From b4c7f0b2cb1d717d153f7e460a037058351a59d3 Mon Sep 17 00:00:00 2001 From: "Anash P. Oommen" Date: Thu, 12 Nov 2020 12:37:40 -0500 Subject: [PATCH] Changes for version 6.0.0. (#247) --- ChangeLog | 64 + Google.Ads.GoogleAds.sln | 6 +- README.md | 110 +- buildscript/build.sh | 2 +- examples/AccountManagement/CreateCustomer.cs | 10 +- .../AccountManagement/GetAccountHierarchy.cs | 20 +- .../GetAccountInformation.cs | 10 +- .../AccountManagement/GetChangeDetails.cs | 201 + ...tAccountChanges.cs => GetChangeSummary.cs} | 49 +- .../AccountManagement/LinkManagerToClient.cs | 18 +- .../ListAccessibleCustomers.cs | 8 +- .../RejectMerchantCenterLink.cs | 12 +- .../AccountManagement/UpdateUserAccess.cs | 179 + .../AdvancedOperations/AddAdCustomizer.cs | 30 +- .../AddAdGroupBidModifier.cs | 14 +- examples/AdvancedOperations/AddAppCampaign.cs | 42 +- .../AdvancedOperations/AddDisplayUploadAd.cs | 22 +- .../AdvancedOperations/AddDynamicPageFeed.cs | 34 +- .../AdvancedOperations/AddDynamicSearchAds.cs | 40 +- .../AddExpandedTextAdWithUpgradedUrls.cs | 14 +- examples/AdvancedOperations/AddGmailAd.cs | 22 +- .../AdvancedOperations/AddLocalCampaign.cs | 447 + .../AdvancedOperations/AddSmartDisplayAd.cs | 38 +- .../CreateAndAttachSharedKeywordSet.cs | 20 +- .../FindAndRemoveCriteriaFromSharedSet.cs | 14 +- .../GetAdGroupBidModifiers.cs | 10 +- .../UsePortfolioBiddingStrategy.cs | 24 +- .../AuthenticateInDesktopApplication.csproj} | 2 +- .../Program.cs | 2 +- .../AuthenticateInWebApplication.csproj | 46 +- .../Default.aspx.cs | 4 +- .../AuthenticateInWebApplication/Web.config | 4 +- .../packages.config | 28 +- examples/BasicOperations/AddAdGroups.cs | 12 +- examples/BasicOperations/AddCampaigns.cs | 22 +- .../BasicOperations/AddExpandedTextAds.cs | 14 +- examples/BasicOperations/AddKeywords.cs | 16 +- .../BasicOperations/AddResponsiveSearchAd.cs | 16 +- examples/BasicOperations/GetAdGroups.cs | 10 +- .../BasicOperations/GetArtifactMetadata.cs | 10 +- examples/BasicOperations/GetCampaigns.cs | 10 +- .../BasicOperations/GetExpandedTextAds.cs | 12 +- examples/BasicOperations/GetKeywords.cs | 8 +- .../BasicOperations/GetResponsiveSearchAds.cs | 12 +- examples/BasicOperations/PauseAd.cs | 12 +- examples/BasicOperations/RemoveAd.cs | 8 +- examples/BasicOperations/RemoveAdGroup.cs | 8 +- examples/BasicOperations/RemoveCampaign.cs | 8 +- examples/BasicOperations/RemoveKeyword.cs | 8 +- examples/BasicOperations/UpdateAdGroup.cs | 12 +- examples/BasicOperations/UpdateCampaign.cs | 14 +- .../BasicOperations/UpdateExpandedTextAd.cs | 12 +- examples/BasicOperations/UpdateKeyword.cs | 12 +- examples/Billing/AddAccountBudgetProposal.cs | 14 +- examples/Billing/AddBillingSetup.cs | 17 +- examples/Billing/GetAccountBudgetProposals.cs | 10 +- examples/Billing/GetAccountBudgets.cs | 12 +- examples/Billing/GetBillingSetup.cs | 48 +- examples/Billing/RemoveBillingSetup.cs | 8 +- .../AddCampaignBidModifier.cs | 14 +- .../CampaignManagement/AddCampaignDraft.cs | 16 +- .../CampaignManagement/AddCampaignLabels.cs | 10 +- .../AddCompleteCampaignsUsingBatchJob.cs | 30 +- .../CreateCampaignExperiment.cs | 14 +- .../GetAllDisapprovedAds.cs | 14 +- .../CampaignManagement/GetCampaignsByLabel.cs | 8 +- .../GraduateCampaignExperiment.cs | 14 +- .../CampaignManagement/SetAdParameters.cs | 10 +- .../UpdateCampaignCriterionBidModifier.cs | 10 +- examples/CampaignManagement/ValidateTextAd.cs | 18 +- .../HandleExpandedTextAdPolicyViolations.cs | 14 +- .../HandleKeywordPolicyViolations.cs | 16 +- .../ErrorHandling/HandlePartialFailure.cs | 10 +- .../ErrorHandling/HandleRateExceededError.cs | 18 +- .../AddAffiliateLocationExtensions.cs | 42 +- examples/Extensions/AddGeoTarget.cs | 10 +- .../AddGoogleMyBusinessLocationExtensions.cs | 38 +- examples/Extensions/AddHotelCallout.cs | 20 +- examples/Extensions/AddLeadFormExtension.cs | 234 + examples/Extensions/AddPrices.cs | 26 +- examples/Extensions/AddSitelinks.cs | 24 +- examples/Extensions/AddSitelinksUsingFeeds.cs | 32 +- ...eEntireSitelinkCampaignExtensionSetting.cs | 234 + examples/Extensions/UpdateSitelink.cs | 12 +- .../UpdateSitelinkCampaignExtensionSetting.cs | 12 +- examples/Feeds/RemoveFeedItems.cs | 8 +- .../RemoveFlightsFeedItemAttributeValue.cs | 21 +- ...dateFlightsFeedItemStringAttributeValue.cs | 21 +- examples/Google.Ads.GoogleAds.Examples.csproj | 2 +- examples/HotelAds/AddHotelAd.cs | 34 +- .../HotelAds/AddHotelAdGroupBidModifiers.cs | 14 +- examples/HotelAds/AddHotelListingGroupTree.cs | 376 + .../CreateCompleteCampaignAdWordsApiOnly.cs | 2 +- .../CreateCompleteCampaignBothApisPhase1.cs | 12 +- .../CreateCompleteCampaignBothApisPhase2.cs | 26 +- .../CreateCompleteCampaignBothApisPhase3.cs | 38 +- .../CreateCompleteCampaignBothApisPhase4.cs | 44 +- .../CreateCompleteCampaignGoogleAdsApiOnly.cs | 52 +- examples/Migration/Migration.csproj | 2 +- examples/Misc/GetAllImageAssets.cs | 12 +- examples/Misc/GetAllVideosAndImages.cs | 10 +- examples/Misc/UploadImage.cs | 12 +- examples/Misc/UploadImageAsset.cs | 16 +- examples/Misc/UploadMediaBundle.cs | 12 +- examples/Planning/AddKeywordPlan.cs | 24 +- examples/Planning/ForecastReach.cs | 27 +- examples/Planning/GenerateForecastMetrics.cs | 8 +- examples/Planning/GenerateKeywordIdeas.cs | 12 +- .../GetAdGroupCriterionCpcBidSimulations.cs | 12 +- ...CampaignCriterionBidModifierSimulations.cs | 12 +- examples/Program.cs | 2 +- .../Recommendations/ApplyRecommendation.cs | 8 +- .../Recommendations/DismissRecommendation.cs | 12 +- .../GetTextAdRecommendations.cs | 12 +- .../Remarketing/AddCombinedRuleUserList.cs | 22 +- examples/Remarketing/AddConversionAction.cs | 16 +- .../Remarketing/AddConversionBasedUserList.cs | 14 +- .../Remarketing/AddCustomerMatchUserList.cs | 20 +- .../Remarketing/AddExpressionRuleUserList.cs | 20 +- examples/Remarketing/AddFlightsFeed.cs | 22 +- examples/Remarketing/AddLogicalUserList.cs | 14 +- ...erchantCenterDynamicRemarketingCampaign.cs | 30 +- examples/Remarketing/AddRealEstateFeed.cs | 24 +- examples/Remarketing/AddRemarketingAction.cs | 14 +- examples/Remarketing/AddUnionUserList.cs | 14 +- .../Remarketing/SetupAdvancedRemarketing.cs | 206 + examples/Remarketing/SetupRemarketing.cs | 455 + .../UpdateAudienceTargetRestriction.cs | 204 + examples/Remarketing/UploadCallConversion.cs | 12 +- .../Remarketing/UploadConversionAdjustment.cs | 10 +- .../Remarketing/UploadOfflineConversion.cs | 8 +- .../UploadStoreSalesTransactions.cs | 37 +- examples/Reporting/GetHotelAdsPerformance.cs | 8 +- examples/Reporting/GetKeywordStats.cs | 10 +- examples/Reporting/ParallelReportDownload.cs | 48 +- examples/ShoppingAds/AddListingScope.cs | 16 +- examples/ShoppingAds/AddShoppingProductAd.cs | 40 +- .../AddShoppingProductListingGroupTree.cs | 22 +- examples/ShoppingAds/AddShoppingSmartAd.cs | 42 +- .../ShoppingAds/ApproveMerchantCenterLink.cs | 12 +- .../GetProductBiddingCategoryConstant.cs | 10 +- .../Targeting/AddCampaignTargetingCriteria.cs | 16 +- .../Targeting/AddCustomerNegativeCriteria.cs | 14 +- .../AddDemographicTargetingCriteria.cs | 16 +- .../Targeting/GetCampaignTargetingCriteria.cs | 12 +- .../Targeting/GetGeoTargetConstantsByNames.cs | 8 +- .../SearchForLanguageAndCarrierConstants.cs | 12 +- src/Config/ConfigBase.cs | 46 +- src/Config/GoogleAdsConfig.cs | 47 +- src/Google.Ads.GoogleAds.csproj | 22 +- src/Lib/EnvironmentVariableNames.cs | 84 + src/Lib/MetadataKeyNames.cs | 22 + src/Logging/LogEntry.cs | 311 +- src/Util/Examples/ExampleRunner.cs | 2 +- src/Util/FieldMasks.cs | 86 + .../KeywordPlanKeywordResourceNames.g.cs | 283 - src/V2/Resources/MutateJobResourceNames.g.cs | 249 - src/V2/ServiceHelperMethods.cs | 36 - .../Services/KeywordPlanKeywordServiceGrpc.cs | 230 - ...anNegativeKeywordServiceResourceNames.g.cs | 33 - src/V2/Services/KeywordPlanServiceGrpc.cs | 362 - src/V2/Services/MutateJobServiceGrpc.cs | 448 - src/V2/Types/Asset.cs | 628 -- src/V2/Types/AssetTypes.cs | 1231 --- src/V2/Types/CampaignBudget.cs | 1041 -- src/V2/Types/ChangeStatus.cs | 865 -- src/V2/Types/ConversionAction.cs | 1463 --- src/V2/Types/CustomerClient.cs | 677 -- src/V2/Types/DomainCategory.cs | 635 -- .../Types/DynamicSearchAdsSearchTermView.cs | 441 - src/V2/Types/Invoice.cs | 1648 ---- src/V2/Types/KeywordPlanCommon.cs | 286 - src/V2/Types/KeywordPlanKeyword.cs | 476 - src/V2/Types/KeywordPlanNegativeKeyword.cs | 428 - src/V2/Types/Metrics.cs | 5720 ----------- src/V2/Types/MutateJob.cs | 872 -- src/V2/Types/PaymentsAccount.cs | 483 - src/V2/Types/Segments.cs | 4088 -------- src/V2/Types/Simulation.cs | 2846 ------ src/V2/Types/TargetingSetting.cs | 460 - src/V3/ResourceNames.cs | 151 +- .../AccountBudgetProposalResourceNames.g.cs | 2 +- .../Resources/AccountBudgetResourceNames.g.cs | 2 +- .../AdGroupAdAssetViewResourceNames.g.cs | 2 +- .../AdGroupAdLabelResourceNames.g.cs | 2 +- src/V3/Resources/AdGroupAdResourceNames.g.cs | 2 +- .../AdGroupAudienceViewResourceNames.g.cs | 2 +- .../AdGroupBidModifierResourceNames.g.cs | 2 +- .../AdGroupCriterionLabelResourceNames.g.cs | 2 +- .../AdGroupCriterionResourceNames.g.cs | 2 +- ...GroupCriterionSimulationResourceNames.g.cs | 2 +- .../AdGroupExtensionSettingResourceNames.g.cs | 2 +- .../Resources/AdGroupFeedResourceNames.g.cs | 2 +- .../Resources/AdGroupLabelResourceNames.g.cs | 2 +- src/V3/Resources/AdGroupResourceNames.g.cs | 2 +- .../AdGroupSimulationResourceNames.g.cs | 2 +- .../Resources/AdParameterResourceNames.g.cs | 2 +- src/V3/Resources/AdResourceNames.g.cs | 2 +- .../AdScheduleViewResourceNames.g.cs | 2 +- .../Resources/AgeRangeViewResourceNames.g.cs | 2 +- src/V3/Resources/AssetResourceNames.g.cs | 2 +- .../BiddingStrategyResourceNames.g.cs | 2 +- .../Resources/BillingSetupResourceNames.g.cs | 2 +- .../CampaignAudienceViewResourceNames.g.cs | 2 +- .../CampaignBidModifierResourceNames.g.cs | 2 +- .../CampaignBudgetResourceNames.g.cs | 2 +- .../CampaignCriterionResourceNames.g.cs | 2 +- ...paignCriterionSimulationResourceNames.g.cs | 2 +- .../Resources/CampaignDraftResourceNames.g.cs | 2 +- .../CampaignExperimentResourceNames.g.cs | 2 +- ...CampaignExtensionSettingResourceNames.g.cs | 2 +- .../Resources/CampaignFeedResourceNames.g.cs | 2 +- .../Resources/CampaignLabelResourceNames.g.cs | 2 +- src/V3/Resources/CampaignResourceNames.g.cs | 2 +- .../CampaignSharedSetResourceNames.g.cs | 2 +- .../CarrierConstantResourceNames.g.cs | 2 +- .../Resources/ChangeStatusResourceNames.g.cs | 2 +- src/V3/Resources/ClickViewResourceNames.g.cs | 2 +- .../ConversionActionResourceNames.g.cs | 2 +- .../CurrencyConstantResourceNames.g.cs | 2 +- .../CustomInterestResourceNames.g.cs | 2 +- .../CustomerClientLinkResourceNames.g.cs | 2 +- .../CustomerClientResourceNames.g.cs | 2 +- ...CustomerExtensionSettingResourceNames.g.cs | 2 +- .../Resources/CustomerFeedResourceNames.g.cs | 2 +- .../Resources/CustomerLabelResourceNames.g.cs | 2 +- .../CustomerManagerLinkResourceNames.g.cs | 2 +- ...ustomerNegativeCriterionResourceNames.g.cs | 2 +- src/V3/Resources/CustomerResourceNames.g.cs | 2 +- .../DetailPlacementViewResourceNames.g.cs | 2 +- .../DisplayKeywordViewResourceNames.g.cs | 2 +- .../Resources/DistanceViewResourceNames.g.cs | 2 +- .../DomainCategoryResourceNames.g.cs | 2 +- ...cSearchAdsSearchTermViewResourceNames.g.cs | 2 +- .../ExpandedLandingPageViewResourceNames.g.cs | 2 +- .../ExtensionFeedItemResourceNames.g.cs | 2 +- src/V3/Resources/FeedItemResourceNames.g.cs | 2 +- .../FeedItemTargetResourceNames.g.cs | 2 +- .../Resources/FeedMappingResourceNames.g.cs | 2 +- .../FeedPlaceholderViewResourceNames.g.cs | 2 +- src/V3/Resources/FeedResourceNames.g.cs | 2 +- src/V3/Resources/GenderViewResourceNames.g.cs | 2 +- .../GeoTargetConstantResourceNames.g.cs | 2 +- .../GeographicViewResourceNames.g.cs | 2 +- .../GoogleAdsFieldResourceNames.g.cs | 2 +- .../GroupPlacementViewResourceNames.g.cs | 2 +- .../HotelGroupViewResourceNames.g.cs | 2 +- .../HotelPerformanceViewResourceNames.g.cs | 2 +- src/V3/Resources/InvoiceResourceNames.g.cs | 2 +- .../KeywordPlanAdGroupResourceNames.g.cs | 2 +- .../KeywordPlanCampaignResourceNames.g.cs | 2 +- .../KeywordPlanKeywordResourceNames.g.cs | 2 +- ...ywordPlanNegativeKeywordResourceNames.g.cs | 2 +- .../Resources/KeywordPlanResourceNames.g.cs | 2 +- .../Resources/KeywordViewResourceNames.g.cs | 2 +- src/V3/Resources/LabelResourceNames.g.cs | 2 +- .../LandingPageViewResourceNames.g.cs | 2 +- .../LanguageConstantResourceNames.g.cs | 2 +- .../Resources/LocationViewResourceNames.g.cs | 2 +- .../ManagedPlacementViewResourceNames.g.cs | 2 +- src/V3/Resources/MediaFileResourceNames.g.cs | 2 +- .../MerchantCenterLinkResourceNames.g.cs | 2 +- ...obileAppCategoryConstantResourceNames.g.cs | 2 +- .../MobileDeviceConstantResourceNames.g.cs | 2 +- src/V3/Resources/MutateJobResourceNames.g.cs | 2 +- .../OfflineUserDataJobResourceNames.g.cs | 2 +- ...ingSystemVersionConstantResourceNames.g.cs | 2 +- ...aidOrganicSearchTermViewResourceNames.g.cs | 2 +- .../ParentalStatusViewResourceNames.g.cs | 2 +- .../PaymentsAccountResourceNames.g.cs | 2 +- ...tBiddingCategoryConstantResourceNames.g.cs | 2 +- .../ProductGroupViewResourceNames.g.cs | 2 +- .../RecommendationResourceNames.g.cs | 2 +- .../RemarketingActionResourceNames.g.cs | 2 +- .../SearchTermViewResourceNames.g.cs | 2 +- .../SharedCriterionResourceNames.g.cs | 2 +- src/V3/Resources/SharedSetResourceNames.g.cs | 2 +- .../ShoppingPerformanceViewResourceNames.g.cs | 2 +- .../Resources/TopicConstantResourceNames.g.cs | 2 +- src/V3/Resources/TopicViewResourceNames.g.cs | 2 +- .../Resources/UserInterestResourceNames.g.cs | 2 +- src/V3/Resources/UserListResourceNames.g.cs | 2 +- .../UserLocationViewResourceNames.g.cs | 2 +- src/V3/Resources/VideoResourceNames.g.cs | 2 +- src/V3/ServiceExtensions.cs | 218 +- src/V3/Services.V3.cs | 218 +- src/V3/Services/KeywordPlanAdGroupService.cs | 53 +- ...eywordPlanAdGroupServiceResourceNames.g.cs | 12 + src/V3/Services/KeywordPlanCampaignService.cs | 53 +- ...ywordPlanCampaignServiceResourceNames.g.cs | 13 + src/V3/Services/KeywordPlanKeywordService.cs | 53 +- ...eywordPlanKeywordServiceResourceNames.g.cs | 12 + .../KeywordPlanNegativeKeywordService.cs | 57 +- ...anNegativeKeywordServiceResourceNames.g.cs | 13 + src/V3/Services/KeywordPlanService.cs | 142 +- src/V3/Services/KeywordPlanServiceClient.g.cs | 81 + .../KeywordPlanServiceResourceNames.g.cs | 36 + src/V3/Services/ReachPlanService.cs | 5 +- src/V3/Types/AccessRole.cs | 21 +- src/V3/Types/AdGroupAdAssetView.cs | 1 + src/V3/Types/AdGroupCriterionSimulation.cs | 5 +- src/V3/Types/AdTypeInfos.cs | 3 +- src/V3/Types/Bidding.cs | 35 +- src/V3/Types/BiddingError.cs | 6 +- src/V3/Types/Campaign.cs | 939 +- src/V3/Types/CampaignBudget.cs | 2 +- src/V3/Types/Criteria.cs | 3 +- src/V3/Types/CurrencyConstant.cs | 2 +- .../Types/DynamicSearchAdsSearchTermView.cs | 2 +- src/V3/Types/Invoice.cs | 15 +- src/V3/Types/OfflineUserDataJobError.cs | 2 +- src/V3/Types/PositiveGeoTargetType.cs | 2 + src/V3/Types/Recommendation.cs | 1988 ++-- src/V4/ResourceNames.cs | 116 +- .../AccountBudgetProposalResourceNames.g.cs | 2 +- .../Resources/AccountBudgetResourceNames.g.cs | 2 +- .../Resources/AccountLinkResourceNames.g.cs | 2 +- .../AdGroupAdAssetViewResourceNames.g.cs | 2 +- .../AdGroupAdLabelResourceNames.g.cs | 2 +- src/V4/Resources/AdGroupAdResourceNames.g.cs | 2 +- .../AdGroupAudienceViewResourceNames.g.cs | 2 +- .../AdGroupBidModifierResourceNames.g.cs | 2 +- .../AdGroupCriterionLabelResourceNames.g.cs | 2 +- .../AdGroupCriterionResourceNames.g.cs | 2 +- ...GroupCriterionSimulationResourceNames.g.cs | 2 +- .../AdGroupExtensionSettingResourceNames.g.cs | 2 +- .../Resources/AdGroupFeedResourceNames.g.cs | 2 +- .../Resources/AdGroupLabelResourceNames.g.cs | 2 +- src/V4/Resources/AdGroupResourceNames.g.cs | 2 +- .../AdGroupSimulationResourceNames.g.cs | 2 +- .../Resources/AdParameterResourceNames.g.cs | 2 +- src/V4/Resources/AdResourceNames.g.cs | 2 +- .../AdScheduleViewResourceNames.g.cs | 2 +- .../Resources/AgeRangeViewResourceNames.g.cs | 2 +- src/V4/Resources/AssetResourceNames.g.cs | 2 +- src/V4/Resources/BatchJobResourceNames.g.cs | 2 +- .../BiddingStrategyResourceNames.g.cs | 2 +- .../Resources/BillingSetupResourceNames.g.cs | 2 +- .../CampaignAudienceViewResourceNames.g.cs | 2 +- .../CampaignBidModifierResourceNames.g.cs | 2 +- .../CampaignBudgetResourceNames.g.cs | 2 +- .../CampaignCriterionResourceNames.g.cs | 2 +- ...paignCriterionSimulationResourceNames.g.cs | 2 +- .../Resources/CampaignDraftResourceNames.g.cs | 2 +- .../CampaignExperimentResourceNames.g.cs | 2 +- ...CampaignExtensionSettingResourceNames.g.cs | 2 +- .../Resources/CampaignFeedResourceNames.g.cs | 2 +- .../Resources/CampaignLabelResourceNames.g.cs | 2 +- src/V4/Resources/CampaignResourceNames.g.cs | 2 +- .../CampaignSharedSetResourceNames.g.cs | 2 +- .../CarrierConstantResourceNames.g.cs | 2 +- .../Resources/ChangeStatusResourceNames.g.cs | 2 +- src/V4/Resources/ClickViewResourceNames.g.cs | 2 +- .../ConversionActionResourceNames.g.cs | 2 +- .../CurrencyConstantResourceNames.g.cs | 2 +- .../CustomInterestResourceNames.g.cs | 2 +- .../CustomerClientLinkResourceNames.g.cs | 2 +- .../CustomerClientResourceNames.g.cs | 2 +- ...CustomerExtensionSettingResourceNames.g.cs | 2 +- .../Resources/CustomerFeedResourceNames.g.cs | 2 +- .../Resources/CustomerLabelResourceNames.g.cs | 2 +- .../CustomerManagerLinkResourceNames.g.cs | 2 +- ...ustomerNegativeCriterionResourceNames.g.cs | 2 +- src/V4/Resources/CustomerResourceNames.g.cs | 2 +- .../DetailPlacementViewResourceNames.g.cs | 2 +- .../DisplayKeywordViewResourceNames.g.cs | 2 +- .../Resources/DistanceViewResourceNames.g.cs | 2 +- .../DomainCategoryResourceNames.g.cs | 2 +- ...cSearchAdsSearchTermViewResourceNames.g.cs | 2 +- .../ExpandedLandingPageViewResourceNames.g.cs | 2 +- .../ExtensionFeedItemResourceNames.g.cs | 2 +- src/V4/Resources/FeedItemResourceNames.g.cs | 2 +- .../FeedItemTargetResourceNames.g.cs | 2 +- .../Resources/FeedMappingResourceNames.g.cs | 2 +- .../FeedPlaceholderViewResourceNames.g.cs | 2 +- src/V4/Resources/FeedResourceNames.g.cs | 2 +- src/V4/Resources/GenderViewResourceNames.g.cs | 2 +- .../GeoTargetConstantResourceNames.g.cs | 2 +- .../GeographicViewResourceNames.g.cs | 2 +- .../GoogleAdsFieldResourceNames.g.cs | 2 +- .../GroupPlacementViewResourceNames.g.cs | 2 +- .../HotelGroupViewResourceNames.g.cs | 2 +- .../HotelPerformanceViewResourceNames.g.cs | 2 +- .../IncomeRangeViewResourceNames.g.cs | 2 +- src/V4/Resources/InvoiceResourceNames.g.cs | 2 +- ...eywordPlanAdGroupKeywordResourceNames.g.cs | 2 +- .../KeywordPlanAdGroupResourceNames.g.cs | 2 +- ...ywordPlanCampaignKeywordResourceNames.g.cs | 2 +- .../KeywordPlanCampaignResourceNames.g.cs | 2 +- .../Resources/KeywordPlanResourceNames.g.cs | 2 +- .../Resources/KeywordViewResourceNames.g.cs | 2 +- src/V4/Resources/LabelResourceNames.g.cs | 2 +- .../LandingPageViewResourceNames.g.cs | 2 +- .../LanguageConstantResourceNames.g.cs | 2 +- .../Resources/LocationViewResourceNames.g.cs | 2 +- .../ManagedPlacementViewResourceNames.g.cs | 2 +- src/V4/Resources/MediaFileResourceNames.g.cs | 2 +- .../MerchantCenterLinkResourceNames.g.cs | 2 +- ...obileAppCategoryConstantResourceNames.g.cs | 2 +- .../MobileDeviceConstantResourceNames.g.cs | 2 +- .../OfflineUserDataJobResourceNames.g.cs | 2 +- ...ingSystemVersionConstantResourceNames.g.cs | 2 +- ...aidOrganicSearchTermViewResourceNames.g.cs | 2 +- .../ParentalStatusViewResourceNames.g.cs | 2 +- .../PaymentsAccountResourceNames.g.cs | 2 +- ...tBiddingCategoryConstantResourceNames.g.cs | 2 +- .../ProductGroupViewResourceNames.g.cs | 2 +- .../RecommendationResourceNames.g.cs | 2 +- .../RemarketingActionResourceNames.g.cs | 2 +- .../SearchTermViewResourceNames.g.cs | 2 +- .../SharedCriterionResourceNames.g.cs | 2 +- src/V4/Resources/SharedSetResourceNames.g.cs | 2 +- .../ShoppingPerformanceViewResourceNames.g.cs | 2 +- ...irdPartyAppAnalyticsLinkResourceNames.g.cs | 2 +- .../Resources/TopicConstantResourceNames.g.cs | 2 +- src/V4/Resources/TopicViewResourceNames.g.cs | 2 +- .../Resources/UserInterestResourceNames.g.cs | 2 +- src/V4/Resources/UserListResourceNames.g.cs | 2 +- .../UserLocationViewResourceNames.g.cs | 2 +- src/V4/Resources/VideoResourceNames.g.cs | 2 +- src/V4/ServiceExtensions.cs | 224 +- src/V4/Services.V4.cs | 224 +- .../KeywordPlanAdGroupKeywordService.cs | 58 +- ...lanAdGroupKeywordServiceResourceNames.g.cs | 13 + src/V4/Services/KeywordPlanAdGroupService.cs | 53 +- ...eywordPlanAdGroupServiceResourceNames.g.cs | 12 + .../KeywordPlanCampaignKeywordService.cs | 57 +- ...anCampaignKeywordServiceResourceNames.g.cs | 13 + src/V4/Services/KeywordPlanCampaignService.cs | 53 +- ...ywordPlanCampaignServiceResourceNames.g.cs | 13 + src/V4/Services/KeywordPlanService.cs | 181 +- src/V4/Services/KeywordPlanServiceClient.g.cs | 135 + .../KeywordPlanServiceResourceNames.g.cs | 48 + src/V4/Services/ReachPlanService.cs | 5 +- src/V4/Types/AccessRole.cs | 21 +- src/V4/Types/AdGroupAdAssetView.cs | 1 + src/V4/Types/AdGroupCriterionSimulation.cs | 5 +- src/V4/Types/AdTypeInfos.cs | 3 +- src/V4/Types/Bidding.cs | 35 +- src/V4/Types/BiddingError.cs | 6 +- src/V4/Types/Campaign.cs | 1391 +-- src/V4/Types/CampaignBudget.cs | 2 +- src/V4/Types/ConversionAction.cs | 156 +- src/V4/Types/Criteria.cs | 3 +- src/V4/Types/CurrencyConstant.cs | 2 +- src/V4/Types/Customer.cs | 3 +- .../Types/DynamicSearchAdsSearchTermView.cs | 2 +- src/V4/Types/Invoice.cs | 15 +- src/V4/Types/OfflineUserDataJobError.cs | 4 +- src/V4/Types/PositiveGeoTargetType.cs | 2 + src/V4/Types/Recommendation.cs | 552 +- src/V5/ResourceNames.cs | 116 +- .../AccountBudgetProposalResourceNames.g.cs | 2 +- .../Resources/AccountBudgetResourceNames.g.cs | 2 +- .../Resources/AccountLinkResourceNames.g.cs | 2 +- .../AdGroupAdAssetViewResourceNames.g.cs | 2 +- .../AdGroupAdLabelResourceNames.g.cs | 2 +- src/V5/Resources/AdGroupAdResourceNames.g.cs | 2 +- .../AdGroupAudienceViewResourceNames.g.cs | 2 +- .../AdGroupBidModifierResourceNames.g.cs | 2 +- .../AdGroupCriterionLabelResourceNames.g.cs | 2 +- .../AdGroupCriterionResourceNames.g.cs | 2 +- ...GroupCriterionSimulationResourceNames.g.cs | 2 +- .../AdGroupExtensionSettingResourceNames.g.cs | 2 +- .../Resources/AdGroupFeedResourceNames.g.cs | 2 +- .../Resources/AdGroupLabelResourceNames.g.cs | 2 +- src/V5/Resources/AdGroupResourceNames.g.cs | 2 +- .../AdGroupSimulationResourceNames.g.cs | 2 +- .../Resources/AdParameterResourceNames.g.cs | 2 +- src/V5/Resources/AdResourceNames.g.cs | 2 +- .../AdScheduleViewResourceNames.g.cs | 2 +- .../Resources/AgeRangeViewResourceNames.g.cs | 2 +- src/V5/Resources/AssetResourceNames.g.cs | 2 +- src/V5/Resources/BatchJobResourceNames.g.cs | 2 +- .../BiddingStrategyResourceNames.g.cs | 2 +- .../Resources/BillingSetupResourceNames.g.cs | 2 +- .../Resources/CampaignAssetResourceNames.g.cs | 2 +- .../CampaignAudienceViewResourceNames.g.cs | 2 +- .../CampaignBidModifierResourceNames.g.cs | 2 +- .../CampaignBudgetResourceNames.g.cs | 2 +- .../CampaignCriterionResourceNames.g.cs | 2 +- ...paignCriterionSimulationResourceNames.g.cs | 2 +- .../Resources/CampaignDraftResourceNames.g.cs | 2 +- .../CampaignExperimentResourceNames.g.cs | 2 +- ...CampaignExtensionSettingResourceNames.g.cs | 2 +- .../Resources/CampaignFeedResourceNames.g.cs | 2 +- .../Resources/CampaignLabelResourceNames.g.cs | 2 +- src/V5/Resources/CampaignResourceNames.g.cs | 2 +- .../CampaignSharedSetResourceNames.g.cs | 2 +- .../CarrierConstantResourceNames.g.cs | 2 +- .../Resources/ChangeStatusResourceNames.g.cs | 2 +- src/V5/Resources/ClickViewResourceNames.g.cs | 2 +- .../ConversionActionResourceNames.g.cs | 2 +- .../CurrencyConstantResourceNames.g.cs | 2 +- .../CustomInterestResourceNames.g.cs | 2 +- .../CustomerClientLinkResourceNames.g.cs | 2 +- .../CustomerClientResourceNames.g.cs | 2 +- ...CustomerExtensionSettingResourceNames.g.cs | 2 +- .../Resources/CustomerFeedResourceNames.g.cs | 2 +- .../Resources/CustomerLabelResourceNames.g.cs | 2 +- .../CustomerManagerLinkResourceNames.g.cs | 2 +- ...ustomerNegativeCriterionResourceNames.g.cs | 2 +- src/V5/Resources/CustomerResourceNames.g.cs | 2 +- .../DetailPlacementViewResourceNames.g.cs | 2 +- .../DisplayKeywordViewResourceNames.g.cs | 2 +- .../Resources/DistanceViewResourceNames.g.cs | 2 +- .../DomainCategoryResourceNames.g.cs | 2 +- ...cSearchAdsSearchTermViewResourceNames.g.cs | 2 +- .../ExpandedLandingPageViewResourceNames.g.cs | 2 +- .../ExtensionFeedItemResourceNames.g.cs | 2 +- src/V5/Resources/FeedItemResourceNames.g.cs | 2 +- .../FeedItemTargetResourceNames.g.cs | 2 +- .../Resources/FeedMappingResourceNames.g.cs | 2 +- .../FeedPlaceholderViewResourceNames.g.cs | 2 +- src/V5/Resources/FeedResourceNames.g.cs | 2 +- src/V5/Resources/GenderViewResourceNames.g.cs | 2 +- .../GeoTargetConstantResourceNames.g.cs | 2 +- .../GeographicViewResourceNames.g.cs | 2 +- .../GoogleAdsFieldResourceNames.g.cs | 2 +- .../GroupPlacementViewResourceNames.g.cs | 2 +- .../HotelGroupViewResourceNames.g.cs | 2 +- .../HotelPerformanceViewResourceNames.g.cs | 2 +- .../IncomeRangeViewResourceNames.g.cs | 2 +- src/V5/Resources/InvoiceResourceNames.g.cs | 2 +- ...eywordPlanAdGroupKeywordResourceNames.g.cs | 2 +- .../KeywordPlanAdGroupResourceNames.g.cs | 2 +- ...ywordPlanCampaignKeywordResourceNames.g.cs | 2 +- .../KeywordPlanCampaignResourceNames.g.cs | 2 +- .../Resources/KeywordPlanResourceNames.g.cs | 2 +- .../Resources/KeywordViewResourceNames.g.cs | 2 +- src/V5/Resources/LabelResourceNames.g.cs | 2 +- .../LandingPageViewResourceNames.g.cs | 2 +- .../LanguageConstantResourceNames.g.cs | 2 +- .../Resources/LocationViewResourceNames.g.cs | 2 +- .../ManagedPlacementViewResourceNames.g.cs | 2 +- src/V5/Resources/MediaFileResourceNames.g.cs | 2 +- .../MerchantCenterLinkResourceNames.g.cs | 2 +- ...obileAppCategoryConstantResourceNames.g.cs | 2 +- .../MobileDeviceConstantResourceNames.g.cs | 2 +- .../OfflineUserDataJobResourceNames.g.cs | 2 +- ...ingSystemVersionConstantResourceNames.g.cs | 2 +- ...aidOrganicSearchTermViewResourceNames.g.cs | 2 +- .../ParentalStatusViewResourceNames.g.cs | 2 +- .../PaymentsAccountResourceNames.g.cs | 2 +- ...tBiddingCategoryConstantResourceNames.g.cs | 2 +- .../ProductGroupViewResourceNames.g.cs | 2 +- .../RecommendationResourceNames.g.cs | 2 +- .../RemarketingActionResourceNames.g.cs | 2 +- .../SearchTermViewResourceNames.g.cs | 2 +- .../SharedCriterionResourceNames.g.cs | 2 +- src/V5/Resources/SharedSetResourceNames.g.cs | 2 +- .../ShoppingPerformanceViewResourceNames.g.cs | 2 +- ...irdPartyAppAnalyticsLinkResourceNames.g.cs | 2 +- .../Resources/TopicConstantResourceNames.g.cs | 2 +- src/V5/Resources/TopicViewResourceNames.g.cs | 2 +- .../Resources/UserInterestResourceNames.g.cs | 2 +- src/V5/Resources/UserListResourceNames.g.cs | 2 +- .../UserLocationViewResourceNames.g.cs | 2 +- src/V5/Resources/VideoResourceNames.g.cs | 2 +- src/V5/Services.V5.cs | 226 +- .../KeywordPlanAdGroupKeywordService.cs | 58 +- ...lanAdGroupKeywordServiceResourceNames.g.cs | 13 + src/V5/Services/KeywordPlanAdGroupService.cs | 53 +- ...eywordPlanAdGroupServiceResourceNames.g.cs | 12 + .../KeywordPlanCampaignKeywordService.cs | 57 +- ...anCampaignKeywordServiceResourceNames.g.cs | 13 + src/V5/Services/KeywordPlanCampaignService.cs | 53 +- ...ywordPlanCampaignServiceResourceNames.g.cs | 13 + src/V5/Services/KeywordPlanService.cs | 221 +- src/V5/Services/KeywordPlanServiceClient.g.cs | 192 + .../KeywordPlanServiceResourceNames.g.cs | 60 + src/V5/Services/ReachPlanService.cs | 5 +- src/V5/Types/AccessRole.cs | 21 +- src/V5/Types/AccountLinkStatus.cs | 4 +- src/V5/Types/AdGroupAdAssetView.cs | 1 + src/V5/Types/AdGroupCriterionSimulation.cs | 5 +- src/V5/Types/AdTypeInfos.cs | 3 +- src/V5/Types/Bidding.cs | 85 +- src/V5/Types/BiddingError.cs | 6 +- src/V5/Types/Campaign.cs | 1132 ++- src/V5/Types/CampaignBudget.cs | 2 +- src/V5/Types/ConversionAction.cs | 180 +- src/V5/Types/Criteria.cs | 3 +- src/V5/Types/CurrencyConstant.cs | 2 +- src/V5/Types/Customer.cs | 3 +- .../Types/DynamicSearchAdsSearchTermView.cs | 2 +- src/V5/Types/Invoice.cs | 15 +- src/V5/Types/OfflineUserDataJobError.cs | 4 +- src/V5/Types/PositiveGeoTargetType.cs | 2 + src/V5/Types/Recommendation.cs | 2204 ++--- src/V6/BatchJobResultExtensions.cs | 62 + src/{V2 => V6}/GoogleAdsException.cs | 6 +- src/{V2 => V6}/GoogleAdsFailureExtensions.cs | 10 +- src/{V2 => V6}/ResourceNames.cs | 175 +- .../AccountBudgetProposalResourceNames.g.cs | 38 +- .../Resources/AccountBudgetResourceNames.g.cs | 30 +- .../Resources/AccountLinkResourceNames.g.cs | 266 + .../AdGroupAdAssetViewResourceNames.g.cs | 135 +- .../AdGroupAdLabelResourceNames.g.cs | 115 +- .../Resources/AdGroupAdResourceNames.g.cs | 97 +- .../AdGroupAudienceViewResourceNames.g.cs | 107 +- .../AdGroupBidModifierResourceNames.g.cs | 107 +- .../AdGroupCriterionLabelResourceNames.g.cs | 124 +- .../AdGroupCriterionResourceNames.g.cs | 105 +- ...GroupCriterionSimulationResourceNames.g.cs | 174 +- .../AdGroupExtensionSettingResourceNames.g.cs | 107 +- .../Resources/AdGroupFeedResourceNames.g.cs | 95 +- .../Resources/AdGroupLabelResourceNames.g.cs | 104 +- .../Resources/AdGroupResourceNames.g.cs | 46 +- .../AdGroupSimulationResourceNames.g.cs | 164 +- .../Resources/AdParameterResourceNames.g.cs | 129 +- src/{V2 => V6}/Resources/AdResourceNames.g.cs | 58 +- .../AdScheduleViewResourceNames.g.cs | 107 +- .../Resources/AgeRangeViewResourceNames.g.cs | 106 +- .../Resources/AssetResourceNames.g.cs | 30 +- src/V6/Resources/BatchJobResourceNames.g.cs | 250 + .../BiddingStrategyResourceNames.g.cs | 38 +- .../Resources/BillingSetupResourceNames.g.cs | 28 +- .../Resources/CampaignAssetResourceNames.g.cs | 332 + .../CampaignAudienceViewResourceNames.g.cs | 115 +- .../CampaignBidModifierResourceNames.g.cs | 107 +- .../CampaignBudgetResourceNames.g.cs | 30 +- .../CampaignCriterionResourceNames.g.cs | 105 +- ...paignCriterionSimulationResourceNames.g.cs | 174 +- .../Resources/CampaignDraftResourceNames.g.cs | 108 +- .../CampaignExperimentResourceNames.g.cs | 31 +- ...CampaignExtensionSettingResourceNames.g.cs | 107 +- .../Resources/CampaignFeedResourceNames.g.cs | 104 +- .../Resources/CampaignLabelResourceNames.g.cs | 104 +- .../Resources/CampaignResourceNames.g.cs | 65 +- .../CampaignSharedSetResourceNames.g.cs | 97 +- .../CarrierConstantResourceNames.g.cs | 73 +- .../Resources/ChangeEventResourceNames.g.cs | 334 + .../Resources/ChangeStatusResourceNames.g.cs | 28 +- .../Resources/ClickViewResourceNames.g.cs | 122 +- .../CombinedAudienceResourceNames.g.cs | 276 + .../ConversionActionResourceNames.g.cs | 38 +- .../CurrencyConstantResourceNames.g.cs | 245 + .../CustomAudienceResourceNames.g.cs | 268 + .../CustomInterestResourceNames.g.cs | 30 +- .../CustomerClientLinkResourceNames.g.cs | 116 +- .../CustomerClientResourceNames.g.cs | 70 +- ...CustomerExtensionSettingResourceNames.g.cs | 83 +- .../Resources/CustomerFeedResourceNames.g.cs | 68 +- .../Resources/CustomerLabelResourceNames.g.cs | 64 +- .../CustomerManagerLinkResourceNames.g.cs | 116 +- ...ustomerNegativeCriterionResourceNames.g.cs | 85 +- .../Resources/CustomerResourceNames.g.cs | 28 +- .../CustomerUserAccessResourceNames.g.cs | 255 + .../DetailPlacementViewResourceNames.g.cs | 120 +- .../DisplayKeywordViewResourceNames.g.cs | 111 +- .../Resources/DistanceViewResourceNames.g.cs | 115 +- .../DomainCategoryResourceNames.g.cs | 125 +- ...cSearchAdsSearchTermViewResourceNames.g.cs | 183 +- .../ExpandedLandingPageViewResourceNames.g.cs | 74 +- .../ExtensionFeedItemResourceNames.g.cs | 72 +- .../Resources/FeedItemResourceNames.g.cs | 85 +- .../FeedItemSetLinkResourceNames.g.cs | 334 + .../Resources/FeedItemSetResourceNames.g.cs | 302 + .../FeedItemTargetResourceNames.g.cs | 146 +- .../Resources/FeedMappingResourceNames.g.cs | 95 +- .../FeedPlaceholderViewResourceNames.g.cs | 74 +- .../Resources/FeedResourceNames.g.cs | 42 +- .../Resources/GenderViewResourceNames.g.cs | 113 +- .../GeoTargetConstantResourceNames.g.cs | 84 +- .../GeographicViewResourceNames.g.cs | 115 +- .../GoogleAdsFieldResourceNames.g.cs | 6 +- .../GroupPlacementViewResourceNames.g.cs | 120 +- .../HotelGroupViewResourceNames.g.cs | 111 +- .../HotelPerformanceViewResourceNames.g.cs | 28 +- .../IncomeRangeViewResourceNames.g.cs | 298 + .../Resources/InvoiceResourceNames.g.cs | 28 +- ...eywordPlanAdGroupKeywordResourceNames.g.cs | 309 + .../KeywordPlanAdGroupResourceNames.g.cs | 31 +- ...wordPlanCampaignKeywordResourceNames.g.cs} | 158 +- .../KeywordPlanCampaignResourceNames.g.cs | 31 +- .../Resources/KeywordPlanResourceNames.g.cs | 34 +- .../Resources/KeywordViewResourceNames.g.cs | 113 +- .../Resources/LabelResourceNames.g.cs | 30 +- .../LandingPageViewResourceNames.g.cs | 91 +- .../LanguageConstantResourceNames.g.cs | 73 +- .../Resources/LocationViewResourceNames.g.cs | 110 +- .../ManagedPlacementViewResourceNames.g.cs | 119 +- .../Resources/MediaFileResourceNames.g.cs | 33 +- .../MerchantCenterLinkResourceNames.g.cs | 74 +- ...obileAppCategoryConstantResourceNames.g.cs | 75 +- .../MobileDeviceConstantResourceNames.g.cs | 75 +- .../OfflineUserDataJobResourceNames.g.cs | 274 + ...ingSystemVersionConstantResourceNames.g.cs | 84 +- ...aidOrganicSearchTermViewResourceNames.g.cs | 125 +- .../ParentalStatusViewResourceNames.g.cs | 111 +- .../PaymentsAccountResourceNames.g.cs | 38 +- ...tBiddingCategoryConstantResourceNames.g.cs | 124 +- .../ProductGroupViewResourceNames.g.cs | 111 +- .../RecommendationResourceNames.g.cs | 28 +- .../RemarketingActionResourceNames.g.cs | 38 +- .../SearchTermViewResourceNames.g.cs | 125 +- .../SharedCriterionResourceNames.g.cs | 107 +- .../Resources/SharedSetResourceNames.g.cs | 33 +- .../ShoppingPerformanceViewResourceNames.g.cs | 28 +- ...irdPartyAppAnalyticsLinkResourceNames.g.cs | 283 + .../Resources/TopicConstantResourceNames.g.cs | 67 +- .../Resources/TopicViewResourceNames.g.cs | 111 +- .../Resources/UserInterestResourceNames.g.cs | 30 +- .../Resources/UserListResourceNames.g.cs | 31 +- .../UserLocationViewResourceNames.g.cs | 125 +- .../Resources/VideoResourceNames.g.cs | 28 +- src/{V2 => V6}/ServiceExtensions.cs | 228 +- src/V6/ServiceHelperMethods.cs | 104 + src/{V2/Services.V2.cs => V6/Services.V6.cs} | 432 +- .../Services/AccountBudgetProposalService.cs | 96 +- .../AccountBudgetProposalServiceClient.g.cs | 4 +- .../AccountBudgetProposalServiceGrpc.cs | 82 +- ...untBudgetProposalServiceResourceNames.g.cs | 4 +- .../Services/AccountBudgetService.cs | 36 +- .../Services/AccountBudgetServiceClient.g.cs | 4 +- .../Services/AccountBudgetServiceGrpc.cs | 60 +- .../AccountBudgetServiceResourceNames.g.cs | 4 +- src/V6/Services/AccountLinkService.cs | 1663 ++++ src/V6/Services/AccountLinkServiceClient.g.cs | 642 ++ src/V6/Services/AccountLinkServiceGrpc.cs | 337 + .../AccountLinkServiceResourceNames.g.cs} | 12 +- .../Services/AdGroupAdAssetViewService.cs | 34 +- .../AdGroupAdAssetViewServiceClient.g.cs | 4 +- .../Services/AdGroupAdAssetViewServiceGrpc.cs | 60 +- ...dGroupAdAssetViewServiceResourceNames.g.cs | 4 +- .../Services/AdGroupAdLabelService.cs | 92 +- .../Services/AdGroupAdLabelServiceClient.g.cs | 4 +- .../Services/AdGroupAdLabelServiceGrpc.cs | 82 +- .../AdGroupAdLabelServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/AdGroupAdService.cs | 261 +- .../Services/AdGroupAdServiceClient.g.cs | 4 +- .../Services/AdGroupAdServiceGrpc.cs | 82 +- .../AdGroupAdServiceResourceNames.g.cs | 4 +- .../Services/AdGroupAudienceViewService.cs | 34 +- .../AdGroupAudienceViewServiceClient.g.cs | 4 +- .../AdGroupAudienceViewServiceGrpc.cs | 60 +- ...GroupAudienceViewServiceResourceNames.g.cs | 4 +- .../Services/AdGroupBidModifierService.cs | 251 +- .../AdGroupBidModifierServiceClient.g.cs | 4 +- .../Services/AdGroupBidModifierServiceGrpc.cs | 82 +- ...dGroupBidModifierServiceResourceNames.g.cs | 4 +- .../Services/AdGroupCriterionLabelService.cs | 90 +- .../AdGroupCriterionLabelServiceClient.g.cs | 4 +- .../AdGroupCriterionLabelServiceGrpc.cs | 82 +- ...oupCriterionLabelServiceResourceNames.g.cs | 4 +- .../Services/AdGroupCriterionService.cs | 263 +- .../AdGroupCriterionServiceClient.g.cs | 4 +- .../Services/AdGroupCriterionServiceGrpc.cs | 82 +- .../AdGroupCriterionServiceResourceNames.g.cs | 4 +- .../AdGroupCriterionSimulationService.cs | 38 +- ...GroupCriterionSimulationServiceClient.g.cs | 4 +- .../AdGroupCriterionSimulationServiceGrpc.cs | 60 +- ...iterionSimulationServiceResourceNames.g.cs | 4 +- .../AdGroupExtensionSettingService.cs | 104 +- .../AdGroupExtensionSettingServiceClient.g.cs | 4 +- .../AdGroupExtensionSettingServiceGrpc.cs | 82 +- ...pExtensionSettingServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/AdGroupFeedService.cs | 246 +- .../Services/AdGroupFeedServiceClient.g.cs | 4 +- .../Services/AdGroupFeedServiceGrpc.cs | 82 +- .../AdGroupFeedServiceResourceNames.g.cs | 4 +- .../Services/AdGroupLabelService.cs | 92 +- .../Services/AdGroupLabelServiceClient.g.cs | 4 +- .../Services/AdGroupLabelServiceGrpc.cs | 82 +- .../AdGroupLabelServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/AdGroupService.cs | 240 +- .../Services/AdGroupServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/AdGroupServiceGrpc.cs | 82 +- .../Services/AdGroupServiceResourceNames.g.cs | 4 +- .../Services/AdGroupSimulationService.cs | 36 +- .../AdGroupSimulationServiceClient.g.cs | 4 +- .../Services/AdGroupSimulationServiceGrpc.cs | 60 +- ...AdGroupSimulationServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/AdParameterService.cs | 104 +- .../Services/AdParameterServiceClient.g.cs | 4 +- .../Services/AdParameterServiceGrpc.cs | 82 +- .../AdParameterServiceResourceNames.g.cs | 4 +- .../Services/AdScheduleViewService.cs | 36 +- .../Services/AdScheduleViewServiceClient.g.cs | 4 +- .../Services/AdScheduleViewServiceGrpc.cs | 60 +- .../AdScheduleViewServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/AdService.cs | 216 +- src/{V2 => V6}/Services/AdServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/AdServiceGrpc.cs | 82 +- .../Services/AdServiceResourceNames.g.cs | 4 +- ...OperationsResponsePartialFailureSupport.cs | 46 + .../Services/AgeRangeViewService.cs | 38 +- .../Services/AgeRangeViewServiceClient.g.cs | 4 +- .../Services/AgeRangeViewServiceGrpc.cs | 60 +- .../AgeRangeViewServiceResourceNames.g.cs | 4 +- ...mmendationResponsePartialFailureSupport.cs | 4 +- src/{V2 => V6}/Services/AssetService.cs | 325 +- .../Services/AssetServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/AssetServiceGrpc.cs | 82 +- .../Services/AssetServiceResourceNames.g.cs | 4 +- .../Services/BatchJobService.cs} | 891 +- .../Services/BatchJobServiceClient.g.cs} | 788 +- src/V6/Services/BatchJobServiceGrpc.cs | 478 + .../BatchJobServiceResourceNames.g.cs} | 36 +- .../Services/BiddingStrategyService.cs | 106 +- .../BiddingStrategyServiceClient.g.cs | 4 +- .../Services/BiddingStrategyServiceGrpc.cs | 82 +- .../BiddingStrategyServiceResourceNames.g.cs | 4 +- .../Services/BillingSetupService.cs | 94 +- .../Services/BillingSetupServiceClient.g.cs | 4 +- .../Services/BillingSetupServiceGrpc.cs | 82 +- .../BillingSetupServiceResourceNames.g.cs | 4 +- src/V6/Services/CampaignAssetService.cs | 1210 +++ .../Services/CampaignAssetServiceClient.g.cs | 500 + src/V6/Services/CampaignAssetServiceGrpc.cs | 255 + .../CampaignAssetServiceResourceNames.g.cs} | 12 +- .../Services/CampaignAudienceViewService.cs | 34 +- .../CampaignAudienceViewServiceClient.g.cs | 4 +- .../CampaignAudienceViewServiceGrpc.cs | 60 +- ...paignAudienceViewServiceResourceNames.g.cs | 4 +- .../Services/CampaignBidModifierService.cs | 104 +- .../CampaignBidModifierServiceClient.g.cs | 4 +- .../CampaignBidModifierServiceGrpc.cs | 82 +- ...mpaignBidModifierServiceResourceNames.g.cs | 4 +- .../Services/CampaignBudgetService.cs | 249 +- .../Services/CampaignBudgetServiceClient.g.cs | 4 +- .../Services/CampaignBudgetServiceGrpc.cs | 82 +- .../CampaignBudgetServiceResourceNames.g.cs | 4 +- .../Services/CampaignCriterionService.cs | 249 +- .../CampaignCriterionServiceClient.g.cs | 4 +- .../Services/CampaignCriterionServiceGrpc.cs | 82 +- ...CampaignCriterionServiceResourceNames.g.cs | 4 +- .../CampaignCriterionSimulationService.cs | 38 +- ...paignCriterionSimulationServiceClient.g.cs | 4 +- .../CampaignCriterionSimulationServiceGrpc.cs | 60 +- ...iterionSimulationServiceResourceNames.g.cs | 4 +- .../Services/CampaignDraftService.cs | 305 +- .../Services/CampaignDraftServiceClient.g.cs | 20 +- .../Services/CampaignDraftServiceGrpc.cs | 134 +- .../CampaignDraftServiceResourceNames.g.cs | 4 +- .../Services/CampaignExperimentService.cs | 392 +- .../CampaignExperimentServiceClient.g.cs | 4 +- .../Services/CampaignExperimentServiceGrpc.cs | 184 +- ...ampaignExperimentServiceResourceNames.g.cs | 4 +- .../CampaignExtensionSettingService.cs | 102 +- ...CampaignExtensionSettingServiceClient.g.cs | 4 +- .../CampaignExtensionSettingServiceGrpc.cs | 82 +- ...nExtensionSettingServiceResourceNames.g.cs | 4 +- .../Services/CampaignFeedService.cs | 247 +- .../Services/CampaignFeedServiceClient.g.cs | 4 +- .../Services/CampaignFeedServiceGrpc.cs | 82 +- .../CampaignFeedServiceResourceNames.g.cs | 4 +- .../Services/CampaignLabelService.cs | 94 +- .../Services/CampaignLabelServiceClient.g.cs | 4 +- .../Services/CampaignLabelServiceGrpc.cs | 82 +- .../CampaignLabelServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/CampaignService.cs | 242 +- .../Services/CampaignServiceClient.g.cs | 4 +- .../Services/CampaignServiceGrpc.cs | 82 +- .../CampaignServiceResourceNames.g.cs | 4 +- .../Services/CampaignSharedSetService.cs | 90 +- .../CampaignSharedSetServiceClient.g.cs | 4 +- .../Services/CampaignSharedSetServiceGrpc.cs | 82 +- ...CampaignSharedSetServiceResourceNames.g.cs | 4 +- .../Services/CarrierConstantService.cs | 38 +- .../CarrierConstantServiceClient.g.cs | 4 +- .../Services/CarrierConstantServiceGrpc.cs | 60 +- .../CarrierConstantServiceResourceNames.g.cs | 4 +- .../Services/ChangeStatusService.cs | 38 +- .../Services/ChangeStatusServiceClient.g.cs | 4 +- .../Services/ChangeStatusServiceGrpc.cs | 60 +- .../ChangeStatusServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/ClickViewService.cs | 38 +- .../Services/ClickViewServiceClient.g.cs | 4 +- .../Services/ClickViewServiceGrpc.cs | 60 +- .../ClickViewServiceResourceNames.g.cs | 4 +- src/V6/Services/CombinedAudienceService.cs | 240 + .../CombinedAudienceServiceClient.g.cs | 378 + .../Services/CombinedAudienceServiceGrpc.cs | 191 + ...CombinedAudienceServiceResourceNames.g.cs} | 12 +- .../Services/ConversionActionService.cs | 104 +- .../ConversionActionServiceClient.g.cs | 4 +- .../Services/ConversionActionServiceGrpc.cs | 82 +- .../ConversionActionServiceResourceNames.g.cs | 4 +- .../ConversionAdjustmentUploadService.cs | 782 +- ...nversionAdjustmentUploadServiceClient.g.cs | 2 +- .../ConversionAdjustmentUploadServiceGrpc.cs | 60 +- .../Services/ConversionUploadService.cs | 1453 +-- .../ConversionUploadServiceClient.g.cs | 2 +- .../Services/ConversionUploadServiceGrpc.cs | 82 +- src/V6/Services/CurrencyConstantService.cs | 240 + .../CurrencyConstantServiceClient.g.cs | 374 + .../Services/CurrencyConstantServiceGrpc.cs | 189 + .../CurrencyConstantServiceResourceNames.g.cs | 33 + .../Services/CustomAudienceService.cs} | 405 +- .../Services/CustomAudienceServiceClient.g.cs | 502 + src/V6/Services/CustomAudienceServiceGrpc.cs | 255 + .../CustomAudienceServiceResourceNames.g.cs | 33 + .../Services/CustomInterestService.cs | 106 +- .../Services/CustomInterestServiceClient.g.cs | 4 +- .../Services/CustomInterestServiceGrpc.cs | 82 +- .../CustomInterestServiceResourceNames.g.cs | 4 +- .../Services/CustomerClientLinkService.cs | 108 +- .../CustomerClientLinkServiceClient.g.cs | 4 +- .../Services/CustomerClientLinkServiceGrpc.cs | 82 +- ...ustomerClientLinkServiceResourceNames.g.cs | 4 +- .../Services/CustomerClientService.cs | 38 +- .../Services/CustomerClientServiceClient.g.cs | 4 +- .../Services/CustomerClientServiceGrpc.cs | 60 +- .../CustomerClientServiceResourceNames.g.cs | 4 +- .../CustomerExtensionSettingService.cs | 102 +- ...CustomerExtensionSettingServiceClient.g.cs | 4 +- .../CustomerExtensionSettingServiceGrpc.cs | 82 +- ...rExtensionSettingServiceResourceNames.g.cs | 4 +- .../Services/CustomerFeedService.cs | 247 +- .../Services/CustomerFeedServiceClient.g.cs | 4 +- .../Services/CustomerFeedServiceGrpc.cs | 82 +- .../CustomerFeedServiceResourceNames.g.cs | 4 +- .../Services/CustomerLabelService.cs | 94 +- .../Services/CustomerLabelServiceClient.g.cs | 4 +- .../Services/CustomerLabelServiceGrpc.cs | 82 +- .../CustomerLabelServiceResourceNames.g.cs | 4 +- src/V6/Services/CustomerManagerLinkService.cs | 1535 +++ .../CustomerManagerLinkServiceClient.g.cs | 180 +- .../CustomerManagerLinkServiceGrpc.cs | 170 +- ...stomerManagerLinkServiceResourceNames.g.cs | 4 +- .../CustomerNegativeCriterionService.cs | 92 +- ...ustomerNegativeCriterionServiceClient.g.cs | 4 +- .../CustomerNegativeCriterionServiceGrpc.cs | 82 +- ...NegativeCriterionServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/CustomerService.cs | 422 +- .../Services/CustomerServiceClient.g.cs | 4 +- .../Services/CustomerServiceGrpc.cs | 126 +- .../CustomerServiceResourceNames.g.cs | 4 +- src/V6/Services/CustomerUserAccessService.cs | 1168 +++ .../CustomerUserAccessServiceClient.g.cs} | 338 +- .../Services/CustomerUserAccessServiceGrpc.cs | 260 + ...stomerUserAccessServiceResourceNames.g.cs} | 12 +- .../Services/DetailPlacementViewService.cs | 32 +- .../DetailPlacementViewServiceClient.g.cs | 4 +- .../DetailPlacementViewServiceGrpc.cs | 60 +- ...tailPlacementViewServiceResourceNames.g.cs | 4 +- ...mmendationResponsePartialFailureSupport.cs | 4 +- .../Services/DisplayKeywordViewService.cs | 36 +- .../DisplayKeywordViewServiceClient.g.cs | 4 +- .../Services/DisplayKeywordViewServiceGrpc.cs | 60 +- ...isplayKeywordViewServiceResourceNames.g.cs | 4 +- .../Services/DistanceViewService.cs | 38 +- .../Services/DistanceViewServiceClient.g.cs | 4 +- .../Services/DistanceViewServiceGrpc.cs | 60 +- .../DistanceViewServiceResourceNames.g.cs | 4 +- .../Services/DomainCategoryService.cs | 36 +- .../Services/DomainCategoryServiceClient.g.cs | 4 +- .../Services/DomainCategoryServiceGrpc.cs | 60 +- .../DomainCategoryServiceResourceNames.g.cs | 4 +- .../DynamicSearchAdsSearchTermViewService.cs | 38 +- ...cSearchAdsSearchTermViewServiceClient.g.cs | 4 +- ...namicSearchAdsSearchTermViewServiceGrpc.cs | 60 +- ...AdsSearchTermViewServiceResourceNames.g.cs | 4 +- .../ExpandedLandingPageViewService.cs | 34 +- .../ExpandedLandingPageViewServiceClient.g.cs | 4 +- .../ExpandedLandingPageViewServiceGrpc.cs | 60 +- ...edLandingPageViewServiceResourceNames.g.cs | 4 +- .../Services/ExtensionFeedItemService.cs | 250 +- .../ExtensionFeedItemServiceClient.g.cs | 4 +- .../Services/ExtensionFeedItemServiceGrpc.cs | 82 +- ...ExtensionFeedItemServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/FeedItemService.cs | 242 +- .../Services/FeedItemServiceClient.g.cs | 4 +- .../Services/FeedItemServiceGrpc.cs | 82 +- .../FeedItemServiceResourceNames.g.cs | 4 +- src/V6/Services/FeedItemSetLinkService.cs | 1158 +++ .../FeedItemSetLinkServiceClient.g.cs | 504 + src/V6/Services/FeedItemSetLinkServiceGrpc.cs | 255 + .../FeedItemSetLinkServiceResourceNames.g.cs | 33 + src/V6/Services/FeedItemSetService.cs | 1262 +++ src/V6/Services/FeedItemSetServiceClient.g.cs | 506 + src/V6/Services/FeedItemSetServiceGrpc.cs | 260 + .../FeedItemSetServiceResourceNames.g.cs | 32 + .../Services/FeedItemTargetService.cs | 227 +- .../Services/FeedItemTargetServiceClient.g.cs | 4 +- .../Services/FeedItemTargetServiceGrpc.cs | 82 +- .../FeedItemTargetServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/FeedMappingService.cs | 94 +- .../Services/FeedMappingServiceClient.g.cs | 4 +- .../Services/FeedMappingServiceGrpc.cs | 82 +- .../FeedMappingServiceResourceNames.g.cs | 4 +- .../Services/FeedPlaceholderViewService.cs | 32 +- .../FeedPlaceholderViewServiceClient.g.cs | 4 +- .../FeedPlaceholderViewServiceGrpc.cs | 60 +- ...edPlaceholderViewServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/FeedService.cs | 238 +- .../Services/FeedServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/FeedServiceGrpc.cs | 82 +- .../Services/FeedServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/GenderViewService.cs | 36 +- .../Services/GenderViewServiceClient.g.cs | 4 +- .../Services/GenderViewServiceGrpc.cs | 60 +- .../GenderViewServiceResourceNames.g.cs | 4 +- .../Services/GeoTargetConstantService.cs | 502 +- .../GeoTargetConstantServiceClient.g.cs | 4 +- .../Services/GeoTargetConstantServiceGrpc.cs | 82 +- ...GeoTargetConstantServiceResourceNames.g.cs | 4 +- .../Services/GeographicViewService.cs | 38 +- .../Services/GeographicViewServiceClient.g.cs | 4 +- .../Services/GeographicViewServiceGrpc.cs | 60 +- .../GeographicViewServiceResourceNames.g.cs | 4 +- .../Services/GoogleAdsFieldService.cs | 66 +- .../Services/GoogleAdsFieldServiceClient.g.cs | 4 +- .../Services/GoogleAdsFieldServiceGrpc.cs | 82 +- .../GoogleAdsFieldServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/GoogleAdsService.cs | 5542 +++++++---- .../Services/GoogleAdsServiceClient.g.cs | 81 +- .../Services/GoogleAdsServiceGrpc.cs | 127 +- .../Services/GroupPlacementViewService.cs | 36 +- .../GroupPlacementViewServiceClient.g.cs | 4 +- .../Services/GroupPlacementViewServiceGrpc.cs | 60 +- ...roupPlacementViewServiceResourceNames.g.cs | 4 +- .../Services/HotelGroupViewService.cs | 36 +- .../Services/HotelGroupViewServiceClient.g.cs | 4 +- .../Services/HotelGroupViewServiceGrpc.cs | 60 +- .../HotelGroupViewServiceResourceNames.g.cs | 4 +- .../Services/HotelPerformanceViewService.cs | 34 +- .../HotelPerformanceViewServiceClient.g.cs | 4 +- .../HotelPerformanceViewServiceGrpc.cs | 60 +- ...elPerformanceViewServiceResourceNames.g.cs | 4 +- src/V6/Services/IncomeRangeViewService.cs | 240 + .../IncomeRangeViewServiceClient.g.cs | 374 + src/V6/Services/IncomeRangeViewServiceGrpc.cs | 189 + .../IncomeRangeViewServiceResourceNames.g.cs | 33 + src/{V2 => V6}/Services/InvoiceService.cs | 72 +- .../Services/InvoiceServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/InvoiceServiceGrpc.cs | 60 +- .../KeywordPlanAdGroupKeywordService.cs} | 292 +- ...eywordPlanAdGroupKeywordServiceClient.g.cs | 528 + .../KeywordPlanAdGroupKeywordServiceGrpc.cs | 264 + ...lanAdGroupKeywordServiceResourceNames.g.cs | 46 + .../Services/KeywordPlanAdGroupService.cs | 133 +- .../KeywordPlanAdGroupServiceClient.g.cs | 4 +- .../Services/KeywordPlanAdGroupServiceGrpc.cs | 82 +- ...eywordPlanAdGroupServiceResourceNames.g.cs | 45 + .../KeywordPlanCampaignKeywordService.cs} | 271 +- ...wordPlanCampaignKeywordServiceClient.g.cs} | 282 +- .../KeywordPlanCampaignKeywordServiceGrpc.cs} | 153 +- ...anCampaignKeywordServiceResourceNames.g.cs | 46 + .../Services/KeywordPlanCampaignService.cs | 133 +- .../KeywordPlanCampaignServiceClient.g.cs | 4 +- .../KeywordPlanCampaignServiceGrpc.cs | 82 +- ...ywordPlanCampaignServiceResourceNames.g.cs | 46 + .../Services/KeywordPlanIdeaService.cs | 903 +- .../KeywordPlanIdeaServiceClient.g.cs | 44 +- .../Services/KeywordPlanIdeaServiceGrpc.cs | 60 +- src/{V2 => V6}/Services/KeywordPlanService.cs | 3163 ++++-- .../Services/KeywordPlanServiceClient.g.cs | 510 +- src/V6/Services/KeywordPlanServiceGrpc.cs | 579 ++ .../KeywordPlanServiceResourceNames.g.cs | 92 + src/{V2 => V6}/Services/KeywordViewService.cs | 36 +- .../Services/KeywordViewServiceClient.g.cs | 4 +- .../Services/KeywordViewServiceGrpc.cs | 60 +- .../KeywordViewServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/LabelService.cs | 238 +- .../Services/LabelServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/LabelServiceGrpc.cs | 82 +- .../Services/LabelServiceResourceNames.g.cs | 4 +- .../Services/LandingPageViewService.cs | 34 +- .../LandingPageViewServiceClient.g.cs | 4 +- .../Services/LandingPageViewServiceGrpc.cs | 60 +- .../LandingPageViewServiceResourceNames.g.cs | 4 +- .../Services/LanguageConstantService.cs | 34 +- .../LanguageConstantServiceClient.g.cs | 4 +- .../Services/LanguageConstantServiceGrpc.cs | 60 +- .../LanguageConstantServiceResourceNames.g.cs | 4 +- .../Services/LocationViewService.cs | 38 +- .../Services/LocationViewServiceClient.g.cs | 4 +- .../Services/LocationViewServiceGrpc.cs | 60 +- .../LocationViewServiceResourceNames.g.cs | 4 +- .../Services/ManagedPlacementViewService.cs | 34 +- .../ManagedPlacementViewServiceClient.g.cs | 4 +- .../ManagedPlacementViewServiceGrpc.cs | 60 +- ...agedPlacementViewServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/MediaFileService.cs | 227 +- .../Services/MediaFileServiceClient.g.cs | 4 +- .../Services/MediaFileServiceGrpc.cs | 82 +- .../MediaFileServiceResourceNames.g.cs | 4 +- .../Services/MerchantCenterLinkService.cs | 124 +- .../MerchantCenterLinkServiceClient.g.cs | 4 +- .../Services/MerchantCenterLinkServiceGrpc.cs | 104 +- ...erchantCenterLinkServiceResourceNames.g.cs | 4 +- .../MobileAppCategoryConstantService.cs | 36 +- ...obileAppCategoryConstantServiceClient.g.cs | 4 +- .../MobileAppCategoryConstantServiceGrpc.cs | 60 +- ...pCategoryConstantServiceResourceNames.g.cs | 4 +- .../Services/MobileDeviceConstantService.cs | 34 +- .../MobileDeviceConstantServiceClient.g.cs | 4 +- .../MobileDeviceConstantServiceGrpc.cs | 60 +- ...ileDeviceConstantServiceResourceNames.g.cs | 4 +- ...upAdLabelsResponsePartialFailureSupport.cs | 4 +- ...AdGroupAdsResponsePartialFailureSupport.cs | 4 +- ...dModifiersResponsePartialFailureSupport.cs | 4 +- ...upCriteriaResponsePartialFailureSupport.cs | 4 +- ...rionLabelsResponsePartialFailureSupport.cs | 4 +- ...onSettingsResponsePartialFailureSupport.cs | 4 +- ...GroupFeedsResponsePartialFailureSupport.cs | 4 +- ...roupLabelsResponsePartialFailureSupport.cs | 4 +- ...teAdGroupsResponsePartialFailureSupport.cs | 4 +- ...ParametersResponsePartialFailureSupport.cs | 4 +- ...StrategiesResponsePartialFailureSupport.cs | 4 +- ...ignAssetsResponsePartialFailureSupport.cs} | 6 +- ...dModifiersResponsePartialFailureSupport.cs | 4 +- ...ignBudgetsResponsePartialFailureSupport.cs | 4 +- ...gnCriteriaResponsePartialFailureSupport.cs | 4 +- ...aignDraftsResponsePartialFailureSupport.cs | 4 +- ...xperimentsResponsePartialFailureSupport.cs | 4 +- ...onSettingsResponsePartialFailureSupport.cs | 4 +- ...paignFeedsResponsePartialFailureSupport.cs | 4 +- ...aignLabelsResponsePartialFailureSupport.cs | 4 +- ...SharedSetsResponsePartialFailureSupport.cs | 4 +- ...eCampaignsResponsePartialFailureSupport.cs | 4 +- ...ionActionsResponsePartialFailureSupport.cs | 4 +- ...onSettingsResponsePartialFailureSupport.cs | 4 +- ...tomerFeedsResponsePartialFailureSupport.cs | 4 +- ...omerLabelsResponsePartialFailureSupport.cs | 4 +- ...veCriteriaResponsePartialFailureSupport.cs | 4 +- ...eFeedItemsResponsePartialFailureSupport.cs | 4 +- ...edMappingsResponsePartialFailureSupport.cs | 4 +- ...utateFeedsResponsePartialFailureSupport.cs | 4 +- ...eGoogleAdsResponsePartialFailureSupport.cs | 4 +- ...upKeywordsResponsePartialFailureSupport.cs | 46 + ...anAdGroupsResponsePartialFailureSupport.cs | 4 +- ...nKeywordsResponsePartialFailureSupport.cs} | 6 +- ...nCampaignsResponsePartialFailureSupport.cs | 4 +- ...ywordPlansResponsePartialFailureSupport.cs | 4 +- ...tateLabelsResponsePartialFailureSupport.cs | 4 +- ...MediaFilesResponsePartialFailureSupport.cs | 4 +- ...ingActionsResponsePartialFailureSupport.cs | 4 +- ...edCriteriaResponsePartialFailureSupport.cs | 4 +- ...SharedSetsResponsePartialFailureSupport.cs | 4 +- ...eUserListsResponsePartialFailureSupport.cs | 4 +- src/V6/Services/OfflineUserDataJobService.cs | 1639 ++++ .../OfflineUserDataJobServiceClient.g.cs | 935 ++ .../Services/OfflineUserDataJobServiceGrpc.cs | 402 + ...fflineUserDataJobServiceResourceNames.g.cs | 59 + .../OperatingSystemVersionConstantService.cs | 38 +- ...ingSystemVersionConstantServiceClient.g.cs | 4 +- ...eratingSystemVersionConstantServiceGrpc.cs | 60 +- ...emVersionConstantServiceResourceNames.g.cs | 4 +- .../PaidOrganicSearchTermViewService.cs | 38 +- ...aidOrganicSearchTermViewServiceClient.g.cs | 4 +- .../PaidOrganicSearchTermViewServiceGrpc.cs | 60 +- ...nicSearchTermViewServiceResourceNames.g.cs | 4 +- .../Services/ParentalStatusViewService.cs | 36 +- .../ParentalStatusViewServiceClient.g.cs | 4 +- .../Services/ParentalStatusViewServiceGrpc.cs | 60 +- ...arentalStatusViewServiceResourceNames.g.cs | 4 +- .../Services/PaymentsAccountService.cs | 50 +- .../PaymentsAccountServiceClient.g.cs | 2 +- .../Services/PaymentsAccountServiceGrpc.cs | 60 +- .../ProductBiddingCategoryConstantService.cs | 38 +- ...tBiddingCategoryConstantServiceClient.g.cs | 4 +- ...oductBiddingCategoryConstantServiceGrpc.cs | 60 +- ...gCategoryConstantServiceResourceNames.g.cs | 4 +- .../Services/ProductGroupViewService.cs | 36 +- .../ProductGroupViewServiceClient.g.cs | 4 +- .../Services/ProductGroupViewServiceGrpc.cs | 60 +- .../ProductGroupViewServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/ReachPlanService.cs | 3526 ++++--- .../Services/ReachPlanServiceClient.g.cs | 24 +- .../Services/ReachPlanServiceGrpc.cs | 126 +- .../Services/RecommendationService.cs | 1105 ++- .../Services/RecommendationServiceClient.g.cs | 4 +- .../Services/RecommendationServiceGrpc.cs | 104 +- .../RecommendationServiceResourceNames.g.cs | 4 +- .../Services/RemarketingActionService.cs | 102 +- .../RemarketingActionServiceClient.g.cs | 4 +- .../Services/RemarketingActionServiceGrpc.cs | 82 +- ...RemarketingActionServiceResourceNames.g.cs | 4 +- .../Services/SearchTermViewService.cs | 36 +- .../Services/SearchTermViewServiceClient.g.cs | 4 +- .../Services/SearchTermViewServiceGrpc.cs | 60 +- .../SearchTermViewServiceResourceNames.g.cs | 4 +- .../Services/SharedCriterionService.cs | 92 +- .../SharedCriterionServiceClient.g.cs | 4 +- .../Services/SharedCriterionServiceGrpc.cs | 82 +- .../SharedCriterionServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/SharedSetService.cs | 244 +- .../Services/SharedSetServiceClient.g.cs | 4 +- .../Services/SharedSetServiceGrpc.cs | 82 +- .../SharedSetServiceResourceNames.g.cs | 4 +- .../ShoppingPerformanceViewService.cs | 36 +- .../ShoppingPerformanceViewServiceClient.g.cs | 4 +- .../ShoppingPerformanceViewServiceGrpc.cs | 60 +- ...ngPerformanceViewServiceResourceNames.g.cs | 4 +- .../ThirdPartyAppAnalyticsLinkService.cs | 573 ++ ...irdPartyAppAnalyticsLinkServiceClient.g.cs | 382 + .../ThirdPartyAppAnalyticsLinkServiceGrpc.cs | 261 + ...yAppAnalyticsLinkServiceResourceNames.g.cs | 46 + .../Services/TopicConstantService.cs | 36 +- .../Services/TopicConstantServiceClient.g.cs | 4 +- .../Services/TopicConstantServiceGrpc.cs | 60 +- .../TopicConstantServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/TopicViewService.cs | 38 +- .../Services/TopicViewServiceClient.g.cs | 4 +- .../Services/TopicViewServiceGrpc.cs | 60 +- .../TopicViewServiceResourceNames.g.cs | 4 +- ...onversionsResponsePartialFailureSupport.cs | 4 +- ...onversionsResponsePartialFailureSupport.cs | 4 +- ...djustmentsResponsePartialFailureSupport.cs | 4 +- src/V6/Services/UserDataService.cs | 873 ++ src/V6/Services/UserDataServiceClient.g.cs | 288 + src/V6/Services/UserDataServiceGrpc.cs | 190 + .../Services/UserInterestService.cs | 38 +- .../Services/UserInterestServiceClient.g.cs | 4 +- .../Services/UserInterestServiceGrpc.cs | 60 +- .../UserInterestServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/UserListService.cs | 102 +- .../Services/UserListServiceClient.g.cs | 4 +- .../Services/UserListServiceGrpc.cs | 82 +- .../UserListServiceResourceNames.g.cs | 4 +- .../Services/UserLocationViewService.cs | 36 +- .../UserLocationViewServiceClient.g.cs | 4 +- .../Services/UserLocationViewServiceGrpc.cs | 60 +- .../UserLocationViewServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Services/VideoService.cs | 38 +- .../Services/VideoServiceClient.g.cs | 4 +- src/{V2 => V6}/Services/VideoServiceGrpc.cs | 60 +- .../Services/VideoServiceResourceNames.g.cs | 4 +- src/{V2 => V6}/Types/AccessInvitationError.cs | 26 +- src/{V2 => V6}/Types/AccessReason.cs | 24 +- src/{V2 => V6}/Types/AccessRole.cs | 26 +- src/{V2 => V6}/Types/AccountBudget.cs | 1462 +-- src/{V2 => V6}/Types/AccountBudgetProposal.cs | 948 +- .../Types/AccountBudgetProposalError.cs | 44 +- .../Types/AccountBudgetProposalStatus.cs | 26 +- .../Types/AccountBudgetProposalType.cs | 26 +- src/{V2 => V6}/Types/AccountBudgetStatus.cs | 24 +- src/V6/Types/AccountLink.cs | 1266 +++ src/V6/Types/AccountLinkError.cs | 216 + src/V6/Types/AccountLinkStatus.cs | 240 + src/{V2 => V6}/Types/Ad.cs | 979 +- src/{V2 => V6}/Types/AdAsset.cs | 404 +- src/{V2 => V6}/Types/AdCustomizerError.cs | 26 +- .../Types/AdCustomizerPlaceholderField.cs | 24 +- .../Types/AdDestinationType.cs} | 124 +- src/{V2 => V6}/Types/AdError.cs | 110 +- src/{V2 => V6}/Types/AdGroup.cs | 1273 +-- src/{V2 => V6}/Types/AdGroupAd.cs | 257 +- src/{V2 => V6}/Types/AdGroupAdAssetView.cs | 352 +- src/{V2 => V6}/Types/AdGroupAdError.cs | 41 +- src/{V2 => V6}/Types/AdGroupAdLabel.cs | 163 +- src/{V2 => V6}/Types/AdGroupAdRotationMode.cs | 24 +- src/{V2 => V6}/Types/AdGroupAdStatus.cs | 26 +- src/{V2 => V6}/Types/AdGroupAudienceView.cs | 38 +- src/{V2 => V6}/Types/AdGroupBidModifier.cs | 450 +- .../Types/AdGroupBidModifierError.cs | 26 +- src/{V2 => V6}/Types/AdGroupCriterion.cs | 2206 +++-- .../Types/AdGroupCriterionApprovalStatus.cs | 26 +- src/{V2 => V6}/Types/AdGroupCriterionError.cs | 79 +- src/{V2 => V6}/Types/AdGroupCriterionLabel.cs | 165 +- .../Types/AdGroupCriterionSimulation.cs | 450 +- .../Types/AdGroupCriterionStatus.cs | 24 +- src/{V2 => V6}/Types/AdGroupError.cs | 40 +- .../Types/AdGroupExtensionSetting.cs | 179 +- src/{V2 => V6}/Types/AdGroupFeed.cs | 237 +- src/{V2 => V6}/Types/AdGroupFeedError.cs | 24 +- src/{V2 => V6}/Types/AdGroupLabel.cs | 161 +- src/{V2 => V6}/Types/AdGroupSimulation.cs | 408 +- src/{V2 => V6}/Types/AdGroupStatus.cs | 24 +- src/{V2 => V6}/Types/AdGroupType.cs | 41 +- src/{V2 => V6}/Types/AdNetworkType.cs | 26 +- src/{V2 => V6}/Types/AdParameter.cs | 225 +- src/{V2 => V6}/Types/AdParameterError.cs | 26 +- src/{V2 => V6}/Types/AdScheduleView.cs | 36 +- .../Types/AdServingOptimizationStatus.cs | 26 +- src/{V2 => V6}/Types/AdSharingError.cs | 24 +- src/{V2 => V6}/Types/AdStrength.cs | 26 +- src/{V2 => V6}/Types/AdType.cs | 68 +- src/{V2 => V6}/Types/AdTypeInfos.cs | 8560 ++++++++++------- .../Types/AdvertisingChannelSubType.cs | 45 +- .../Types/AdvertisingChannelType.cs | 42 +- src/{V2 => V6}/Types/AdxError.cs | 26 +- .../AffiliateLocationFeedRelationshipType.cs | 24 +- .../AffiliateLocationPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/AgeRangeType.cs | 24 +- src/{V2 => V6}/Types/AgeRangeView.cs | 37 +- src/{V2 => V6}/Types/AppCampaignAppStore.cs | 24 +- .../AppCampaignBiddingStrategyGoalType.cs | 26 +- src/{V2 => V6}/Types/AppPaymentModelType.cs | 24 +- src/{V2 => V6}/Types/AppPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/AppStore.cs | 26 +- .../Types/AppUrlOperatingSystemType.cs | 24 +- src/V6/Types/Asset.cs | 1083 +++ src/{V2 => V6}/Types/AssetError.cs | 72 +- src/{V2 => V6}/Types/AssetFieldType.cs | 43 +- src/V6/Types/AssetLinkError.cs | 237 + src/V6/Types/AssetLinkStatus.cs | 220 + src/{V2 => V6}/Types/AssetPerformanceLabel.cs | 26 +- src/V6/Types/AssetPolicy.cs | 306 + src/{V2 => V6}/Types/AssetType.cs | 43 +- src/V6/Types/AssetTypes.cs | 3091 ++++++ src/{V2 => V6}/Types/AttributionModel.cs | 24 +- src/{V2 => V6}/Types/AuthenticationError.cs | 24 +- src/{V2 => V6}/Types/AuthorizationError.cs | 53 +- src/V6/Types/BatchJob.cs | 946 ++ .../Types/BatchJobError.cs} | 83 +- .../Types/BatchJobStatus.cs} | 66 +- src/{V2 => V6}/Types/BidModifierSource.cs | 26 +- src/{V2 => V6}/Types/Bidding.cs | 2050 ++-- src/{V2 => V6}/Types/BiddingError.cs | 44 +- src/{V2 => V6}/Types/BiddingSource.cs | 24 +- src/{V2 => V6}/Types/BiddingStrategy.cs | 709 +- src/{V2 => V6}/Types/BiddingStrategyError.cs | 26 +- src/{V2 => V6}/Types/BiddingStrategyStatus.cs | 26 +- src/{V2 => V6}/Types/BiddingStrategyType.cs | 26 +- src/{V2 => V6}/Types/BillingSetup.cs | 635 +- src/{V2 => V6}/Types/BillingSetupError.cs | 40 +- src/{V2 => V6}/Types/BillingSetupStatus.cs | 24 +- .../Types/BrandSafetySuitability.cs | 24 +- .../Types/BudgetCampaignAssociationStatus.cs | 222 + src/{V2 => V6}/Types/BudgetDeliveryMethod.cs | 26 +- src/{V2 => V6}/Types/BudgetPeriod.cs | 42 +- src/{V2 => V6}/Types/BudgetStatus.cs | 24 +- src/{V2 => V6}/Types/BudgetType.cs | 26 +- .../Types/CallConversionReportingState.cs | 24 +- src/{V2 => V6}/Types/CallPlaceholderField.cs | 26 +- .../Types/CalloutPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/Campaign.cs | 3454 ++++--- src/V6/Types/CampaignAsset.cs | 425 + src/{V2 => V6}/Types/CampaignAudienceView.cs | 38 +- src/{V2 => V6}/Types/CampaignBidModifier.cs | 279 +- src/V6/Types/CampaignBudget.cs | 1080 +++ src/{V2 => V6}/Types/CampaignBudgetError.cs | 38 +- src/{V2 => V6}/Types/CampaignCriterion.cs | 865 +- .../Types/CampaignCriterionError.cs | 26 +- .../Types/CampaignCriterionSimulation.cs | 401 +- .../Types/CampaignCriterionStatus.cs | 24 +- src/{V2 => V6}/Types/CampaignDraft.cs | 441 +- src/{V2 => V6}/Types/CampaignDraftError.cs | 26 +- src/{V2 => V6}/Types/CampaignDraftStatus.cs | 26 +- src/{V2 => V6}/Types/CampaignError.cs | 72 +- src/{V2 => V6}/Types/CampaignExperiment.cs | 654 +- .../Types/CampaignExperimentError.cs | 24 +- .../Types/CampaignExperimentStatus.cs | 24 +- .../CampaignExperimentTrafficSplitType.cs | 24 +- .../Types/CampaignExperimentType.cs | 24 +- .../Types/CampaignExtensionSetting.cs | 179 +- src/{V2 => V6}/Types/CampaignFeed.cs | 237 +- src/{V2 => V6}/Types/CampaignFeedError.cs | 40 +- src/{V2 => V6}/Types/CampaignLabel.cs | 161 +- src/{V2 => V6}/Types/CampaignServingStatus.cs | 26 +- src/{V2 => V6}/Types/CampaignSharedSet.cs | 189 +- .../Types/CampaignSharedSetError.cs | 24 +- .../Types/CampaignSharedSetStatus.cs | 24 +- src/{V2 => V6}/Types/CampaignStatus.cs | 24 +- src/{V2 => V6}/Types/CarrierConstant.cs | 221 +- src/V6/Types/ChangeClientType.cs | 274 + src/V6/Types/ChangeEvent.cs | 1231 +++ src/V6/Types/ChangeEventError.cs | 238 + src/V6/Types/ChangeEventResourceType.cs | 246 + src/V6/Types/ChangeStatus.cs | 891 ++ src/{V2 => V6}/Types/ChangeStatusError.cs | 57 +- src/{V2 => V6}/Types/ChangeStatusOperation.cs | 24 +- .../Types/ChangeStatusResourceType.cs | 26 +- src/{V2 => V6}/Types/ClickLocation.cs | 322 +- src/{V2 => V6}/Types/ClickType.cs | 26 +- src/{V2 => V6}/Types/ClickView.cs | 364 +- src/{V2 => V6}/Types/CollectionSizeError.cs | 26 +- src/V6/Types/CombinedAudience.cs | 401 + src/V6/Types/CombinedAudienceStatus.cs | 221 + src/{V2 => V6}/Types/ContentLabelType.cs | 48 +- src/{V2 => V6}/Types/ContextError.cs | 26 +- src/V6/Types/ConversionAction.cs | 2070 ++++ .../Types/ConversionActionCategory.cs | 98 +- .../Types/ConversionActionCountingType.cs | 26 +- src/{V2 => V6}/Types/ConversionActionError.cs | 44 +- .../Types/ConversionActionStatus.cs | 24 +- src/V6/Types/ConversionActionType.cs | 399 + .../Types/ConversionAdjustmentType.cs | 24 +- .../Types/ConversionAdjustmentUploadError.cs | 41 +- .../Types/ConversionAttributionEventType.cs | 26 +- src/{V2 => V6}/Types/ConversionLagBucket.cs | 24 +- .../Types/ConversionOrAdjustmentLagBucket.cs | 26 +- src/{V2 => V6}/Types/ConversionUploadError.cs | 26 +- src/{V2 => V6}/Types/CountryCodeError.cs | 26 +- src/{V2 => V6}/Types/Criteria.cs | 5496 ++++++----- .../Types/CriterionCategoryAvailability.cs | 346 +- ...riterionCategoryChannelAvailabilityMode.cs | 24 +- ...CriterionCategoryLocaleAvailabilityMode.cs | 24 +- src/{V2 => V6}/Types/CriterionError.cs | 373 +- .../Types/CriterionSystemServingStatus.cs | 26 +- src/{V2 => V6}/Types/CriterionType.cs | 38 +- src/{V2 => V6}/Types/CurrencyCodeError.cs | 24 +- src/V6/Types/CurrencyConstant.cs | 440 + src/V6/Types/CustomAudience.cs | 861 ++ src/V6/Types/CustomAudienceError.cs | 249 + src/V6/Types/CustomAudienceMemberType.cs | 229 + src/V6/Types/CustomAudienceStatus.cs | 221 + src/V6/Types/CustomAudienceType.cs | 231 + src/{V2 => V6}/Types/CustomInterest.cs | 396 +- src/{V2 => V6}/Types/CustomInterestError.cs | 24 +- .../Types/CustomInterestMemberType.cs | 24 +- src/{V2 => V6}/Types/CustomInterestStatus.cs | 26 +- src/{V2 => V6}/Types/CustomInterestType.cs | 26 +- src/{V2 => V6}/Types/CustomParameter.cs | 148 +- .../Types/CustomPlaceholderField.cs | 24 +- src/{V2 => V6}/Types/Customer.cs | 1287 +-- src/V6/Types/CustomerClient.cs | 700 ++ src/{V2 => V6}/Types/CustomerClientLink.cs | 263 +- .../Types/CustomerClientLinkError.cs | 37 +- src/{V2 => V6}/Types/CustomerError.cs | 26 +- .../Types/CustomerExtensionSetting.cs | 115 +- src/{V2 => V6}/Types/CustomerFeed.cs | 165 +- src/{V2 => V6}/Types/CustomerFeedError.cs | 26 +- src/{V2 => V6}/Types/CustomerLabel.cs | 158 +- src/{V2 => V6}/Types/CustomerManagerLink.cs | 203 +- .../Types/CustomerManagerLinkError.cs | 36 +- .../Types/CustomerMatchUploadKeyType.cs | 24 +- .../Types/CustomerNegativeCriterion.cs | 227 +- ...ayPerConversionEligibilityFailureReason.cs | 24 +- src/V6/Types/CustomerUserAccess.cs | 475 + src/V6/Types/CustomerUserAccessError.cs | 236 + src/{V2 => V6}/Types/DataDrivenModelStatus.cs | 26 +- src/{V2 => V6}/Types/DatabaseError.cs | 40 +- src/{V2 => V6}/Types/DateError.cs | 26 +- src/{V2 => V6}/Types/DateRangeError.cs | 24 +- src/{V2 => V6}/Types/Dates.cs | 147 +- src/{V2 => V6}/Types/DayOfWeek.cs | 24 +- src/{V2 => V6}/Types/DetailPlacementView.cs | 315 +- src/{V2 => V6}/Types/Device.cs | 24 +- .../Types/DisplayAdFormatSetting.cs | 24 +- src/{V2 => V6}/Types/DisplayKeywordView.cs | 37 +- .../Types/DisplayUploadProductType.cs | 24 +- src/{V2 => V6}/Types/DistanceBucket.cs | 26 +- src/{V2 => V6}/Types/DistanceView.cs | 131 +- src/{V2 => V6}/Types/DistinctError.cs | 26 +- src/V6/Types/DomainCategory.cs | 655 ++ .../Types/DsaPageFeedCriterionField.cs | 24 +- .../Types/DynamicSearchAdsSearchTermView.cs | 611 ++ .../Types/EducationPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/EnumError.cs | 26 +- src/{V2 => V6}/Types/Errors.cs | 2635 +++-- .../Types/ExpandedLandingPageView.cs | 104 +- .../Types/ExplorerAutoOptimizerSetting.cs | 96 +- src/{V2 => V6}/Types/ExtensionFeedItem.cs | 719 +- .../Types/ExtensionFeedItemError.cs | 96 +- .../Types/ExtensionSettingDevice.cs | 26 +- src/{V2 => V6}/Types/ExtensionSettingError.cs | 101 +- src/{V2 => V6}/Types/ExtensionType.cs | 38 +- src/{V2 => V6}/Types/Extensions.cs | 3895 ++++---- src/V6/Types/ExtensionsResourceNames.g.cs | 32 + .../Types/ExternalConversionSource.cs | 65 +- src/{V2 => V6}/Types/Feed.cs | 1002 +- .../Types/FeedAttributeReferenceError.cs | 24 +- src/{V2 => V6}/Types/FeedAttributeType.cs | 24 +- src/{V2 => V6}/Types/FeedCommon.cs | 150 +- src/{V2 => V6}/Types/FeedError.cs | 40 +- src/{V2 => V6}/Types/FeedItem.cs | 1237 +-- src/{V2 => V6}/Types/FeedItemError.cs | 26 +- .../Types/FeedItemQualityApprovalStatus.cs | 26 +- .../Types/FeedItemQualityDisapprovalReason.cs | 24 +- src/V6/Types/FeedItemSet.cs | 545 ++ src/V6/Types/FeedItemSetError.cs | 245 + src/V6/Types/FeedItemSetFilterTypeInfos.cs | 667 ++ src/V6/Types/FeedItemSetLink.cs | 318 + src/V6/Types/FeedItemSetLinkError.cs | 222 + src/V6/Types/FeedItemSetStatus.cs | 220 + src/V6/Types/FeedItemSetStringFilterType.cs | 216 + src/{V2 => V6}/Types/FeedItemStatus.cs | 24 +- src/{V2 => V6}/Types/FeedItemTarget.cs | 440 +- src/{V2 => V6}/Types/FeedItemTargetDevice.cs | 24 +- src/{V2 => V6}/Types/FeedItemTargetError.cs | 26 +- .../Types/FeedItemTargetStatus.cs} | 76 +- src/{V2 => V6}/Types/FeedItemTargetType.cs | 24 +- .../Types/FeedItemValidationError.cs | 166 +- .../Types/FeedItemValidationStatus.cs | 24 +- src/{V2 => V6}/Types/FeedLinkStatus.cs | 24 +- src/{V2 => V6}/Types/FeedMapping.cs | 561 +- .../Types/FeedMappingCriterionType.cs | 26 +- src/{V2 => V6}/Types/FeedMappingError.cs | 37 +- src/{V2 => V6}/Types/FeedMappingStatus.cs | 26 +- src/{V2 => V6}/Types/FeedOrigin.cs | 26 +- src/{V2 => V6}/Types/FeedPlaceholderView.cs | 62 +- src/{V2 => V6}/Types/FeedStatus.cs | 26 +- src/{V2 => V6}/Types/FieldError.cs | 34 +- src/{V2 => V6}/Types/FieldMaskError.cs | 24 +- src/{V2 => V6}/Types/FinalAppUrl.cs | 115 +- .../Types/FlightPlaceholderField.cs | 24 +- src/{V2 => V6}/Types/FrequencyCap.cs | 249 +- src/{V2 => V6}/Types/FrequencyCapEventType.cs | 24 +- src/{V2 => V6}/Types/FrequencyCapLevel.cs | 26 +- src/{V2 => V6}/Types/FrequencyCapTimeUnit.cs | 26 +- src/{V2 => V6}/Types/FunctionError.cs | 24 +- src/{V2 => V6}/Types/FunctionParsingError.cs | 24 +- src/{V2 => V6}/Types/GenderType.cs | 24 +- src/{V2 => V6}/Types/GenderView.cs | 37 +- src/{V2 => V6}/Types/GeoTargetConstant.cs | 427 +- .../Types/GeoTargetConstantStatus.cs | 24 +- .../Types/GeoTargetConstantSuggestionError.cs | 26 +- .../Types/GeoTargetingRestriction.cs | 24 +- src/{V2 => V6}/Types/GeoTargetingType.cs | 26 +- src/{V2 => V6}/Types/GeographicView.cs | 131 +- src/{V2 => V6}/Types/GoogleAdsField.cs | 534 +- .../Types/GoogleAdsFieldCategory.cs | 26 +- .../Types/GoogleAdsFieldDataType.cs | 24 +- src/{V2 => V6}/Types/GroupPlacementView.cs | 255 +- src/{V2 => V6}/Types/HeaderError.cs | 36 +- .../Types/HotelDateSelectionType.cs | 24 +- src/{V2 => V6}/Types/HotelGroupView.cs | 36 +- src/{V2 => V6}/Types/HotelPerformanceView.cs | 36 +- src/{V2 => V6}/Types/HotelPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/HotelPriceBucket.cs | 26 +- src/{V2 => V6}/Types/HotelRateType.cs | 24 +- src/{V2 => V6}/Types/IdError.cs | 26 +- src/{V2 => V6}/Types/ImageError.cs | 42 +- src/V6/Types/ImagePlaceholderField.cs | 45 + src/{V2 => V6}/Types/IncomeRangeType.cs | 24 +- src/V6/Types/IncomeRangeView.cs | 237 + src/{V2 => V6}/Types/InteractionEventType.cs | 24 +- src/{V2 => V6}/Types/InteractionType.cs | 24 +- src/{V2 => V6}/Types/InternalError.cs | 40 +- src/V6/Types/Invoice.cs | 1893 ++++ src/{V2 => V6}/Types/InvoiceError.cs | 26 +- src/{V2 => V6}/Types/InvoiceType.cs | 24 +- src/{V2 => V6}/Types/JobPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/KeywordMatchType.cs | 26 +- src/{V2 => V6}/Types/KeywordPlan.cs | 228 +- src/{V2 => V6}/Types/KeywordPlanAdGroup.cs | 286 +- .../Types/KeywordPlanAdGroupError.cs | 26 +- src/V6/Types/KeywordPlanAdGroupKeyword.cs | 542 ++ .../Types/KeywordPlanAdGroupKeywordError.cs} | 82 +- src/{V2 => V6}/Types/KeywordPlanCampaign.cs | 432 +- .../Types/KeywordPlanCampaignError.cs | 35 +- src/V6/Types/KeywordPlanCampaignKeyword.cs | 488 + .../Types/KeywordPlanCampaignKeywordError.cs} | 73 +- src/V6/Types/KeywordPlanCommon.cs | 766 ++ .../Types/KeywordPlanCompetitionLevel.cs | 26 +- src/{V2 => V6}/Types/KeywordPlanError.cs | 26 +- .../Types/KeywordPlanForecastInterval.cs | 26 +- src/{V2 => V6}/Types/KeywordPlanIdeaError.cs | 24 +- src/{V2 => V6}/Types/KeywordPlanNetwork.cs | 24 +- src/{V2 => V6}/Types/KeywordView.cs | 37 +- src/{V2 => V6}/Types/Label.cs | 222 +- src/{V2 => V6}/Types/LabelError.cs | 24 +- src/{V2 => V6}/Types/LabelStatus.cs | 26 +- src/{V2 => V6}/Types/LandingPageView.cs | 102 +- src/{V2 => V6}/Types/LanguageCodeError.cs | 24 +- src/{V2 => V6}/Types/LanguageConstant.cs | 282 +- src/V6/Types/LeadFormCallToActionType.cs | 273 + src/V6/Types/LeadFormDesiredIntent.cs | 220 + src/V6/Types/LeadFormFieldUserInputType.cs | 532 + .../LeadFormPostSubmitCallToActionType.cs | 231 + .../Types/LegacyAppInstallAdAppStore.cs | 24 +- src/V6/Types/LinkedAccountType.cs | 226 + src/{V2 => V6}/Types/ListOperationError.cs | 24 +- src/{V2 => V6}/Types/ListingGroupType.cs | 24 +- src/{V2 => V6}/Types/LocalPlaceholderField.cs | 26 +- ...ocationExtensionTargetingCriterionField.cs | 24 +- .../Types/LocationGroupRadiusUnits.cs | 39 +- .../Types/LocationPlaceholderField.cs | 26 +- src/V6/Types/LocationSourceType.cs | 221 + src/{V2 => V6}/Types/LocationView.cs | 37 +- src/{V2 => V6}/Types/ManagedPlacementView.cs | 38 +- src/{V2 => V6}/Types/ManagerLinkError.cs | 47 +- src/{V2 => V6}/Types/ManagerLinkStatus.cs | 24 +- src/{V2 => V6}/Types/MatchingFunction.cs | 512 +- .../Types/MatchingFunctionContextType.cs | 26 +- .../Types/MatchingFunctionOperator.cs | 26 +- src/{V2 => V6}/Types/MediaBundleError.cs | 26 +- src/{V2 => V6}/Types/MediaFile.cs | 1014 +- src/{V2 => V6}/Types/MediaFileError.cs | 26 +- src/{V2 => V6}/Types/MediaType.cs | 24 +- src/V6/Types/MediaUploadError.cs | 373 + src/{V2 => V6}/Types/MerchantCenterLink.cs | 203 +- .../Types/MerchantCenterLinkStatus.cs | 24 +- .../Types/MessagePlaceholderField.cs | 26 +- src/V6/Types/Metrics.cs | 6114 ++++++++++++ src/{V2 => V6}/Types/MimeType.cs | 26 +- src/{V2 => V6}/Types/MinuteOfHour.cs | 26 +- .../Types/MobileAppCategoryConstant.cs | 165 +- src/V6/Types/MobileAppVendor.cs | 220 + src/{V2 => V6}/Types/MobileDeviceConstant.cs | 317 +- src/{V2 => V6}/Types/MobileDeviceType.cs | 24 +- src/{V2 => V6}/Types/MonthOfYear.cs | 26 +- src/{V2 => V6}/Types/MultiplierError.cs | 24 +- src/{V2 => V6}/Types/MutateError.cs | 43 +- src/{V2 => V6}/Types/NegativeGeoTargetType.cs | 24 +- .../Types/NewResourceCreationError.cs | 26 +- .../Types/NotAllowlistedError.cs} | 66 +- src/{V2 => V6}/Types/NotEmptyError.cs | 24 +- src/{V2 => V6}/Types/NullError.cs | 26 +- src/V6/Types/OfflineUserData.cs | 3151 ++++++ src/V6/Types/OfflineUserDataJob.cs | 614 ++ src/V6/Types/OfflineUserDataJobError.cs | 366 + .../Types/OfflineUserDataJobFailureReason.cs | 223 + src/V6/Types/OfflineUserDataJobStatus.cs | 229 + src/V6/Types/OfflineUserDataJobType.cs | 231 + .../Types/OperatingSystemVersionConstant.cs | 325 +- .../OperatingSystemVersionOperatorType.cs | 24 +- .../Types/OperationAccessDeniedError.cs | 26 +- src/{V2 => V6}/Types/OperatorError.cs | 24 +- src/V6/Types/OptimizationGoalType.cs | 223 + src/V6/Types/PageOnePromotedStrategyGoal.cs | 45 + .../Types/PaidOrganicSearchTermView.cs | 105 +- src/{V2 => V6}/Types/ParentalStatusType.cs | 24 +- src/{V2 => V6}/Types/ParentalStatusView.cs | 37 +- src/{V2 => V6}/Types/PartialFailureError.cs | 24 +- src/{V2 => V6}/Types/PaymentMode.cs | 40 +- src/V6/Types/PaymentsAccount.cs | 543 ++ src/V6/Types/PaymentsAccountError.cs | 217 + src/{V2 => V6}/Types/PlaceholderType.cs | 37 +- src/{V2 => V6}/Types/PlacementType.cs | 26 +- src/{V2 => V6}/Types/Policy.cs | 933 +- src/{V2 => V6}/Types/PolicyApprovalStatus.cs | 24 +- src/{V2 => V6}/Types/PolicyFindingError.cs | 24 +- src/{V2 => V6}/Types/PolicyReviewStatus.cs | 26 +- src/{V2 => V6}/Types/PolicyTopicEntryType.cs | 26 +- ...TopicEvidenceDestinationMismatchUrlType.cs | 26 +- ...opicEvidenceDestinationNotWorkingDevice.cs | 24 +- ...idenceDestinationNotWorkingDnsErrorType.cs | 24 +- .../Types/PolicyValidationParameterError.cs | 26 +- src/{V2 => V6}/Types/PolicyViolationError.cs | 26 +- src/{V2 => V6}/Types/PositiveGeoTargetType.cs | 28 +- src/{V2 => V6}/Types/PreferredContentType.cs | 26 +- .../Types/PriceExtensionPriceQualifier.cs | 26 +- .../Types/PriceExtensionPriceUnit.cs | 24 +- src/{V2 => V6}/Types/PriceExtensionType.cs | 26 +- src/{V2 => V6}/Types/PricePlaceholderField.cs | 26 +- .../Types/ProductBiddingCategoryConstant.cs | 415 +- .../Types/ProductBiddingCategoryLevel.cs | 24 +- .../Types/ProductBiddingCategoryStatus.cs | 26 +- src/{V2 => V6}/Types/ProductChannel.cs | 24 +- .../Types/ProductChannelExclusivity.cs | 26 +- src/{V2 => V6}/Types/ProductCondition.cs | 26 +- .../Types/ProductCustomAttributeIndex.cs} | 68 +- src/{V2 => V6}/Types/ProductGroupView.cs | 36 +- src/{V2 => V6}/Types/ProductTypeLevel.cs | 24 +- .../PromotionExtensionDiscountModifier.cs | 26 +- .../Types/PromotionExtensionOccasion.cs | 24 +- .../Types/PromotionPlaceholderField.cs | 26 +- src/{V2 => V6}/Types/ProximityRadiusUnits.cs | 26 +- src/{V2 => V6}/Types/QualityScoreBucket.cs | 24 +- src/{V2 => V6}/Types/QueryError.cs | 26 +- src/{V2 => V6}/Types/QuotaError.cs | 24 +- src/{V2 => V6}/Types/RangeError.cs | 24 +- src/{V2 => V6}/Types/ReachPlanAdLength.cs | 26 +- src/{V2 => V6}/Types/ReachPlanAgeRange.cs | 26 +- src/{V2 => V6}/Types/ReachPlanError.cs | 37 +- src/V6/Types/ReachPlanNetwork.cs | 226 + .../Types/RealEstatePlaceholderField.cs | 24 +- .../Types/RealTimeBiddingSetting.cs | 96 +- src/{V2 => V6}/Types/Recommendation.cs | 3325 ++++--- src/{V2 => V6}/Types/RecommendationError.cs | 24 +- src/{V2 => V6}/Types/RecommendationType.cs | 47 +- src/{V2 => V6}/Types/RegionCodeError.cs | 24 +- src/{V2 => V6}/Types/RemarketingAction.cs | 189 +- src/{V2 => V6}/Types/RequestError.cs | 43 +- .../Types/ResourceAccessDeniedError.cs | 24 +- src/V6/Types/ResourceChangeOperation.cs | 227 + .../Types/ResourceCountLimitExceededError.cs | 24 +- src/V6/Types/ResponseContentType.cs | 217 + .../Types/SearchEngineResultsPageType.cs | 24 +- src/{V2 => V6}/Types/SearchTermMatchType.cs | 26 +- .../Types/SearchTermTargetingStatus.cs | 26 +- src/{V2 => V6}/Types/SearchTermView.cs | 199 +- src/V6/Types/Segments.cs | 4539 +++++++++ src/V6/Types/SegmentsResourceNames.g.cs | 32 + src/{V2 => V6}/Types/ServedAssetFieldType.cs | 24 +- src/{V2 => V6}/Types/SettingError.cs | 72 +- src/{V2 => V6}/Types/SharedCriterion.cs | 286 +- src/{V2 => V6}/Types/SharedCriterionError.cs | 26 +- src/{V2 => V6}/Types/SharedSet.cs | 348 +- src/{V2 => V6}/Types/SharedSetError.cs | 26 +- src/{V2 => V6}/Types/SharedSetStatus.cs | 24 +- src/{V2 => V6}/Types/SharedSetType.cs | 26 +- .../Types/ShoppingPerformanceView.cs | 38 +- src/V6/Types/Simulation.cs | 4293 +++++++++ .../Types/SimulationModificationMethod.cs | 24 +- src/{V2 => V6}/Types/SimulationType.cs | 43 +- .../Types/SitelinkPlaceholderField.cs | 24 +- src/{V2 => V6}/Types/SizeLimitError.cs | 24 +- src/{V2 => V6}/Types/Slot.cs | 26 +- src/{V2 => V6}/Types/SpendingLimitType.cs | 24 +- src/{V2 => V6}/Types/StringFormatError.cs | 26 +- src/{V2 => V6}/Types/StringLengthError.cs | 39 +- .../StructuredSnippetPlaceholderField.cs | 24 +- src/V6/Types/SummaryRowSetting.cs | 226 + .../Types/SystemManagedEntitySource.cs | 24 +- src/{V2 => V6}/Types/TagSnippet.cs | 199 +- .../Types/TargetCpaOptInRecommendationGoal.cs | 26 +- .../Types/TargetImpressionShareLocation.cs | 24 +- src/{V2 => V6}/Types/TargetingDimension.cs | 26 +- src/V6/Types/TargetingSetting.cs | 758 ++ src/{V2 => V6}/Types/TextLabel.cs | 145 +- src/V6/Types/ThirdPartyAppAnalyticsLink.cs | 292 + .../Types/ThirdPartyAppAnalyticsLinkError.cs | 233 + src/{V2 => V6}/Types/TimeType.cs | 26 +- src/V6/Types/TimeZoneError.cs | 216 + src/{V2 => V6}/Types/TopicConstant.cs | 174 +- src/{V2 => V6}/Types/TopicView.cs | 36 +- .../Types/TrackingCodePageFormat.cs | 26 +- src/{V2 => V6}/Types/TrackingCodeType.cs | 24 +- .../Types/TravelPlaceholderField.cs | 24 +- src/{V2 => V6}/Types/UrlCollection.cs | 170 +- src/{V2 => V6}/Types/UrlFieldError.cs | 24 +- .../Types/UserDataError.cs} | 86 +- src/V6/Types/UserIdentifierSource.cs | 224 + src/{V2 => V6}/Types/UserInterest.cs | 337 +- .../Types/UserInterestTaxonomyType.cs | 26 +- src/{V2 => V6}/Types/UserList.cs | 1061 +- src/{V2 => V6}/Types/UserListAccessStatus.cs | 26 +- src/{V2 => V6}/Types/UserListClosingReason.cs | 26 +- .../Types/UserListCombinedRuleOperator.cs | 24 +- .../Types/UserListCrmDataSourceType.cs | 24 +- .../Types/UserListDateRuleItemOperator.cs | 24 +- src/{V2 => V6}/Types/UserListError.cs | 44 +- .../Types/UserListLogicalRuleOperator.cs | 24 +- .../Types/UserListMembershipStatus.cs | 24 +- .../Types/UserListNumberRuleItemOperator.cs | 26 +- .../Types/UserListPrepopulationStatus.cs | 26 +- src/{V2 => V6}/Types/UserListRuleType.cs | 26 +- src/{V2 => V6}/Types/UserListSizeRange.cs | 24 +- .../Types/UserListStringRuleItemOperator.cs | 24 +- src/{V2 => V6}/Types/UserListType.cs | 26 +- src/{V2 => V6}/Types/UserLists.cs | 1211 +-- src/{V2 => V6}/Types/UserLocationView.cs | 164 +- src/{V2 => V6}/Types/Value.cs | 26 +- .../Types/VanityPharmaDisplayUrlMode.cs | 24 +- src/{V2 => V6}/Types/VanityPharmaText.cs | 26 +- src/{V2 => V6}/Types/Video.cs | 277 +- .../Types/WebpageConditionOperand.cs | 24 +- .../Types/WebpageConditionOperator.cs | 24 +- .../Types/YoutubeVideoRegistrationError.cs | 40 +- tests/Config/GoogleAdsConfigTests.cs | 141 +- ...Google.Ads.GoogleAds.Tests.Examples.csproj | 4 +- .../AdvancedOperations/AddAppCampaignTest.cs | 4 +- .../AddSmartDisplayAdTest.cs | 4 +- .../BasicOperations/AddAdGroupsTest.cs | 4 +- .../BasicOperations/AddCampaignsTest.cs | 4 +- .../BasicOperations/AddExpandedTextAdsTest.cs | 4 +- .../BasicOperations/AddKeywordsTest.cs | 4 +- .../AddResponsiveSearchAdTest.cs | 4 +- .../BasicOperations/GetAdGroupsTest.cs | 4 +- .../GetArtifactMetadataTest.cs | 4 +- .../BasicOperations/GetCampaignsTest.cs | 4 +- .../BasicOperations/GetExpandedTextAdsTest.cs | 4 +- .../BasicOperations/GetKeywordsTest.cs | 4 +- .../GetResponsiveSearchAdsTest.cs | 4 +- .../{V5 => V6}/BasicOperations/PauseAdTest.cs | 4 +- .../BasicOperations/RemoveAdGroupTest.cs | 4 +- .../BasicOperations/RemoveAdTest.cs | 4 +- .../BasicOperations/RemoveCampaignTest.cs | 4 +- .../BasicOperations/RemoveKeywordTest.cs | 4 +- .../BasicOperations/UpdateAdGroupTest.cs | 4 +- .../BasicOperations/UpdateCampaignTest.cs | 4 +- .../UpdateExpandedTextAdsTest.cs | 4 +- .../BasicOperations/UpdateKeywordTest.cs | 4 +- .../AddCampaignDraftTest.cs | 4 +- .../AddCompleteCampaignsUsingBatchJobTest.cs | 4 +- .../CreateCampaignExperimentTest.cs | 8 +- .../GraduateCampaignExperimentTest.cs | 4 +- .../UpdateCampaignCriterionBidModifierTest.cs | 4 +- .../CampaignManagement/ValidateTextAdTest.cs | 4 +- ...andleExpandedTextAdPolicyViolationsTest.cs | 4 +- .../HandleKeywordPolicyViolationsTest.cs | 4 +- .../Examples/{V5 => V6}/ExampleTestsUtils.cs | 42 +- .../AddAffiliateLocationExtensionsTest.cs | 4 +- ...dGoogleMyBusinessLocationExtensionsTest.cs | 4 +- .../{V5 => V6}/Extensions/AddPricesTest.cs | 4 +- .../{V5 => V6}/Misc/GetAllImageAssetsTest.cs | 4 +- .../Misc/GetAllVideosAndImagesTest.cs | 4 +- .../{V5 => V6}/Misc/UploadImageAssetTest.cs | 4 +- .../{V5 => V6}/Misc/UploadImageTest.cs | 4 +- .../{V5 => V6}/Misc/UploadMediaBundleTest.cs | 4 +- .../ShoppingAds/AddListingScopeTest.cs | 4 +- .../ApproveMerchantCenterLinkTest.cs | 4 +- ...earchForLanguageAndCarrierConstantsTest.cs | 4 +- tests/Google.Ads.GoogleAds.Tests.csproj | 8 +- tests/Logging/{V2 => V6}/LogEntryTests.cs | 6 +- .../Logging/{V2 => V6}/LoggingHandlerTests.cs | 16 +- tests/TestResources.Designer.cs | 13 + tests/TestResources.resx | 68 +- tests/Util/FieldMasksTest.cs | 68 +- .../KeywordPlanIdeaServiceClientTest.g.cs | 95 - .../KeywordPlanKeywordServiceClientTest.g.cs | 299 - ...dPlanNegativeKeywordServiceClientTest.g.cs | 293 - .../Services/MutateJobServiceClientTest.g.cs | 539 -- .../KeywordPlanServiceClientTest.g.cs | 124 +- .../KeywordPlanServiceClientTest.g.cs | 178 +- .../KeywordPlanServiceClientTest.g.cs | 232 +- .../GoogleAdsFailureExtensionsTests.cs | 8 +- ...ccountBudgetProposalServiceClientTest.g.cs | 176 +- .../AccountBudgetServiceClientTest.g.cs | 140 +- .../AccountLinkServiceClientTest.g.cs | 360 + .../AdGroupAdAssetViewServiceClientTest.g.cs | 62 +- .../AdGroupAdLabelServiceClientTest.g.cs | 54 +- .../Services/AdGroupAdServiceClientTest.g.cs | 46 +- .../AdGroupAudienceViewServiceClientTest.g.cs | 30 +- .../AdGroupBidModifierServiceClientTest.g.cs | 84 +- ...dGroupCriterionLabelServiceClientTest.g.cs | 54 +- .../AdGroupCriterionServiceClientTest.g.cs | 324 +- ...pCriterionSimulationServiceClientTest.g.cs | 76 +- ...roupExtensionSettingServiceClientTest.g.cs | 68 +- .../AdGroupFeedServiceClientTest.g.cs | 72 +- .../AdGroupLabelServiceClientTest.g.cs | 54 +- .../Services/AdGroupServiceClientTest.g.cs | 216 +- .../AdGroupSimulationServiceClientTest.g.cs | 88 +- .../AdParameterServiceClientTest.g.cs | 42 +- .../AdScheduleViewServiceClientTest.g.cs | 30 +- .../Services/AdServiceClientTest.g.cs | 216 +- .../AgeRangeViewServiceClientTest.g.cs | 30 +- .../Services/AssetServiceClientTest.g.cs | 114 +- .../Services/BatchJobServiceClientTest.g.cs | 543 ++ .../BiddingStrategyServiceClientTest.g.cs | 100 +- .../BillingSetupServiceClientTest.g.cs | 80 +- .../CampaignAssetServiceClientTest.g.cs | 293 + ...CampaignAudienceViewServiceClientTest.g.cs | 30 +- .../CampaignBidModifierServiceClientTest.g.cs | 56 +- .../CampaignBudgetServiceClientTest.g.cs | 106 +- .../CampaignCriterionServiceClientTest.g.cs | 108 +- ...nCriterionSimulationServiceClientTest.g.cs | 70 +- .../CampaignDraftServiceClientTest.g.cs | 82 +- .../CampaignExperimentServiceClientTest.g.cs | 94 +- ...aignExtensionSettingServiceClientTest.g.cs | 68 +- .../CampaignFeedServiceClientTest.g.cs | 72 +- .../CampaignLabelServiceClientTest.g.cs | 54 +- .../Services/CampaignServiceClientTest.g.cs | 198 +- .../CampaignSharedSetServiceClientTest.g.cs | 56 +- .../CarrierConstantServiceClientTest.g.cs | 42 +- .../ChangeStatusServiceClientTest.g.cs | 164 +- .../Services/ClickViewServiceClientTest.g.cs | 68 +- .../CombinedAudienceServiceClientTest.g.cs | 176 + .../ConversionActionServiceClientTest.g.cs | 148 +- ...sionAdjustmentUploadServiceClientTest.g.cs | 4 +- .../ConversionUploadServiceClientTest.g.cs | 4 +- .../CurrencyConstantServiceClientTest.g.cs | 175 + .../CustomAudienceServiceClientTest.g.cs | 316 + .../CustomInterestServiceClientTest.g.cs | 68 +- .../CustomerClientLinkServiceClientTest.g.cs | 44 +- .../CustomerClientServiceClientTest.g.cs | 30 +- ...omerExtensionSettingServiceClientTest.g.cs | 56 +- .../CustomerFeedServiceClientTest.g.cs | 60 +- .../CustomerLabelServiceClientTest.g.cs | 30 +- .../CustomerManagerLinkServiceClientTest.g.cs | 132 +- ...merNegativeCriterionServiceClientTest.g.cs | 58 +- .../Services/CustomerServiceClientTest.g.cs | 150 +- .../CustomerUserAccessServiceClientTest.g.cs | 266 + .../DetailPlacementViewServiceClientTest.g.cs | 44 +- .../DisplayKeywordViewServiceClientTest.g.cs | 30 +- .../DistanceViewServiceClientTest.g.cs | 32 +- .../DomainCategoryServiceClientTest.g.cs | 42 +- ...rchAdsSearchTermViewServiceClientTest.g.cs | 48 +- ...andedLandingPageViewServiceClientTest.g.cs | 30 +- .../ExtensionFeedItemServiceClientTest.g.cs | 102 +- .../Services/FeedItemServiceClientTest.g.cs | 84 +- .../FeedItemSetLinkServiceClientTest.g.cs | 275 + .../FeedItemSetServiceClientTest.g.cs | 301 + .../FeedItemTargetServiceClientTest.g.cs | 102 +- .../FeedMappingServiceClientTest.g.cs | 56 +- .../FeedPlaceholderViewServiceClientTest.g.cs | 44 +- .../Services/FeedServiceClientTest.g.cs | 58 +- .../Services/GenderViewServiceClientTest.g.cs | 30 +- .../GeoTargetConstantServiceClientTest.g.cs | 62 +- .../GeographicViewServiceClientTest.g.cs | 32 +- .../GoogleAdsFieldServiceClientTest.g.cs | 32 +- .../Services/GoogleAdsServiceClientTest.g.cs | 7 +- .../GroupPlacementViewServiceClientTest.g.cs | 44 +- .../HotelGroupViewServiceClientTest.g.cs | 30 +- ...HotelPerformanceViewServiceClientTest.g.cs | 30 +- .../IncomeRangeViewServiceClientTest.g.cs | 151 + .../Services/InvoiceServiceClientTest.g.cs | 8 +- ...rdPlanAdGroupKeywordServiceClientTest.g.cs | 305 + .../KeywordPlanAdGroupServiceClientTest.g.cs | 54 +- ...dPlanCampaignKeywordServiceClientTest.g.cs | 299 + .../KeywordPlanCampaignServiceClientTest.g.cs | 128 +- .../KeywordPlanIdeaServiceClientTest.g.cs | 23 + .../KeywordPlanServiceClientTest.g.cs | 454 +- .../KeywordViewServiceClientTest.g.cs | 30 +- .../Services/LabelServiceClientTest.g.cs | 60 +- .../LandingPageViewServiceClientTest.g.cs | 30 +- .../LanguageConstantServiceClientTest.g.cs | 42 +- .../LocationViewServiceClientTest.g.cs | 30 +- ...ManagedPlacementViewServiceClientTest.g.cs | 30 +- .../Services/MediaFileServiceClientTest.g.cs | 82 +- .../MerchantCenterLinkServiceClientTest.g.cs | 44 +- ...eAppCategoryConstantServiceClientTest.g.cs | 42 +- ...MobileDeviceConstantServiceClientTest.g.cs | 56 +- .../OfflineUserDataJobServiceClientTest.g.cs | 443 + ...ystemVersionConstantServiceClientTest.g.cs | 56 +- ...rganicSearchTermViewServiceClientTest.g.cs | 30 +- .../ParentalStatusViewServiceClientTest.g.cs | 30 +- .../PaymentsAccountServiceClientTest.g.cs | 6 +- ...dingCategoryConstantServiceClientTest.g.cs | 68 +- .../ProductGroupViewServiceClientTest.g.cs | 30 +- .../Services/ReachPlanServiceClientTest.g.cs | 22 +- .../RecommendationServiceClientTest.g.cs | 104 +- .../RemarketingActionServiceClientTest.g.cs | 56 +- .../SearchTermViewServiceClientTest.g.cs | 56 +- .../SharedCriterionServiceClientTest.g.cs | 58 +- .../Services/SharedSetServiceClientTest.g.cs | 58 +- ...ppingPerformanceViewServiceClientTest.g.cs | 30 +- ...artyAppAnalyticsLinkServiceClientTest.g.cs | 107 + .../TopicConstantServiceClientTest.g.cs | 42 +- .../Services/TopicViewServiceClientTest.g.cs | 30 +- .../Services/UserDataServiceClientTest.g.cs | 83 + .../UserInterestServiceClientTest.g.cs | 82 +- .../Services/UserListServiceClientTest.g.cs | 160 +- .../UserLocationViewServiceClientTest.g.cs | 30 +- .../Services/VideoServiceClientTest.g.cs | 30 +- tests/{V2 => V6}/TestUtils.cs | 6 +- 1904 files changed, 173344 insertions(+), 90043 deletions(-) create mode 100644 examples/AccountManagement/GetChangeDetails.cs rename examples/AccountManagement/{GetAccountChanges.cs => GetChangeSummary.cs} (78%) create mode 100644 examples/AccountManagement/UpdateUserAccess.cs create mode 100644 examples/AdvancedOperations/AddLocalCampaign.cs rename examples/Authentication/{AuthenticateInStandaloneApplication/AuthenticateInStandaloneApplication.csproj => AuthenticateInDesktopApplication/AuthenticateInDesktopApplication.csproj} (93%) rename examples/Authentication/{AuthenticateInStandaloneApplication => AuthenticateInDesktopApplication}/Program.cs (98%) create mode 100644 examples/Extensions/AddLeadFormExtension.cs create mode 100644 examples/Extensions/RemoveEntireSitelinkCampaignExtensionSetting.cs create mode 100644 examples/HotelAds/AddHotelListingGroupTree.cs create mode 100644 examples/Remarketing/SetupAdvancedRemarketing.cs create mode 100644 examples/Remarketing/SetupRemarketing.cs create mode 100644 examples/Remarketing/UpdateAudienceTargetRestriction.cs create mode 100644 src/Lib/EnvironmentVariableNames.cs delete mode 100644 src/V2/Resources/KeywordPlanKeywordResourceNames.g.cs delete mode 100644 src/V2/Resources/MutateJobResourceNames.g.cs delete mode 100644 src/V2/ServiceHelperMethods.cs delete mode 100644 src/V2/Services/KeywordPlanKeywordServiceGrpc.cs delete mode 100644 src/V2/Services/KeywordPlanNegativeKeywordServiceResourceNames.g.cs delete mode 100644 src/V2/Services/KeywordPlanServiceGrpc.cs delete mode 100644 src/V2/Services/MutateJobServiceGrpc.cs delete mode 100644 src/V2/Types/Asset.cs delete mode 100644 src/V2/Types/AssetTypes.cs delete mode 100644 src/V2/Types/CampaignBudget.cs delete mode 100644 src/V2/Types/ChangeStatus.cs delete mode 100644 src/V2/Types/ConversionAction.cs delete mode 100644 src/V2/Types/CustomerClient.cs delete mode 100644 src/V2/Types/DomainCategory.cs delete mode 100644 src/V2/Types/DynamicSearchAdsSearchTermView.cs delete mode 100644 src/V2/Types/Invoice.cs delete mode 100644 src/V2/Types/KeywordPlanCommon.cs delete mode 100644 src/V2/Types/KeywordPlanKeyword.cs delete mode 100644 src/V2/Types/KeywordPlanNegativeKeyword.cs delete mode 100644 src/V2/Types/Metrics.cs delete mode 100644 src/V2/Types/MutateJob.cs delete mode 100644 src/V2/Types/PaymentsAccount.cs delete mode 100644 src/V2/Types/Segments.cs delete mode 100644 src/V2/Types/Simulation.cs delete mode 100644 src/V2/Types/TargetingSetting.cs create mode 100644 src/V6/BatchJobResultExtensions.cs rename src/{V2 => V6}/GoogleAdsException.cs (96%) rename src/{V2 => V6}/GoogleAdsFailureExtensions.cs (90%) rename src/{V2 => V6}/ResourceNames.cs (84%) rename src/{V2 => V6}/Resources/AccountBudgetProposalResourceNames.g.cs (90%) rename src/{V2 => V6}/Resources/AccountBudgetResourceNames.g.cs (91%) create mode 100644 src/V6/Resources/AccountLinkResourceNames.g.cs rename src/{V2 => V6}/Resources/AdGroupAdAssetViewResourceNames.g.cs (62%) rename src/{V2 => V6}/Resources/AdGroupAdLabelResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/AdGroupAdResourceNames.g.cs (72%) rename src/{V2 => V6}/Resources/AdGroupAudienceViewResourceNames.g.cs (69%) rename src/{V2 => V6}/Resources/AdGroupBidModifierResourceNames.g.cs (70%) rename src/{V2 => V6}/Resources/AdGroupCriterionLabelResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/AdGroupCriterionResourceNames.g.cs (72%) rename src/{V2 => V6}/Resources/AdGroupCriterionSimulationResourceNames.g.cs (53%) rename src/{V2 => V6}/Resources/AdGroupExtensionSettingResourceNames.g.cs (71%) rename src/{V2 => V6}/Resources/AdGroupFeedResourceNames.g.cs (73%) rename src/{V2 => V6}/Resources/AdGroupLabelResourceNames.g.cs (72%) rename src/{V2 => V6}/Resources/AdGroupResourceNames.g.cs (92%) rename src/{V2 => V6}/Resources/AdGroupSimulationResourceNames.g.cs (53%) rename src/{V2 => V6}/Resources/AdParameterResourceNames.g.cs (60%) rename src/{V2 => V6}/Resources/AdResourceNames.g.cs (90%) rename src/{V2 => V6}/Resources/AdScheduleViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/AgeRangeViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/AssetResourceNames.g.cs (92%) create mode 100644 src/V6/Resources/BatchJobResourceNames.g.cs rename src/{V2 => V6}/Resources/BiddingStrategyResourceNames.g.cs (90%) rename src/{V2 => V6}/Resources/BillingSetupResourceNames.g.cs (92%) create mode 100644 src/V6/Resources/CampaignAssetResourceNames.g.cs rename src/{V2 => V6}/Resources/CampaignAudienceViewResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/CampaignBidModifierResourceNames.g.cs (69%) rename src/{V2 => V6}/Resources/CampaignBudgetResourceNames.g.cs (91%) rename src/{V2 => V6}/Resources/CampaignCriterionResourceNames.g.cs (72%) rename src/{V2 => V6}/Resources/CampaignCriterionSimulationResourceNames.g.cs (53%) rename src/{V2 => V6}/Resources/CampaignDraftResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/CampaignExperimentResourceNames.g.cs (91%) rename src/{V2 => V6}/Resources/CampaignExtensionSettingResourceNames.g.cs (71%) rename src/{V2 => V6}/Resources/CampaignFeedResourceNames.g.cs (72%) rename src/{V2 => V6}/Resources/CampaignLabelResourceNames.g.cs (72%) rename src/{V2 => V6}/Resources/CampaignResourceNames.g.cs (93%) rename src/{V2 => V6}/Resources/CampaignSharedSetResourceNames.g.cs (73%) rename src/{V2 => V6}/Resources/CarrierConstantResourceNames.g.cs (77%) create mode 100644 src/V6/Resources/ChangeEventResourceNames.g.cs rename src/{V2 => V6}/Resources/ChangeStatusResourceNames.g.cs (93%) rename src/{V2 => V6}/Resources/ClickViewResourceNames.g.cs (65%) create mode 100644 src/V6/Resources/CombinedAudienceResourceNames.g.cs rename src/{V2 => V6}/Resources/ConversionActionResourceNames.g.cs (90%) create mode 100644 src/V6/Resources/CurrencyConstantResourceNames.g.cs create mode 100644 src/V6/Resources/CustomAudienceResourceNames.g.cs rename src/{V2 => V6}/Resources/CustomInterestResourceNames.g.cs (91%) rename src/{V2 => V6}/Resources/CustomerClientLinkResourceNames.g.cs (65%) rename src/{V2 => V6}/Resources/CustomerClientResourceNames.g.cs (78%) rename src/{V2 => V6}/Resources/CustomerExtensionSettingResourceNames.g.cs (74%) rename src/{V2 => V6}/Resources/CustomerFeedResourceNames.g.cs (76%) rename src/{V2 => V6}/Resources/CustomerLabelResourceNames.g.cs (76%) rename src/{V2 => V6}/Resources/CustomerManagerLinkResourceNames.g.cs (65%) rename src/{V2 => V6}/Resources/CustomerNegativeCriterionResourceNames.g.cs (73%) rename src/{V2 => V6}/Resources/CustomerResourceNames.g.cs (95%) create mode 100644 src/V6/Resources/CustomerUserAccessResourceNames.g.cs rename src/{V2 => V6}/Resources/DetailPlacementViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/DisplayKeywordViewResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/DistanceViewResourceNames.g.cs (63%) rename src/{V2 => V6}/Resources/DomainCategoryResourceNames.g.cs (61%) rename src/{V2 => V6}/Resources/DynamicSearchAdsSearchTermViewResourceNames.g.cs (50%) rename src/{V2 => V6}/Resources/ExpandedLandingPageViewResourceNames.g.cs (75%) rename src/{V2 => V6}/Resources/ExtensionFeedItemResourceNames.g.cs (76%) rename src/{V2 => V6}/Resources/FeedItemResourceNames.g.cs (71%) create mode 100644 src/V6/Resources/FeedItemSetLinkResourceNames.g.cs create mode 100644 src/V6/Resources/FeedItemSetResourceNames.g.cs rename src/{V2 => V6}/Resources/FeedItemTargetResourceNames.g.cs (61%) rename src/{V2 => V6}/Resources/FeedMappingResourceNames.g.cs (71%) rename src/{V2 => V6}/Resources/FeedPlaceholderViewResourceNames.g.cs (75%) rename src/{V2 => V6}/Resources/FeedResourceNames.g.cs (90%) rename src/{V2 => V6}/Resources/GenderViewResourceNames.g.cs (65%) rename src/{V2 => V6}/Resources/GeoTargetConstantResourceNames.g.cs (76%) rename src/{V2 => V6}/Resources/GeographicViewResourceNames.g.cs (63%) rename src/{V2 => V6}/Resources/GoogleAdsFieldResourceNames.g.cs (99%) rename src/{V2 => V6}/Resources/GroupPlacementViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/HotelGroupViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/HotelPerformanceViewResourceNames.g.cs (92%) create mode 100644 src/V6/Resources/IncomeRangeViewResourceNames.g.cs rename src/{V2 => V6}/Resources/InvoiceResourceNames.g.cs (92%) create mode 100644 src/V6/Resources/KeywordPlanAdGroupKeywordResourceNames.g.cs rename src/{V2 => V6}/Resources/KeywordPlanAdGroupResourceNames.g.cs (91%) rename src/{V2/Resources/KeywordPlanNegativeKeywordResourceNames.g.cs => V6/Resources/KeywordPlanCampaignKeywordResourceNames.g.cs} (59%) rename src/{V2 => V6}/Resources/KeywordPlanCampaignResourceNames.g.cs (92%) rename src/{V2 => V6}/Resources/KeywordPlanResourceNames.g.cs (91%) rename src/{V2 => V6}/Resources/KeywordViewResourceNames.g.cs (65%) rename src/{V2 => V6}/Resources/LabelResourceNames.g.cs (92%) rename src/{V2 => V6}/Resources/LandingPageViewResourceNames.g.cs (69%) rename src/{V2 => V6}/Resources/LanguageConstantResourceNames.g.cs (76%) rename src/{V2 => V6}/Resources/LocationViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/ManagedPlacementViewResourceNames.g.cs (67%) rename src/{V2 => V6}/Resources/MediaFileResourceNames.g.cs (91%) rename src/{V2 => V6}/Resources/MerchantCenterLinkResourceNames.g.cs (77%) rename src/{V2 => V6}/Resources/MobileAppCategoryConstantResourceNames.g.cs (80%) rename src/{V2 => V6}/Resources/MobileDeviceConstantResourceNames.g.cs (76%) create mode 100644 src/V6/Resources/OfflineUserDataJobResourceNames.g.cs rename src/{V2 => V6}/Resources/OperatingSystemVersionConstantResourceNames.g.cs (74%) rename src/{V2 => V6}/Resources/PaidOrganicSearchTermViewResourceNames.g.cs (63%) rename src/{V2 => V6}/Resources/ParentalStatusViewResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/PaymentsAccountResourceNames.g.cs (90%) rename src/{V2 => V6}/Resources/ProductBiddingCategoryConstantResourceNames.g.cs (68%) rename src/{V2 => V6}/Resources/ProductGroupViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/RecommendationResourceNames.g.cs (92%) rename src/{V2 => V6}/Resources/RemarketingActionResourceNames.g.cs (90%) rename src/{V2 => V6}/Resources/SearchTermViewResourceNames.g.cs (62%) rename src/{V2 => V6}/Resources/SharedCriterionResourceNames.g.cs (67%) rename src/{V2 => V6}/Resources/SharedSetResourceNames.g.cs (91%) rename src/{V2 => V6}/Resources/ShoppingPerformanceViewResourceNames.g.cs (92%) create mode 100644 src/V6/Resources/ThirdPartyAppAnalyticsLinkResourceNames.g.cs rename src/{V2 => V6}/Resources/TopicConstantResourceNames.g.cs (80%) rename src/{V2 => V6}/Resources/TopicViewResourceNames.g.cs (66%) rename src/{V2 => V6}/Resources/UserInterestResourceNames.g.cs (92%) rename src/{V2 => V6}/Resources/UserListResourceNames.g.cs (92%) rename src/{V2 => V6}/Resources/UserLocationViewResourceNames.g.cs (61%) rename src/{V2 => V6}/Resources/VideoResourceNames.g.cs (92%) rename src/{V2 => V6}/ServiceExtensions.cs (59%) create mode 100644 src/V6/ServiceHelperMethods.cs rename src/{V2/Services.V2.cs => V6/Services.V6.cs} (82%) rename src/{V2 => V6}/Services/AccountBudgetProposalService.cs (92%) rename src/{V2 => V6}/Services/AccountBudgetProposalServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AccountBudgetProposalServiceGrpc.cs (73%) rename src/{V2 => V6}/Services/AccountBudgetProposalServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AccountBudgetService.cs (87%) rename src/{V2 => V6}/Services/AccountBudgetServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AccountBudgetServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AccountBudgetServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/AccountLinkService.cs create mode 100644 src/V6/Services/AccountLinkServiceClient.g.cs create mode 100644 src/V6/Services/AccountLinkServiceGrpc.cs rename src/{V2/Services/KeywordPlanServiceResourceNames.g.cs => V6/Services/AccountLinkServiceResourceNames.g.cs} (72%) rename src/{V2 => V6}/Services/AdGroupAdAssetViewService.cs (89%) rename src/{V2 => V6}/Services/AdGroupAdAssetViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupAdAssetViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupAdAssetViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupAdLabelService.cs (92%) rename src/{V2 => V6}/Services/AdGroupAdLabelServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupAdLabelServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupAdLabelServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupAdService.cs (79%) rename src/{V2 => V6}/Services/AdGroupAdServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupAdServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/AdGroupAdServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupAudienceViewService.cs (88%) rename src/{V2 => V6}/Services/AdGroupAudienceViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupAudienceViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/AdGroupAudienceViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupBidModifierService.cs (79%) rename src/{V2 => V6}/Services/AdGroupBidModifierServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupBidModifierServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupBidModifierServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupCriterionLabelService.cs (93%) rename src/{V2 => V6}/Services/AdGroupCriterionLabelServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupCriterionLabelServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/AdGroupCriterionLabelServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupCriterionService.cs (79%) rename src/{V2 => V6}/Services/AdGroupCriterionServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupCriterionServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupCriterionServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupCriterionSimulationService.cs (87%) rename src/{V2 => V6}/Services/AdGroupCriterionSimulationServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupCriterionSimulationServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/AdGroupCriterionSimulationServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupExtensionSettingService.cs (92%) rename src/{V2 => V6}/Services/AdGroupExtensionSettingServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupExtensionSettingServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/AdGroupExtensionSettingServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupFeedService.cs (79%) rename src/{V2 => V6}/Services/AdGroupFeedServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupFeedServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupFeedServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupLabelService.cs (92%) rename src/{V2 => V6}/Services/AdGroupLabelServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupLabelServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupLabelServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupService.cs (79%) rename src/{V2 => V6}/Services/AdGroupServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/AdGroupServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdGroupSimulationService.cs (87%) rename src/{V2 => V6}/Services/AdGroupSimulationServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdGroupSimulationServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdGroupSimulationServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdParameterService.cs (92%) rename src/{V2 => V6}/Services/AdParameterServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdParameterServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdParameterServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdScheduleViewService.cs (88%) rename src/{V2 => V6}/Services/AdScheduleViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdScheduleViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdScheduleViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/AdService.cs (78%) rename src/{V2 => V6}/Services/AdServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AdServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AdServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/AddOfflineUserDataJobOperationsResponsePartialFailureSupport.cs rename src/{V2 => V6}/Services/AgeRangeViewService.cs (87%) rename src/{V2 => V6}/Services/AgeRangeViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AgeRangeViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/AgeRangeViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ApplyRecommendationResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/AssetService.cs (69%) rename src/{V2 => V6}/Services/AssetServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/AssetServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/AssetServiceResourceNames.g.cs (92%) rename src/{V2/Services/MutateJobService.cs => V6/Services/BatchJobService.cs} (63%) rename src/{V2/Services/MutateJobServiceClient.g.cs => V6/Services/BatchJobServiceClient.g.cs} (55%) create mode 100644 src/V6/Services/BatchJobServiceGrpc.cs rename src/{V2/Services/MutateJobServiceResourceNames.g.cs => V6/Services/BatchJobServiceResourceNames.g.cs} (53%) rename src/{V2 => V6}/Services/BiddingStrategyService.cs (92%) rename src/{V2 => V6}/Services/BiddingStrategyServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/BiddingStrategyServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/BiddingStrategyServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/BillingSetupService.cs (92%) rename src/{V2 => V6}/Services/BillingSetupServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/BillingSetupServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/BillingSetupServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/CampaignAssetService.cs create mode 100644 src/V6/Services/CampaignAssetServiceClient.g.cs create mode 100644 src/V6/Services/CampaignAssetServiceGrpc.cs rename src/{V2/Services/KeywordPlanAdGroupServiceResourceNames.g.cs => V6/Services/CampaignAssetServiceResourceNames.g.cs} (67%) rename src/{V2 => V6}/Services/CampaignAudienceViewService.cs (88%) rename src/{V2 => V6}/Services/CampaignAudienceViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignAudienceViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CampaignAudienceViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignBidModifierService.cs (92%) rename src/{V2 => V6}/Services/CampaignBidModifierServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignBidModifierServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CampaignBidModifierServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignBudgetService.cs (79%) rename src/{V2 => V6}/Services/CampaignBudgetServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignBudgetServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CampaignBudgetServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignCriterionService.cs (79%) rename src/{V2 => V6}/Services/CampaignCriterionServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignCriterionServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CampaignCriterionServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignCriterionSimulationService.cs (87%) rename src/{V2 => V6}/Services/CampaignCriterionSimulationServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignCriterionSimulationServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CampaignCriterionSimulationServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignDraftService.cs (82%) rename src/{V2 => V6}/Services/CampaignDraftServiceClient.g.cs (98%) rename src/{V2 => V6}/Services/CampaignDraftServiceGrpc.cs (75%) rename src/{V2 => V6}/Services/CampaignDraftServiceResourceNames.g.cs (94%) rename src/{V2 => V6}/Services/CampaignExperimentService.cs (85%) rename src/{V2 => V6}/Services/CampaignExperimentServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignExperimentServiceGrpc.cs (78%) rename src/{V2 => V6}/Services/CampaignExperimentServiceResourceNames.g.cs (94%) rename src/{V2 => V6}/Services/CampaignExtensionSettingService.cs (92%) rename src/{V2 => V6}/Services/CampaignExtensionSettingServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignExtensionSettingServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CampaignExtensionSettingServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignFeedService.cs (79%) rename src/{V2 => V6}/Services/CampaignFeedServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignFeedServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CampaignFeedServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignLabelService.cs (92%) rename src/{V2 => V6}/Services/CampaignLabelServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignLabelServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CampaignLabelServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignService.cs (79%) rename src/{V2 => V6}/Services/CampaignServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/CampaignServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CampaignSharedSetService.cs (92%) rename src/{V2 => V6}/Services/CampaignSharedSetServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CampaignSharedSetServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CampaignSharedSetServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CarrierConstantService.cs (88%) rename src/{V2 => V6}/Services/CarrierConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CarrierConstantServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CarrierConstantServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ChangeStatusService.cs (87%) rename src/{V2 => V6}/Services/ChangeStatusServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ChangeStatusServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/ChangeStatusServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ClickViewService.cs (87%) rename src/{V2 => V6}/Services/ClickViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ClickViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/ClickViewServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/CombinedAudienceService.cs create mode 100644 src/V6/Services/CombinedAudienceServiceClient.g.cs create mode 100644 src/V6/Services/CombinedAudienceServiceGrpc.cs rename src/{V2/Services/KeywordPlanCampaignServiceResourceNames.g.cs => V6/Services/CombinedAudienceServiceResourceNames.g.cs} (66%) rename src/{V2 => V6}/Services/ConversionActionService.cs (92%) rename src/{V2 => V6}/Services/ConversionActionServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ConversionActionServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/ConversionActionServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ConversionAdjustmentUploadService.cs (73%) rename src/{V2 => V6}/Services/ConversionAdjustmentUploadServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ConversionAdjustmentUploadServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/ConversionUploadService.cs (66%) rename src/{V2 => V6}/Services/ConversionUploadServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ConversionUploadServiceGrpc.cs (71%) create mode 100644 src/V6/Services/CurrencyConstantService.cs create mode 100644 src/V6/Services/CurrencyConstantServiceClient.g.cs create mode 100644 src/V6/Services/CurrencyConstantServiceGrpc.cs create mode 100644 src/V6/Services/CurrencyConstantServiceResourceNames.g.cs rename src/{V2/Services/CustomerManagerLinkService.cs => V6/Services/CustomAudienceService.cs} (64%) create mode 100644 src/V6/Services/CustomAudienceServiceClient.g.cs create mode 100644 src/V6/Services/CustomAudienceServiceGrpc.cs create mode 100644 src/V6/Services/CustomAudienceServiceResourceNames.g.cs rename src/{V2 => V6}/Services/CustomInterestService.cs (91%) rename src/{V2 => V6}/Services/CustomInterestServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomInterestServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CustomInterestServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerClientLinkService.cs (91%) rename src/{V2 => V6}/Services/CustomerClientLinkServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerClientLinkServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CustomerClientLinkServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerClientService.cs (88%) rename src/{V2 => V6}/Services/CustomerClientServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerClientServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CustomerClientServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerExtensionSettingService.cs (92%) rename src/{V2 => V6}/Services/CustomerExtensionSettingServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerExtensionSettingServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CustomerExtensionSettingServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerFeedService.cs (79%) rename src/{V2 => V6}/Services/CustomerFeedServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerFeedServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CustomerFeedServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerLabelService.cs (92%) rename src/{V2 => V6}/Services/CustomerLabelServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerLabelServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CustomerLabelServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/CustomerManagerLinkService.cs rename src/{V2 => V6}/Services/CustomerManagerLinkServiceClient.g.cs (72%) rename src/{V2 => V6}/Services/CustomerManagerLinkServiceGrpc.cs (51%) rename src/{V2 => V6}/Services/CustomerManagerLinkServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerNegativeCriterionService.cs (92%) rename src/{V2 => V6}/Services/CustomerNegativeCriterionServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerNegativeCriterionServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/CustomerNegativeCriterionServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/CustomerService.cs (79%) rename src/{V2 => V6}/Services/CustomerServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/CustomerServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/CustomerServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/CustomerUserAccessService.cs rename src/{V2/Services/KeywordPlanKeywordServiceClient.g.cs => V6/Services/CustomerUserAccessServiceClient.g.cs} (50%) create mode 100644 src/V6/Services/CustomerUserAccessServiceGrpc.cs rename src/{V2/Services/KeywordPlanKeywordServiceResourceNames.g.cs => V6/Services/CustomerUserAccessServiceResourceNames.g.cs} (71%) rename src/{V2 => V6}/Services/DetailPlacementViewService.cs (88%) rename src/{V2 => V6}/Services/DetailPlacementViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/DetailPlacementViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/DetailPlacementViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/DismissRecommendationResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/DisplayKeywordViewService.cs (88%) rename src/{V2 => V6}/Services/DisplayKeywordViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/DisplayKeywordViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/DisplayKeywordViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/DistanceViewService.cs (87%) rename src/{V2 => V6}/Services/DistanceViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/DistanceViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/DistanceViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/DomainCategoryService.cs (89%) rename src/{V2 => V6}/Services/DomainCategoryServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/DomainCategoryServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/DomainCategoryServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/DynamicSearchAdsSearchTermViewService.cs (88%) rename src/{V2 => V6}/Services/DynamicSearchAdsSearchTermViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/DynamicSearchAdsSearchTermViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/DynamicSearchAdsSearchTermViewServiceResourceNames.g.cs (93%) rename src/{V2 => V6}/Services/ExpandedLandingPageViewService.cs (88%) rename src/{V2 => V6}/Services/ExpandedLandingPageViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ExpandedLandingPageViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/ExpandedLandingPageViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ExtensionFeedItemService.cs (79%) rename src/{V2 => V6}/Services/ExtensionFeedItemServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ExtensionFeedItemServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/ExtensionFeedItemServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/FeedItemService.cs (79%) rename src/{V2 => V6}/Services/FeedItemServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/FeedItemServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/FeedItemServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/FeedItemSetLinkService.cs create mode 100644 src/V6/Services/FeedItemSetLinkServiceClient.g.cs create mode 100644 src/V6/Services/FeedItemSetLinkServiceGrpc.cs create mode 100644 src/V6/Services/FeedItemSetLinkServiceResourceNames.g.cs create mode 100644 src/V6/Services/FeedItemSetService.cs create mode 100644 src/V6/Services/FeedItemSetServiceClient.g.cs create mode 100644 src/V6/Services/FeedItemSetServiceGrpc.cs create mode 100644 src/V6/Services/FeedItemSetServiceResourceNames.g.cs rename src/{V2 => V6}/Services/FeedItemTargetService.cs (77%) rename src/{V2 => V6}/Services/FeedItemTargetServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/FeedItemTargetServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/FeedItemTargetServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/FeedMappingService.cs (92%) rename src/{V2 => V6}/Services/FeedMappingServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/FeedMappingServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/FeedMappingServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/FeedPlaceholderViewService.cs (88%) rename src/{V2 => V6}/Services/FeedPlaceholderViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/FeedPlaceholderViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/FeedPlaceholderViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/FeedService.cs (80%) rename src/{V2 => V6}/Services/FeedServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/FeedServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/FeedServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/GenderViewService.cs (88%) rename src/{V2 => V6}/Services/GenderViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/GenderViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/GenderViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/GeoTargetConstantService.cs (78%) rename src/{V2 => V6}/Services/GeoTargetConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/GeoTargetConstantServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/GeoTargetConstantServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/GeographicViewService.cs (88%) rename src/{V2 => V6}/Services/GeographicViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/GeographicViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/GeographicViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/GoogleAdsFieldService.cs (92%) rename src/{V2 => V6}/Services/GoogleAdsFieldServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/GoogleAdsFieldServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/GoogleAdsFieldServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/GoogleAdsService.cs (63%) rename src/{V2 => V6}/Services/GoogleAdsServiceClient.g.cs (91%) rename src/{V2 => V6}/Services/GoogleAdsServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/GroupPlacementViewService.cs (88%) rename src/{V2 => V6}/Services/GroupPlacementViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/GroupPlacementViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/GroupPlacementViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/HotelGroupViewService.cs (88%) rename src/{V2 => V6}/Services/HotelGroupViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/HotelGroupViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/HotelGroupViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/HotelPerformanceViewService.cs (88%) rename src/{V2 => V6}/Services/HotelPerformanceViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/HotelPerformanceViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/HotelPerformanceViewServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/IncomeRangeViewService.cs create mode 100644 src/V6/Services/IncomeRangeViewServiceClient.g.cs create mode 100644 src/V6/Services/IncomeRangeViewServiceGrpc.cs create mode 100644 src/V6/Services/IncomeRangeViewServiceResourceNames.g.cs rename src/{V2 => V6}/Services/InvoiceService.cs (88%) rename src/{V2 => V6}/Services/InvoiceServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/InvoiceServiceGrpc.cs (71%) rename src/{V2/Services/KeywordPlanKeywordService.cs => V6/Services/KeywordPlanAdGroupKeywordService.cs} (73%) create mode 100644 src/V6/Services/KeywordPlanAdGroupKeywordServiceClient.g.cs create mode 100644 src/V6/Services/KeywordPlanAdGroupKeywordServiceGrpc.cs create mode 100644 src/V6/Services/KeywordPlanAdGroupKeywordServiceResourceNames.g.cs rename src/{V2 => V6}/Services/KeywordPlanAdGroupService.cs (89%) rename src/{V2 => V6}/Services/KeywordPlanAdGroupServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/KeywordPlanAdGroupServiceGrpc.cs (71%) create mode 100644 src/V6/Services/KeywordPlanAdGroupServiceResourceNames.g.cs rename src/{V2/Services/KeywordPlanNegativeKeywordService.cs => V6/Services/KeywordPlanCampaignKeywordService.cs} (76%) rename src/{V2/Services/KeywordPlanNegativeKeywordServiceClient.g.cs => V6/Services/KeywordPlanCampaignKeywordServiceClient.g.cs} (58%) rename src/{V2/Services/KeywordPlanNegativeKeywordServiceGrpc.cs => V6/Services/KeywordPlanCampaignKeywordServiceGrpc.cs} (51%) create mode 100644 src/V6/Services/KeywordPlanCampaignKeywordServiceResourceNames.g.cs rename src/{V2 => V6}/Services/KeywordPlanCampaignService.cs (89%) rename src/{V2 => V6}/Services/KeywordPlanCampaignServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/KeywordPlanCampaignServiceGrpc.cs (72%) create mode 100644 src/V6/Services/KeywordPlanCampaignServiceResourceNames.g.cs rename src/{V2 => V6}/Services/KeywordPlanIdeaService.cs (63%) rename src/{V2 => V6}/Services/KeywordPlanIdeaServiceClient.g.cs (86%) rename src/{V2 => V6}/Services/KeywordPlanIdeaServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/KeywordPlanService.cs (52%) rename src/{V2 => V6}/Services/KeywordPlanServiceClient.g.cs (58%) create mode 100644 src/V6/Services/KeywordPlanServiceGrpc.cs create mode 100644 src/V6/Services/KeywordPlanServiceResourceNames.g.cs rename src/{V2 => V6}/Services/KeywordViewService.cs (87%) rename src/{V2 => V6}/Services/KeywordViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/KeywordViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/KeywordViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/LabelService.cs (79%) rename src/{V2 => V6}/Services/LabelServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/LabelServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/LabelServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/LandingPageViewService.cs (87%) rename src/{V2 => V6}/Services/LandingPageViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/LandingPageViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/LandingPageViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/LanguageConstantService.cs (88%) rename src/{V2 => V6}/Services/LanguageConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/LanguageConstantServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/LanguageConstantServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/LocationViewService.cs (87%) rename src/{V2 => V6}/Services/LocationViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/LocationViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/LocationViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ManagedPlacementViewService.cs (88%) rename src/{V2 => V6}/Services/ManagedPlacementViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ManagedPlacementViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/ManagedPlacementViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/MediaFileService.cs (78%) rename src/{V2 => V6}/Services/MediaFileServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/MediaFileServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/MediaFileServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/MerchantCenterLinkService.cs (92%) rename src/{V2 => V6}/Services/MerchantCenterLinkServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/MerchantCenterLinkServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/MerchantCenterLinkServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/MobileAppCategoryConstantService.cs (88%) rename src/{V2 => V6}/Services/MobileAppCategoryConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/MobileAppCategoryConstantServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/MobileAppCategoryConstantServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/MobileDeviceConstantService.cs (88%) rename src/{V2 => V6}/Services/MobileDeviceConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/MobileDeviceConstantServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/MobileDeviceConstantServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/MutateAdGroupAdLabelsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupAdsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupBidModifiersResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupCriteriaResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupCriterionLabelsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupExtensionSettingsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupFeedsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupLabelsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdGroupsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateAdParametersResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateBiddingStrategiesResponsePartialFailureSupport.cs (94%) rename src/{V2/Services/MutateKeywordPlanKeywordsResponsePartialFailureSupport.cs => V6/Services/MutateCampaignAssetsResponsePartialFailureSupport.cs} (90%) rename src/{V2 => V6}/Services/MutateCampaignBidModifiersResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignBudgetsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignCriteriaResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignDraftsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignExperimentsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignExtensionSettingsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignFeedsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignLabelsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignSharedSetsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCampaignsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateConversionActionsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCustomerExtensionSettingsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCustomerFeedsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCustomerLabelsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateCustomerNegativeCriteriaResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateFeedItemsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateFeedMappingsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateFeedsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateGoogleAdsResponsePartialFailureSupport.cs (94%) create mode 100644 src/V6/Services/MutateKeywordPlanAdGroupKeywordsResponsePartialFailureSupport.cs rename src/{V2 => V6}/Services/MutateKeywordPlanAdGroupsResponsePartialFailureSupport.cs (94%) rename src/{V2/Services/MutateKeywordPlanNegativeKeywordsResponsePartialFailureSupport.cs => V6/Services/MutateKeywordPlanCampaignKeywordsResponsePartialFailureSupport.cs} (91%) rename src/{V2 => V6}/Services/MutateKeywordPlanCampaignsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateKeywordPlansResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateLabelsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateMediaFilesResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateRemarketingActionsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateSharedCriteriaResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateSharedSetsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/MutateUserListsResponsePartialFailureSupport.cs (94%) create mode 100644 src/V6/Services/OfflineUserDataJobService.cs create mode 100644 src/V6/Services/OfflineUserDataJobServiceClient.g.cs create mode 100644 src/V6/Services/OfflineUserDataJobServiceGrpc.cs create mode 100644 src/V6/Services/OfflineUserDataJobServiceResourceNames.g.cs rename src/{V2 => V6}/Services/OperatingSystemVersionConstantService.cs (88%) rename src/{V2 => V6}/Services/OperatingSystemVersionConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/OperatingSystemVersionConstantServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/OperatingSystemVersionConstantServiceResourceNames.g.cs (93%) rename src/{V2 => V6}/Services/PaidOrganicSearchTermViewService.cs (87%) rename src/{V2 => V6}/Services/PaidOrganicSearchTermViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/PaidOrganicSearchTermViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/PaidOrganicSearchTermViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ParentalStatusViewService.cs (88%) rename src/{V2 => V6}/Services/ParentalStatusViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ParentalStatusViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/ParentalStatusViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/PaymentsAccountService.cs (89%) rename src/{V2 => V6}/Services/PaymentsAccountServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/PaymentsAccountServiceGrpc.cs (73%) rename src/{V2 => V6}/Services/ProductBiddingCategoryConstantService.cs (88%) rename src/{V2 => V6}/Services/ProductBiddingCategoryConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ProductBiddingCategoryConstantServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/ProductBiddingCategoryConstantServiceResourceNames.g.cs (93%) rename src/{V2 => V6}/Services/ProductGroupViewService.cs (87%) rename src/{V2 => V6}/Services/ProductGroupViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ProductGroupViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/ProductGroupViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ReachPlanService.cs (60%) rename src/{V2 => V6}/Services/ReachPlanServiceClient.g.cs (98%) rename src/{V2 => V6}/Services/ReachPlanServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/RecommendationService.cs (77%) rename src/{V2 => V6}/Services/RecommendationServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/RecommendationServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/RecommendationServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/RemarketingActionService.cs (92%) rename src/{V2 => V6}/Services/RemarketingActionServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/RemarketingActionServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/RemarketingActionServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/SearchTermViewService.cs (88%) rename src/{V2 => V6}/Services/SearchTermViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/SearchTermViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/SearchTermViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/SharedCriterionService.cs (92%) rename src/{V2 => V6}/Services/SharedCriterionServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/SharedCriterionServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/SharedCriterionServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/SharedSetService.cs (79%) rename src/{V2 => V6}/Services/SharedSetServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/SharedSetServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/SharedSetServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/ShoppingPerformanceViewService.cs (88%) rename src/{V2 => V6}/Services/ShoppingPerformanceViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/ShoppingPerformanceViewServiceGrpc.cs (72%) rename src/{V2 => V6}/Services/ShoppingPerformanceViewServiceResourceNames.g.cs (92%) create mode 100644 src/V6/Services/ThirdPartyAppAnalyticsLinkService.cs create mode 100644 src/V6/Services/ThirdPartyAppAnalyticsLinkServiceClient.g.cs create mode 100644 src/V6/Services/ThirdPartyAppAnalyticsLinkServiceGrpc.cs create mode 100644 src/V6/Services/ThirdPartyAppAnalyticsLinkServiceResourceNames.g.cs rename src/{V2 => V6}/Services/TopicConstantService.cs (87%) rename src/{V2 => V6}/Services/TopicConstantServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/TopicConstantServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/TopicConstantServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/TopicViewService.cs (87%) rename src/{V2 => V6}/Services/TopicViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/TopicViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/TopicViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/UploadCallConversionsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/UploadClickConversionsResponsePartialFailureSupport.cs (94%) rename src/{V2 => V6}/Services/UploadConversionAdjustmentsResponsePartialFailureSupport.cs (94%) create mode 100644 src/V6/Services/UserDataService.cs create mode 100644 src/V6/Services/UserDataServiceClient.g.cs create mode 100644 src/V6/Services/UserDataServiceGrpc.cs rename src/{V2 => V6}/Services/UserInterestService.cs (87%) rename src/{V2 => V6}/Services/UserInterestServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/UserInterestServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/UserInterestServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/UserListService.cs (92%) rename src/{V2 => V6}/Services/UserListServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/UserListServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/UserListServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/UserLocationViewService.cs (87%) rename src/{V2 => V6}/Services/UserLocationViewServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/UserLocationViewServiceGrpc.cs (71%) rename src/{V2 => V6}/Services/UserLocationViewServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Services/VideoService.cs (87%) rename src/{V2 => V6}/Services/VideoServiceClient.g.cs (99%) rename src/{V2 => V6}/Services/VideoServiceGrpc.cs (70%) rename src/{V2 => V6}/Services/VideoServiceResourceNames.g.cs (92%) rename src/{V2 => V6}/Types/AccessInvitationError.cs (90%) rename src/{V2 => V6}/Types/AccessReason.cs (89%) rename src/{V2 => V6}/Types/AccessRole.cs (89%) rename src/{V2 => V6}/Types/AccountBudget.cs (61%) rename src/{V2 => V6}/Types/AccountBudgetProposal.cs (61%) rename src/{V2 => V6}/Types/AccountBudgetProposalError.cs (87%) rename src/{V2 => V6}/Types/AccountBudgetProposalStatus.cs (90%) rename src/{V2 => V6}/Types/AccountBudgetProposalType.cs (89%) rename src/{V2 => V6}/Types/AccountBudgetStatus.cs (90%) create mode 100644 src/V6/Types/AccountLink.cs create mode 100644 src/V6/Types/AccountLinkError.cs create mode 100644 src/V6/Types/AccountLinkStatus.cs rename src/{V2 => V6}/Types/Ad.cs (67%) rename src/{V2 => V6}/Types/AdAsset.cs (64%) rename src/{V2 => V6}/Types/AdCustomizerError.cs (89%) rename src/{V2 => V6}/Types/AdCustomizerPlaceholderField.cs (89%) rename src/{V2/Types/ConversionActionType.cs => V6/Types/AdDestinationType.cs} (56%) rename src/{V2 => V6}/Types/AdError.cs (87%) rename src/{V2 => V6}/Types/AdGroup.cs (51%) rename src/{V2 => V6}/Types/AdGroupAd.cs (72%) rename src/{V2 => V6}/Types/AdGroupAdAssetView.cs (67%) rename src/{V2 => V6}/Types/AdGroupAdError.cs (83%) rename src/{V2 => V6}/Types/AdGroupAdLabel.cs (66%) rename src/{V2 => V6}/Types/AdGroupAdRotationMode.cs (90%) rename src/{V2 => V6}/Types/AdGroupAdStatus.cs (88%) rename src/{V2 => V6}/Types/AdGroupAudienceView.cs (86%) rename src/{V2 => V6}/Types/AdGroupBidModifier.cs (68%) rename src/{V2 => V6}/Types/AdGroupBidModifierError.cs (89%) rename src/{V2 => V6}/Types/AdGroupCriterion.cs (59%) rename src/{V2 => V6}/Types/AdGroupCriterionApprovalStatus.cs (89%) rename src/{V2 => V6}/Types/AdGroupCriterionError.cs (79%) rename src/{V2 => V6}/Types/AdGroupCriterionLabel.cs (64%) rename src/{V2 => V6}/Types/AdGroupCriterionSimulation.cs (55%) rename src/{V2 => V6}/Types/AdGroupCriterionStatus.cs (90%) rename src/{V2 => V6}/Types/AdGroupError.cs (85%) rename src/{V2 => V6}/Types/AdGroupExtensionSetting.cs (71%) rename src/{V2 => V6}/Types/AdGroupFeed.cs (68%) rename src/{V2 => V6}/Types/AdGroupFeedError.cs (90%) rename src/{V2 => V6}/Types/AdGroupLabel.cs (66%) rename src/{V2 => V6}/Types/AdGroupSimulation.cs (63%) rename src/{V2 => V6}/Types/AdGroupStatus.cs (89%) rename src/{V2 => V6}/Types/AdGroupType.cs (85%) rename src/{V2 => V6}/Types/AdNetworkType.cs (89%) rename src/{V2 => V6}/Types/AdParameter.cs (62%) rename src/{V2 => V6}/Types/AdParameterError.cs (88%) rename src/{V2 => V6}/Types/AdScheduleView.cs (85%) rename src/{V2 => V6}/Types/AdServingOptimizationStatus.cs (91%) rename src/{V2 => V6}/Types/AdSharingError.cs (89%) rename src/{V2 => V6}/Types/AdStrength.cs (90%) rename src/{V2 => V6}/Types/AdType.cs (78%) rename src/{V2 => V6}/Types/AdTypeInfos.cs (54%) rename src/{V2 => V6}/Types/AdvertisingChannelSubType.cs (84%) rename src/{V2 => V6}/Types/AdvertisingChannelType.cs (84%) rename src/{V2 => V6}/Types/AdxError.cs (88%) rename src/{V2 => V6}/Types/AffiliateLocationFeedRelationshipType.cs (90%) rename src/{V2 => V6}/Types/AffiliateLocationPlaceholderField.cs (91%) rename src/{V2 => V6}/Types/AgeRangeType.cs (90%) rename src/{V2 => V6}/Types/AgeRangeView.cs (85%) rename src/{V2 => V6}/Types/AppCampaignAppStore.cs (89%) rename src/{V2 => V6}/Types/AppCampaignBiddingStrategyGoalType.cs (91%) rename src/{V2 => V6}/Types/AppPaymentModelType.cs (89%) rename src/{V2 => V6}/Types/AppPlaceholderField.cs (92%) rename src/{V2 => V6}/Types/AppStore.cs (89%) rename src/{V2 => V6}/Types/AppUrlOperatingSystemType.cs (89%) create mode 100644 src/V6/Types/Asset.cs rename src/{V2 => V6}/Types/AssetError.cs (69%) rename src/{V2 => V6}/Types/AssetFieldType.cs (82%) create mode 100644 src/V6/Types/AssetLinkError.cs create mode 100644 src/V6/Types/AssetLinkStatus.cs rename src/{V2 => V6}/Types/AssetPerformanceLabel.cs (90%) create mode 100644 src/V6/Types/AssetPolicy.cs rename src/{V2 => V6}/Types/AssetType.cs (80%) create mode 100644 src/V6/Types/AssetTypes.cs rename src/{V2 => V6}/Types/AttributionModel.cs (91%) rename src/{V2 => V6}/Types/AuthenticationError.cs (93%) rename src/{V2 => V6}/Types/AuthorizationError.cs (81%) create mode 100644 src/V6/Types/BatchJob.cs rename src/{V2/Types/MutateJobError.cs => V6/Types/BatchJobError.cs} (65%) rename src/{V2/Types/MutateJobStatus.cs => V6/Types/BatchJobStatus.cs} (69%) rename src/{V2 => V6}/Types/BidModifierSource.cs (88%) rename src/{V2 => V6}/Types/Bidding.cs (53%) rename src/{V2 => V6}/Types/BiddingError.cs (88%) rename src/{V2 => V6}/Types/BiddingSource.cs (89%) rename src/{V2 => V6}/Types/BiddingStrategy.cs (55%) rename src/{V2 => V6}/Types/BiddingStrategyError.cs (91%) rename src/{V2 => V6}/Types/BiddingStrategyStatus.cs (91%) rename src/{V2 => V6}/Types/BiddingStrategyType.cs (94%) rename src/{V2 => V6}/Types/BillingSetup.cs (62%) rename src/{V2 => V6}/Types/BillingSetupError.cs (87%) rename src/{V2 => V6}/Types/BillingSetupStatus.cs (89%) rename src/{V2 => V6}/Types/BrandSafetySuitability.cs (92%) create mode 100644 src/V6/Types/BudgetCampaignAssociationStatus.cs rename src/{V2 => V6}/Types/BudgetDeliveryMethod.cs (91%) rename src/{V2 => V6}/Types/BudgetPeriod.cs (81%) rename src/{V2 => V6}/Types/BudgetStatus.cs (88%) rename src/{V2 => V6}/Types/BudgetType.cs (89%) rename src/{V2 => V6}/Types/CallConversionReportingState.cs (90%) rename src/{V2 => V6}/Types/CallPlaceholderField.cs (90%) rename src/{V2 => V6}/Types/CalloutPlaceholderField.cs (90%) rename src/{V2 => V6}/Types/Campaign.cs (63%) create mode 100644 src/V6/Types/CampaignAsset.cs rename src/{V2 => V6}/Types/CampaignAudienceView.cs (86%) rename src/{V2 => V6}/Types/CampaignBidModifier.cs (64%) create mode 100644 src/V6/Types/CampaignBudget.cs rename src/{V2 => V6}/Types/CampaignBudgetError.cs (88%) rename src/{V2 => V6}/Types/CampaignCriterion.cs (69%) rename src/{V2 => V6}/Types/CampaignCriterionError.cs (92%) rename src/{V2 => V6}/Types/CampaignCriterionSimulation.cs (63%) rename src/{V2 => V6}/Types/CampaignCriterionStatus.cs (90%) rename src/{V2 => V6}/Types/CampaignDraft.cs (52%) rename src/{V2 => V6}/Types/CampaignDraftError.cs (91%) rename src/{V2 => V6}/Types/CampaignDraftStatus.cs (91%) rename src/{V2 => V6}/Types/CampaignError.cs (87%) rename src/{V2 => V6}/Types/CampaignExperiment.cs (51%) rename src/{V2 => V6}/Types/CampaignExperimentError.cs (93%) rename src/{V2 => V6}/Types/CampaignExperimentStatus.cs (91%) rename src/{V2 => V6}/Types/CampaignExperimentTrafficSplitType.cs (90%) rename src/{V2 => V6}/Types/CampaignExperimentType.cs (90%) rename src/{V2 => V6}/Types/CampaignExtensionSetting.cs (70%) rename src/{V2 => V6}/Types/CampaignFeed.cs (68%) rename src/{V2 => V6}/Types/CampaignFeedError.cs (84%) rename src/{V2 => V6}/Types/CampaignLabel.cs (66%) rename src/{V2 => V6}/Types/CampaignServingStatus.cs (89%) rename src/{V2 => V6}/Types/CampaignSharedSet.cs (66%) rename src/{V2 => V6}/Types/CampaignSharedSetError.cs (89%) rename src/{V2 => V6}/Types/CampaignSharedSetStatus.cs (90%) rename src/{V2 => V6}/Types/CampaignStatus.cs (89%) rename src/{V2 => V6}/Types/CarrierConstant.cs (62%) create mode 100644 src/V6/Types/ChangeClientType.cs create mode 100644 src/V6/Types/ChangeEvent.cs create mode 100644 src/V6/Types/ChangeEventError.cs create mode 100644 src/V6/Types/ChangeEventResourceType.cs create mode 100644 src/V6/Types/ChangeStatus.cs rename src/{V2 => V6}/Types/ChangeStatusError.cs (72%) rename src/{V2 => V6}/Types/ChangeStatusOperation.cs (90%) rename src/{V2 => V6}/Types/ChangeStatusResourceType.cs (91%) rename src/{V2 => V6}/Types/ClickLocation.cs (51%) rename src/{V2 => V6}/Types/ClickType.cs (95%) rename src/{V2 => V6}/Types/ClickView.cs (54%) rename src/{V2 => V6}/Types/CollectionSizeError.cs (89%) create mode 100644 src/V6/Types/CombinedAudience.cs create mode 100644 src/V6/Types/CombinedAudienceStatus.cs rename src/{V2 => V6}/Types/ContentLabelType.cs (83%) rename src/{V2 => V6}/Types/ContextError.cs (88%) create mode 100644 src/V6/Types/ConversionAction.cs rename src/{V2 => V6}/Types/ConversionActionCategory.cs (64%) rename src/{V2 => V6}/Types/ConversionActionCountingType.cs (89%) rename src/{V2 => V6}/Types/ConversionActionError.cs (84%) rename src/{V2 => V6}/Types/ConversionActionStatus.cs (90%) create mode 100644 src/V6/Types/ConversionActionType.cs rename src/{V2 => V6}/Types/ConversionAdjustmentType.cs (90%) rename src/{V2 => V6}/Types/ConversionAdjustmentUploadError.cs (85%) rename src/{V2 => V6}/Types/ConversionAttributionEventType.cs (90%) rename src/{V2 => V6}/Types/ConversionLagBucket.cs (93%) rename src/{V2 => V6}/Types/ConversionOrAdjustmentLagBucket.cs (95%) rename src/{V2 => V6}/Types/ConversionUploadError.cs (94%) rename src/{V2 => V6}/Types/CountryCodeError.cs (88%) rename src/{V2 => V6}/Types/Criteria.cs (72%) rename src/{V2 => V6}/Types/CriterionCategoryAvailability.cs (72%) rename src/{V2 => V6}/Types/CriterionCategoryChannelAvailabilityMode.cs (90%) rename src/{V2 => V6}/Types/CriterionCategoryLocaleAvailabilityMode.cs (91%) rename src/{V2 => V6}/Types/CriterionError.cs (64%) rename src/{V2 => V6}/Types/CriterionSystemServingStatus.cs (88%) rename src/{V2 => V6}/Types/CriterionType.cs (89%) rename src/{V2 => V6}/Types/CurrencyCodeError.cs (88%) create mode 100644 src/V6/Types/CurrencyConstant.cs create mode 100644 src/V6/Types/CustomAudience.cs create mode 100644 src/V6/Types/CustomAudienceError.cs create mode 100644 src/V6/Types/CustomAudienceMemberType.cs create mode 100644 src/V6/Types/CustomAudienceStatus.cs create mode 100644 src/V6/Types/CustomAudienceType.cs rename src/{V2 => V6}/Types/CustomInterest.cs (66%) rename src/{V2 => V6}/Types/CustomInterestError.cs (91%) rename src/{V2 => V6}/Types/CustomInterestMemberType.cs (90%) rename src/{V2 => V6}/Types/CustomInterestStatus.cs (89%) rename src/{V2 => V6}/Types/CustomInterestType.cs (90%) rename src/{V2 => V6}/Types/CustomParameter.cs (64%) rename src/{V2 => V6}/Types/CustomPlaceholderField.cs (93%) rename src/{V2 => V6}/Types/Customer.cs (54%) create mode 100644 src/V6/Types/CustomerClient.cs rename src/{V2 => V6}/Types/CustomerClientLink.cs (60%) rename src/{V2 => V6}/Types/CustomerClientLinkError.cs (86%) rename src/{V2 => V6}/Types/CustomerError.cs (90%) rename src/{V2 => V6}/Types/CustomerExtensionSetting.cs (76%) rename src/{V2 => V6}/Types/CustomerFeed.cs (72%) rename src/{V2 => V6}/Types/CustomerFeedError.cs (90%) rename src/{V2 => V6}/Types/CustomerLabel.cs (67%) rename src/{V2 => V6}/Types/CustomerManagerLink.cs (63%) rename src/{V2 => V6}/Types/CustomerManagerLinkError.cs (85%) rename src/{V2 => V6}/Types/CustomerMatchUploadKeyType.cs (90%) rename src/{V2 => V6}/Types/CustomerNegativeCriterion.cs (75%) rename src/{V2 => V6}/Types/CustomerPayPerConversionEligibilityFailureReason.cs (91%) create mode 100644 src/V6/Types/CustomerUserAccess.cs create mode 100644 src/V6/Types/CustomerUserAccessError.cs rename src/{V2 => V6}/Types/DataDrivenModelStatus.cs (90%) rename src/{V2 => V6}/Types/DatabaseError.cs (81%) rename src/{V2 => V6}/Types/DateError.cs (91%) rename src/{V2 => V6}/Types/DateRangeError.cs (89%) rename src/{V2 => V6}/Types/Dates.cs (63%) rename src/{V2 => V6}/Types/DayOfWeek.cs (89%) rename src/{V2 => V6}/Types/DetailPlacementView.cs (57%) rename src/{V2 => V6}/Types/Device.cs (89%) rename src/{V2 => V6}/Types/DisplayAdFormatSetting.cs (90%) rename src/{V2 => V6}/Types/DisplayKeywordView.cs (85%) rename src/{V2 => V6}/Types/DisplayUploadProductType.cs (93%) rename src/{V2 => V6}/Types/DistanceBucket.cs (92%) rename src/{V2 => V6}/Types/DistanceView.cs (70%) rename src/{V2 => V6}/Types/DistinctError.cs (88%) create mode 100644 src/V6/Types/DomainCategory.cs rename src/{V2 => V6}/Types/DsaPageFeedCriterionField.cs (89%) create mode 100644 src/V6/Types/DynamicSearchAdsSearchTermView.cs rename src/{V2 => V6}/Types/EducationPlaceholderField.cs (93%) rename src/{V2 => V6}/Types/EnumError.cs (89%) rename src/{V2 => V6}/Types/Errors.cs (69%) rename src/{V2 => V6}/Types/ExpandedLandingPageView.cs (70%) rename src/{V2 => V6}/Types/ExplorerAutoOptimizerSetting.cs (71%) rename src/{V2 => V6}/Types/ExtensionFeedItem.cs (68%) rename src/{V2 => V6}/Types/ExtensionFeedItemError.cs (81%) rename src/{V2 => V6}/Types/ExtensionSettingDevice.cs (91%) rename src/{V2 => V6}/Types/ExtensionSettingError.cs (85%) rename src/{V2 => V6}/Types/ExtensionType.cs (86%) rename src/{V2 => V6}/Types/Extensions.cs (57%) create mode 100644 src/V6/Types/ExtensionsResourceNames.g.cs rename src/{V2 => V6}/Types/ExternalConversionSource.cs (82%) rename src/{V2 => V6}/Types/Feed.cs (70%) rename src/{V2 => V6}/Types/FeedAttributeReferenceError.cs (90%) rename src/{V2 => V6}/Types/FeedAttributeType.cs (90%) rename src/{V2 => V6}/Types/FeedCommon.cs (62%) rename src/{V2 => V6}/Types/FeedError.cs (87%) rename src/{V2 => V6}/Types/FeedItem.cs (64%) rename src/{V2 => V6}/Types/FeedItemError.cs (91%) rename src/{V2 => V6}/Types/FeedItemQualityApprovalStatus.cs (89%) rename src/{V2 => V6}/Types/FeedItemQualityDisapprovalReason.cs (93%) create mode 100644 src/V6/Types/FeedItemSet.cs create mode 100644 src/V6/Types/FeedItemSetError.cs create mode 100644 src/V6/Types/FeedItemSetFilterTypeInfos.cs create mode 100644 src/V6/Types/FeedItemSetLink.cs create mode 100644 src/V6/Types/FeedItemSetLinkError.cs create mode 100644 src/V6/Types/FeedItemSetStatus.cs create mode 100644 src/V6/Types/FeedItemSetStringFilterType.cs rename src/{V2 => V6}/Types/FeedItemStatus.cs (88%) rename src/{V2 => V6}/Types/FeedItemTarget.cs (60%) rename src/{V2 => V6}/Types/FeedItemTargetDevice.cs (89%) rename src/{V2 => V6}/Types/FeedItemTargetError.cs (92%) rename src/{V2/Types/PageOnePromotedStrategyGoal.cs => V6/Types/FeedItemTargetStatus.cs} (63%) rename src/{V2 => V6}/Types/FeedItemTargetType.cs (90%) rename src/{V2 => V6}/Types/FeedItemValidationError.cs (81%) rename src/{V2 => V6}/Types/FeedItemValidationStatus.cs (90%) rename src/{V2 => V6}/Types/FeedLinkStatus.cs (88%) rename src/{V2 => V6}/Types/FeedMapping.cs (76%) rename src/{V2 => V6}/Types/FeedMappingCriterionType.cs (89%) rename src/{V2 => V6}/Types/FeedMappingError.cs (88%) rename src/{V2 => V6}/Types/FeedMappingStatus.cs (88%) rename src/{V2 => V6}/Types/FeedOrigin.cs (88%) rename src/{V2 => V6}/Types/FeedPlaceholderView.cs (82%) rename src/{V2 => V6}/Types/FeedStatus.cs (89%) rename src/{V2 => V6}/Types/FieldError.cs (86%) rename src/{V2 => V6}/Types/FieldMaskError.cs (90%) rename src/{V2 => V6}/Types/FinalAppUrl.cs (70%) rename src/{V2 => V6}/Types/FlightPlaceholderField.cs (93%) rename src/{V2 => V6}/Types/FrequencyCap.cs (69%) rename src/{V2 => V6}/Types/FrequencyCapEventType.cs (89%) rename src/{V2 => V6}/Types/FrequencyCapLevel.cs (90%) rename src/{V2 => V6}/Types/FrequencyCapTimeUnit.cs (91%) rename src/{V2 => V6}/Types/FunctionError.cs (92%) rename src/{V2 => V6}/Types/FunctionParsingError.cs (91%) rename src/{V2 => V6}/Types/GenderType.cs (88%) rename src/{V2 => V6}/Types/GenderView.cs (85%) rename src/{V2 => V6}/Types/GeoTargetConstant.cs (51%) rename src/{V2 => V6}/Types/GeoTargetConstantStatus.cs (90%) rename src/{V2 => V6}/Types/GeoTargetConstantSuggestionError.cs (90%) rename src/{V2 => V6}/Types/GeoTargetingRestriction.cs (90%) rename src/{V2 => V6}/Types/GeoTargetingType.cs (89%) rename src/{V2 => V6}/Types/GeographicView.cs (69%) rename src/{V2 => V6}/Types/GoogleAdsField.cs (62%) rename src/{V2 => V6}/Types/GoogleAdsFieldCategory.cs (90%) rename src/{V2 => V6}/Types/GoogleAdsFieldDataType.cs (92%) rename src/{V2 => V6}/Types/GroupPlacementView.cs (62%) rename src/{V2 => V6}/Types/HeaderError.cs (82%) rename src/{V2 => V6}/Types/HotelDateSelectionType.cs (90%) rename src/{V2 => V6}/Types/HotelGroupView.cs (85%) rename src/{V2 => V6}/Types/HotelPerformanceView.cs (86%) rename src/{V2 => V6}/Types/HotelPlaceholderField.cs (93%) rename src/{V2 => V6}/Types/HotelPriceBucket.cs (88%) rename src/{V2 => V6}/Types/HotelRateType.cs (89%) rename src/{V2 => V6}/Types/IdError.cs (87%) rename src/{V2 => V6}/Types/ImageError.cs (88%) create mode 100644 src/V6/Types/ImagePlaceholderField.cs rename src/{V2 => V6}/Types/IncomeRangeType.cs (90%) create mode 100644 src/V6/Types/IncomeRangeView.cs rename src/{V2 => V6}/Types/InteractionEventType.cs (90%) rename src/{V2 => V6}/Types/InteractionType.cs (88%) rename src/{V2 => V6}/Types/InternalError.cs (82%) create mode 100644 src/V6/Types/Invoice.cs rename src/{V2 => V6}/Types/InvoiceError.cs (88%) rename src/{V2 => V6}/Types/InvoiceType.cs (88%) rename src/{V2 => V6}/Types/JobPlaceholderField.cs (92%) rename src/{V2 => V6}/Types/KeywordMatchType.cs (88%) rename src/{V2 => V6}/Types/KeywordPlan.cs (76%) rename src/{V2 => V6}/Types/KeywordPlanAdGroup.cs (58%) rename src/{V2 => V6}/Types/KeywordPlanAdGroupError.cs (89%) create mode 100644 src/V6/Types/KeywordPlanAdGroupKeyword.cs rename src/{V2/Types/KeywordPlanKeywordError.cs => V6/Types/KeywordPlanAdGroupKeywordError.cs} (66%) rename src/{V2 => V6}/Types/KeywordPlanCampaign.cs (65%) rename src/{V2 => V6}/Types/KeywordPlanCampaignError.cs (85%) create mode 100644 src/V6/Types/KeywordPlanCampaignKeyword.cs rename src/{V2/Types/KeywordPlanNegativeKeywordError.cs => V6/Types/KeywordPlanCampaignKeywordError.cs} (66%) create mode 100644 src/V6/Types/KeywordPlanCommon.cs rename src/{V2 => V6}/Types/KeywordPlanCompetitionLevel.cs (89%) rename src/{V2 => V6}/Types/KeywordPlanError.cs (91%) rename src/{V2 => V6}/Types/KeywordPlanForecastInterval.cs (90%) rename src/{V2 => V6}/Types/KeywordPlanIdeaError.cs (89%) rename src/{V2 => V6}/Types/KeywordPlanNetwork.cs (89%) rename src/{V2 => V6}/Types/KeywordView.cs (85%) rename src/{V2 => V6}/Types/Label.cs (67%) rename src/{V2 => V6}/Types/LabelError.cs (91%) rename src/{V2 => V6}/Types/LabelStatus.cs (89%) rename src/{V2 => V6}/Types/LandingPageView.cs (71%) rename src/{V2 => V6}/Types/LanguageCodeError.cs (89%) rename src/{V2 => V6}/Types/LanguageConstant.cs (59%) create mode 100644 src/V6/Types/LeadFormCallToActionType.cs create mode 100644 src/V6/Types/LeadFormDesiredIntent.cs create mode 100644 src/V6/Types/LeadFormFieldUserInputType.cs create mode 100644 src/V6/Types/LeadFormPostSubmitCallToActionType.cs rename src/{V2 => V6}/Types/LegacyAppInstallAdAppStore.cs (90%) create mode 100644 src/V6/Types/LinkedAccountType.cs rename src/{V2 => V6}/Types/ListOperationError.cs (89%) rename src/{V2 => V6}/Types/ListingGroupType.cs (89%) rename src/{V2 => V6}/Types/LocalPlaceholderField.cs (94%) rename src/{V2 => V6}/Types/LocationExtensionTargetingCriterionField.cs (90%) rename src/{V2 => V6}/Types/LocationGroupRadiusUnits.cs (83%) rename src/{V2 => V6}/Types/LocationPlaceholderField.cs (90%) create mode 100644 src/V6/Types/LocationSourceType.cs rename src/{V2 => V6}/Types/LocationView.cs (85%) rename src/{V2 => V6}/Types/ManagedPlacementView.cs (85%) rename src/{V2 => V6}/Types/ManagerLinkError.cs (84%) rename src/{V2 => V6}/Types/ManagerLinkStatus.cs (89%) rename src/{V2 => V6}/Types/MatchingFunction.cs (78%) rename src/{V2 => V6}/Types/MatchingFunctionContextType.cs (89%) rename src/{V2 => V6}/Types/MatchingFunctionOperator.cs (91%) rename src/{V2 => V6}/Types/MediaBundleError.cs (93%) rename src/{V2 => V6}/Types/MediaFile.cs (60%) rename src/{V2 => V6}/Types/MediaFileError.cs (94%) rename src/{V2 => V6}/Types/MediaType.cs (89%) create mode 100644 src/V6/Types/MediaUploadError.cs rename src/{V2 => V6}/Types/MerchantCenterLink.cs (64%) rename src/{V2 => V6}/Types/MerchantCenterLinkStatus.cs (90%) rename src/{V2 => V6}/Types/MessagePlaceholderField.cs (90%) create mode 100644 src/V6/Types/Metrics.cs rename src/{V2 => V6}/Types/MimeType.cs (90%) rename src/{V2 => V6}/Types/MinuteOfHour.cs (88%) rename src/{V2 => V6}/Types/MobileAppCategoryConstant.cs (67%) create mode 100644 src/V6/Types/MobileAppVendor.cs rename src/{V2 => V6}/Types/MobileDeviceConstant.cs (58%) rename src/{V2 => V6}/Types/MobileDeviceType.cs (88%) rename src/{V2 => V6}/Types/MonthOfYear.cs (90%) rename src/{V2 => V6}/Types/MultiplierError.cs (92%) rename src/{V2 => V6}/Types/MutateError.cs (82%) rename src/{V2 => V6}/Types/NegativeGeoTargetType.cs (90%) rename src/{V2 => V6}/Types/NewResourceCreationError.cs (89%) rename src/{V2/Types/NotWhitelistedError.cs => V6/Types/NotAllowlistedError.cs} (71%) rename src/{V2 => V6}/Types/NotEmptyError.cs (88%) rename src/{V2 => V6}/Types/NullError.cs (88%) create mode 100644 src/V6/Types/OfflineUserData.cs create mode 100644 src/V6/Types/OfflineUserDataJob.cs create mode 100644 src/V6/Types/OfflineUserDataJobError.cs create mode 100644 src/V6/Types/OfflineUserDataJobFailureReason.cs create mode 100644 src/V6/Types/OfflineUserDataJobStatus.cs create mode 100644 src/V6/Types/OfflineUserDataJobType.cs rename src/{V2 => V6}/Types/OperatingSystemVersionConstant.cs (59%) rename src/{V2 => V6}/Types/OperatingSystemVersionOperatorType.cs (89%) rename src/{V2 => V6}/Types/OperationAccessDeniedError.cs (91%) rename src/{V2 => V6}/Types/OperatorError.cs (88%) create mode 100644 src/V6/Types/OptimizationGoalType.cs create mode 100644 src/V6/Types/PageOnePromotedStrategyGoal.cs rename src/{V2 => V6}/Types/PaidOrganicSearchTermView.cs (71%) rename src/{V2 => V6}/Types/ParentalStatusType.cs (89%) rename src/{V2 => V6}/Types/ParentalStatusView.cs (85%) rename src/{V2 => V6}/Types/PartialFailureError.cs (91%) rename src/{V2 => V6}/Types/PaymentMode.cs (82%) create mode 100644 src/V6/Types/PaymentsAccount.cs create mode 100644 src/V6/Types/PaymentsAccountError.cs rename src/{V2 => V6}/Types/PlaceholderType.cs (89%) rename src/{V2 => V6}/Types/PlacementType.cs (90%) rename src/{V2 => V6}/Types/Policy.cs (80%) rename src/{V2 => V6}/Types/PolicyApprovalStatus.cs (90%) rename src/{V2 => V6}/Types/PolicyFindingError.cs (89%) rename src/{V2 => V6}/Types/PolicyReviewStatus.cs (91%) rename src/{V2 => V6}/Types/PolicyTopicEntryType.cs (90%) rename src/{V2 => V6}/Types/PolicyTopicEvidenceDestinationMismatchUrlType.cs (90%) rename src/{V2 => V6}/Types/PolicyTopicEvidenceDestinationNotWorkingDevice.cs (90%) rename src/{V2 => V6}/Types/PolicyTopicEvidenceDestinationNotWorkingDnsErrorType.cs (90%) rename src/{V2 => V6}/Types/PolicyValidationParameterError.cs (90%) rename src/{V2 => V6}/Types/PolicyViolationError.cs (89%) rename src/{V2 => V6}/Types/PositiveGeoTargetType.cs (88%) rename src/{V2 => V6}/Types/PreferredContentType.cs (88%) rename src/{V2 => V6}/Types/PriceExtensionPriceQualifier.cs (89%) rename src/{V2 => V6}/Types/PriceExtensionPriceUnit.cs (90%) rename src/{V2 => V6}/Types/PriceExtensionType.cs (90%) rename src/{V2 => V6}/Types/PricePlaceholderField.cs (96%) rename src/{V2 => V6}/Types/ProductBiddingCategoryConstant.cs (56%) rename src/{V2 => V6}/Types/ProductBiddingCategoryLevel.cs (89%) rename src/{V2 => V6}/Types/ProductBiddingCategoryStatus.cs (89%) rename src/{V2 => V6}/Types/ProductChannel.cs (88%) rename src/{V2 => V6}/Types/ProductChannelExclusivity.cs (89%) rename src/{V2 => V6}/Types/ProductCondition.cs (88%) rename src/{V2/Types/ListingCustomAttributeIndex.cs => V6/Types/ProductCustomAttributeIndex.cs} (71%) rename src/{V2 => V6}/Types/ProductGroupView.cs (85%) rename src/{V2 => V6}/Types/ProductTypeLevel.cs (89%) rename src/{V2 => V6}/Types/PromotionExtensionDiscountModifier.cs (88%) rename src/{V2 => V6}/Types/PromotionExtensionOccasion.cs (93%) rename src/{V2 => V6}/Types/PromotionPlaceholderField.cs (92%) rename src/{V2 => V6}/Types/ProximityRadiusUnits.cs (89%) rename src/{V2 => V6}/Types/QualityScoreBucket.cs (89%) rename src/{V2 => V6}/Types/QueryError.cs (96%) rename src/{V2 => V6}/Types/QuotaError.cs (89%) rename src/{V2 => V6}/Types/RangeError.cs (89%) rename src/{V2 => V6}/Types/ReachPlanAdLength.cs (88%) rename src/{V2 => V6}/Types/ReachPlanAgeRange.cs (93%) rename src/{V2 => V6}/Types/ReachPlanError.cs (81%) create mode 100644 src/V6/Types/ReachPlanNetwork.cs rename src/{V2 => V6}/Types/RealEstatePlaceholderField.cs (93%) rename src/{V2 => V6}/Types/RealTimeBiddingSetting.cs (71%) rename src/{V2 => V6}/Types/Recommendation.cs (70%) rename src/{V2 => V6}/Types/RecommendationError.cs (93%) rename src/{V2 => V6}/Types/RecommendationType.cs (83%) rename src/{V2 => V6}/Types/RegionCodeError.cs (88%) rename src/{V2 => V6}/Types/RemarketingAction.cs (68%) rename src/{V2 => V6}/Types/RequestError.cs (86%) rename src/{V2 => V6}/Types/ResourceAccessDeniedError.cs (89%) create mode 100644 src/V6/Types/ResourceChangeOperation.cs rename src/{V2 => V6}/Types/ResourceCountLimitExceededError.cs (92%) create mode 100644 src/V6/Types/ResponseContentType.cs rename src/{V2 => V6}/Types/SearchEngineResultsPageType.cs (90%) rename src/{V2 => V6}/Types/SearchTermMatchType.cs (89%) rename src/{V2 => V6}/Types/SearchTermTargetingStatus.cs (90%) rename src/{V2 => V6}/Types/SearchTermView.cs (65%) create mode 100644 src/V6/Types/Segments.cs create mode 100644 src/V6/Types/SegmentsResourceNames.g.cs rename src/{V2 => V6}/Types/ServedAssetFieldType.cs (90%) rename src/{V2 => V6}/Types/SettingError.cs (74%) rename src/{V2 => V6}/Types/SharedCriterion.cs (71%) rename src/{V2 => V6}/Types/SharedCriterionError.cs (89%) rename src/{V2 => V6}/Types/SharedSet.cs (58%) rename src/{V2 => V6}/Types/SharedSetError.cs (89%) rename src/{V2 => V6}/Types/SharedSetStatus.cs (89%) rename src/{V2 => V6}/Types/SharedSetType.cs (88%) rename src/{V2 => V6}/Types/ShoppingPerformanceView.cs (86%) create mode 100644 src/V6/Types/Simulation.cs rename src/{V2 => V6}/Types/SimulationModificationMethod.cs (89%) rename src/{V2 => V6}/Types/SimulationType.cs (80%) rename src/{V2 => V6}/Types/SitelinkPlaceholderField.cs (91%) rename src/{V2 => V6}/Types/SizeLimitError.cs (89%) rename src/{V2 => V6}/Types/Slot.cs (90%) rename src/{V2 => V6}/Types/SpendingLimitType.cs (88%) rename src/{V2 => V6}/Types/StringFormatError.cs (90%) rename src/{V2 => V6}/Types/StringLengthError.cs (82%) rename src/{V2 => V6}/Types/StructuredSnippetPlaceholderField.cs (90%) create mode 100644 src/V6/Types/SummaryRowSetting.cs rename src/{V2 => V6}/Types/SystemManagedEntitySource.cs (89%) rename src/{V2 => V6}/Types/TagSnippet.cs (61%) rename src/{V2 => V6}/Types/TargetCpaOptInRecommendationGoal.cs (90%) rename src/{V2 => V6}/Types/TargetImpressionShareLocation.cs (89%) rename src/{V2 => V6}/Types/TargetingDimension.cs (90%) create mode 100644 src/V6/Types/TargetingSetting.cs rename src/{V2 => V6}/Types/TextLabel.cs (63%) create mode 100644 src/V6/Types/ThirdPartyAppAnalyticsLink.cs create mode 100644 src/V6/Types/ThirdPartyAppAnalyticsLinkError.cs rename src/{V2 => V6}/Types/TimeType.cs (88%) create mode 100644 src/V6/Types/TimeZoneError.cs rename src/{V2 => V6}/Types/TopicConstant.cs (67%) rename src/{V2 => V6}/Types/TopicView.cs (85%) rename src/{V2 => V6}/Types/TrackingCodePageFormat.cs (89%) rename src/{V2 => V6}/Types/TrackingCodeType.cs (89%) rename src/{V2 => V6}/Types/TravelPlaceholderField.cs (94%) rename src/{V2 => V6}/Types/UrlCollection.cs (64%) rename src/{V2 => V6}/Types/UrlFieldError.cs (95%) rename src/{V2/Types/MediaUploadError.cs => V6/Types/UserDataError.cs} (62%) create mode 100644 src/V6/Types/UserIdentifierSource.cs rename src/{V2 => V6}/Types/UserInterest.cs (58%) rename src/{V2 => V6}/Types/UserInterestTaxonomyType.cs (91%) rename src/{V2 => V6}/Types/UserList.cs (58%) rename src/{V2 => V6}/Types/UserListAccessStatus.cs (89%) rename src/{V2 => V6}/Types/UserListClosingReason.cs (89%) rename src/{V2 => V6}/Types/UserListCombinedRuleOperator.cs (89%) rename src/{V2 => V6}/Types/UserListCrmDataSourceType.cs (89%) rename src/{V2 => V6}/Types/UserListDateRuleItemOperator.cs (90%) rename src/{V2 => V6}/Types/UserListError.cs (88%) rename src/{V2 => V6}/Types/UserListLogicalRuleOperator.cs (89%) rename src/{V2 => V6}/Types/UserListMembershipStatus.cs (90%) rename src/{V2 => V6}/Types/UserListNumberRuleItemOperator.cs (89%) rename src/{V2 => V6}/Types/UserListPrepopulationStatus.cs (89%) rename src/{V2 => V6}/Types/UserListRuleType.cs (88%) rename src/{V2 => V6}/Types/UserListSizeRange.cs (92%) rename src/{V2 => V6}/Types/UserListStringRuleItemOperator.cs (91%) rename src/{V2 => V6}/Types/UserListType.cs (90%) rename src/{V2 => V6}/Types/UserLists.cs (79%) rename src/{V2 => V6}/Types/UserLocationView.cs (66%) rename src/{V2 => V6}/Types/Value.cs (94%) rename src/{V2 => V6}/Types/VanityPharmaDisplayUrlMode.cs (90%) rename src/{V2 => V6}/Types/VanityPharmaText.cs (93%) rename src/{V2 => V6}/Types/Video.cs (57%) rename src/{V2 => V6}/Types/WebpageConditionOperand.cs (90%) rename src/{V2 => V6}/Types/WebpageConditionOperator.cs (90%) rename src/{V2 => V6}/Types/YoutubeVideoRegistrationError.cs (82%) rename tests/Examples/{V5 => V6}/AdvancedOperations/AddAppCampaignTest.cs (93%) rename tests/Examples/{V5 => V6}/AdvancedOperations/AddSmartDisplayAdTest.cs (93%) rename tests/Examples/{V5 => V6}/BasicOperations/AddAdGroupsTest.cs (94%) rename tests/Examples/{V5 => V6}/BasicOperations/AddCampaignsTest.cs (93%) rename tests/Examples/{V5 => V6}/BasicOperations/AddExpandedTextAdsTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/AddKeywordsTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/AddResponsiveSearchAdTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/GetAdGroupsTest.cs (96%) rename tests/Examples/{V5 => V6}/BasicOperations/GetArtifactMetadataTest.cs (93%) rename tests/Examples/{V5 => V6}/BasicOperations/GetCampaignsTest.cs (94%) rename tests/Examples/{V5 => V6}/BasicOperations/GetExpandedTextAdsTest.cs (96%) rename tests/Examples/{V5 => V6}/BasicOperations/GetKeywordsTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/GetResponsiveSearchAdsTest.cs (96%) rename tests/Examples/{V5 => V6}/BasicOperations/PauseAdTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/RemoveAdGroupTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/RemoveAdTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/RemoveCampaignTest.cs (94%) rename tests/Examples/{V5 => V6}/BasicOperations/RemoveKeywordTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/UpdateAdGroupTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/UpdateCampaignTest.cs (94%) rename tests/Examples/{V5 => V6}/BasicOperations/UpdateExpandedTextAdsTest.cs (95%) rename tests/Examples/{V5 => V6}/BasicOperations/UpdateKeywordTest.cs (95%) rename tests/Examples/{V5 => V6}/CampaignManagement/AddCampaignDraftTest.cs (95%) rename tests/Examples/{V5 => V6}/CampaignManagement/AddCompleteCampaignsUsingBatchJobTest.cs (93%) rename tests/Examples/{V5 => V6}/CampaignManagement/CreateCampaignExperimentTest.cs (92%) rename tests/Examples/{V5 => V6}/CampaignManagement/GraduateCampaignExperimentTest.cs (96%) rename tests/Examples/{V5 => V6}/CampaignManagement/UpdateCampaignCriterionBidModifierTest.cs (95%) rename tests/Examples/{V5 => V6}/CampaignManagement/ValidateTextAdTest.cs (95%) rename tests/Examples/{V5 => V6}/ErrorHandling/HandleExpandedTextAdPolicyViolationsTest.cs (95%) rename tests/Examples/{V5 => V6}/ErrorHandling/HandleKeywordPolicyViolationsTest.cs (95%) rename tests/Examples/{V5 => V6}/ExampleTestsUtils.cs (95%) rename tests/Examples/{V5 => V6}/Extensions/AddAffiliateLocationExtensionsTest.cs (95%) rename tests/Examples/{V5 => V6}/Extensions/AddGoogleMyBusinessLocationExtensionsTest.cs (94%) rename tests/Examples/{V5 => V6}/Extensions/AddPricesTest.cs (94%) rename tests/Examples/{V5 => V6}/Misc/GetAllImageAssetsTest.cs (93%) rename tests/Examples/{V5 => V6}/Misc/GetAllVideosAndImagesTest.cs (93%) rename tests/Examples/{V5 => V6}/Misc/UploadImageAssetTest.cs (93%) rename tests/Examples/{V5 => V6}/Misc/UploadImageTest.cs (93%) rename tests/Examples/{V5 => V6}/Misc/UploadMediaBundleTest.cs (93%) rename tests/Examples/{V5 => V6}/ShoppingAds/AddListingScopeTest.cs (95%) rename tests/Examples/{V5 => V6}/ShoppingAds/ApproveMerchantCenterLinkTest.cs (93%) rename tests/Examples/{V5 => V6}/Targeting/SearchForLanguageAndCarrierConstantsTest.cs (93%) rename tests/Logging/{V2 => V6}/LogEntryTests.cs (98%) rename tests/Logging/{V2 => V6}/LoggingHandlerTests.cs (98%) delete mode 100644 tests/V2/Services/KeywordPlanIdeaServiceClientTest.g.cs delete mode 100644 tests/V2/Services/KeywordPlanKeywordServiceClientTest.g.cs delete mode 100644 tests/V2/Services/KeywordPlanNegativeKeywordServiceClientTest.g.cs delete mode 100644 tests/V2/Services/MutateJobServiceClientTest.g.cs rename tests/{V2 => V6}/GoogleAdsFailureExtensionsTests.cs (97%) rename tests/{V2 => V6}/Services/AccountBudgetProposalServiceClientTest.g.cs (93%) rename tests/{V2 => V6}/Services/AccountBudgetServiceClientTest.g.cs (90%) create mode 100644 tests/V6/Services/AccountLinkServiceClientTest.g.cs rename tests/{V2 => V6}/Services/AdGroupAdAssetViewServiceClientTest.g.cs (81%) rename tests/{V2 => V6}/Services/AdGroupAdLabelServiceClientTest.g.cs (88%) rename tests/{V2 => V6}/Services/AdGroupAdServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/AdGroupAudienceViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/AdGroupBidModifierServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/AdGroupCriterionLabelServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/AdGroupCriterionServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/AdGroupCriterionSimulationServiceClientTest.g.cs (82%) rename tests/{V2 => V6}/Services/AdGroupExtensionSettingServiceClientTest.g.cs (88%) rename tests/{V2 => V6}/Services/AdGroupFeedServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/AdGroupLabelServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/AdGroupServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/AdGroupSimulationServiceClientTest.g.cs (80%) rename tests/{V2 => V6}/Services/AdParameterServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/AdScheduleViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/AdServiceClientTest.g.cs (92%) rename tests/{V2 => V6}/Services/AgeRangeViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/AssetServiceClientTest.g.cs (81%) create mode 100644 tests/V6/Services/BatchJobServiceClientTest.g.cs rename tests/{V2 => V6}/Services/BiddingStrategyServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/BillingSetupServiceClientTest.g.cs (91%) create mode 100644 tests/V6/Services/CampaignAssetServiceClientTest.g.cs rename tests/{V2 => V6}/Services/CampaignAudienceViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/CampaignBidModifierServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/CampaignBudgetServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/CampaignCriterionServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/CampaignCriterionSimulationServiceClientTest.g.cs (85%) rename tests/{V2 => V6}/Services/CampaignDraftServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/CampaignExperimentServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/CampaignExtensionSettingServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/CampaignFeedServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/CampaignLabelServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/CampaignServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/CampaignSharedSetServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/CarrierConstantServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/ChangeStatusServiceClientTest.g.cs (73%) rename tests/{V2 => V6}/Services/ClickViewServiceClientTest.g.cs (77%) create mode 100644 tests/V6/Services/CombinedAudienceServiceClientTest.g.cs rename tests/{V2 => V6}/Services/ConversionActionServiceClientTest.g.cs (84%) rename tests/{V2 => V6}/Services/ConversionAdjustmentUploadServiceClientTest.g.cs (98%) rename tests/{V2 => V6}/Services/ConversionUploadServiceClientTest.g.cs (99%) create mode 100644 tests/V6/Services/CurrencyConstantServiceClientTest.g.cs create mode 100644 tests/V6/Services/CustomAudienceServiceClientTest.g.cs rename tests/{V2 => V6}/Services/CustomInterestServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/CustomerClientLinkServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/CustomerClientServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/CustomerExtensionSettingServiceClientTest.g.cs (88%) rename tests/{V2 => V6}/Services/CustomerFeedServiceClientTest.g.cs (92%) rename tests/{V2 => V6}/Services/CustomerLabelServiceClientTest.g.cs (93%) rename tests/{V2 => V6}/Services/CustomerManagerLinkServiceClientTest.g.cs (68%) rename tests/{V2 => V6}/Services/CustomerNegativeCriterionServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/CustomerServiceClientTest.g.cs (93%) create mode 100644 tests/V6/Services/CustomerUserAccessServiceClientTest.g.cs rename tests/{V2 => V6}/Services/DetailPlacementViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/DisplayKeywordViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/DistanceViewServiceClientTest.g.cs (85%) rename tests/{V2 => V6}/Services/DomainCategoryServiceClientTest.g.cs (84%) rename tests/{V2 => V6}/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs (72%) rename tests/{V2 => V6}/Services/ExpandedLandingPageViewServiceClientTest.g.cs (85%) rename tests/{V2 => V6}/Services/ExtensionFeedItemServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/FeedItemServiceClientTest.g.cs (92%) create mode 100644 tests/V6/Services/FeedItemSetLinkServiceClientTest.g.cs create mode 100644 tests/V6/Services/FeedItemSetServiceClientTest.g.cs rename tests/{V2 => V6}/Services/FeedItemTargetServiceClientTest.g.cs (80%) rename tests/{V2 => V6}/Services/FeedMappingServiceClientTest.g.cs (91%) rename tests/{V2 => V6}/Services/FeedPlaceholderViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/FeedServiceClientTest.g.cs (94%) rename tests/{V2 => V6}/Services/GenderViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/GeoTargetConstantServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/GeographicViewServiceClientTest.g.cs (85%) rename tests/{V2 => V6}/Services/GoogleAdsFieldServiceClientTest.g.cs (98%) rename tests/{V2 => V6}/Services/GoogleAdsServiceClientTest.g.cs (95%) rename tests/{V2 => V6}/Services/GroupPlacementViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/HotelGroupViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/HotelPerformanceViewServiceClientTest.g.cs (91%) create mode 100644 tests/V6/Services/IncomeRangeViewServiceClientTest.g.cs rename tests/{V2 => V6}/Services/InvoiceServiceClientTest.g.cs (97%) create mode 100644 tests/V6/Services/KeywordPlanAdGroupKeywordServiceClientTest.g.cs rename tests/{V2 => V6}/Services/KeywordPlanAdGroupServiceClientTest.g.cs (89%) create mode 100644 tests/V6/Services/KeywordPlanCampaignKeywordServiceClientTest.g.cs rename tests/{V2 => V6}/Services/KeywordPlanCampaignServiceClientTest.g.cs (90%) create mode 100644 tests/V6/Services/KeywordPlanIdeaServiceClientTest.g.cs rename tests/{V2 => V6}/Services/KeywordPlanServiceClientTest.g.cs (50%) rename tests/{V2 => V6}/Services/KeywordViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/LabelServiceClientTest.g.cs (92%) rename tests/{V2 => V6}/Services/LandingPageViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/LanguageConstantServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/LocationViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/ManagedPlacementViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/MediaFileServiceClientTest.g.cs (92%) rename tests/{V2 => V6}/Services/MerchantCenterLinkServiceClientTest.g.cs (94%) rename tests/{V2 => V6}/Services/MobileAppCategoryConstantServiceClientTest.g.cs (84%) rename tests/{V2 => V6}/Services/MobileDeviceConstantServiceClientTest.g.cs (88%) create mode 100644 tests/V6/Services/OfflineUserDataJobServiceClientTest.g.cs rename tests/{V2 => V6}/Services/OperatingSystemVersionConstantServiceClientTest.g.cs (84%) rename tests/{V2 => V6}/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs (83%) rename tests/{V2 => V6}/Services/ParentalStatusViewServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/PaymentsAccountServiceClientTest.g.cs (97%) rename tests/{V2 => V6}/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs (86%) rename tests/{V2 => V6}/Services/ProductGroupViewServiceClientTest.g.cs (87%) rename tests/{V2 => V6}/Services/ReachPlanServiceClientTest.g.cs (99%) rename tests/{V2 => V6}/Services/RecommendationServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/RemarketingActionServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/SearchTermViewServiceClientTest.g.cs (84%) rename tests/{V2 => V6}/Services/SharedCriterionServiceClientTest.g.cs (90%) rename tests/{V2 => V6}/Services/SharedSetServiceClientTest.g.cs (92%) rename tests/{V2 => V6}/Services/ShoppingPerformanceViewServiceClientTest.g.cs (91%) create mode 100644 tests/V6/Services/ThirdPartyAppAnalyticsLinkServiceClientTest.g.cs rename tests/{V2 => V6}/Services/TopicConstantServiceClientTest.g.cs (89%) rename tests/{V2 => V6}/Services/TopicViewServiceClientTest.g.cs (87%) create mode 100644 tests/V6/Services/UserDataServiceClientTest.g.cs rename tests/{V2 => V6}/Services/UserInterestServiceClientTest.g.cs (85%) rename tests/{V2 => V6}/Services/UserListServiceClientTest.g.cs (94%) rename tests/{V2 => V6}/Services/UserLocationViewServiceClientTest.g.cs (84%) rename tests/{V2 => V6}/Services/VideoServiceClientTest.g.cs (92%) rename tests/{V2 => V6}/TestUtils.cs (95%) diff --git a/ChangeLog b/ChangeLog index 5533d70a2..c7f839fde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,67 @@ +6.0.0 +===== +- Added support for v6 of Google Ads API. See + https://developers.google.com/google-ads/api/docs/release-notes#v6 for release notes. +- Removed support for v2 of the Google Ads API. See + https://developers.google.com/google-ads/api/docs/sunset-dates and + https://ads-developers.googleblog.com/2020/08/google-ads-api-v2-sunset-reminder.html + for more details. +- The library dependencies were bumped as listed below: + - Google.Api.Gax and related assemblies: 3.2.0 + - Grpc.Core and related assemblies: 2.33.1 + - Microsoft.Extensions and related assemblies: 3.1.9 +- Fixed the README.md file to make it minimal. See + https://developers.google.com/google-ads/api/docs/client-libs/dotnet for detailed + documentation. +- Fixed the conditional compilation for net472. +- Added a utility method in FieldMasks.cs to fetch field values given a fieldmask. +- Added additional masking for PII in logs. +- Fixed the broken documentation links in multiple source files. +- Fixed broken examples. + - Billing\AddBillingSetup.cs + - Fixed issue 246 - Reporting\ParallelReportDownload.cs. +- Updated some examples. + - Updated the query in Billing\AddBillingSetup.cs. + - Fix a comment in Remarketing\UploadStoreSalesTransactions.cs. + - Simplified the paged search iteration in Billing\GetBillingSetup.cs. + - Renamed Authentication\AuthenticateInStandaloneApplication => Authentication\AuthenticateInDesktopApplication. + - Minor grammar fix in Remarketing\UploadCallConversion.cs. + - Renamed AccountManagement\GetAccountChanges.cs => AccountManagement\GetChangeSummary.cs. +- Fixed the resource name for DomainCategory. +- Fixed the PartialFailureError condition logic. +- Migrated all code examples to use proto3 presence instead of wrapper types. This improves + the API performance and makes the API easier to work with native C# types. +- Added support for reading the settings.json file from an environment variable named + GOOGLE_ADS_CONFIGURATION_FILE_PATH. The client library will try to load settings from this file + if App.config is missing, and this environment variable is provided. +- Added support for reading individual settings from an environment variable. Supported settings + are: + - GOOGLE_ADS_OAUTH2_MODE + - GOOGLE_ADS_CLIENT_ID + - GOOGLE_ADS_CLIENT_SECRET + - GOOGLE_ADS_REFRESH_TOKEN + - GOOGLE_ADS_JSON_KEY_FILE_PATH + - GOOGLE_ADS_IMPERSONATED_EMAIL + - GOOGLE_ADS_DEVELOPER_TOKEN + - GOOGLE_ADS_LOGIN_CUSTOMER_ID + - GOOGLE_ADS_LINKED_CUSTOMER_ID +- Add new code examples. + - Remarketing\SetupRemarketing.cs. + - Remarketing\SetupAdvancedRemarketing.cs + - Remarketing\UpdateAudienceTargetRestriction.cs. + - AdvancedOperations\AddLocalCampaign.cs. + - HotelAds\AddHotelListingGroupTree.cs. + - AccountManagement\UpdateUserAccess.cs. + - AdvancedOperations\GetChangeDetails.cs. + - Extensions\UpdateSitelinkCampaignExtensionSetting.cs. + - Extensions\UpdateSitelink.cs. + - Extensions\RemoveEntireSitelinkCampaignExtensionSetting.cs. + - Extensions\AddLeadFormExtension.cs. + - Extensions\AddHotelCallout.cs. +- Fixed the PackageIconUrl property in Google.Ads.GoogleAds.csproj with PackageIcon as required + by the latest .NET library. +- Downgrade the tests to use .netcoreapp3.0. + 5.0.0 ===== - Added support for v5 of Google Ads API. See diff --git a/Google.Ads.GoogleAds.sln b/Google.Ads.GoogleAds.sln index 3c29b2761..3b833f88a 100644 --- a/Google.Ads.GoogleAds.sln +++ b/Google.Ads.GoogleAds.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2027 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29920.165 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Google.Ads.GoogleAds", "src\Google.Ads.GoogleAds.csproj", "{C691BD4D-683D-425B-8BC7-52F161475C7C}" EndProject @@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Google.Ads.GoogleAds.Tests" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Google.Ads.GoogleAds.Examples", "examples\Google.Ads.GoogleAds.Examples.csproj", "{7172CCB7-70B9-41A4-9D45-FCB156F9DF60}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthenticateInStandaloneApplication", "examples\Authentication\AuthenticateInStandaloneApplication\AuthenticateInStandaloneApplication.csproj", "{C64FFE8B-8464-4D71-814A-9397E6C2CFC2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthenticateInDesktopApplication", "examples\Authentication\AuthenticateInDesktopApplication\AuthenticateInDesktopApplication.csproj", "{C64FFE8B-8464-4D71-814A-9397E6C2CFC2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/README.md b/README.md index f5d946862..f2c4df1d2 100644 --- a/README.md +++ b/README.md @@ -14,115 +14,15 @@ This project hosts the .NET client library for the Google Ads API. ## Supported Frameworks -- .NET Framework 4.5.2+ -- .NET Standard 2.0 +- .NET Framework 4.7.2+ (net472) +- .NET Standard 2.0 (netstandard2.0) +- .NET Core 3.0 (netcoreapp3.0) -## Announcements and updates - -For API and client library updates and news, please follow our Google - Ads Developers blog: http://googleadsdeveloper.blogspot.com/. - - -## Running the code examples - -We provide a zip package for the examples. To run the code examples, - follow these steps: - -1. Download the Google.Ads.GoogleAds.Examples zip file from - https://github.com/googleads/google-ads-dotnet/releases/latest. -1. Extract the examples zip file into a local folder. -1. Open `Google.Ads.GoogleAds.Examples.sln in Visual Studio and build it. -1. Follow the instructions on the -[Authentication guide](https://developers.google.com/google-ads/api/docs/oauth/cloud-project) - to create an OAuth2 client ID and Secret. -1. Run the `AuthenticateInStandaloneApplication` code example from the - Visual Studio project. When prompted, provide the client ID and client secret - from the previous step. `AuthenticateInStandaloneApplication` performs - the authentication and prints the configuration in XML format. Copy the - configuration into the `App.config` of the `Google.Ads.GoogleAds.Examples` - project. -1. Open the **Properties** dialog for the Examples project by - right clicking `Google.Ads.GoogleAds.Examples` project in the Solution - Explorer and selecting the **Properties** option from the context - menu. -1. Navigate to the **Debug Tab** and enter the command-line options, - which are of the form `version.examplename`. For instance, - `V0.GetCampaigns` is the command-line option to run `GetCampaigns` - in the `V0` version of the Google Ads API. -1. Compile and run the `Google.Ads.GoogleAds.Examples` project. - -As an alternative to steps 8-10, each code example has a `main()` -method, so you can set the appropriate code example as the Startup -object (Select the **Application tab** on the Examples Properties dialog - and pick the desired class from the "Startup object" dropdown.). - - -## Using the client library in your own project - - -The client library binaries are distributed via Nuget. Add a Nuget - reference to the [Google.Ads.GoogleAds package](https://www.nuget.org/packages/Google.Ads.GoogleAds) - in your project to use the client library. - - -## How do I make API calls? - -``` -// Create a Google Ads client. -GoogleAdsClient client = new GoogleAdsClient(); - -// Create the required service. -CampaignServiceClient campaignService = - client.GetService(Services.V0.CampaignService); - -// make more calls to service class. -``` - -See the [Getting Started](https://github.com/googleads/google-ads-dotnet/wiki/Getting-started) guide -for more details, and examples folder for code examples that show how to use various services. - -## How do I enable logging? - -You can enable logging by adding the following line in your Program.cs before making any API calls. - -``` -TraceUtilities.Configure(TraceUtilities.DETAILED_REQUEST_LOGS_SOURCE, - "C:\\logs\\details.log", System.Diagnostics.SourceLevels.All); -``` - -In most cases, the logs generated by the client library should provide enough details to troubleshoot -your issues. When reaching out to the support forum / aliases, you can either provide the logs (which -redacts sensitive information by default), or just share the request ID (which is logged as part of -the response log). - -If you prefer capturing the request ID yourself, then you need to provide a GoogleResponseMetadata object -to capture the request ID, as follows: - -``` -GoogleAdsResponseMetadata metadata = new GoogleAdsResponseMetadata(client.Config); - -// Add the campaigns. -MutateCampaignsResponse retVal = campaignService.MutateCampaigns( - customerId.ToString(), operations.ToArray(), metadata.CallSettings); - -Console.WriteLine(metadata.RequestId); -``` - -If the API log doesn't give you enough details, then you can enable more low level logging at grpc -level. Keep in mind that this can get pretty detailed and long. The grpc logs are written to -`stderr`, but you can attach your own logger like shown below. You can find all the supported -environment variables here: -https://github.com/grpc/grpc/blob/master/doc/environment_variables.md - -``` -Environment.SetEnvironmentVariable("GRPC_VERBOSITY", "DEBUG"); -Environment.SetEnvironmentVariable("GRPC_TRACE", "http"); -GrpcEnvironment.SetLogger(new ConsoleLogger()); -``` +## Documentation +Our documentation is available [here](https://developers.google.com/google-ads/api/docs/client-libs/dotnet). ## Miscellaneous - ### Wiki - https://github.com/googleads/google-ads-dotnet/wiki diff --git a/buildscript/build.sh b/buildscript/build.sh index 32ebd3c58..daac704d1 100755 --- a/buildscript/build.sh +++ b/buildscript/build.sh @@ -71,7 +71,7 @@ function dotnet_library::build_library() { echo "Run the smoke tests." echo "===================" - dotnet test "${DOTNET_CLIENT_LIBRARY_PATH}/tests/bin/Release/netcoreapp3.1/Google.Ads.GoogleAds.Tests.dll" \ + dotnet test "${DOTNET_CLIENT_LIBRARY_PATH}/tests/bin/Release/netcoreapp3.0/Google.Ads.GoogleAds.Tests.dll" \ -v d --filter TestCategory=Smoke } diff --git a/examples/AccountManagement/CreateCustomer.cs b/examples/AccountManagement/CreateCustomer.cs index d51c7968d..4cb3f17d9 100644 --- a/examples/AccountManagement/CreateCustomer.cs +++ b/examples/AccountManagement/CreateCustomer.cs @@ -13,13 +13,13 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example illustrates how to create a new customer under a given manager account. @@ -59,7 +59,7 @@ public static void Main(string[] args) public void Run(GoogleAdsClient client, long managerCustomerId) { // Get the CustomerService. - CustomerServiceClient customerService = client.GetService(Services.V5.CustomerService); + CustomerServiceClient customerService = client.GetService(Services.V6.CustomerService); Customer customer = new Customer() { diff --git a/examples/AccountManagement/GetAccountHierarchy.cs b/examples/AccountManagement/GetAccountHierarchy.cs index bf6ccdfc2..c9e032cf2 100644 --- a/examples/AccountManagement/GetAccountHierarchy.cs +++ b/examples/AccountManagement/GetAccountHierarchy.cs @@ -15,12 +15,12 @@ using System; using System.Collections.Generic; using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using Google.Api.Gax; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This example gets the account hierarchy of the specified manager account. If you don't @@ -87,10 +87,10 @@ public void Run(GoogleAdsClient googleAdsClient, long? managerCustomerId = null, } GoogleAdsServiceClient googleAdsServiceClient = - googleAdsClient.GetService(Services.V5.GoogleAdsService); + googleAdsClient.GetService(Services.V6.GoogleAdsService); CustomerServiceClient customerServiceClient = - googleAdsClient.GetService(Services.V5.CustomerService); + googleAdsClient.GetService(Services.V6.CustomerService); // List of Customer IDs to handle. List seedCustomerIds = new List(); @@ -178,13 +178,13 @@ FROM customer_client customerIdsToChildAccounts[managerCustomerId.Value].Add(customerClient); - if (customerClient.Manager.HasValue) + if (customerClient.Manager) // A customer can be managed by multiple managers, so to prevent // visiting the same customer many times, we need to check if it's // already in the Dictionary. - if (!customerIdsToChildAccounts.ContainsKey(customerClient.Id.Value) && + if (!customerIdsToChildAccounts.ContainsKey(customerClient.Id) && customerClient.Level == 1) - unprocessedCustomerIds.Enqueue(customerClient.Id.Value); + unprocessedCustomerIds.Enqueue(customerClient.Id); } } @@ -221,7 +221,7 @@ private void PrintAccountHierarchy(CustomerClient customerClient, if (depth == 0) Console.WriteLine("Customer ID (Descriptive Name, Currency Code, Time Zone)"); - long customerId = customerClient.Id.Value; + long customerId = customerClient.Id; Console.Write(new string('-', depth * 2)); Console.WriteLine("{0} ({1}, {2}, {3})", customerId, customerClient.DescriptiveName, customerClient.CurrencyCode, diff --git a/examples/AccountManagement/GetAccountInformation.cs b/examples/AccountManagement/GetAccountInformation.cs index 308e2465e..b3d203d3c 100644 --- a/examples/AccountManagement/GetAccountInformation.cs +++ b/examples/AccountManagement/GetAccountInformation.cs @@ -13,13 +13,13 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example lists basic information about an advertising account, like the name, @@ -58,7 +58,7 @@ public static void Main(string[] args) public void Run(GoogleAdsClient client, long customerId) { // Get the CustomerService. - CustomerServiceClient customerService = client.GetService(Services.V5.CustomerService); + CustomerServiceClient customerService = client.GetService(Services.V6.CustomerService); try { diff --git a/examples/AccountManagement/GetChangeDetails.cs b/examples/AccountManagement/GetChangeDetails.cs new file mode 100644 index 000000000..62d4b9aa9 --- /dev/null +++ b/examples/AccountManagement/GetChangeDetails.cs @@ -0,0 +1,201 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using Google.Ads.GoogleAds.Lib; +using Google.Ads.GoogleAds.Util; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; +using Google.Protobuf; +using System; +using static Google.Ads.GoogleAds.V6.Enums.ChangeEventResourceTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.ResourceChangeOperationEnum.Types; +using static Google.Ads.GoogleAds.V6.Resources.ChangeEvent.Types; + +namespace Google.Ads.GoogleAds.Examples.V6 +{ + /// + /// This code example gets the changes in an account during the last 25 days. + /// + public class GetChangeDetails : ExampleBase + { + /// + /// Main method, to run this code example as a standalone application. + /// + /// The command line arguments. + public static void Main(string[] args) + { + GetChangeDetails codeExample = new GetChangeDetails(); + + Console.WriteLine(codeExample.Description); + + // The Google Ads customer ID for which the call is made. + long customerId = long.Parse("INSERT_CUSTOMER_ID_HERE"); + + codeExample.Run(new GoogleAdsClient(), customerId); + } + + /// + /// Returns a description about the code example. + /// + public override string Description => "This code example gets the changes in an account " + + "during the last 25 days."; + + /// + /// Runs the code example. + /// + /// The Google Ads client. + /// The Google Ads customer ID for which the call is made. + public void Run(GoogleAdsClient client, long customerId) + { + // Get the GoogleAdsService. + GoogleAdsServiceClient googleAdsService = client.GetService( + Services.V6.GoogleAdsService); + + // Construct a query to find details for recent changes in your account. + // The LIMIT clause is required for the change_event resource. + // The maximum size is 10000, but a low limit was set here for demonstrative + // purposes. + // The WHERE clause on change_date_time is also required. It must specify a + // window of at most 30 days within the past 30 days. + + string startDate = DateTime.Today.Subtract(TimeSpan.FromDays(25)).ToString("yyyyMMdd"); + string endDate = DateTime.Today.Add(TimeSpan.FromDays(1)).ToString("yyyyMMdd"); + string searchQuery = $@" + SELECT + change_event.resource_name, + change_event.change_date_time, + change_event.change_resource_name, + change_event.user_email, + change_event.client_type, + change_event.change_resource_type, + change_event.old_resource, + change_event.new_resource, + change_event.resource_change_operation, + change_event.changed_fields + FROM + change_event + WHERE + change_event.change_date_time >= '{startDate}' AND + change_event.change_date_time <= '{endDate}' + ORDER BY + change_event.change_date_time DESC + LIMIT 5"; + + try + { + // Issue a search request. + googleAdsService.SearchStream(customerId.ToString(), searchQuery, + delegate (SearchGoogleAdsStreamResponse resp) + { + // Display the results. + foreach (GoogleAdsRow googleAdsRow in resp.Results) + { + ChangeEvent changeEvent = googleAdsRow.ChangeEvent; + ChangedResource oldResource = changeEvent.OldResource; + ChangedResource newResource = changeEvent.NewResource; + + bool knownResourceType = true; + IMessage oldResourceEntity = null; + IMessage newResourceEntity = null; + switch (changeEvent.ChangeResourceType) + { + case ChangeEventResourceType.Ad: + oldResourceEntity = oldResource.Ad; + newResourceEntity = newResource.Ad; + break; + + case ChangeEventResourceType.AdGroup: + oldResourceEntity = oldResource.AdGroup; + newResourceEntity = newResource.AdGroup; + break; + + case ChangeEventResourceType.AdGroupCriterion: + oldResourceEntity = oldResource.AdGroupCriterion; + newResourceEntity = newResource.AdGroupCriterion; + break; + + case ChangeEventResourceType.AdGroupBidModifier: + oldResourceEntity = oldResource.AdGroupBidModifier; + newResourceEntity = newResource.AdGroupBidModifier; + break; + + case ChangeEventResourceType.Campaign: + oldResourceEntity = oldResource.Campaign; + newResourceEntity = newResource.Campaign; + break; + + case ChangeEventResourceType.CampaignBudget: + oldResourceEntity = oldResource.CampaignBudget; + newResourceEntity = newResource.CampaignBudget; + break; + + case ChangeEventResourceType.CampaignCriterion: + oldResourceEntity = oldResource.CampaignCriterion; + newResourceEntity = newResource.CampaignCriterion; + break; + + default: + knownResourceType = false; + break; + } + + if (!knownResourceType) + { + Console.WriteLine($"Unknown change_resource_type " + + $"'{changeEvent.ChangeResourceType}'."); + continue; + } + + Console.WriteLine($"On #{changeEvent.ChangeDateTime}, user " + + $"{changeEvent.UserEmail} used interface {changeEvent.ClientType} " + + $"to perform a(n) '{changeEvent.ResourceChangeOperation}' " + + $"operation on a '{changeEvent.ChangeResourceType}' with " + + $"resource name {changeEvent.ChangeResourceName}."); + + foreach (string fieldMaskPath in changeEvent.ChangedFields.Paths) + { + if (changeEvent.ResourceChangeOperation == + ResourceChangeOperation.Create) + { + object newValue = FieldMasks.GetFieldValue( + fieldMaskPath, newResourceEntity); + Console.WriteLine($"\t{fieldMaskPath} set to '{newValue}'."); + } + else if (changeEvent.ResourceChangeOperation == + ResourceChangeOperation.Update) + { + object oldValue = FieldMasks.GetFieldValue(fieldMaskPath, + oldResourceEntity); + object newValue = FieldMasks.GetFieldValue(fieldMaskPath, + newResourceEntity); + + Console.WriteLine($"\t{fieldMaskPath} changed from " + + $"'{oldValue}' to '{newValue}'."); + } + } + } + }); + } + catch (GoogleAdsException e) + { + Console.WriteLine("Failure:"); + Console.WriteLine($"Message: {e.Message}"); + Console.WriteLine($"Failure: {e.Failure}"); + Console.WriteLine($"Request ID: {e.RequestId}"); + throw; + } + } + } +} diff --git a/examples/AccountManagement/GetAccountChanges.cs b/examples/AccountManagement/GetChangeSummary.cs similarity index 78% rename from examples/AccountManagement/GetAccountChanges.cs rename to examples/AccountManagement/GetChangeSummary.cs index 5a3173d90..8cc3478b0 100644 --- a/examples/AccountManagement/GetAccountChanges.cs +++ b/examples/AccountManagement/GetChangeSummary.cs @@ -13,19 +13,19 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Services; using Google.Api.Gax; -using static Google.Ads.GoogleAds.V5.Enums.ChangeStatusResourceTypeEnum.Types; - using System; +using static Google.Ads.GoogleAds.V6.Enums.ChangeStatusResourceTypeEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// - /// This code example gets the changes in an account during the last 7 days. + /// This code example gets a list of which resources have been changed in your account + /// in the last 14 days. /// - public class GetAccountChanges : ExampleBase + public class GetChangeSummary : ExampleBase { /// /// The page size to be used by default. @@ -38,7 +38,7 @@ public class GetAccountChanges : ExampleBase /// The command line arguments. public static void Main(string[] args) { - GetAccountChanges codeExample = new GetAccountChanges(); + GetChangeSummary codeExample = new GetChangeSummary(); Console.WriteLine(codeExample.Description); @@ -51,8 +51,8 @@ public static void Main(string[] args) /// /// Returns a description about the code example. /// - public override string Description => "This code example gets the changes in an account " + - "during the last 7 days."; + public override string Description => + "This example gets a list of which resources have been changed in your account."; /// /// Runs the code example. @@ -63,15 +63,24 @@ public void Run(GoogleAdsClient client, long customerId) { // Get the GoogleAdsService. GoogleAdsServiceClient googleAdsService = client.GetService( - Services.V5.GoogleAdsService); - - string searchQuery = "SELECT change_status.resource_name, " + - "change_status.last_change_date_time, change_status.resource_type, " + - "change_status.campaign, change_status.ad_group, change_status.resource_status, " + - "change_status.ad_group_ad, change_status.ad_group_criterion, " + - "change_status.campaign_criterion FROM change_status " + - "WHERE change_status.last_change_date_time DURING LAST_7_DAYS " + - "ORDER BY change_status.last_change_date_time"; + Services.V6.GoogleAdsService); + + string searchQuery = @" + SELECT + change_status.resource_name, + change_status.last_change_date_time, + change_status.resource_type, + change_status.campaign, + change_status.ad_group, + change_status.resource_status, + change_status.ad_group_ad, + change_status.ad_group_criterion, + change_status.campaign_criterion + FROM change_status + WHERE + change_status.last_change_date_time DURING LAST_14_DAYS + ORDER BY change_status.last_change_date_time + LIMIT 10000"; // Create a request that will retrieve all changes using pages of the specified // page size. @@ -119,7 +128,7 @@ public void Run(GoogleAdsClient client, long customerId) /// Each returned row contains all possible changed fields /// The resource name of the changed field based on the resource type. /// The changed field's parent is also populated, but is not used. - string SpecificResourceName(ChangeStatusResourceType resourceType, GoogleAdsRow row) + private string SpecificResourceName(ChangeStatusResourceType resourceType, GoogleAdsRow row) { string resourceName = ""; diff --git a/examples/AccountManagement/LinkManagerToClient.cs b/examples/AccountManagement/LinkManagerToClient.cs index 35a1bd0c7..5f1bf0583 100644 --- a/examples/AccountManagement/LinkManagerToClient.cs +++ b/examples/AccountManagement/LinkManagerToClient.cs @@ -14,15 +14,15 @@ using Google.Ads.GoogleAds.Lib; using Google.Ads.GoogleAds.Util; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; using System.Linq; -using static Google.Ads.GoogleAds.V5.Enums.ManagerLinkStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.ManagerLinkStatusEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example demonstrates how to link an existing Google Ads manager customer @@ -105,7 +105,7 @@ private string CreateInvitation(GoogleAdsClient client, long managerCustomerId, { // Get the CustomerClientLinkService. CustomerClientLinkServiceClient customerClientLinkService = - client.GetService(Services.V5.CustomerClientLinkService); + client.GetService(Services.V6.CustomerClientLinkService); // Create a client with the manager customer ID as login customer ID. client.Config.LoginCustomerId = managerCustomerId.ToString(); @@ -156,7 +156,7 @@ private string GetManagerLinkResourceName(GoogleAdsClient client, long managerCu { // Get the GoogleAdsService. GoogleAdsServiceClient googleAdsService = - client.GetService(Services.V5.GoogleAdsService); + client.GetService(Services.V6.GoogleAdsService); // Create a client with the manager customer ID as login customer ID. client.Config.LoginCustomerId = managerCustomerId.ToString(); @@ -171,7 +171,7 @@ private string GetManagerLinkResourceName(GoogleAdsClient client, long managerCu managerCustomerId.ToString(), query).First(); // Gets the ID and resource name associated to the manager link found. - long managerLinkId = result.CustomerManagerLink.ManagerLinkId.Value; + long managerLinkId = result.CustomerManagerLink.ManagerLinkId; string managerLinkResourceName = ResourceNames.CustomerManagerLink( clientCustomerId, managerCustomerId, managerLinkId); // Prints the result. @@ -192,7 +192,7 @@ private void AcceptInvitation(GoogleAdsClient client, long clientCustomerId, { // Get the CustomerManagerLinkService. CustomerManagerLinkServiceClient customerManagerLinkService = - client.GetService(Services.V5.CustomerManagerLinkService); + client.GetService(Services.V6.CustomerManagerLinkService); // Create a client with the manager customer ID as login customer ID. client.Config.LoginCustomerId = clientCustomerId.ToString(); diff --git a/examples/AccountManagement/ListAccessibleCustomers.cs b/examples/AccountManagement/ListAccessibleCustomers.cs index 75e979905..6aad82f6c 100644 --- a/examples/AccountManagement/ListAccessibleCustomers.cs +++ b/examples/AccountManagement/ListAccessibleCustomers.cs @@ -13,12 +13,12 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Services; using System; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example lists the resource names for the customers that the authenticating user @@ -59,7 +59,7 @@ public static void Main(string[] args) public void Run(GoogleAdsClient client) { // Get the CustomerService. - CustomerServiceClient customerService = client.GetService(Services.V5.CustomerService); + CustomerServiceClient customerService = client.GetService(Services.V6.CustomerService); try { diff --git a/examples/AccountManagement/RejectMerchantCenterLink.cs b/examples/AccountManagement/RejectMerchantCenterLink.cs index 964c1455d..aedb69975 100644 --- a/examples/AccountManagement/RejectMerchantCenterLink.cs +++ b/examples/AccountManagement/RejectMerchantCenterLink.cs @@ -14,11 +14,11 @@ using System; using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V4.Errors; -using Google.Ads.GoogleAds.V4.Resources; -using Google.Ads.GoogleAds.V4.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Examples.V4 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example demonstrates how to reject a Merchant Center link request. @@ -70,7 +70,7 @@ public void Run(GoogleAdsClient client, long customerId, long merchantCenterAcco { // Get the MerchantCenterLinkService. MerchantCenterLinkServiceClient merchantCenterLinkServiceClient = - client.GetService(Services.V4.MerchantCenterLinkService); + client.GetService(Services.V6.MerchantCenterLinkService); try { @@ -89,7 +89,7 @@ public void Run(GoogleAdsClient client, long customerId, long merchantCenterAcco $"'{merchantCenterLink.Status}'."); // Checks if there is a link for the Merchant Center account we are looking for. - if (merchantCenterAccountId == merchantCenterLink.Id.Value) + if (merchantCenterAccountId == merchantCenterLink.Id) { // If the Merchant Center link is pending, reject it by removing the link. // If the Merchant Center link is enabled, unlink Merchant Center from diff --git a/examples/AccountManagement/UpdateUserAccess.cs b/examples/AccountManagement/UpdateUserAccess.cs new file mode 100644 index 000000000..d3f6de3c8 --- /dev/null +++ b/examples/AccountManagement/UpdateUserAccess.cs @@ -0,0 +1,179 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using Google.Ads.GoogleAds.Lib; +using Google.Ads.GoogleAds.Util; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; +using Google.Api.Gax; +using System; +using System.Linq; +using static Google.Ads.GoogleAds.V6.Enums.AccessRoleEnum.Types; + +namespace Google.Ads.GoogleAds.Examples.V6 +{ + /// + /// This code example updates the access role of a user, given the email address. + /// Note: This code example should be run as a user who is an Administrator on the Google Ads + /// account with the specified customer ID. See + /// https://support.google.com/google-ads/answer/9978556 to learn more about account access + /// levels. + /// + public class UpdateUserAccess : ExampleBase + { + /// + /// Main method, to run this code example as a standalone application. + /// + /// The command line arguments. + public static void Main(string[] args) + { + UpdateUserAccess codeExample = new UpdateUserAccess(); + Console.WriteLine(codeExample.Description); + + // The Google Ads customer ID for which the call is made. + long customerId = long.Parse("INSERT_CUSTOMER_ID_HERE"); + + // Email address of the user whose access role should be modifled. + string emailAddress = "INSERT_EMAIL_ADDRESS_HERE"; + + // The updated user access role. + AccessRole accessRole = (AccessRole) Enum.Parse(typeof(AccessRole), + "INSERT_ACCESS_ROLE_HERE"); + codeExample.Run(new GoogleAdsClient(), customerId, emailAddress, accessRole); + } + + /// + /// Returns a description about the code example. + /// + public override string Description => + "This code example updates the access of a user, given the email " + + "address. Note: This code example should be run as a user who is an Administrator" + + " on the Google Ads account with the specified customer ID. See " + + "https://support.google.com/google-ads/answer/9978556 to learn more about account " + + "access levels."; + + /// + /// Runs the code example. + /// + /// The Google Ads client. + /// The Google Ads customer ID for which the call is made. + /// Email address of the user whose access role should be + /// updated. + /// The updated access role. + public void Run(GoogleAdsClient client, long customerId, string emailAddress, + AccessRole accessRole) + { + try + { + long? userId = GetUserAccess(client, customerId, emailAddress); + if (userId != null) + { + ModifyUserAccess(client, customerId, userId.Value, accessRole); + } + } + catch (GoogleAdsException e) + { + Console.WriteLine("Failure:"); + Console.WriteLine($"Message: {e.Message}"); + Console.WriteLine($"Failure: {e.Failure}"); + Console.WriteLine($"Request ID: {e.RequestId}"); + throw; + } + } + + /// + /// Gets the customer user access given an email address. + /// + /// The Google Ads client. + /// The Google Ads customer ID for which the call is made. + /// Email address of the user whose access role should be + /// retrieved. + /// The user ID if a customer is found, or null if no matching customers were + /// found. + private long? GetUserAccess(GoogleAdsClient client, long customerId, string emailAddress) + { + // Get the GoogleAdsService. + GoogleAdsServiceClient googleAdsService = client.GetService( + Services.V6.GoogleAdsService); + + // Create the search query. Use the LIKE query for filtering to ignore the text case + // for email address when searching for a match. + string searchQuery = "Select customer_user_access.user_id, " + + "customer_user_access.email_address, customer_user_access.access_role," + + "customer_user_access.access_creation_date_time from customer_user_access " + + $"where customer_user_access.email_address LIKE '{emailAddress}'"; + + // Retrieves the user accesses. + PagedEnumerable searchPagedResponse = + googleAdsService.Search(customerId.ToString(), searchQuery); + + GoogleAdsRow result = searchPagedResponse.FirstOrDefault(); + + // Displays the results. + if (result != null) + { + CustomerUserAccess access = result.CustomerUserAccess; + Console.WriteLine("Customer user access with User ID = {0}, Email Address = " + + "{1}, Access Role = {2} and Creation Time = {3} was found in " + + "Customer ID: {4}.", access.UserId, access.EmailAddress, access.AccessRole, + access.AccessCreationDateTime, customerId); + return access.UserId; + } + else + { + Console.WriteLine("No customer user access with requested email was found."); + return null; + } + } + + /// + /// Modifies the user access role to a specified value. + /// + /// The Google Ads client. + /// The Google Ads customer ID for which the call is made. + /// ID of the user whose access role is modified. + /// The updated access role. + private void ModifyUserAccess(GoogleAdsClient client, long customerId, long userId, + AccessRole accessRole) + { + // Get the CustomerUserAccessService. + CustomerUserAccessServiceClient userAccessService = client.GetService( + Services.V6.CustomerUserAccessService); + + // Creates the modified user access. + CustomerUserAccess userAccess = new CustomerUserAccess() + { + ResourceName = ResourceNames.CustomerUserAccess(customerId, userId), + AccessRole = accessRole + }; + + // Creates the operation. + CustomerUserAccessOperation operation = new CustomerUserAccessOperation() + { + Update = userAccess, + UpdateMask = FieldMasks.AllSetFieldsOf(userAccess) + }; + + // Updates the user access. + MutateCustomerUserAccessResponse response = + userAccessService.MutateCustomerUserAccess( + customerId.ToString(), operation); + + // Displays the result. + Console.WriteLine($"Successfully modified customer user access with " + + $"resource name '{response.Result.ResourceName}'."); + } + } +} diff --git a/examples/AdvancedOperations/AddAdCustomizer.cs b/examples/AdvancedOperations/AddAdCustomizer.cs index 882b401ec..f208b08c1 100644 --- a/examples/AdvancedOperations/AddAdCustomizer.cs +++ b/examples/AdvancedOperations/AddAdCustomizer.cs @@ -13,19 +13,19 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; using System.Collections.Generic; using System.Linq; -using static Google.Ads.GoogleAds.V5.Enums.AdCustomizerPlaceholderFieldEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.FeedAttributeTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.PlaceholderTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdCustomizerPlaceholderFieldEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.FeedAttributeTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.PlaceholderTypeEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds an ad customizer feed and associates it with the customer. @@ -72,7 +72,7 @@ public void Run(GoogleAdsClient client, long customerId, long[] adGroupIds) { // Get the AdGroupBidModifierService. AdGroupBidModifierServiceClient adGroupBidModifierService = - client.GetService(Services.V5.AdGroupBidModifierService); + client.GetService(Services.V6.AdGroupBidModifierService); string feedName = "Ad_Customizer_example_feed_" + ExampleUtilities.GetShortRandomString(); @@ -125,7 +125,7 @@ private string CreateAdCustomizerFeed(GoogleAdsClient client, long customerId, string feedName) { // Get the FeedServiceClient. - FeedServiceClient feedService = client.GetService(Services.V5.FeedService); + FeedServiceClient feedService = client.GetService(Services.V6.FeedService); // Creates three feed attributes: a name, a price and a date. The attribute names // are arbitrary choices and will be used as placeholders in the ad text fields. @@ -179,7 +179,7 @@ private Dictionary GetFeedAttributes(GoogleAdsClient clie { // Get the GoogleAdsServiceClient. GoogleAdsServiceClient googleAdsService = - client.GetService(Services.V5.GoogleAdsService); + client.GetService(Services.V6.GoogleAdsService); string query = $"SELECT feed.attributes, feed.name FROM feed WHERE " + $"feed.resource_name = '{feedResourceName}'"; @@ -217,7 +217,7 @@ private void CreateAdCustomizerMapping(GoogleAdsClient client, long customerId, { // Get the FeedMappingService. FeedMappingServiceClient feedMappingService = - client.GetService(Services.V5.FeedMappingService); + client.GetService(Services.V6.FeedMappingService); // Map the feed attributes to ad customizer placeholder fields. // For a full list of ad customizer placeholder fields, see @@ -272,7 +272,7 @@ private List CreateFeedItems(GoogleAdsClient client, long customerId, { // Get the FeedItemServiceClient. FeedItemServiceClient feedItemService = - client.GetService(Services.V5.FeedItemService); + client.GetService(Services.V6.FeedItemService); List feedItemOperations = new List(); @@ -357,7 +357,7 @@ private void CreateFeedItemTargets(GoogleAdsClient client, { // Get the FeedItemTargetServiceClient. FeedItemTargetServiceClient feedItemTargetService = - client.GetService(Services.V5.FeedItemTargetService); + client.GetService(Services.V6.FeedItemTargetService); // Bind each feed item to a specific ad group to make sure it will only be used to // customize ads inside that ad group; using the feed item elsewhere will result @@ -400,7 +400,7 @@ private void CreateAdsWithCustomizations(GoogleAdsClient client, long customerId { // Get the AdGroupAdServiceClient. AdGroupAdServiceClient adGroupAdService = - client.GetService(Services.V5.AdGroupAdService); + client.GetService(Services.V6.AdGroupAdService); // Creates an expanded text ad using the feed attribute names as placeholders. diff --git a/examples/AdvancedOperations/AddAdGroupBidModifier.cs b/examples/AdvancedOperations/AddAdGroupBidModifier.cs index 67e26d149..5bbd05e23 100644 --- a/examples/AdvancedOperations/AddAdGroupBidModifier.cs +++ b/examples/AdvancedOperations/AddAdGroupBidModifier.cs @@ -13,15 +13,15 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; -using static Google.Ads.GoogleAds.V5.Enums.DeviceEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.DeviceEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example demonstrates how to add an ad group bid modifier for mobile devices. @@ -70,7 +70,7 @@ public void Run(GoogleAdsClient client, long customerId, long adGroupId, { // Get the AdGroupBidModifierService. AdGroupBidModifierServiceClient adGroupBidModifierService = - client.GetService(Services.V5.AdGroupBidModifierService); + client.GetService(Services.V6.AdGroupBidModifierService); // Creates an ad group bid modifier for mobile devices with the specified ad group // ID and bid modifier value. diff --git a/examples/AdvancedOperations/AddAppCampaign.cs b/examples/AdvancedOperations/AddAppCampaign.cs index 5ca6ae147..417e3f13b 100644 --- a/examples/AdvancedOperations/AddAppCampaign.cs +++ b/examples/AdvancedOperations/AddAppCampaign.cs @@ -13,25 +13,25 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; using System.Collections.Generic; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupAdStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdvertisingChannelSubTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdvertisingChannelTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AppCampaignAppStoreEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AppCampaignBiddingStrategyGoalTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.BudgetDeliveryMethodEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.CampaignStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.CriterionTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Resources.Campaign.Types; - -namespace Google.Ads.GoogleAds.Examples.V5 +using static Google.Ads.GoogleAds.V6.Enums.AdGroupAdStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelSubTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AppCampaignAppStoreEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AppCampaignBiddingStrategyGoalTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.BudgetDeliveryMethodEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.CampaignStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.CriterionTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Resources.Campaign.Types; + +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds a new App Campaign. @@ -102,7 +102,7 @@ private string CreateBudget(GoogleAdsClient client, long customerId) { // Get the BudgetService. CampaignBudgetServiceClient budgetService = client.GetService( - Services.V5.CampaignBudgetService); + Services.V6.CampaignBudgetService); // Creates a campaign budget. CampaignBudget budget = new CampaignBudget() @@ -143,7 +143,7 @@ private string CreateCampaign(GoogleAdsClient client, long customerId, string budgetResourceName) { // Get the CampaignService. - CampaignServiceClient campaignService = client.GetService(Services.V5.CampaignService); + CampaignServiceClient campaignService = client.GetService(Services.V6.CampaignService); // Create the campaign. Campaign campaign = new Campaign() @@ -221,7 +221,7 @@ private void SetCampaignTargetingCriteria(GoogleAdsClient client, long customerI { // Get the CampaignCriterionService. CampaignCriterionServiceClient campaignCriterionService = client.GetService( - Services.V5.CampaignCriterionService); + Services.V6.CampaignCriterionService); List operations = new List(); @@ -311,7 +311,7 @@ private string CreateAdGroup(GoogleAdsClient client, long customerId, string campaignResourceName) { // Get the AdGroupService. - AdGroupServiceClient adGroupService = client.GetService(Services.V5.AdGroupService); + AdGroupServiceClient adGroupService = client.GetService(Services.V6.AdGroupService); // Creates an ad group. // Note that the ad group type must not be set. @@ -354,7 +354,7 @@ private void CreateAppAd(GoogleAdsClient client, long customerId, { // Get the AdGroupAdService. AdGroupAdServiceClient adGroupAdService = client.GetService( - Services.V5.AdGroupAdService); + Services.V6.AdGroupAdService); // Creates an ad group ad. AdGroupAd adGroupAd = new AdGroupAd diff --git a/examples/AdvancedOperations/AddDisplayUploadAd.cs b/examples/AdvancedOperations/AddDisplayUploadAd.cs index a86ab2de0..81c2579e1 100644 --- a/examples/AdvancedOperations/AddDisplayUploadAd.cs +++ b/examples/AdvancedOperations/AddDisplayUploadAd.cs @@ -16,15 +16,15 @@ using System.Linq; using Google.Ads.GoogleAds.Lib; using Google.Ads.GoogleAds.Util; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Enums; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Enums; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using Google.Protobuf; -using static Google.Ads.GoogleAds.V5.Enums.DisplayUploadProductTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.DisplayUploadProductTypeEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds a display upload ad to a given ad group. To get ad groups, @@ -74,7 +74,7 @@ public void Run(GoogleAdsClient client, long customerId, long adGroupId) // This feature is only available to allowlisted accounts. // See https://support.google.com/google-ads/answer/1722096 for more details. // The DisplayUploadProductType field lists the available display upload types: - // https://developers.google.com/google-ads/api/reference/rpc/V5/DisplayUploadAdInfo + // https://developers.google.com/google-ads/api/reference/rpc/latest/DisplayUploadAdInfo // Creates a new media bundle asset and returns the resource name. string adAssetResourceName = CreateMediaBundleAsset(client, customerId); @@ -101,7 +101,7 @@ public void Run(GoogleAdsClient client, long customerId, long adGroupId) private string CreateMediaBundleAsset(GoogleAdsClient client, long customerId) { // Gets the AssetService. - AssetServiceClient assetServiceClient = client.GetService(Services.V5.AssetService); + AssetServiceClient assetServiceClient = client.GetService(Services.V6.AssetService); // The HTML5 zip file contains all the HTML, CSS, and images needed for the // HTML5 ad. For help on creating an HTML5 zip file, check out Google Web @@ -150,7 +150,7 @@ private void CreateDisplayUploadAdGroupAd(GoogleAdsClient client, long customerI { // Get the AdGroupAdService. AdGroupAdServiceClient adGroupAdServiceClient = - client.GetService(Services.V5.AdGroupAdService); + client.GetService(Services.V6.AdGroupAdService); // Creates the ad with the required fields. Ad displayUploadAd = new Ad() @@ -158,7 +158,7 @@ private void CreateDisplayUploadAdGroupAd(GoogleAdsClient client, long customerI Name = "Ad for HTML5", FinalUrls = {"http://example.com/html5"}, // Exactly one ad data field must be included to specify the ad type. See - // https://developers.google.com/google-ads/api/reference/rpc/V5/Ad for the full + // https://developers.google.com/google-ads/api/reference/rpc/V6/Ad for the full // list of available types. DisplayUploadAd = new DisplayUploadAdInfo() { diff --git a/examples/AdvancedOperations/AddDynamicPageFeed.cs b/examples/AdvancedOperations/AddDynamicPageFeed.cs index 095800096..1949a9b20 100644 --- a/examples/AdvancedOperations/AddDynamicPageFeed.cs +++ b/examples/AdvancedOperations/AddDynamicPageFeed.cs @@ -14,21 +14,21 @@ using Google.Ads.GoogleAds.Lib; using Google.Ads.GoogleAds.Util; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; using System.Collections.Generic; using System.Linq; -using static Google.Ads.GoogleAds.V5.Enums.DsaPageFeedCriterionFieldEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.FeedAttributeTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.FeedMappingCriterionTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.WebpageConditionOperandEnum.Types; -using static Google.Ads.GoogleAds.V5.Resources.Campaign.Types; +using static Google.Ads.GoogleAds.V6.Enums.DsaPageFeedCriterionFieldEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.FeedAttributeTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.FeedMappingCriterionTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.WebpageConditionOperandEnum.Types; +using static Google.Ads.GoogleAds.V6.Resources.Campaign.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds a page feed to specify precisely which URLs to use with your @@ -116,7 +116,7 @@ public void Run(GoogleAdsClient client, long customerId, long campaignId, long a private string CreateFeed(GoogleAdsClient client, long customerId) { // Get the FeedService. - FeedServiceClient feedService = client.GetService(Services.V5.FeedService); + FeedServiceClient feedService = client.GetService(Services.V6.FeedService); // Create a URL attribute. FeedAttribute urlAttribute = new FeedAttribute() @@ -170,7 +170,7 @@ private Dictionary GetFeed( { // Get the GoogleAdsService. GoogleAdsServiceClient googleAdsService = client.GetService( - Services.V5.GoogleAdsService); + Services.V6.GoogleAdsService); // Construct the query. String query = $"SELECT feed.attributes FROM feed WHERE feed.resource_name" + @@ -227,7 +227,7 @@ Dictionary feedAttributes { // Get the FeedMappingService. FeedMappingServiceClient feedMappingService = client.GetService( - Services.V5.FeedMappingService); + Services.V6.FeedMappingService); FeedMapping feedMapping = new FeedMapping() { @@ -285,7 +285,7 @@ private void CreateFeedItems(GoogleAdsClient client, long customerId, { // Get the FeedItemService. FeedItemServiceClient feedItemService = client.GetService( - Services.V5.FeedItemService); + Services.V6.FeedItemService); List urls = new List { @@ -349,7 +349,7 @@ private void UpdateCampaignDsaSetting(GoogleAdsClient client, long customerId, { // Get the CampaignService. CampaignServiceClient campaignService = client.GetService( - Services.V5.CampaignService); + Services.V6.CampaignService); DynamicSearchAdsSetting dsaSetting = GetDsaSetting(client, customerId, campaignId); dsaSetting.Feeds.Add(feedResourceName); @@ -392,7 +392,7 @@ private DynamicSearchAdsSetting GetDsaSetting(GoogleAdsClient client, long custo { // Get the GoogleAdsService. GoogleAdsServiceClient googleAdsService = client.GetService( - Services.V5.GoogleAdsService); + Services.V6.GoogleAdsService); // Creates the query. // You must request all DSA fields in order to update the DSA settings in the @@ -436,7 +436,7 @@ private void AddDsaTarget(GoogleAdsClient client, long customerId, long adGroupI { // Get the AdGroupCriterionService. AdGroupCriterionServiceClient adGroupCriterionService = client.GetService( - Services.V5.AdGroupCriterionService); + Services.V6.AdGroupCriterionService); // Create the webpage condition info. WebpageConditionInfo webpageConditionInfo = new WebpageConditionInfo() diff --git a/examples/AdvancedOperations/AddDynamicSearchAds.cs b/examples/AdvancedOperations/AddDynamicSearchAds.cs index 62d20d999..86b901540 100644 --- a/examples/AdvancedOperations/AddDynamicSearchAds.cs +++ b/examples/AdvancedOperations/AddDynamicSearchAds.cs @@ -13,24 +13,24 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupAdStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupCriterionStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdvertisingChannelTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.BudgetDeliveryMethodEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.CampaignStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.WebpageConditionOperandEnum.Types; -using static Google.Ads.GoogleAds.V5.Resources.Campaign.Types; - -namespace Google.Ads.GoogleAds.Examples.V5 +using static Google.Ads.GoogleAds.V6.Enums.AdGroupAdStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupCriterionStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.BudgetDeliveryMethodEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.CampaignStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.WebpageConditionOperandEnum.Types; +using static Google.Ads.GoogleAds.V6.Resources.Campaign.Types; + +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds dynamic search ads to a given ad group. To list @@ -100,7 +100,7 @@ private static string AddCampaignBudget(GoogleAdsClient client, long customerId) { // Get the CampaignBudgetService. CampaignBudgetServiceClient campaignBudgetService = - client.GetService(Services.V5.CampaignBudgetService); + client.GetService(Services.V6.CampaignBudgetService); // Create the budget. CampaignBudget campaignBudget = new CampaignBudget() @@ -138,7 +138,7 @@ private static string AddCampaign(GoogleAdsClient client, long customerId, string budgetResourceName) { // Get the CampaignService. - CampaignServiceClient campaignService = client.GetService(Services.V5.CampaignService); + CampaignServiceClient campaignService = client.GetService(Services.V6.CampaignService); // Create the campaign. Campaign campaign = new Campaign() @@ -186,7 +186,7 @@ private static string AddAdGroup(GoogleAdsClient client, long customerId, string campaignResourceName) { // Get the AdGroupService. - AdGroupServiceClient adGroupService = client.GetService(Services.V5.AdGroupService); + AdGroupServiceClient adGroupService = client.GetService(Services.V6.AdGroupService); // Create the ad group. AdGroup adGroup = new AdGroup() @@ -226,7 +226,7 @@ private static void AddExpandedDSA(GoogleAdsClient client, long customerId, { // Get the AdGroupAdService. AdGroupAdServiceClient adGroupAdService = - client.GetService(Services.V5.AdGroupAdService); + client.GetService(Services.V6.AdGroupAdService); // Create an ad group ad. AdGroupAd adGroupAd = new AdGroupAd() @@ -269,7 +269,7 @@ private static void AddWebPageCriteria(GoogleAdsClient client, long customerId, { // Get the AdGroupCriterionService. AdGroupCriterionServiceClient adGroupCriterionService = - client.GetService(Services.V5.AdGroupCriterionService); + client.GetService(Services.V6.AdGroupCriterionService); // Create the criterion. AdGroupCriterion adGroupCriterion = new AdGroupCriterion() diff --git a/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs b/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs index 8b90fc832..d71cee3c4 100644 --- a/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs +++ b/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs @@ -13,16 +13,16 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupAdStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupAdStatusEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds expanded text ads to a given ad group. To list @@ -65,7 +65,7 @@ public static void Main(string[] args) public void Run(GoogleAdsClient client, long customerId, long adGroupId) { // Get the AdGroupAdService. - AdGroupAdServiceClient service = client.GetService(Services.V5.AdGroupAdService); + AdGroupAdServiceClient service = client.GetService(Services.V6.AdGroupAdService); // Create the expanded text ad. AdGroupAd ad = new AdGroupAd diff --git a/examples/AdvancedOperations/AddGmailAd.cs b/examples/AdvancedOperations/AddGmailAd.cs index e4c692de8..eecd9afea 100644 --- a/examples/AdvancedOperations/AddGmailAd.cs +++ b/examples/AdvancedOperations/AddGmailAd.cs @@ -14,19 +14,19 @@ using Google.Ads.GoogleAds.Lib; using Google.Ads.GoogleAds.Util; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using Google.Protobuf; using System; using System.Collections.Generic; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupAdStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.DeviceEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.MediaTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.MimeTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupAdStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.DeviceEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.MediaTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.MimeTypeEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds a Gmail ad to a given ad group. The ad group's campaign needs to @@ -95,7 +95,7 @@ private Dictionary AddMediaFiles(GoogleAdsClient client, long cu { // Get the MediaFileService. MediaFileServiceClient mediaFileService = - client.GetService(Services.V5.MediaFileService); + client.GetService(Services.V6.MediaFileService); // Creates a bytes array from the logo image data. byte[] logoImageData = MediaUtilities.GetAssetDataFromUrl( @@ -170,7 +170,7 @@ private void AddAd(GoogleAdsClient client, long customerId, long adGroupId, { // Get the AdGroupAdService. AdGroupAdServiceClient adGroupAdService = - client.GetService(Services.V5.AdGroupAdService); + client.GetService(Services.V6.AdGroupAdService); // Creates the Gmail ad info. GmailAdInfo gmailAdInfo = new GmailAdInfo() diff --git a/examples/AdvancedOperations/AddLocalCampaign.cs b/examples/AdvancedOperations/AddLocalCampaign.cs new file mode 100644 index 000000000..73d509693 --- /dev/null +++ b/examples/AdvancedOperations/AddLocalCampaign.cs @@ -0,0 +1,447 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Linq; +using Google.Ads.GoogleAds.Lib; +using Google.Ads.GoogleAds.Util; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; +using Google.Protobuf; +using static Google.Ads.GoogleAds.V6.Enums.CampaignStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelSubTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.LocationSourceTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.OptimizationGoalTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.BudgetDeliveryMethodEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdGroupAdStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AssetTypeEnum.Types; + +namespace Google.Ads.GoogleAds.Examples.V6 +{ + /// + /// This example adds an Local campaign. + /// Prerequisite: To create a Local campaign, you need to define the store locations you want to + /// promote by linking your Google My Business account or selecting affiliate locations. More + /// information about Local campaigns can be found at: + /// https: //support.google.com/google-ads/answer/9118422. + /// + public class AddLocalCampaign : ExampleBase + { + const string MARKETING_IMAGE_URL = "https://goo.gl/3b9Wfh"; + const string LOGO_IMAGE_URL = "https://goo.gl/mtt54n"; + const string YOUTUBE_VIDEO_ID = "t1fDo0VyeEo"; + + /// + /// Main method, to run this code example as a standalone application. + /// + /// The command line arguments. + public static void Main(string[] args) + { + AddLocalCampaign codeExample = new AddLocalCampaign(); + Console.WriteLine(codeExample.Description); + + // The Google Ads customer ID for which the call is made. + long customerId = long.Parse("INSERT_CUSTOMER_ID_HERE"); + + codeExample.Run(new GoogleAdsClient(), customerId); + } + + /// + /// Returns a description about the code example. + /// + public override string Description => + "This example adds an Local campaign.\nPrerequisite: To create a Local campaign, you " + + "need to define the store locations you want to promote by linking your Google My " + + "Business account or selecting affiliate locations. More information about Local " + + "campaigns can be found at: https://support.google.com/google-ads/answer/9118422."; + + /// + /// Runs the code example. + /// + /// The Google Ads client. + /// The Google Ads customer ID. + public void Run(GoogleAdsClient client, long customerId) + { + try + { + // Create a budget for the campaign. + string budgetResourceName = CreateCampaignBudget(client, customerId); + + // Create a campaign. + string campaignResourceName = CreateCampaign(client, customerId, + budgetResourceName); + + + // Create an ad group. + string adGroupResourceName = + CreateAdGroup(client, customerId, campaignResourceName); + + // Create a Local ad. + CreateLocalAd(client, customerId, adGroupResourceName); + } + catch (GoogleAdsException e) + { + Console.WriteLine("Failure:"); + Console.WriteLine($"Message: {e.Message}"); + Console.WriteLine($"Failure: {e.Failure}"); + Console.WriteLine($"Request ID: {e.RequestId}"); + throw; + } + } + + /// + /// Creates a campaign budget. + /// + /// The Google Ads client. + /// The Google Ads customer ID. + /// The resource name of the newly created campaign budget. + private string CreateCampaignBudget(GoogleAdsClient client, in long customerId) + { + // Get the CampaignBudgetService client. + CampaignBudgetServiceClient campaignBudgetServiceClient = + client.GetService(Services.V6.CampaignBudgetService); + + // Create a campaign budget object. + CampaignBudget campaignBudget = new CampaignBudget + { + Name = $"Interplanetary Cruise Budget #{ExampleUtilities.GetRandomString()}", + AmountMicros = 50000000, + DeliveryMethod = BudgetDeliveryMethod.Standard, + // A Local campaign cannot use a shared campaign budget. + ExplicitlyShared = false + }; + + // Create a campaign budget operation. + CampaignBudgetOperation campaignBudgetOperation = new CampaignBudgetOperation + { + Create = campaignBudget + }; + + // Issue a mutate request to add the campaign budget, then print and return the + // resulting budget's resource name. + MutateCampaignBudgetsResponse campaignBudgetsResponse = + campaignBudgetServiceClient.MutateCampaignBudgets(customerId.ToString(), + new[] {campaignBudgetOperation}); + + string campaignBudgetResourceName = + campaignBudgetsResponse.Results.First().ResourceName; + Console.WriteLine( + $"Created campaign budget with resource name '{campaignBudgetResourceName}'."); + + return campaignBudgetResourceName; + } + + /// + /// Creates a Local campaign. + /// + /// The Google Ads client. + /// The Google Ads customer ID. + /// The resource name of the budget to use with the new + /// campaign. + /// The resource name of the newly created campaign. + private string CreateCampaign(GoogleAdsClient client, long customerId, + string budgetResourceName) + { + // Get the CampaignService client. + CampaignServiceClient campaignServiceClient = + client.GetService(Services.V6.CampaignService); + + // Create a campaign object. + Campaign campaign = new Campaign + { + Name = $"Interplanetary Cruise Local #{ExampleUtilities.GetRandomString()}", + CampaignBudget = budgetResourceName, + // Recommendation: Set the campaign to PAUSED when creating it to prevent the ads + // from immediately serving. Set to ENABLED once you've added targeting and the ads + // are ready to serve. + Status = CampaignStatus.Paused, + // All Local campaigns have an advertisingChannelType of LOCAL and + // advertisingChannelSubtype of LOCAL_CAMPAIGN. + AdvertisingChannelType = AdvertisingChannelType.Local, + AdvertisingChannelSubType = AdvertisingChannelSubType.LocalCampaign, + // Bidding strategy must be set directly on the campaign.Setting a portfolio bidding + // strategy by resource name is not supported. Maximize conversion value is the only + // strategy supported for Local campaigns. An optional ROAS (Return on Advertising + // Spend) can be set for MaximizeConversionValue. The ROAS value must be specified + // as a ratio in the API. It is calculated by dividing "total value" by + // "total spend". For more information on maximize conversion value, see the support + // article: http://support.google.com/google-ads/answer/7684216. + MaximizeConversionValue = new MaximizeConversionValue + { + TargetRoas = 3.5 + }, + // Configure the Local campaign setting. + LocalCampaignSetting = new Campaign.Types.LocalCampaignSetting + { + LocationSourceType = LocationSourceType.GoogleMyBusiness + }, + // Optimization goal setting is mandatory for Local campaigns. This example selects + // driving directions and call clicks as goals. + OptimizationGoalSetting = new Campaign.Types.OptimizationGoalSetting + { + OptimizationGoalTypes = + { + OptimizationGoalType.CallClicks, OptimizationGoalType.DrivingDirections + } + } + }; + + // Create a campaign operation. + CampaignOperation campaignOperation = new CampaignOperation + { + Create = campaign + }; + + // Issue a mutate request to add the campaign, then print and return the resulting + // campaign's resource name. + MutateCampaignsResponse campaignResponse = + campaignServiceClient.MutateCampaigns(customerId.ToString(), + new[] {campaignOperation}); + + string campaignResourceName = campaignResponse.Results.First().ResourceName; + Console.WriteLine("Created Local campaign with resource name " + + $"'{campaignResourceName}'."); + + return campaignResourceName; + } + + /// + /// Creates an ad group for the given campaign. + /// + /// The Google Ads API client. + /// The client customer ID. + /// The campaign resource name to which to attach the ad + /// group. + /// The string resource name for the newly created ad group. + private string CreateAdGroup(GoogleAdsClient client, long customerId, + string campaignResourceName) + { + // Create the ad group service client. + AdGroupServiceClient adGroupServiceClient = + client.GetService(Services.V6.AdGroupService); + + // Create the ad group. + // Note that the ad group type must not be set. + // Since the advertisingChannelSubType is LOCAL_CAMPAIGN: + // 1. you cannot override bid settings at the ad group level. + // 2. you cannot add ad group criteria. + AdGroup adGroup = new AdGroup() + { + Name = $"Earth to Mars Cruises #{ExampleUtilities.GetRandomString()}", + Campaign = campaignResourceName, + Status = AdGroupStatus.Enabled + }; + + // Create the ad group operation. + AdGroupOperation adGroupOperation = new AdGroupOperation() + { + Create = adGroup + }; + + // Issue a mutate request to add the ad group, then print and return the resulting ad + // group's resource name. + MutateAdGroupsResponse adGroupResponse = adGroupServiceClient.MutateAdGroups( + customerId.ToString(), new[] {adGroupOperation}); + + string adGroupResourceName = adGroupResponse.Results.First().ResourceName; + Console.WriteLine($"Created ad group with resource name '{adGroupResourceName}'."); + return adGroupResourceName; + } + + /// + /// Creates a Local ad for the given ad group. + /// + /// The Google Ads API client. + /// The client customer ID. + /// The ad group resource name to which the ad will + /// belong. + private void CreateLocalAd(GoogleAdsClient client, in long customerId, + string adGroupResourceName) + { + // Create the ad group service client. + AdGroupAdServiceClient adGroupAdServiceClient = + client.GetService(Services.V6.AdGroupAdService); + + // Create an ad group ad. + AdGroupAd adGroupAd = new AdGroupAd + { + AdGroup = adGroupResourceName, + Status = AdGroupAdStatus.Enabled, + Ad = new Ad + { + FinalUrls = {"https://www.example.com"}, + LocalAd = new LocalAdInfo + { + Headlines = + { + CreateAdTextAsset("Best Space Cruise Line"), + CreateAdTextAsset("Experience the Stars") + }, + Descriptions = + { + CreateAdTextAsset("Buy your tickets now"), + CreateAdTextAsset("Visit the Red Planet") + }, + CallToActions = {CreateAdTextAsset("Shop Now")}, + // Set the marketing image and logo image assets. + MarketingImages = + { + new AdImageAsset + { + Asset = CreateImageAsset(client, customerId, MARKETING_IMAGE_URL, + "Marketing Image") + } + }, + LogoImages = + { + new AdImageAsset + { + Asset = CreateImageAsset(client, customerId, LOGO_IMAGE_URL, + "Square Marketing Image") + } + }, + // Set the video assets. + Videos = + { + new AdVideoAsset + { + Asset = CreateYoutubeVideoAsset(client, customerId, + YOUTUBE_VIDEO_ID, "Local Campaigns") + } + } + } + } + }; + + // Create an ad group ad operation. + AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation + { + Create = adGroupAd + }; + + // Issue a mutate request to add the ad group ad and print the resulting ad group ad's + // resource name. + MutateAdGroupAdsResponse adGroupAdResponse = + adGroupAdServiceClient.MutateAdGroupAds(customerId.ToString(), + new[] {adGroupAdOperation}); + + Console.WriteLine("Created ad group ad with resource name " + + $"'{adGroupAdResponse.Results.First().ResourceName}'."); + } + + /// + /// Creates an ad text asset with the given text. + /// + /// The text to include in the asset. + /// A new ad text asset with the given text. + private AdTextAsset CreateAdTextAsset(string text) + { + return new AdTextAsset + { + Text = text + }; + } + + /// + /// Creates an image asset. + /// + /// The Google Ads API client. + /// The client customer ID. + /// The URL of the image source. + /// The name to associate with the image asset. + /// A new ad text asset with the given text. + private string CreateImageAsset(GoogleAdsClient client, long customerId, string imageUrl, + string imageName) + { + // Get the AssetService client. + AssetServiceClient assetService = client.GetService(Services.V6.AssetService); + + // Creates an image asset. + byte[] imageContent = MediaUtilities.GetAssetDataFromUrl(imageUrl, client.Config); + Asset asset = new Asset + { + Name = imageName, + Type = AssetType.Image, + ImageAsset = new ImageAsset + { + Data = ByteString.CopyFrom(imageContent), + } + }; + + // Create an asset operation. + AssetOperation assetOperation = new AssetOperation + { + Create = asset + }; + + // Issue a mutate request to add the asset, then print and return the resulting asset's + // resource name. + MutateAssetsResponse assetResponse = + assetService.MutateAssets(customerId.ToString(), new[] {assetOperation}); + + string assetResourceName = assetResponse.Results.First().ResourceName; + Console.WriteLine("A new image asset has been added with resource name: " + + $"'{assetResourceName}'."); + + return assetResourceName; + } + + /// + /// Creates a YouTube video asset. + /// + /// The Google Ads API client. + /// The client customer ID. + /// The YouTube video ID to be attached to the asset. + /// The name to associate with the video. + /// + private string CreateYoutubeVideoAsset(GoogleAdsClient client, in long customerId, + string youtubeVideoId, string youtubeVideoName) + { + // Get the AssetService client. + AssetServiceClient assetServiceClient = client.GetService(Services.V6.AssetService); + + // Create an asset. + Asset asset = new Asset + { + Name = youtubeVideoName, + Type = AssetType.YoutubeVideo, + YoutubeVideoAsset = new YoutubeVideoAsset + { + YoutubeVideoId = youtubeVideoId + } + }; + + // Create an asset operation. + AssetOperation assetOperation = new AssetOperation + { + Create = asset + }; + + // Issue a mutate request to add the asset, then print and return the resulting asset's + // resource name. + MutateAssetsResponse assetResponse = + assetServiceClient.MutateAssets(customerId.ToString(), new[] {assetOperation}); + + string assetResourceName = assetResponse.Results.First().ResourceName; + Console.WriteLine("A new YouTube video asset has been added with resource name: " + + $"'{assetResourceName}'."); + + return assetResourceName; + } + } +} diff --git a/examples/AdvancedOperations/AddSmartDisplayAd.cs b/examples/AdvancedOperations/AddSmartDisplayAd.cs index 480889fe0..6fe241de4 100644 --- a/examples/AdvancedOperations/AddSmartDisplayAd.cs +++ b/examples/AdvancedOperations/AddSmartDisplayAd.cs @@ -14,23 +14,23 @@ using Google.Ads.GoogleAds.Lib; using Google.Ads.GoogleAds.Util; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Enums; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Enums; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using Google.Protobuf; using System; using System.Linq; -using static Google.Ads.GoogleAds.V5.Enums.AdGroupAdStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdvertisingChannelSubTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AdvertisingChannelTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.AssetTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.BudgetDeliveryMethodEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.CampaignStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.MimeTypeEnum.Types; - -namespace Google.Ads.GoogleAds.Examples.V5 +using static Google.Ads.GoogleAds.V6.Enums.AdGroupAdStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelSubTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.AssetTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.BudgetDeliveryMethodEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.CampaignStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.MimeTypeEnum.Types; + +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// @@ -112,7 +112,7 @@ private static string CreateBudget(GoogleAdsClient client, long customerId) { // Get the BudgetService. CampaignBudgetServiceClient budgetService = client.GetService( - Services.V5.CampaignBudgetService); + Services.V6.CampaignBudgetService); // Create the campaign budget. CampaignBudget budget = new CampaignBudget() @@ -151,7 +151,7 @@ private string CreateSmartDisplayCampaign(GoogleAdsClient client, long customerI string budgetResourceName) { // Get the CampaignService. - CampaignServiceClient campaignService = client.GetService(Services.V5.CampaignService); + CampaignServiceClient campaignService = client.GetService(Services.V6.CampaignService); // Create the campaign. Campaign campaign = new Campaign() @@ -208,7 +208,7 @@ private string CreateAdGroup(GoogleAdsClient client, long customerId, string campaignResourceName) { // Get the AdGroupService. - AdGroupServiceClient adGroupService = client.GetService(Services.V5.AdGroupService); + AdGroupServiceClient adGroupService = client.GetService(Services.V6.AdGroupService); // Create the ad group. AdGroup adGroup = new AdGroup() @@ -250,7 +250,7 @@ private static string UploadImageAsset(GoogleAdsClient client, long customerId, { // Get the AssetServiceClient. AssetServiceClient assetService = - client.GetService(Services.V5.AssetService); + client.GetService(Services.V6.AssetService); // Creates an image content. byte[] imageContent = MediaUtilities.GetAssetDataFromUrl(imageUrl, client.Config); @@ -316,7 +316,7 @@ private static string CreateResponsiveDisplayAd(GoogleAdsClient client, long cus { // Get the AdGroupAdServiceClient. AdGroupAdServiceClient adGroupAdService = - client.GetService(Services.V5.AdGroupAdService); + client.GetService(Services.V6.AdGroupAdService); // Creates a responsive display ad info. ResponsiveDisplayAdInfo responsiveDisplayAdInfo = new ResponsiveDisplayAdInfo() diff --git a/examples/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs b/examples/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs index e0189a80d..b67d2ad17 100644 --- a/examples/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs +++ b/examples/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs @@ -13,16 +13,16 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; using System.Collections.Generic; -using static Google.Ads.GoogleAds.V5.Enums.KeywordMatchTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.SharedSetTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.KeywordMatchTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.SharedSetTypeEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example creates a shared list of negative broad match keywords. It then @@ -66,11 +66,11 @@ public static void Main(string[] args) public void Run(GoogleAdsClient client, long customerId, long campaignId) { SharedSetServiceClient sharedSetService = client.GetService( - Services.V5.SharedSetService); + Services.V6.SharedSetService); SharedCriterionServiceClient sharedCriterionService = - client.GetService(Services.V5.SharedCriterionService); + client.GetService(Services.V6.SharedCriterionService); CampaignSharedSetServiceClient campaignSharedSetService = - client.GetService(Services.V5.CampaignSharedSetService); + client.GetService(Services.V6.CampaignSharedSetService); try { diff --git a/examples/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs b/examples/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs index 068137899..ff27e5036 100644 --- a/examples/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs +++ b/examples/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs @@ -13,15 +13,15 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using Google.Api.Gax; using System; using System.Collections.Generic; -using static Google.Ads.GoogleAds.V5.Enums.CriterionTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.CriterionTypeEnum.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example demonstrates how to find shared sets, shared set criteria, and @@ -67,10 +67,10 @@ public void Run(GoogleAdsClient client, long customerId, long campaignId) try { SharedCriterionServiceClient sharedCriterionService = client.GetService( - Services.V5.SharedCriterionService); + Services.V6.SharedCriterionService); GoogleAdsServiceClient googleAdsService = client.GetService( - Services.V5.GoogleAdsService); + Services.V6.GoogleAdsService); List sharedSetIds = new List(); List criterionResources = new List(); diff --git a/examples/AdvancedOperations/GetAdGroupBidModifiers.cs b/examples/AdvancedOperations/GetAdGroupBidModifiers.cs index 0cfdb508a..b7f2b87f9 100644 --- a/examples/AdvancedOperations/GetAdGroupBidModifiers.cs +++ b/examples/AdvancedOperations/GetAdGroupBidModifiers.cs @@ -13,13 +13,13 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using Google.Api.Gax; using System; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example gets ad group bid modifiers. @@ -65,7 +65,7 @@ public void Run(GoogleAdsClient client, long customerId, long? adGroupId) { // Get the GoogleAdsService. GoogleAdsServiceClient googleAdsService = - client.GetService(Services.V5.GoogleAdsService); + client.GetService(Services.V6.GoogleAdsService); string searchQuery = "SELECT ad_group.id, ad_group_bid_modifier.criterion_id, " diff --git a/examples/AdvancedOperations/UsePortfolioBiddingStrategy.cs b/examples/AdvancedOperations/UsePortfolioBiddingStrategy.cs index 10dba0c20..73b8a3787 100644 --- a/examples/AdvancedOperations/UsePortfolioBiddingStrategy.cs +++ b/examples/AdvancedOperations/UsePortfolioBiddingStrategy.cs @@ -13,19 +13,19 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V5.Common; -using Google.Ads.GoogleAds.V5.Enums; -using Google.Ads.GoogleAds.V5.Errors; -using Google.Ads.GoogleAds.V5.Resources; -using Google.Ads.GoogleAds.V5.Services; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Enums; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Resources; +using Google.Ads.GoogleAds.V6.Services; using System; -using static Google.Ads.GoogleAds.V5.Enums.AdvertisingChannelTypeEnum.Types; -using static Google.Ads.GoogleAds.V5.Enums.CampaignStatusEnum.Types; -using static Google.Ads.GoogleAds.V5.Resources.Campaign.Types; +using static Google.Ads.GoogleAds.V6.Enums.AdvertisingChannelTypeEnum.Types; +using static Google.Ads.GoogleAds.V6.Enums.CampaignStatusEnum.Types; +using static Google.Ads.GoogleAds.V6.Resources.Campaign.Types; -namespace Google.Ads.GoogleAds.Examples.V5 +namespace Google.Ads.GoogleAds.Examples.V6 { /// /// This code example adds a portfolio bidding strategy and uses it to construct a campaign. @@ -117,7 +117,7 @@ private string CreatePortfolioBiddingStrategy(GoogleAdsClient client, { // Get the BiddingStrategyService. BiddingStrategyServiceClient biddingStrategyService = client.GetService( - Services.V5.BiddingStrategyService); + Services.V6.BiddingStrategyService); // Create a portfolio bidding strategy. BiddingStrategy biddingStrategy = new BiddingStrategy() @@ -157,7 +157,7 @@ private string CreateSharedBudget(GoogleAdsClient client, long customerId, strin { // Get the CampaignBudgetService. CampaignBudgetServiceClient campaignBudgetService = - client.GetService(Services.V5.CampaignBudgetService); + client.GetService(Services.V6.CampaignBudgetService); // Create a shared budget. CampaignBudget budget = new CampaignBudget() @@ -194,7 +194,7 @@ private string CreateCampaignWithBiddingStrategy(GoogleAdsClient client, string campaignBudgetResourceName) { // Get the CampaignService. - CampaignServiceClient campaignService = client.GetService(Services.V5.CampaignService); + CampaignServiceClient campaignService = client.GetService(Services.V6.CampaignService); // Create the campaign. Campaign campaign = new Campaign() diff --git a/examples/Authentication/AuthenticateInStandaloneApplication/AuthenticateInStandaloneApplication.csproj b/examples/Authentication/AuthenticateInDesktopApplication/AuthenticateInDesktopApplication.csproj similarity index 93% rename from examples/Authentication/AuthenticateInStandaloneApplication/AuthenticateInStandaloneApplication.csproj rename to examples/Authentication/AuthenticateInDesktopApplication/AuthenticateInDesktopApplication.csproj index 7ca671467..88c120a20 100644 --- a/examples/Authentication/AuthenticateInStandaloneApplication/AuthenticateInStandaloneApplication.csproj +++ b/examples/Authentication/AuthenticateInDesktopApplication/AuthenticateInDesktopApplication.csproj @@ -2,7 +2,7 @@ netcoreapp3.0 Google.Ads.GoogleAds.Examples - Google.Ads.GoogleAds.Examples + AuthenticateInDesktopApplication Exe Google.Ads.GoogleAds.Examples.Program pdbonly diff --git a/examples/Authentication/AuthenticateInStandaloneApplication/Program.cs b/examples/Authentication/AuthenticateInDesktopApplication/Program.cs similarity index 98% rename from examples/Authentication/AuthenticateInStandaloneApplication/Program.cs rename to examples/Authentication/AuthenticateInDesktopApplication/Program.cs index 890e21ce0..f4056a9c2 100644 --- a/examples/Authentication/AuthenticateInStandaloneApplication/Program.cs +++ b/examples/Authentication/AuthenticateInDesktopApplication/Program.cs @@ -68,7 +68,7 @@ public static void Main(string[] args) try { - // Authorize the user using installed application flow. + // Authorize the user using desktop flow. Task task = GoogleWebAuthorizationBroker.AuthorizeAsync( secrets, new string[] { GOOGLE_ADS_API_SCOPE }, diff --git a/examples/Authentication/AuthenticateInWebApplication/AuthenticateInWebApplication.csproj b/examples/Authentication/AuthenticateInWebApplication/AuthenticateInWebApplication.csproj index a385fce84..450248156 100644 --- a/examples/Authentication/AuthenticateInWebApplication/AuthenticateInWebApplication.csproj +++ b/examples/Authentication/AuthenticateInWebApplication/AuthenticateInWebApplication.csproj @@ -48,20 +48,20 @@ {C691BD4D-683D-425B-8BC7-52F161475C7C} Google.Ads.GoogleAds - - ..\..\..\packages\Google.Ads.GoogleAds.5.0.0\lib\net472\Google.Ads.GoogleAds.dll + + ..\..\..\packages\Google.Ads.GoogleAds.6.0.0\lib\net472\Google.Ads.GoogleAds.dll - - ..\..\..\packages\Google.Api.CommonProtos.2.1.0\lib\net461\Google.Api.CommonProtos.dll + + ..\..\..\packages\Google.Api.CommonProtos.2.2.0\lib\net461\Google.Api.CommonProtos.dll - - ..\..\..\packages\Google.Api.Gax.3.1.0\lib\net461\Google.Api.Gax.dll + + ..\..\..\packages\Google.Api.Gax.3.2.0\lib\net461\Google.Api.Gax.dll - - ..\..\..\packages\Google.Api.Gax.Grpc.3.1.0\lib\net461\Google.Api.Gax.Grpc.dll + + ..\..\..\packages\Google.Api.Gax.Grpc.3.2.0\lib\net461\Google.Api.Gax.Grpc.dll - - ..\..\..\packages\Google.Api.Gax.Grpc.GrpcCore.3.1.0\lib\net461\Google.Api.Gax.Grpc.GrpcCore.dll + + ..\..\..\packages\Google.Api.Gax.Grpc.GrpcCore.3.2.0\lib\net461\Google.Api.Gax.Grpc.GrpcCore.dll ..\..\..\packages\Google.Apis.1.49.0\lib\net45\Google.Apis.dll @@ -78,20 +78,20 @@ ..\..\..\packages\Google.Apis.1.49.0\lib\net45\Google.Apis.PlatformServices.dll - - ..\..\..\packages\Google.LongRunning.2.0.0\lib\net461\Google.LongRunning.dll + + ..\..\..\packages\Google.LongRunning.2.1.0\lib\net461\Google.LongRunning.dll ..\..\..\packages\Google.Protobuf.3.13.0\lib\net45\Google.Protobuf.dll - ..\..\..\packages\Grpc.Auth.2.31.0\lib\net45\Grpc.Auth.dll + ..\..\..\packages\Grpc.Auth.2.33.1\lib\net45\Grpc.Auth.dll - ..\..\..\packages\Grpc.Core.2.31.0\lib\net45\Grpc.Core.dll + ..\..\..\packages\Grpc.Core.2.33.1\lib\net45\Grpc.Core.dll - ..\..\..\packages\Grpc.Core.Api.2.31.0\lib\net45\Grpc.Core.Api.dll + ..\..\..\packages\Grpc.Core.Api.2.33.1\lib\net45\Grpc.Core.Api.dll ..\..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll @@ -100,14 +100,14 @@ ..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll - - ..\..\..\packages\Microsoft.Extensions.Configuration.3.1.7\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll + + ..\..\..\packages\Microsoft.Extensions.Configuration.3.1.9\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - - ..\..\..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.7\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll + + ..\..\..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.9\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - - ..\..\..\packages\Microsoft.Extensions.Primitives.3.1.7\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll + + ..\..\..\packages\Microsoft.Extensions.Primitives.3.1.9\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll ..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll @@ -202,10 +202,10 @@ - + - + @@ -240,4 +240,18 @@ Headers: { Partial failures: PARTIAL_FAILURES ----------------END API CALL---------------- + + { + "type": "service_account", + "project_id": "project-id-123", + "private_key_id": "654321", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDw6CCpKHEF373IJ6exzsHT1SPaUbSxSEA7iOpMNr45OxaAUfQf8UQKUvUphGIp0qn6cTvMZShqMBzoJw/aFzdmNdlXUnou3L6ay78sqBXiMVVxclDn/sTMyfWIY4w4UwqZGANsbUwkR3A7twAJynsqzgN6YAzfjaO3TdoIDIH9sxARhZVRUYDBY6ul5k/BF+rKsvXZS7MKOUq/uyYyAjPx1xLiybvb09kuVK8m9Hk4RJI+bZKCFadUetb1LFgDn7FiysNYHbsNInctIv075gW/QahIxPyOKUjFU/03nvcIH4kM1NEjlZh7VS/kUHA+CSDN736xcruoepLveyScF5M7AgMBAAECggEBAIe3rla+EtZlUyyEsqOoQGgPppAjAbHya0Ve/+gJ2yaw1B9cjDTGnjdWvwkxrH+1T89opXCj+J3CFzbucq7B75LkeVoJfA4UjEj2ye/ljdaNRn6QEWZxj/tzN6Eru94rYkgXUC5wcLnriR4LHblmWfcmcq0pmXcD+5yT/mYUbdM3Ssr2Ou4gmMlzSx8KfDhS50OFlnlmKC8EZfMp9DlDZwkR/0XAcdktx4VFIOeHOpyZT1K4JBhVTV3Rs35za8AQB7WwoX6OIfI91MXqzlaajVoBlTCYbfPkr/ULqdpgKl1pgvP7YuGcrYKKjUvFPC/b7wsEmSvbEV+RhFSvfTTS1eECgYEA/pNOps+gaNfjBnNf+8FflZNkNVUlm5lRqrhpNUKSskk1tciOjSaZ2qcTND3BOMmTSNeT1M9jYaxPq1ZX1LAo2+pjMtsEwdPjCFzBEM5p0kjpByy2hDvgRQ70kN7HwKZBuPrz4ClSoEO97hlFEne1hdFOZo9wLayqSdbMN63sXasCgYEA8kE9P8DlXEOyIl6a6ZvzKVReLfjYjfxWgmruPQuWzgQ7ROfPpKc1ibcvId0O7o9oCFCP9eZGCewK2aKRaDKtF4JRQeE3VvqVE/9x0iAOmZeYB6pBhrFbIiOxRQTIc8wVw/B4OqtROXgKFKGuWce9f3ebuCVrckdtN5nqUEgQcLECgYAD3HQa75c9P9j/pgxUozAx8pRYgrwZShAFCNr/pczXy2h3I12WInm+6T3PUwh1Ngl31100oxicyKJEtQCMB0f3Xey3Pr8puW7+F3oOKTNNrzFpnHIAO3BBW+K1t8tLzrm8doHwanAIYj6lN9jmWM52AyCvSYmoB7Blgk6Coa6uFQKBgQDCl7r+UhEq2snlJ78h9X4ObdG09dXlv5Mx8XjrGjsJw4ZkZBx780BjHf1DI1GSOSlkvGnXKSCLacqRZS+N1l8JqklhNOqB+Ij1ZlRkaBGyOH4LcixuaFp/AtKrURs/QOke2jOJVQHKuuzGA9WMEpDaKhawhYZYZp2Jcx4vXKOwEQKBgDWGwMGDF1tDMzhmku18vruMXs3aOsdbWsPew4qRXTY+kikipfP87kJMiMg0N7VTLN/LuED1rl5kdLy2YyE63V3NwseXAA35QUR6/vrwDw0utXAxX96XFMUz3BK2WqWi5Bfh0fSg9EV6fKJkvDaksSCbRpvrQGXkdEPgqrVVgGPq\n-----END PRIVATE KEY-----\n", + "client_email": "test@project-id-123.example.com", + "client_id": "123456", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://accounts.google.com/o/oauth2/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test%40project-id-123.example.com" +} + \ No newline at end of file diff --git a/tests/Util/FieldMasksTest.cs b/tests/Util/FieldMasksTest.cs index acdc05c20..c0fab9aa3 100644 --- a/tests/Util/FieldMasksTest.cs +++ b/tests/Util/FieldMasksTest.cs @@ -16,7 +16,7 @@ using Google.Protobuf.WellKnownTypes; using NUnit.Framework; using NUnit.Framework.Interfaces; - +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -70,5 +70,71 @@ private static TestSuite LoadTestSuite() } return TestSuite.Parser.ParseJson(json); } + + [Test] + public void TestGetFieldValue() + { + Resource r1 = new Resource() + { + Foo = new Foo() + { + Bar = new Bar() + { + Num = 5, + }, + Num = 25, + Text = "hello world", + Bars = { + new Bar() + { + Num = 10 + } + } + }, + Foos = + { + new Foo() + { + Num = 42 + } + }, + OptFoos = 45, + Wrapper = "Test wrapper" + }; + + // Object references should be tested using AreSame. + Assert.AreSame(FieldMasks.GetFieldValue("foo", r1), r1.Foo); + Assert.AreSame(FieldMasks.GetFieldValue("foo.bar", r1), r1.Foo.Bar); + Assert.AreSame(FieldMasks.GetFieldValue("foo.bars", r1), r1.Foo.Bars); + Assert.AreSame(FieldMasks.GetFieldValue("foos", r1), r1.Foos); + Assert.AreSame(FieldMasks.GetFieldValue("wrapper", r1), r1.Wrapper); + + // Value type should be tested using AreEqual. + Assert.AreEqual(FieldMasks.GetFieldValue("foo.bar.num", r1), r1.Foo.Bar.Num); + Assert.AreEqual(FieldMasks.GetFieldValue("foo.num", r1), r1.Foo.Num); + Assert.AreEqual(FieldMasks.GetFieldValue("foo.text", r1), r1.Foo.Text); + Assert.AreEqual(FieldMasks.GetFieldValue("opt_foos", r1), r1.OptFoos); + + Resource r2 = new Resource() + { + OptFoos = 32 + }; + Assert.Throws(delegate () { + // r2.Foo is null. + FieldMasks.GetFieldValue("foo.bar", r2); + }); + Assert.Throws(delegate () { + // r2.Jazz is not a valid field. + FieldMasks.GetFieldValue("foo.jazz", r2); + }); + Assert.Throws(delegate () { + // r2.OptFoos.Blah cannot be recursed because OptFoos is a leaf level node. + FieldMasks.GetFieldValue("foo.opt_foos.blah", r2); + }); + Assert.Throws(delegate () { + // YOu cannot recurse r2.Foos because it is a repeated field. + FieldMasks.GetFieldValue("foo.opt_foos.blah", r2); + }); + } } } diff --git a/tests/V2/Services/KeywordPlanIdeaServiceClientTest.g.cs b/tests/V2/Services/KeywordPlanIdeaServiceClientTest.g.cs deleted file mode 100644 index 0381dd021..000000000 --- a/tests/V2/Services/KeywordPlanIdeaServiceClientTest.g.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated code. DO NOT EDIT! - -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gaxgrpc = Google.Api.Gax.Grpc; -using grpccore = Grpc.Core; -using moq = Moq; -using st = System.Threading; -using stt = System.Threading.Tasks; -using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; - -namespace Google.Ads.GoogleAds.Tests.V2.Services -{ - /// Generated unit tests. - public sealed class GeneratedKeywordPlanIdeaServiceClientTest - { - [Category("Smoke")][Test] - public void GenerateKeywordIdeasRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GenerateKeywordIdeasRequest request = new GenerateKeywordIdeasRequest - { - CustomerId = "customer_id3b3724cb", - KeywordAndUrlSeed = new KeywordAndUrlSeed(), - KeywordSeed = new KeywordSeed(), - UrlSeed = new UrlSeed(), - Language = "language7dae1285", - GeoTargetConstants = - { - "geo_target_constants2f692206", - }, - KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - }; - GenerateKeywordIdeaResponse expectedResponse = new GenerateKeywordIdeaResponse - { - Results = - { - new GenerateKeywordIdeaResult(), - }, - }; - mockGrpcClient.Setup(x => x.GenerateKeywordIdeas(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanIdeaServiceClient client = new KeywordPlanIdeaServiceClientImpl(mockGrpcClient.Object, null); - GenerateKeywordIdeaResponse response = client.GenerateKeywordIdeas(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GenerateKeywordIdeasRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GenerateKeywordIdeasRequest request = new GenerateKeywordIdeasRequest - { - CustomerId = "customer_id3b3724cb", - KeywordAndUrlSeed = new KeywordAndUrlSeed(), - KeywordSeed = new KeywordSeed(), - UrlSeed = new UrlSeed(), - Language = "language7dae1285", - GeoTargetConstants = - { - "geo_target_constants2f692206", - }, - KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - }; - GenerateKeywordIdeaResponse expectedResponse = new GenerateKeywordIdeaResponse - { - Results = - { - new GenerateKeywordIdeaResult(), - }, - }; - mockGrpcClient.Setup(x => x.GenerateKeywordIdeasAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanIdeaServiceClient client = new KeywordPlanIdeaServiceClientImpl(mockGrpcClient.Object, null); - GenerateKeywordIdeaResponse responseCallSettings = await client.GenerateKeywordIdeasAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - GenerateKeywordIdeaResponse responseCancellationToken = await client.GenerateKeywordIdeasAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - } -} diff --git a/tests/V2/Services/KeywordPlanKeywordServiceClientTest.g.cs b/tests/V2/Services/KeywordPlanKeywordServiceClientTest.g.cs deleted file mode 100644 index 32bce261b..000000000 --- a/tests/V2/Services/KeywordPlanKeywordServiceClientTest.g.cs +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated code. DO NOT EDIT! - -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; -using gaxgrpc = Google.Api.Gax.Grpc; -using gr = Google.Rpc; -using grpccore = Grpc.Core; -using moq = Moq; -using st = System.Threading; -using stt = System.Threading.Tasks; -using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; - -namespace Google.Ads.GoogleAds.Tests.V2.Services -{ - /// Generated unit tests. - public sealed class GeneratedKeywordPlanKeywordServiceClientTest - { - [Category("Smoke")][Test] - public void GetKeywordPlanKeywordRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanKeywordRequest request = new GetKeywordPlanKeywordRequest - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - }; - gagvr::KeywordPlanKeyword expectedResponse = new gagvr::KeywordPlanKeyword - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - CpcBidMicros = 7321761304249472746L, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanKeyword(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanKeyword response = client.GetKeywordPlanKeyword(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetKeywordPlanKeywordRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanKeywordRequest request = new GetKeywordPlanKeywordRequest - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - }; - gagvr::KeywordPlanKeyword expectedResponse = new gagvr::KeywordPlanKeyword - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - CpcBidMicros = 7321761304249472746L, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanKeyword responseCallSettings = await client.GetKeywordPlanKeywordAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::KeywordPlanKeyword responseCancellationToken = await client.GetKeywordPlanKeywordAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetKeywordPlanKeyword() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanKeywordRequest request = new GetKeywordPlanKeywordRequest - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - }; - gagvr::KeywordPlanKeyword expectedResponse = new gagvr::KeywordPlanKeyword - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - CpcBidMicros = 7321761304249472746L, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanKeyword(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanKeyword response = client.GetKeywordPlanKeyword(request.ResourceName); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetKeywordPlanKeywordAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanKeywordRequest request = new GetKeywordPlanKeywordRequest - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - }; - gagvr::KeywordPlanKeyword expectedResponse = new gagvr::KeywordPlanKeyword - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - CpcBidMicros = 7321761304249472746L, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanKeyword responseCallSettings = await client.GetKeywordPlanKeywordAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::KeywordPlanKeyword responseCancellationToken = await client.GetKeywordPlanKeywordAsync(request.ResourceName, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetKeywordPlanKeywordResourceNames() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanKeywordRequest request = new GetKeywordPlanKeywordRequest - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - }; - gagvr::KeywordPlanKeyword expectedResponse = new gagvr::KeywordPlanKeyword - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - CpcBidMicros = 7321761304249472746L, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanKeyword(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanKeyword response = client.GetKeywordPlanKeyword(request.ResourceNameAsKeywordPlanKeywordName); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetKeywordPlanKeywordResourceNamesAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanKeywordRequest request = new GetKeywordPlanKeywordRequest - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - }; - gagvr::KeywordPlanKeyword expectedResponse = new gagvr::KeywordPlanKeyword - { - ResourceNameAsKeywordPlanKeywordName = gagvr::KeywordPlanKeywordName.FromCustomerKeywordPlanKeyword("[CUSTOMER]", "[KEYWORD_PLAN_KEYWORD]"), - KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - CpcBidMicros = 7321761304249472746L, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanKeyword responseCallSettings = await client.GetKeywordPlanKeywordAsync(request.ResourceNameAsKeywordPlanKeywordName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::KeywordPlanKeyword responseCancellationToken = await client.GetKeywordPlanKeywordAsync(request.ResourceNameAsKeywordPlanKeywordName, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void MutateKeywordPlanKeywordsRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanKeywordsRequest request = new MutateKeywordPlanKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanKeywordOperation(), - }, - PartialFailure = false, - ValidateOnly = true, - }; - MutateKeywordPlanKeywordsResponse expectedResponse = new MutateKeywordPlanKeywordsResponse - { - Results = - { - new MutateKeywordPlanKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanKeywords(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanKeywordsResponse response = client.MutateKeywordPlanKeywords(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task MutateKeywordPlanKeywordsRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanKeywordsRequest request = new MutateKeywordPlanKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanKeywordOperation(), - }, - PartialFailure = false, - ValidateOnly = true, - }; - MutateKeywordPlanKeywordsResponse expectedResponse = new MutateKeywordPlanKeywordsResponse - { - Results = - { - new MutateKeywordPlanKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanKeywordsResponse responseCallSettings = await client.MutateKeywordPlanKeywordsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - MutateKeywordPlanKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanKeywordsAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void MutateKeywordPlanKeywords() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanKeywordsRequest request = new MutateKeywordPlanKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanKeywordOperation(), - }, - }; - MutateKeywordPlanKeywordsResponse expectedResponse = new MutateKeywordPlanKeywordsResponse - { - Results = - { - new MutateKeywordPlanKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanKeywords(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanKeywordsResponse response = client.MutateKeywordPlanKeywords(request.CustomerId, request.Operations); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task MutateKeywordPlanKeywordsAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanKeywordsRequest request = new MutateKeywordPlanKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanKeywordOperation(), - }, - }; - MutateKeywordPlanKeywordsResponse expectedResponse = new MutateKeywordPlanKeywordsResponse - { - Results = - { - new MutateKeywordPlanKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanKeywordServiceClient client = new KeywordPlanKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanKeywordsResponse responseCallSettings = await client.MutateKeywordPlanKeywordsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - MutateKeywordPlanKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanKeywordsAsync(request.CustomerId, request.Operations, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - } -} diff --git a/tests/V2/Services/KeywordPlanNegativeKeywordServiceClientTest.g.cs b/tests/V2/Services/KeywordPlanNegativeKeywordServiceClientTest.g.cs deleted file mode 100644 index e4fe3ee1d..000000000 --- a/tests/V2/Services/KeywordPlanNegativeKeywordServiceClientTest.g.cs +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated code. DO NOT EDIT! - -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; -using gaxgrpc = Google.Api.Gax.Grpc; -using gr = Google.Rpc; -using grpccore = Grpc.Core; -using moq = Moq; -using st = System.Threading; -using stt = System.Threading.Tasks; -using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; - -namespace Google.Ads.GoogleAds.Tests.V2.Services -{ - /// Generated unit tests. - public sealed class GeneratedKeywordPlanNegativeKeywordServiceClientTest - { - [Category("Smoke")][Test] - public void GetKeywordPlanNegativeKeywordRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanNegativeKeywordRequest request = new GetKeywordPlanNegativeKeywordRequest - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - }; - gagvr::KeywordPlanNegativeKeyword expectedResponse = new gagvr::KeywordPlanNegativeKeyword - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanNegativeKeyword(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanNegativeKeyword response = client.GetKeywordPlanNegativeKeyword(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetKeywordPlanNegativeKeywordRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanNegativeKeywordRequest request = new GetKeywordPlanNegativeKeywordRequest - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - }; - gagvr::KeywordPlanNegativeKeyword expectedResponse = new gagvr::KeywordPlanNegativeKeyword - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanNegativeKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanNegativeKeyword responseCallSettings = await client.GetKeywordPlanNegativeKeywordAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::KeywordPlanNegativeKeyword responseCancellationToken = await client.GetKeywordPlanNegativeKeywordAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetKeywordPlanNegativeKeyword() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanNegativeKeywordRequest request = new GetKeywordPlanNegativeKeywordRequest - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - }; - gagvr::KeywordPlanNegativeKeyword expectedResponse = new gagvr::KeywordPlanNegativeKeyword - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanNegativeKeyword(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanNegativeKeyword response = client.GetKeywordPlanNegativeKeyword(request.ResourceName); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetKeywordPlanNegativeKeywordAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanNegativeKeywordRequest request = new GetKeywordPlanNegativeKeywordRequest - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - }; - gagvr::KeywordPlanNegativeKeyword expectedResponse = new gagvr::KeywordPlanNegativeKeyword - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanNegativeKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanNegativeKeyword responseCallSettings = await client.GetKeywordPlanNegativeKeywordAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::KeywordPlanNegativeKeyword responseCancellationToken = await client.GetKeywordPlanNegativeKeywordAsync(request.ResourceName, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetKeywordPlanNegativeKeywordResourceNames() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanNegativeKeywordRequest request = new GetKeywordPlanNegativeKeywordRequest - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - }; - gagvr::KeywordPlanNegativeKeyword expectedResponse = new gagvr::KeywordPlanNegativeKeyword - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanNegativeKeyword(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanNegativeKeyword response = client.GetKeywordPlanNegativeKeyword(request.ResourceNameAsKeywordPlanNegativeKeywordName); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetKeywordPlanNegativeKeywordResourceNamesAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - GetKeywordPlanNegativeKeywordRequest request = new GetKeywordPlanNegativeKeywordRequest - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - }; - gagvr::KeywordPlanNegativeKeyword expectedResponse = new gagvr::KeywordPlanNegativeKeyword - { - ResourceNameAsKeywordPlanNegativeKeywordName = gagvr::KeywordPlanNegativeKeywordName.FromCustomerKeywordPlanNegativeKeyword("[CUSTOMER]", "[KEYWORD_PLAN_NEGATIVE_KEYWORD]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - Id = -6774108720365892680L, - Text = "textec51b21c", - MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, - }; - mockGrpcClient.Setup(x => x.GetKeywordPlanNegativeKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - gagvr::KeywordPlanNegativeKeyword responseCallSettings = await client.GetKeywordPlanNegativeKeywordAsync(request.ResourceNameAsKeywordPlanNegativeKeywordName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::KeywordPlanNegativeKeyword responseCancellationToken = await client.GetKeywordPlanNegativeKeywordAsync(request.ResourceNameAsKeywordPlanNegativeKeywordName, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void MutateKeywordPlanNegativeKeywordsRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanNegativeKeywordsRequest request = new MutateKeywordPlanNegativeKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanNegativeKeywordOperation(), - }, - PartialFailure = false, - ValidateOnly = true, - }; - MutateKeywordPlanNegativeKeywordsResponse expectedResponse = new MutateKeywordPlanNegativeKeywordsResponse - { - Results = - { - new MutateKeywordPlanNegativeKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanNegativeKeywords(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanNegativeKeywordsResponse response = client.MutateKeywordPlanNegativeKeywords(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task MutateKeywordPlanNegativeKeywordsRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanNegativeKeywordsRequest request = new MutateKeywordPlanNegativeKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanNegativeKeywordOperation(), - }, - PartialFailure = false, - ValidateOnly = true, - }; - MutateKeywordPlanNegativeKeywordsResponse expectedResponse = new MutateKeywordPlanNegativeKeywordsResponse - { - Results = - { - new MutateKeywordPlanNegativeKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanNegativeKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanNegativeKeywordsResponse responseCallSettings = await client.MutateKeywordPlanNegativeKeywordsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - MutateKeywordPlanNegativeKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanNegativeKeywordsAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void MutateKeywordPlanNegativeKeywords() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanNegativeKeywordsRequest request = new MutateKeywordPlanNegativeKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanNegativeKeywordOperation(), - }, - }; - MutateKeywordPlanNegativeKeywordsResponse expectedResponse = new MutateKeywordPlanNegativeKeywordsResponse - { - Results = - { - new MutateKeywordPlanNegativeKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanNegativeKeywords(request, moq::It.IsAny())).Returns(expectedResponse); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanNegativeKeywordsResponse response = client.MutateKeywordPlanNegativeKeywords(request.CustomerId, request.Operations); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task MutateKeywordPlanNegativeKeywordsAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - MutateKeywordPlanNegativeKeywordsRequest request = new MutateKeywordPlanNegativeKeywordsRequest - { - CustomerId = "customer_id3b3724cb", - Operations = - { - new KeywordPlanNegativeKeywordOperation(), - }, - }; - MutateKeywordPlanNegativeKeywordsResponse expectedResponse = new MutateKeywordPlanNegativeKeywordsResponse - { - Results = - { - new MutateKeywordPlanNegativeKeywordResult(), - }, - PartialFailureError = new gr::Status(), - }; - mockGrpcClient.Setup(x => x.MutateKeywordPlanNegativeKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - KeywordPlanNegativeKeywordServiceClient client = new KeywordPlanNegativeKeywordServiceClientImpl(mockGrpcClient.Object, null); - MutateKeywordPlanNegativeKeywordsResponse responseCallSettings = await client.MutateKeywordPlanNegativeKeywordsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - MutateKeywordPlanNegativeKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanNegativeKeywordsAsync(request.CustomerId, request.Operations, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - } -} diff --git a/tests/V2/Services/MutateJobServiceClientTest.g.cs b/tests/V2/Services/MutateJobServiceClientTest.g.cs deleted file mode 100644 index 9ccc08cae..000000000 --- a/tests/V2/Services/MutateJobServiceClientTest.g.cs +++ /dev/null @@ -1,539 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated code. DO NOT EDIT! - -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; -using gaxgrpc = Google.Api.Gax.Grpc; -using lro = Google.LongRunning; -using grpccore = Grpc.Core; -using moq = Moq; -using st = System.Threading; -using stt = System.Threading.Tasks; -using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; - -namespace Google.Ads.GoogleAds.Tests.V2.Services -{ - /// Generated unit tests. - public sealed class GeneratedMutateJobServiceClientTest - { - [Category("Smoke")][Test] - public void CreateMutateJobRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - CreateMutateJobRequest request = new CreateMutateJobRequest - { - CustomerId = "customer_id3b3724cb", - }; - CreateMutateJobResponse expectedResponse = new CreateMutateJobResponse - { - ResourceName = "resource_name8cc2e687", - }; - mockGrpcClient.Setup(x => x.CreateMutateJob(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - CreateMutateJobResponse response = client.CreateMutateJob(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task CreateMutateJobRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - CreateMutateJobRequest request = new CreateMutateJobRequest - { - CustomerId = "customer_id3b3724cb", - }; - CreateMutateJobResponse expectedResponse = new CreateMutateJobResponse - { - ResourceName = "resource_name8cc2e687", - }; - mockGrpcClient.Setup(x => x.CreateMutateJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - CreateMutateJobResponse responseCallSettings = await client.CreateMutateJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - CreateMutateJobResponse responseCancellationToken = await client.CreateMutateJobAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void CreateMutateJob() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - CreateMutateJobRequest request = new CreateMutateJobRequest - { - CustomerId = "customer_id3b3724cb", - }; - CreateMutateJobResponse expectedResponse = new CreateMutateJobResponse - { - ResourceName = "resource_name8cc2e687", - }; - mockGrpcClient.Setup(x => x.CreateMutateJob(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - CreateMutateJobResponse response = client.CreateMutateJob(request.CustomerId); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task CreateMutateJobAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - CreateMutateJobRequest request = new CreateMutateJobRequest - { - CustomerId = "customer_id3b3724cb", - }; - CreateMutateJobResponse expectedResponse = new CreateMutateJobResponse - { - ResourceName = "resource_name8cc2e687", - }; - mockGrpcClient.Setup(x => x.CreateMutateJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - CreateMutateJobResponse responseCallSettings = await client.CreateMutateJobAsync(request.CustomerId, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - CreateMutateJobResponse responseCancellationToken = await client.CreateMutateJobAsync(request.CustomerId, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetMutateJobRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - GetMutateJobRequest request = new GetMutateJobRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - }; - gagvr::MutateJob expectedResponse = new gagvr::MutateJob - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - Id = -6774108720365892680L, - NextAddSequenceToken = "next_add_sequence_token93fee49d", - Metadata = new gagvr::MutateJob.Types.MutateJobMetadata(), - Status = gagve::MutateJobStatusEnum.Types.MutateJobStatus.Done, - LongRunningOperation = "long_running_operation0897bd41", - }; - mockGrpcClient.Setup(x => x.GetMutateJob(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - gagvr::MutateJob response = client.GetMutateJob(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetMutateJobRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - GetMutateJobRequest request = new GetMutateJobRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - }; - gagvr::MutateJob expectedResponse = new gagvr::MutateJob - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - Id = -6774108720365892680L, - NextAddSequenceToken = "next_add_sequence_token93fee49d", - Metadata = new gagvr::MutateJob.Types.MutateJobMetadata(), - Status = gagve::MutateJobStatusEnum.Types.MutateJobStatus.Done, - LongRunningOperation = "long_running_operation0897bd41", - }; - mockGrpcClient.Setup(x => x.GetMutateJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - gagvr::MutateJob responseCallSettings = await client.GetMutateJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::MutateJob responseCancellationToken = await client.GetMutateJobAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetMutateJob() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - GetMutateJobRequest request = new GetMutateJobRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - }; - gagvr::MutateJob expectedResponse = new gagvr::MutateJob - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - Id = -6774108720365892680L, - NextAddSequenceToken = "next_add_sequence_token93fee49d", - Metadata = new gagvr::MutateJob.Types.MutateJobMetadata(), - Status = gagve::MutateJobStatusEnum.Types.MutateJobStatus.Done, - LongRunningOperation = "long_running_operation0897bd41", - }; - mockGrpcClient.Setup(x => x.GetMutateJob(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - gagvr::MutateJob response = client.GetMutateJob(request.ResourceName); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetMutateJobAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - GetMutateJobRequest request = new GetMutateJobRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - }; - gagvr::MutateJob expectedResponse = new gagvr::MutateJob - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - Id = -6774108720365892680L, - NextAddSequenceToken = "next_add_sequence_token93fee49d", - Metadata = new gagvr::MutateJob.Types.MutateJobMetadata(), - Status = gagve::MutateJobStatusEnum.Types.MutateJobStatus.Done, - LongRunningOperation = "long_running_operation0897bd41", - }; - mockGrpcClient.Setup(x => x.GetMutateJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - gagvr::MutateJob responseCallSettings = await client.GetMutateJobAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::MutateJob responseCancellationToken = await client.GetMutateJobAsync(request.ResourceName, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void GetMutateJobResourceNames() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - GetMutateJobRequest request = new GetMutateJobRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - }; - gagvr::MutateJob expectedResponse = new gagvr::MutateJob - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - Id = -6774108720365892680L, - NextAddSequenceToken = "next_add_sequence_token93fee49d", - Metadata = new gagvr::MutateJob.Types.MutateJobMetadata(), - Status = gagve::MutateJobStatusEnum.Types.MutateJobStatus.Done, - LongRunningOperation = "long_running_operation0897bd41", - }; - mockGrpcClient.Setup(x => x.GetMutateJob(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - gagvr::MutateJob response = client.GetMutateJob(request.ResourceNameAsMutateJobName); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task GetMutateJobResourceNamesAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - GetMutateJobRequest request = new GetMutateJobRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - }; - gagvr::MutateJob expectedResponse = new gagvr::MutateJob - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - Id = -6774108720365892680L, - NextAddSequenceToken = "next_add_sequence_token93fee49d", - Metadata = new gagvr::MutateJob.Types.MutateJobMetadata(), - Status = gagve::MutateJobStatusEnum.Types.MutateJobStatus.Done, - LongRunningOperation = "long_running_operation0897bd41", - }; - mockGrpcClient.Setup(x => x.GetMutateJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - gagvr::MutateJob responseCallSettings = await client.GetMutateJobAsync(request.ResourceNameAsMutateJobName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - gagvr::MutateJob responseCancellationToken = await client.GetMutateJobAsync(request.ResourceNameAsMutateJobName, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void AddMutateJobOperationsRequestObject() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - SequenceToken = "sequence_tokene6b46f6e", - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse response = client.AddMutateJobOperations(request); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task AddMutateJobOperationsRequestObjectAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - SequenceToken = "sequence_tokene6b46f6e", - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse responseCallSettings = await client.AddMutateJobOperationsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - AddMutateJobOperationsResponse responseCancellationToken = await client.AddMutateJobOperationsAsync(request, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void AddMutateJobOperations1() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - SequenceToken = "sequence_tokene6b46f6e", - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse response = client.AddMutateJobOperations(request.ResourceName, request.SequenceToken, request.MutateOperations); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task AddMutateJobOperations1Async() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - SequenceToken = "sequence_tokene6b46f6e", - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse responseCallSettings = await client.AddMutateJobOperationsAsync(request.ResourceName, request.SequenceToken, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - AddMutateJobOperationsResponse responseCancellationToken = await client.AddMutateJobOperationsAsync(request.ResourceName, request.SequenceToken, request.MutateOperations, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void AddMutateJobOperations1ResourceNames() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - SequenceToken = "sequence_tokene6b46f6e", - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse response = client.AddMutateJobOperations(request.ResourceNameAsMutateJobName, request.SequenceToken, request.MutateOperations); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task AddMutateJobOperations1ResourceNamesAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - SequenceToken = "sequence_tokene6b46f6e", - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse responseCallSettings = await client.AddMutateJobOperationsAsync(request.ResourceNameAsMutateJobName, request.SequenceToken, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - AddMutateJobOperationsResponse responseCancellationToken = await client.AddMutateJobOperationsAsync(request.ResourceNameAsMutateJobName, request.SequenceToken, request.MutateOperations, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void AddMutateJobOperations2() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse response = client.AddMutateJobOperations(request.ResourceName, request.MutateOperations); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task AddMutateJobOperations2Async() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse responseCallSettings = await client.AddMutateJobOperationsAsync(request.ResourceName, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - AddMutateJobOperationsResponse responseCancellationToken = await client.AddMutateJobOperationsAsync(request.ResourceName, request.MutateOperations, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public void AddMutateJobOperations2ResourceNames() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse response = client.AddMutateJobOperations(request.ResourceNameAsMutateJobName, request.MutateOperations); - Assert.AreEqual(expectedResponse, response); - mockGrpcClient.VerifyAll(); - } - - [Category("Smoke")][Test] - public async stt::Task AddMutateJobOperations2ResourceNamesAsync() - { - moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); - mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); - AddMutateJobOperationsRequest request = new AddMutateJobOperationsRequest - { - ResourceNameAsMutateJobName = gagvr::MutateJobName.FromCustomerMutateJob("[CUSTOMER]", "[MUTATE_JOB]"), - MutateOperations = - { - new MutateOperation(), - }, - }; - AddMutateJobOperationsResponse expectedResponse = new AddMutateJobOperationsResponse - { - TotalOperations = -8188520186954789005L, - NextSequenceToken = "next_sequence_token160dabc7", - }; - mockGrpcClient.Setup(x => x.AddMutateJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); - MutateJobServiceClient client = new MutateJobServiceClientImpl(mockGrpcClient.Object, null); - AddMutateJobOperationsResponse responseCallSettings = await client.AddMutateJobOperationsAsync(request.ResourceNameAsMutateJobName, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); - Assert.AreEqual(expectedResponse, responseCallSettings); - AddMutateJobOperationsResponse responseCancellationToken = await client.AddMutateJobOperationsAsync(request.ResourceNameAsMutateJobName, request.MutateOperations, st::CancellationToken.None); - Assert.AreEqual(expectedResponse, responseCancellationToken); - mockGrpcClient.VerifyAll(); - } - } -} diff --git a/tests/V3/Services/KeywordPlanServiceClientTest.g.cs b/tests/V3/Services/KeywordPlanServiceClientTest.g.cs index f88edf288..50ed4fd66 100644 --- a/tests/V3/Services/KeywordPlanServiceClientTest.g.cs +++ b/tests/V3/Services/KeywordPlanServiceClientTest.g.cs @@ -289,7 +289,7 @@ public void GenerateForecastMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -319,7 +319,7 @@ public void GenerateForecastMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -351,7 +351,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -381,7 +381,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -407,13 +407,75 @@ public void GenerateForecastMetrics() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse response = client.GenerateForecastMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse responseCallSettings = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastMetricsResponse responseCancellationToken = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateHistoricalMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -435,7 +497,7 @@ public void GenerateHistoricalMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -459,7 +521,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -481,7 +543,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -498,5 +560,51 @@ public void GenerateHistoricalMetrics() Assert.AreEqual(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); } + + [Category("Smoke")][Test] + public void GenerateHistoricalMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse response = client.GenerateHistoricalMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateHistoricalMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse responseCallSettings = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateHistoricalMetricsResponse responseCancellationToken = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } } } diff --git a/tests/V4/Services/KeywordPlanServiceClientTest.g.cs b/tests/V4/Services/KeywordPlanServiceClientTest.g.cs index 8a1c2a44d..5348da11e 100644 --- a/tests/V4/Services/KeywordPlanServiceClientTest.g.cs +++ b/tests/V4/Services/KeywordPlanServiceClientTest.g.cs @@ -289,7 +289,7 @@ public void GenerateForecastCurveRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -311,7 +311,7 @@ public void GenerateForecastCurveRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -335,7 +335,7 @@ public void GenerateForecastCurve() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -357,7 +357,7 @@ public void GenerateForecastCurve() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -375,13 +375,59 @@ public void GenerateForecastCurve() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastCurveResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurve(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse response = client.GenerateForecastCurve(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastCurveResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurveAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse responseCallSettings = await client.GenerateForecastCurveAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastCurveResponse responseCancellationToken = await client.GenerateForecastCurveAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateForecastMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -411,7 +457,7 @@ public void GenerateForecastMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -443,7 +489,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -473,7 +519,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -499,13 +545,75 @@ public void GenerateForecastMetrics() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse response = client.GenerateForecastMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse responseCallSettings = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastMetricsResponse responseCancellationToken = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateHistoricalMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -527,7 +635,7 @@ public void GenerateHistoricalMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -551,7 +659,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -573,7 +681,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -590,5 +698,51 @@ public void GenerateHistoricalMetrics() Assert.AreEqual(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); } + + [Category("Smoke")][Test] + public void GenerateHistoricalMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse response = client.GenerateHistoricalMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateHistoricalMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse responseCallSettings = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateHistoricalMetricsResponse responseCancellationToken = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } } } diff --git a/tests/V5/Services/KeywordPlanServiceClientTest.g.cs b/tests/V5/Services/KeywordPlanServiceClientTest.g.cs index 0d40dafca..0a3ee9697 100644 --- a/tests/V5/Services/KeywordPlanServiceClientTest.g.cs +++ b/tests/V5/Services/KeywordPlanServiceClientTest.g.cs @@ -289,7 +289,7 @@ public void GenerateForecastCurveRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -311,7 +311,7 @@ public void GenerateForecastCurveRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -335,7 +335,7 @@ public void GenerateForecastCurve() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -357,7 +357,7 @@ public void GenerateForecastCurve() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastCurveRequest request = new GenerateForecastCurveRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse { @@ -375,13 +375,59 @@ public void GenerateForecastCurve() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastCurveResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurve(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse response = client.GenerateForecastCurve(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastCurveResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurveAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse responseCallSettings = await client.GenerateForecastCurveAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastCurveResponse responseCancellationToken = await client.GenerateForecastCurveAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateForecastTimeSeriesRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse { @@ -403,7 +449,7 @@ public void GenerateForecastTimeSeriesRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse { @@ -427,7 +473,7 @@ public void GenerateForecastTimeSeries() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse { @@ -449,7 +495,7 @@ public void GenerateForecastTimeSeries() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse { @@ -467,13 +513,59 @@ public void GenerateForecastTimeSeries() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastTimeSeriesResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeries(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse response = client.GenerateForecastTimeSeries(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastTimeSeriesResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeriesAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse responseCallSettings = await client.GenerateForecastTimeSeriesAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastTimeSeriesResponse responseCancellationToken = await client.GenerateForecastTimeSeriesAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateForecastMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -503,7 +595,7 @@ public void GenerateForecastMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -535,7 +627,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -565,7 +657,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -591,13 +683,75 @@ public void GenerateForecastMetrics() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse response = client.GenerateForecastMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse responseCallSettings = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastMetricsResponse responseCancellationToken = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateHistoricalMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -619,7 +773,7 @@ public void GenerateHistoricalMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -643,7 +797,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -665,7 +819,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -682,5 +836,51 @@ public void GenerateHistoricalMetrics() Assert.AreEqual(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); } + + [Category("Smoke")][Test] + public void GenerateHistoricalMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse response = client.GenerateHistoricalMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateHistoricalMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse responseCallSettings = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateHistoricalMetricsResponse responseCancellationToken = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } } } diff --git a/tests/V2/GoogleAdsFailureExtensionsTests.cs b/tests/V6/GoogleAdsFailureExtensionsTests.cs similarity index 97% rename from tests/V2/GoogleAdsFailureExtensionsTests.cs rename to tests/V6/GoogleAdsFailureExtensionsTests.cs index d50c3a52d..95909d9d7 100644 --- a/tests/V2/GoogleAdsFailureExtensionsTests.cs +++ b/tests/V6/GoogleAdsFailureExtensionsTests.cs @@ -13,14 +13,14 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V2.Errors; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Errors; +using Google.Ads.GoogleAds.V6.Services; using Google.Protobuf.WellKnownTypes; using NUnit.Framework; using System.Linq; -using static Google.Ads.GoogleAds.V2.Errors.ErrorLocation.Types; +using static Google.Ads.GoogleAds.V6.Errors.ErrorLocation.Types; -namespace Google.Ads.GoogleAds.Tests.V2.Errors +namespace Google.Ads.GoogleAds.Tests.V6.Errors { /// /// UnitTests for extensions in GoogleAdsFailureExtensionsTests.cs. diff --git a/tests/V2/Services/AccountBudgetProposalServiceClientTest.g.cs b/tests/V6/Services/AccountBudgetProposalServiceClientTest.g.cs similarity index 93% rename from tests/V2/Services/AccountBudgetProposalServiceClientTest.g.cs rename to tests/V6/Services/AccountBudgetProposalServiceClientTest.g.cs index d52f003c8..1c564356c 100644 --- a/tests/V2/Services/AccountBudgetProposalServiceClientTest.g.cs +++ b/tests/V6/Services/AccountBudgetProposalServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAccountBudgetProposalServiceClientTest @@ -35,32 +35,32 @@ public void GetAccountBudgetProposalRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetProposalRequest request = new GetAccountBudgetProposalRequest { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), }; gagvr::AccountBudgetProposal expectedResponse = new gagvr::AccountBudgetProposal { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), ProposalType = gagve::AccountBudgetProposalTypeEnum.Types.AccountBudgetProposalType.Remove, - ProposedName = "proposed_name7d4b2591", ProposedStartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - ProposedSpendingLimitMicros = 6806956772888455592L, ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, - ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", - ProposedNotes = "proposed_notes1d6c3942", - Id = -6774108720365892680L, Status = gagve::AccountBudgetProposalStatusEnum.Types.AccountBudgetProposalStatus.ApprovedHeld, - CreationDateTime = "creation_date_time2f8c0159", - ApprovalDateTime = "approval_date_timecefef4db", + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), + ProposedName = "proposed_name7d4b2591", ProposedStartDateTime = "proposed_start_date_time4e2f84a3", - ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedStartDateTime = "approved_start_date_time20090a2c", + ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitMicros = 6806956772888455592L, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", + ProposedNotes = "proposed_notes1d6c3942", + CreationDateTime = "creation_date_time2f8c0159", + ApprovalDateTime = "approval_date_timecefef4db", }; mockGrpcClient.Setup(x => x.GetAccountBudgetProposal(request, moq::It.IsAny())).Returns(expectedResponse); AccountBudgetProposalServiceClient client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null); @@ -75,32 +75,32 @@ public void GetAccountBudgetProposalRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetProposalRequest request = new GetAccountBudgetProposalRequest { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), }; gagvr::AccountBudgetProposal expectedResponse = new gagvr::AccountBudgetProposal { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), ProposalType = gagve::AccountBudgetProposalTypeEnum.Types.AccountBudgetProposalType.Remove, - ProposedName = "proposed_name7d4b2591", ProposedStartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - ProposedSpendingLimitMicros = 6806956772888455592L, ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, - ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", - ProposedNotes = "proposed_notes1d6c3942", - Id = -6774108720365892680L, Status = gagve::AccountBudgetProposalStatusEnum.Types.AccountBudgetProposalStatus.ApprovedHeld, - CreationDateTime = "creation_date_time2f8c0159", - ApprovalDateTime = "approval_date_timecefef4db", + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), + ProposedName = "proposed_name7d4b2591", ProposedStartDateTime = "proposed_start_date_time4e2f84a3", - ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedStartDateTime = "approved_start_date_time20090a2c", + ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitMicros = 6806956772888455592L, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", + ProposedNotes = "proposed_notes1d6c3942", + CreationDateTime = "creation_date_time2f8c0159", + ApprovalDateTime = "approval_date_timecefef4db", }; mockGrpcClient.Setup(x => x.GetAccountBudgetProposalAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountBudgetProposalServiceClient client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null); @@ -117,32 +117,32 @@ public void GetAccountBudgetProposal() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetProposalRequest request = new GetAccountBudgetProposalRequest { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), }; gagvr::AccountBudgetProposal expectedResponse = new gagvr::AccountBudgetProposal { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), ProposalType = gagve::AccountBudgetProposalTypeEnum.Types.AccountBudgetProposalType.Remove, - ProposedName = "proposed_name7d4b2591", ProposedStartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - ProposedSpendingLimitMicros = 6806956772888455592L, ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, - ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", - ProposedNotes = "proposed_notes1d6c3942", - Id = -6774108720365892680L, Status = gagve::AccountBudgetProposalStatusEnum.Types.AccountBudgetProposalStatus.ApprovedHeld, - CreationDateTime = "creation_date_time2f8c0159", - ApprovalDateTime = "approval_date_timecefef4db", + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), + ProposedName = "proposed_name7d4b2591", ProposedStartDateTime = "proposed_start_date_time4e2f84a3", - ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedStartDateTime = "approved_start_date_time20090a2c", + ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitMicros = 6806956772888455592L, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", + ProposedNotes = "proposed_notes1d6c3942", + CreationDateTime = "creation_date_time2f8c0159", + ApprovalDateTime = "approval_date_timecefef4db", }; mockGrpcClient.Setup(x => x.GetAccountBudgetProposal(request, moq::It.IsAny())).Returns(expectedResponse); AccountBudgetProposalServiceClient client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null); @@ -157,32 +157,32 @@ public void GetAccountBudgetProposal() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetProposalRequest request = new GetAccountBudgetProposalRequest { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), }; gagvr::AccountBudgetProposal expectedResponse = new gagvr::AccountBudgetProposal { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), ProposalType = gagve::AccountBudgetProposalTypeEnum.Types.AccountBudgetProposalType.Remove, - ProposedName = "proposed_name7d4b2591", ProposedStartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - ProposedSpendingLimitMicros = 6806956772888455592L, ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, - ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", - ProposedNotes = "proposed_notes1d6c3942", - Id = -6774108720365892680L, Status = gagve::AccountBudgetProposalStatusEnum.Types.AccountBudgetProposalStatus.ApprovedHeld, - CreationDateTime = "creation_date_time2f8c0159", - ApprovalDateTime = "approval_date_timecefef4db", + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), + ProposedName = "proposed_name7d4b2591", ProposedStartDateTime = "proposed_start_date_time4e2f84a3", - ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedStartDateTime = "approved_start_date_time20090a2c", + ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitMicros = 6806956772888455592L, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", + ProposedNotes = "proposed_notes1d6c3942", + CreationDateTime = "creation_date_time2f8c0159", + ApprovalDateTime = "approval_date_timecefef4db", }; mockGrpcClient.Setup(x => x.GetAccountBudgetProposalAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountBudgetProposalServiceClient client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null); @@ -199,32 +199,32 @@ public void GetAccountBudgetProposalResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetProposalRequest request = new GetAccountBudgetProposalRequest { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), }; gagvr::AccountBudgetProposal expectedResponse = new gagvr::AccountBudgetProposal { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), ProposalType = gagve::AccountBudgetProposalTypeEnum.Types.AccountBudgetProposalType.Remove, - ProposedName = "proposed_name7d4b2591", ProposedStartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - ProposedSpendingLimitMicros = 6806956772888455592L, ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, - ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", - ProposedNotes = "proposed_notes1d6c3942", - Id = -6774108720365892680L, Status = gagve::AccountBudgetProposalStatusEnum.Types.AccountBudgetProposalStatus.ApprovedHeld, - CreationDateTime = "creation_date_time2f8c0159", - ApprovalDateTime = "approval_date_timecefef4db", + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), + ProposedName = "proposed_name7d4b2591", ProposedStartDateTime = "proposed_start_date_time4e2f84a3", - ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedStartDateTime = "approved_start_date_time20090a2c", + ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitMicros = 6806956772888455592L, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", + ProposedNotes = "proposed_notes1d6c3942", + CreationDateTime = "creation_date_time2f8c0159", + ApprovalDateTime = "approval_date_timecefef4db", }; mockGrpcClient.Setup(x => x.GetAccountBudgetProposal(request, moq::It.IsAny())).Returns(expectedResponse); AccountBudgetProposalServiceClient client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null); @@ -239,32 +239,32 @@ public void GetAccountBudgetProposalResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetProposalRequest request = new GetAccountBudgetProposalRequest { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), }; gagvr::AccountBudgetProposal expectedResponse = new gagvr::AccountBudgetProposal { - ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER]", "[ACCOUNT_BUDGET_PROPOSAL]"), - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetProposalName = gagvr::AccountBudgetProposalName.FromCustomerAccountBudgetProposal("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_PROPOSAL_ID]"), ProposalType = gagve::AccountBudgetProposalTypeEnum.Types.AccountBudgetProposalType.Remove, - ProposedName = "proposed_name7d4b2591", ProposedStartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - ProposedSpendingLimitMicros = 6806956772888455592L, ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, - ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", - ProposedNotes = "proposed_notes1d6c3942", - Id = -6774108720365892680L, Status = gagve::AccountBudgetProposalStatusEnum.Types.AccountBudgetProposalStatus.ApprovedHeld, - CreationDateTime = "creation_date_time2f8c0159", - ApprovalDateTime = "approval_date_timecefef4db", + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), + ProposedName = "proposed_name7d4b2591", ProposedStartDateTime = "proposed_start_date_time4e2f84a3", - ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedStartDateTime = "approved_start_date_time20090a2c", + ProposedEndDateTime = "proposed_end_date_time39aa28a5", ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitMicros = 6806956772888455592L, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ProposedPurchaseOrderNumber = "proposed_purchase_order_numbere58f9418", + ProposedNotes = "proposed_notes1d6c3942", + CreationDateTime = "creation_date_time2f8c0159", + ApprovalDateTime = "approval_date_timecefef4db", }; mockGrpcClient.Setup(x => x.GetAccountBudgetProposalAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountBudgetProposalServiceClient client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AccountBudgetServiceClientTest.g.cs b/tests/V6/Services/AccountBudgetServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/AccountBudgetServiceClientTest.g.cs rename to tests/V6/Services/AccountBudgetServiceClientTest.g.cs index c6e641df7..548fc836b 100644 --- a/tests/V2/Services/AccountBudgetServiceClientTest.g.cs +++ b/tests/V6/Services/AccountBudgetServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAccountBudgetServiceClientTest @@ -35,32 +35,32 @@ public void GetAccountBudgetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetRequest request = new GetAccountBudgetRequest { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), }; gagvr::AccountBudget expectedResponse = new gagvr::AccountBudget { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), - Id = -6774108720365892680L, - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), Status = gagve::AccountBudgetStatusEnum.Types.AccountBudgetStatus.Cancelled, - AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, + PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), ProposedStartDateTime = "proposed_start_date_time4e2f84a3", ApprovedStartDateTime = "approved_start_date_time20090a2c", ProposedEndDateTime = "proposed_end_date_time39aa28a5", - ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, ProposedSpendingLimitMicros = 6806956772888455592L, - ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, AdjustedSpendingLimitMicros = 5260592673487875057L, - AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, TotalAdjustmentsMicros = -1818058180873398375L, AmountServedMicros = -8683779131450697164L, PurchaseOrderNumber = "purchase_order_number7be7181f", Notes = "notes00b55843", - PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), }; mockGrpcClient.Setup(x => x.GetAccountBudget(request, moq::It.IsAny())).Returns(expectedResponse); AccountBudgetServiceClient client = new AccountBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -75,32 +75,32 @@ public void GetAccountBudgetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetRequest request = new GetAccountBudgetRequest { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), }; gagvr::AccountBudget expectedResponse = new gagvr::AccountBudget { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), - Id = -6774108720365892680L, - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), Status = gagve::AccountBudgetStatusEnum.Types.AccountBudgetStatus.Cancelled, - AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, + PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), ProposedStartDateTime = "proposed_start_date_time4e2f84a3", ApprovedStartDateTime = "approved_start_date_time20090a2c", ProposedEndDateTime = "proposed_end_date_time39aa28a5", - ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, ProposedSpendingLimitMicros = 6806956772888455592L, - ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, AdjustedSpendingLimitMicros = 5260592673487875057L, - AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, TotalAdjustmentsMicros = -1818058180873398375L, AmountServedMicros = -8683779131450697164L, PurchaseOrderNumber = "purchase_order_number7be7181f", Notes = "notes00b55843", - PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), }; mockGrpcClient.Setup(x => x.GetAccountBudgetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountBudgetServiceClient client = new AccountBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -117,32 +117,32 @@ public void GetAccountBudget() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetRequest request = new GetAccountBudgetRequest { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), }; gagvr::AccountBudget expectedResponse = new gagvr::AccountBudget { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), - Id = -6774108720365892680L, - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), Status = gagve::AccountBudgetStatusEnum.Types.AccountBudgetStatus.Cancelled, - AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, + PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), ProposedStartDateTime = "proposed_start_date_time4e2f84a3", ApprovedStartDateTime = "approved_start_date_time20090a2c", ProposedEndDateTime = "proposed_end_date_time39aa28a5", - ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, ProposedSpendingLimitMicros = 6806956772888455592L, - ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, AdjustedSpendingLimitMicros = 5260592673487875057L, - AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, TotalAdjustmentsMicros = -1818058180873398375L, AmountServedMicros = -8683779131450697164L, PurchaseOrderNumber = "purchase_order_number7be7181f", Notes = "notes00b55843", - PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), }; mockGrpcClient.Setup(x => x.GetAccountBudget(request, moq::It.IsAny())).Returns(expectedResponse); AccountBudgetServiceClient client = new AccountBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -157,32 +157,32 @@ public void GetAccountBudget() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetRequest request = new GetAccountBudgetRequest { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), }; gagvr::AccountBudget expectedResponse = new gagvr::AccountBudget { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), - Id = -6774108720365892680L, - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), Status = gagve::AccountBudgetStatusEnum.Types.AccountBudgetStatus.Cancelled, - AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, + PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), ProposedStartDateTime = "proposed_start_date_time4e2f84a3", ApprovedStartDateTime = "approved_start_date_time20090a2c", ProposedEndDateTime = "proposed_end_date_time39aa28a5", - ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, ProposedSpendingLimitMicros = 6806956772888455592L, - ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, AdjustedSpendingLimitMicros = 5260592673487875057L, - AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, TotalAdjustmentsMicros = -1818058180873398375L, AmountServedMicros = -8683779131450697164L, PurchaseOrderNumber = "purchase_order_number7be7181f", Notes = "notes00b55843", - PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), }; mockGrpcClient.Setup(x => x.GetAccountBudgetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountBudgetServiceClient client = new AccountBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -199,32 +199,32 @@ public void GetAccountBudgetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetRequest request = new GetAccountBudgetRequest { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), }; gagvr::AccountBudget expectedResponse = new gagvr::AccountBudget { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), - Id = -6774108720365892680L, - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), Status = gagve::AccountBudgetStatusEnum.Types.AccountBudgetStatus.Cancelled, - AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, + PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), ProposedStartDateTime = "proposed_start_date_time4e2f84a3", ApprovedStartDateTime = "approved_start_date_time20090a2c", ProposedEndDateTime = "proposed_end_date_time39aa28a5", - ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, ProposedSpendingLimitMicros = 6806956772888455592L, - ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, AdjustedSpendingLimitMicros = 5260592673487875057L, - AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, TotalAdjustmentsMicros = -1818058180873398375L, AmountServedMicros = -8683779131450697164L, PurchaseOrderNumber = "purchase_order_number7be7181f", Notes = "notes00b55843", - PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), }; mockGrpcClient.Setup(x => x.GetAccountBudget(request, moq::It.IsAny())).Returns(expectedResponse); AccountBudgetServiceClient client = new AccountBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -239,32 +239,32 @@ public void GetAccountBudgetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAccountBudgetRequest request = new GetAccountBudgetRequest { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), }; gagvr::AccountBudget expectedResponse = new gagvr::AccountBudget { - ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), - Id = -6774108720365892680L, - BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsAccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), Status = gagve::AccountBudgetStatusEnum.Types.AccountBudgetStatus.Cancelled, - AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER]", "[ACCOUNT_BUDGET]"), + ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, + ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, + ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, + AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, + PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), + Id = -6774108720365892680L, + BillingSetupAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), + AccountBudgetName = gagvr::AccountBudgetName.FromCustomerAccountBudget("[CUSTOMER_ID]", "[ACCOUNT_BUDGET_ID]"), ProposedStartDateTime = "proposed_start_date_time4e2f84a3", ApprovedStartDateTime = "approved_start_date_time20090a2c", ProposedEndDateTime = "proposed_end_date_time39aa28a5", - ProposedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, ApprovedEndDateTime = "approved_end_date_time99d3ab5d", - ApprovedEndTimeType = gagve::TimeTypeEnum.Types.TimeType.Forever, ProposedSpendingLimitMicros = 6806956772888455592L, - ProposedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, ApprovedSpendingLimitMicros = 1674109600829643495L, - ApprovedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unknown, AdjustedSpendingLimitMicros = 5260592673487875057L, - AdjustedSpendingLimitType = gagve::SpendingLimitTypeEnum.Types.SpendingLimitType.Unspecified, TotalAdjustmentsMicros = -1818058180873398375L, AmountServedMicros = -8683779131450697164L, PurchaseOrderNumber = "purchase_order_number7be7181f", Notes = "notes00b55843", - PendingProposal = new gagvr::AccountBudget.Types.PendingAccountBudgetProposal(), }; mockGrpcClient.Setup(x => x.GetAccountBudgetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AccountBudgetServiceClient client = new AccountBudgetServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/AccountLinkServiceClientTest.g.cs b/tests/V6/Services/AccountLinkServiceClientTest.g.cs new file mode 100644 index 000000000..802d38bfe --- /dev/null +++ b/tests/V6/Services/AccountLinkServiceClientTest.g.cs @@ -0,0 +1,360 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedAccountLinkServiceClientTest + { + [Category("Smoke")][Test] + public void GetAccountLinkRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetAccountLinkRequest request = new GetAccountLinkRequest + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + }; + gagvr::AccountLink expectedResponse = new gagvr::AccountLink + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + Status = gagve::AccountLinkStatusEnum.Types.AccountLinkStatus.Enabled, + Type = gagve::LinkedAccountTypeEnum.Types.LinkedAccountType.Unspecified, + ThirdPartyAppAnalytics = new gagvr::ThirdPartyAppAnalyticsLinkIdentifier(), + DataPartner = new gagvr::DataPartnerLinkIdentifier(), + GoogleAds = new gagvr::GoogleAdsLinkIdentifier(), + AccountLinkId = 2714466098325457917L, + }; + mockGrpcClient.Setup(x => x.GetAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::AccountLink response = client.GetAccountLink(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetAccountLinkRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetAccountLinkRequest request = new GetAccountLinkRequest + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + }; + gagvr::AccountLink expectedResponse = new gagvr::AccountLink + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + Status = gagve::AccountLinkStatusEnum.Types.AccountLinkStatus.Enabled, + Type = gagve::LinkedAccountTypeEnum.Types.LinkedAccountType.Unspecified, + ThirdPartyAppAnalytics = new gagvr::ThirdPartyAppAnalyticsLinkIdentifier(), + DataPartner = new gagvr::DataPartnerLinkIdentifier(), + GoogleAds = new gagvr::GoogleAdsLinkIdentifier(), + AccountLinkId = 2714466098325457917L, + }; + mockGrpcClient.Setup(x => x.GetAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::AccountLink responseCallSettings = await client.GetAccountLinkAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::AccountLink responseCancellationToken = await client.GetAccountLinkAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetAccountLink() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetAccountLinkRequest request = new GetAccountLinkRequest + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + }; + gagvr::AccountLink expectedResponse = new gagvr::AccountLink + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + Status = gagve::AccountLinkStatusEnum.Types.AccountLinkStatus.Enabled, + Type = gagve::LinkedAccountTypeEnum.Types.LinkedAccountType.Unspecified, + ThirdPartyAppAnalytics = new gagvr::ThirdPartyAppAnalyticsLinkIdentifier(), + DataPartner = new gagvr::DataPartnerLinkIdentifier(), + GoogleAds = new gagvr::GoogleAdsLinkIdentifier(), + AccountLinkId = 2714466098325457917L, + }; + mockGrpcClient.Setup(x => x.GetAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::AccountLink response = client.GetAccountLink(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetAccountLinkAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetAccountLinkRequest request = new GetAccountLinkRequest + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + }; + gagvr::AccountLink expectedResponse = new gagvr::AccountLink + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + Status = gagve::AccountLinkStatusEnum.Types.AccountLinkStatus.Enabled, + Type = gagve::LinkedAccountTypeEnum.Types.LinkedAccountType.Unspecified, + ThirdPartyAppAnalytics = new gagvr::ThirdPartyAppAnalyticsLinkIdentifier(), + DataPartner = new gagvr::DataPartnerLinkIdentifier(), + GoogleAds = new gagvr::GoogleAdsLinkIdentifier(), + AccountLinkId = 2714466098325457917L, + }; + mockGrpcClient.Setup(x => x.GetAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::AccountLink responseCallSettings = await client.GetAccountLinkAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::AccountLink responseCancellationToken = await client.GetAccountLinkAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetAccountLinkResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetAccountLinkRequest request = new GetAccountLinkRequest + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + }; + gagvr::AccountLink expectedResponse = new gagvr::AccountLink + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + Status = gagve::AccountLinkStatusEnum.Types.AccountLinkStatus.Enabled, + Type = gagve::LinkedAccountTypeEnum.Types.LinkedAccountType.Unspecified, + ThirdPartyAppAnalytics = new gagvr::ThirdPartyAppAnalyticsLinkIdentifier(), + DataPartner = new gagvr::DataPartnerLinkIdentifier(), + GoogleAds = new gagvr::GoogleAdsLinkIdentifier(), + AccountLinkId = 2714466098325457917L, + }; + mockGrpcClient.Setup(x => x.GetAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::AccountLink response = client.GetAccountLink(request.ResourceNameAsAccountLinkName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetAccountLinkResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetAccountLinkRequest request = new GetAccountLinkRequest + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + }; + gagvr::AccountLink expectedResponse = new gagvr::AccountLink + { + ResourceNameAsAccountLinkName = gagvr::AccountLinkName.FromCustomerAccountLink("[CUSTOMER_ID]", "[ACCOUNT_LINK_ID]"), + Status = gagve::AccountLinkStatusEnum.Types.AccountLinkStatus.Enabled, + Type = gagve::LinkedAccountTypeEnum.Types.LinkedAccountType.Unspecified, + ThirdPartyAppAnalytics = new gagvr::ThirdPartyAppAnalyticsLinkIdentifier(), + DataPartner = new gagvr::DataPartnerLinkIdentifier(), + GoogleAds = new gagvr::GoogleAdsLinkIdentifier(), + AccountLinkId = 2714466098325457917L, + }; + mockGrpcClient.Setup(x => x.GetAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::AccountLink responseCallSettings = await client.GetAccountLinkAsync(request.ResourceNameAsAccountLinkName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::AccountLink responseCancellationToken = await client.GetAccountLinkAsync(request.ResourceNameAsAccountLinkName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void CreateAccountLinkRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + CreateAccountLinkRequest request = new CreateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + AccountLink = new gagvr::AccountLink(), + }; + CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + CreateAccountLinkResponse response = client.CreateAccountLink(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task CreateAccountLinkRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + CreateAccountLinkRequest request = new CreateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + AccountLink = new gagvr::AccountLink(), + }; + CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + CreateAccountLinkResponse responseCallSettings = await client.CreateAccountLinkAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + CreateAccountLinkResponse responseCancellationToken = await client.CreateAccountLinkAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void CreateAccountLink() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + CreateAccountLinkRequest request = new CreateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + AccountLink = new gagvr::AccountLink(), + }; + CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + CreateAccountLinkResponse response = client.CreateAccountLink(request.CustomerId, request.AccountLink); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task CreateAccountLinkAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + CreateAccountLinkRequest request = new CreateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + AccountLink = new gagvr::AccountLink(), + }; + CreateAccountLinkResponse expectedResponse = new CreateAccountLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + CreateAccountLinkResponse responseCallSettings = await client.CreateAccountLinkAsync(request.CustomerId, request.AccountLink, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + CreateAccountLinkResponse responseCancellationToken = await client.CreateAccountLinkAsync(request.CustomerId, request.AccountLink, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateAccountLinkRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateAccountLinkRequest request = new MutateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new AccountLinkOperation(), + PartialFailure = false, + ValidateOnly = true, + }; + MutateAccountLinkResponse expectedResponse = new MutateAccountLinkResponse + { + Result = new MutateAccountLinkResult(), + }; + mockGrpcClient.Setup(x => x.MutateAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateAccountLinkResponse response = client.MutateAccountLink(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateAccountLinkRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateAccountLinkRequest request = new MutateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new AccountLinkOperation(), + PartialFailure = false, + ValidateOnly = true, + }; + MutateAccountLinkResponse expectedResponse = new MutateAccountLinkResponse + { + Result = new MutateAccountLinkResult(), + }; + mockGrpcClient.Setup(x => x.MutateAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateAccountLinkResponse responseCallSettings = await client.MutateAccountLinkAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateAccountLinkResponse responseCancellationToken = await client.MutateAccountLinkAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateAccountLink() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateAccountLinkRequest request = new MutateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new AccountLinkOperation(), + }; + MutateAccountLinkResponse expectedResponse = new MutateAccountLinkResponse + { + Result = new MutateAccountLinkResult(), + }; + mockGrpcClient.Setup(x => x.MutateAccountLink(request, moq::It.IsAny())).Returns(expectedResponse); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateAccountLinkResponse response = client.MutateAccountLink(request.CustomerId, request.Operation); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateAccountLinkAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateAccountLinkRequest request = new MutateAccountLinkRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new AccountLinkOperation(), + }; + MutateAccountLinkResponse expectedResponse = new MutateAccountLinkResponse + { + Result = new MutateAccountLinkResult(), + }; + mockGrpcClient.Setup(x => x.MutateAccountLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + AccountLinkServiceClient client = new AccountLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateAccountLinkResponse responseCallSettings = await client.MutateAccountLinkAsync(request.CustomerId, request.Operation, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateAccountLinkResponse responseCancellationToken = await client.MutateAccountLinkAsync(request.CustomerId, request.Operation, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/AdGroupAdAssetViewServiceClientTest.g.cs b/tests/V6/Services/AdGroupAdAssetViewServiceClientTest.g.cs similarity index 81% rename from tests/V2/Services/AdGroupAdAssetViewServiceClientTest.g.cs rename to tests/V6/Services/AdGroupAdAssetViewServiceClientTest.g.cs index 6bbdf5b6e..f42f665cc 100644 --- a/tests/V2/Services/AdGroupAdAssetViewServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupAdAssetViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupAdAssetViewServiceClientTest @@ -35,16 +35,17 @@ public void GetAdGroupAdAssetViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdAssetViewRequest request = new GetAdGroupAdAssetViewRequest { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), }; gagvr::AdGroupAdAssetView expectedResponse = new gagvr::AdGroupAdAssetView { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, PolicySummary = new gagvr::AdGroupAdAssetPolicySummary(), PerformanceLabel = gagve::AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Pending, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + Enabled = true, + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAssetView(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdAssetViewServiceClient client = new AdGroupAdAssetViewServiceClientImpl(mockGrpcClient.Object, null); @@ -59,16 +60,17 @@ public void GetAdGroupAdAssetViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdAssetViewRequest request = new GetAdGroupAdAssetViewRequest { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), }; gagvr::AdGroupAdAssetView expectedResponse = new gagvr::AdGroupAdAssetView { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, PolicySummary = new gagvr::AdGroupAdAssetPolicySummary(), PerformanceLabel = gagve::AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Pending, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + Enabled = true, + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAssetViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdAssetViewServiceClient client = new AdGroupAdAssetViewServiceClientImpl(mockGrpcClient.Object, null); @@ -85,16 +87,17 @@ public void GetAdGroupAdAssetView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdAssetViewRequest request = new GetAdGroupAdAssetViewRequest { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), }; gagvr::AdGroupAdAssetView expectedResponse = new gagvr::AdGroupAdAssetView { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, PolicySummary = new gagvr::AdGroupAdAssetPolicySummary(), PerformanceLabel = gagve::AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Pending, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + Enabled = true, + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAssetView(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdAssetViewServiceClient client = new AdGroupAdAssetViewServiceClientImpl(mockGrpcClient.Object, null); @@ -109,16 +112,17 @@ public void GetAdGroupAdAssetView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdAssetViewRequest request = new GetAdGroupAdAssetViewRequest { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), }; gagvr::AdGroupAdAssetView expectedResponse = new gagvr::AdGroupAdAssetView { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, PolicySummary = new gagvr::AdGroupAdAssetPolicySummary(), PerformanceLabel = gagve::AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Pending, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + Enabled = true, + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAssetViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdAssetViewServiceClient client = new AdGroupAdAssetViewServiceClientImpl(mockGrpcClient.Object, null); @@ -135,16 +139,17 @@ public void GetAdGroupAdAssetViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdAssetViewRequest request = new GetAdGroupAdAssetViewRequest { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), }; gagvr::AdGroupAdAssetView expectedResponse = new gagvr::AdGroupAdAssetView { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, PolicySummary = new gagvr::AdGroupAdAssetPolicySummary(), PerformanceLabel = gagve::AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Pending, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + Enabled = true, + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAssetView(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdAssetViewServiceClient client = new AdGroupAdAssetViewServiceClientImpl(mockGrpcClient.Object, null); @@ -159,16 +164,17 @@ public void GetAdGroupAdAssetViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdAssetViewRequest request = new GetAdGroupAdAssetViewRequest { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), }; gagvr::AdGroupAdAssetView expectedResponse = new gagvr::AdGroupAdAssetView { - ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetView("[CUSTOMER]", "[AD_GROUP_AD_ASSET_VIEW]"), + ResourceNameAsAdGroupAdAssetViewName = gagvr::AdGroupAdAssetViewName.FromCustomerAdGroupAdAssetFieldType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, PolicySummary = new gagvr::AdGroupAdAssetPolicySummary(), PerformanceLabel = gagve::AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Pending, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + Enabled = true, + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAssetViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdAssetViewServiceClient client = new AdGroupAdAssetViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupAdLabelServiceClientTest.g.cs b/tests/V6/Services/AdGroupAdLabelServiceClientTest.g.cs similarity index 88% rename from tests/V2/Services/AdGroupAdLabelServiceClientTest.g.cs rename to tests/V6/Services/AdGroupAdLabelServiceClientTest.g.cs index b99fb8933..3dfbbf3bc 100644 --- a/tests/V2/Services/AdGroupAdLabelServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupAdLabelServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupAdLabelServiceClientTest @@ -35,13 +35,13 @@ public void GetAdGroupAdLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdLabelRequest request = new GetAdGroupAdLabelRequest { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), }; gagvr::AdGroupAdLabel expectedResponse = new gagvr::AdGroupAdLabel { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdLabelServiceClient client = new AdGroupAdLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -56,13 +56,13 @@ public void GetAdGroupAdLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdLabelRequest request = new GetAdGroupAdLabelRequest { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), }; gagvr::AdGroupAdLabel expectedResponse = new gagvr::AdGroupAdLabel { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdLabelServiceClient client = new AdGroupAdLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -79,13 +79,13 @@ public void GetAdGroupAdLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdLabelRequest request = new GetAdGroupAdLabelRequest { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), }; gagvr::AdGroupAdLabel expectedResponse = new gagvr::AdGroupAdLabel { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdLabelServiceClient client = new AdGroupAdLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -100,13 +100,13 @@ public void GetAdGroupAdLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdLabelRequest request = new GetAdGroupAdLabelRequest { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), }; gagvr::AdGroupAdLabel expectedResponse = new gagvr::AdGroupAdLabel { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdLabelServiceClient client = new AdGroupAdLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -123,13 +123,13 @@ public void GetAdGroupAdLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdLabelRequest request = new GetAdGroupAdLabelRequest { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), }; gagvr::AdGroupAdLabel expectedResponse = new gagvr::AdGroupAdLabel { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdLabelServiceClient client = new AdGroupAdLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -144,13 +144,13 @@ public void GetAdGroupAdLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdLabelRequest request = new GetAdGroupAdLabelRequest { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), }; gagvr::AdGroupAdLabel expectedResponse = new gagvr::AdGroupAdLabel { - ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER]", "[AD_GROUP_AD_LABEL]"), - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupAdLabelName = gagvr::AdGroupAdLabelName.FromCustomerAdGroupAdLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]", "[LABEL_ID]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdLabelServiceClient client = new AdGroupAdLabelServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupAdServiceClientTest.g.cs b/tests/V6/Services/AdGroupAdServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/AdGroupAdServiceClientTest.g.cs rename to tests/V6/Services/AdGroupAdServiceClientTest.g.cs index e876769f2..0ca036f58 100644 --- a/tests/V2/Services/AdGroupAdServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupAdServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupAdServiceClientTest @@ -36,16 +36,16 @@ public void GetAdGroupAdRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdRequest request = new GetAdGroupAdRequest { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), }; gagvr::AdGroupAd expectedResponse = new gagvr::AdGroupAd { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), Status = gagve::AdGroupAdStatusEnum.Types.AdGroupAdStatus.Removed, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), Ad = new gagvr::Ad(), PolicySummary = new gagvr::AdGroupAdPolicySummary(), AdStrength = gagve::AdStrengthEnum.Types.AdStrength.Excellent, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAd(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdServiceClient client = new AdGroupAdServiceClientImpl(mockGrpcClient.Object, null); @@ -60,16 +60,16 @@ public void GetAdGroupAdRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdRequest request = new GetAdGroupAdRequest { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), }; gagvr::AdGroupAd expectedResponse = new gagvr::AdGroupAd { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), Status = gagve::AdGroupAdStatusEnum.Types.AdGroupAdStatus.Removed, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), Ad = new gagvr::Ad(), PolicySummary = new gagvr::AdGroupAdPolicySummary(), AdStrength = gagve::AdStrengthEnum.Types.AdStrength.Excellent, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdServiceClient client = new AdGroupAdServiceClientImpl(mockGrpcClient.Object, null); @@ -86,16 +86,16 @@ public void GetAdGroupAd() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdRequest request = new GetAdGroupAdRequest { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), }; gagvr::AdGroupAd expectedResponse = new gagvr::AdGroupAd { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), Status = gagve::AdGroupAdStatusEnum.Types.AdGroupAdStatus.Removed, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), Ad = new gagvr::Ad(), PolicySummary = new gagvr::AdGroupAdPolicySummary(), AdStrength = gagve::AdStrengthEnum.Types.AdStrength.Excellent, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAd(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdServiceClient client = new AdGroupAdServiceClientImpl(mockGrpcClient.Object, null); @@ -110,16 +110,16 @@ public void GetAdGroupAd() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdRequest request = new GetAdGroupAdRequest { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), }; gagvr::AdGroupAd expectedResponse = new gagvr::AdGroupAd { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), Status = gagve::AdGroupAdStatusEnum.Types.AdGroupAdStatus.Removed, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), Ad = new gagvr::Ad(), PolicySummary = new gagvr::AdGroupAdPolicySummary(), AdStrength = gagve::AdStrengthEnum.Types.AdStrength.Excellent, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdServiceClient client = new AdGroupAdServiceClientImpl(mockGrpcClient.Object, null); @@ -136,16 +136,16 @@ public void GetAdGroupAdResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdRequest request = new GetAdGroupAdRequest { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), }; gagvr::AdGroupAd expectedResponse = new gagvr::AdGroupAd { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), Status = gagve::AdGroupAdStatusEnum.Types.AdGroupAdStatus.Removed, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), Ad = new gagvr::Ad(), PolicySummary = new gagvr::AdGroupAdPolicySummary(), AdStrength = gagve::AdStrengthEnum.Types.AdStrength.Excellent, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAd(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAdServiceClient client = new AdGroupAdServiceClientImpl(mockGrpcClient.Object, null); @@ -160,16 +160,16 @@ public void GetAdGroupAdResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAdRequest request = new GetAdGroupAdRequest { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), }; gagvr::AdGroupAd expectedResponse = new gagvr::AdGroupAd { - ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + ResourceNameAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), Status = gagve::AdGroupAdStatusEnum.Types.AdGroupAdStatus.Removed, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), Ad = new gagvr::Ad(), PolicySummary = new gagvr::AdGroupAdPolicySummary(), AdStrength = gagve::AdStrengthEnum.Types.AdStrength.Excellent, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAdServiceClient client = new AdGroupAdServiceClientImpl(mockGrpcClient.Object, null); @@ -193,6 +193,7 @@ public void MutateAdGroupAdsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupAdsResponse expectedResponse = new MutateAdGroupAdsResponse { @@ -222,6 +223,7 @@ public void MutateAdGroupAdsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupAdsResponse expectedResponse = new MutateAdGroupAdsResponse { diff --git a/tests/V2/Services/AdGroupAudienceViewServiceClientTest.g.cs b/tests/V6/Services/AdGroupAudienceViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/AdGroupAudienceViewServiceClientTest.g.cs rename to tests/V6/Services/AdGroupAudienceViewServiceClientTest.g.cs index 30ba888be..79d7ffdbc 100644 --- a/tests/V2/Services/AdGroupAudienceViewServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupAudienceViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupAudienceViewServiceClientTest @@ -34,11 +34,11 @@ public void GetAdGroupAudienceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupAudienceView expectedResponse = new gagvr::AdGroupAudienceView { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAudienceView(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetAdGroupAudienceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupAudienceView expectedResponse = new gagvr::AdGroupAudienceView { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAudienceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetAdGroupAudienceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupAudienceView expectedResponse = new gagvr::AdGroupAudienceView { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAudienceView(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetAdGroupAudienceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupAudienceView expectedResponse = new gagvr::AdGroupAudienceView { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAudienceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetAdGroupAudienceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupAudienceView expectedResponse = new gagvr::AdGroupAudienceView { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAudienceView(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetAdGroupAudienceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupAudienceViewRequest request = new GetAdGroupAudienceViewRequest { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupAudienceView expectedResponse = new gagvr::AdGroupAudienceView { - ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupAudienceView("[CUSTOMER]", "[AD_GROUP_AUDIENCE_VIEW]"), + ResourceNameAsAdGroupAudienceViewName = gagvr::AdGroupAudienceViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupAudienceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupAudienceViewServiceClient client = new AdGroupAudienceViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupBidModifierServiceClientTest.g.cs b/tests/V6/Services/AdGroupBidModifierServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/AdGroupBidModifierServiceClientTest.g.cs rename to tests/V6/Services/AdGroupBidModifierServiceClientTest.g.cs index ee728bdcb..eae25d187 100644 --- a/tests/V2/Services/AdGroupBidModifierServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupBidModifierServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupBidModifierServiceClientTest @@ -37,22 +37,22 @@ public void GetAdGroupBidModifierRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupBidModifierRequest request = new GetAdGroupBidModifierRequest { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupBidModifier expectedResponse = new gagvr::AdGroupBidModifier { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - CriterionId = 8584655242409302840L, - BidModifier = 1.6595195068951933E+17, + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), HotelDateSelectionType = new gagvc::HotelDateSelectionTypeInfo(), HotelAdvanceBookingWindow = new gagvc::HotelAdvanceBookingWindowInfo(), HotelLengthOfStay = new gagvc::HotelLengthOfStayInfo(), HotelCheckInDay = new gagvc::HotelCheckInDayInfo(), - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), BidModifierSource = gagve::BidModifierSourceEnum.Types.BidModifierSource.AdGroup, Device = new gagvc::DeviceInfo(), PreferredContent = new gagvc::PreferredContentInfo(), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195068951933E+17, + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupBidModifier(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupBidModifierServiceClient client = new AdGroupBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -67,22 +67,22 @@ public void GetAdGroupBidModifierRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupBidModifierRequest request = new GetAdGroupBidModifierRequest { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupBidModifier expectedResponse = new gagvr::AdGroupBidModifier { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - CriterionId = 8584655242409302840L, - BidModifier = 1.6595195068951933E+17, + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), HotelDateSelectionType = new gagvc::HotelDateSelectionTypeInfo(), HotelAdvanceBookingWindow = new gagvc::HotelAdvanceBookingWindowInfo(), HotelLengthOfStay = new gagvc::HotelLengthOfStayInfo(), HotelCheckInDay = new gagvc::HotelCheckInDayInfo(), - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), BidModifierSource = gagve::BidModifierSourceEnum.Types.BidModifierSource.AdGroup, Device = new gagvc::DeviceInfo(), PreferredContent = new gagvc::PreferredContentInfo(), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195068951933E+17, + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupBidModifierAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupBidModifierServiceClient client = new AdGroupBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -99,22 +99,22 @@ public void GetAdGroupBidModifier() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupBidModifierRequest request = new GetAdGroupBidModifierRequest { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupBidModifier expectedResponse = new gagvr::AdGroupBidModifier { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - CriterionId = 8584655242409302840L, - BidModifier = 1.6595195068951933E+17, + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), HotelDateSelectionType = new gagvc::HotelDateSelectionTypeInfo(), HotelAdvanceBookingWindow = new gagvc::HotelAdvanceBookingWindowInfo(), HotelLengthOfStay = new gagvc::HotelLengthOfStayInfo(), HotelCheckInDay = new gagvc::HotelCheckInDayInfo(), - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), BidModifierSource = gagve::BidModifierSourceEnum.Types.BidModifierSource.AdGroup, Device = new gagvc::DeviceInfo(), PreferredContent = new gagvc::PreferredContentInfo(), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195068951933E+17, + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupBidModifier(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupBidModifierServiceClient client = new AdGroupBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -129,22 +129,22 @@ public void GetAdGroupBidModifier() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupBidModifierRequest request = new GetAdGroupBidModifierRequest { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupBidModifier expectedResponse = new gagvr::AdGroupBidModifier { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - CriterionId = 8584655242409302840L, - BidModifier = 1.6595195068951933E+17, + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), HotelDateSelectionType = new gagvc::HotelDateSelectionTypeInfo(), HotelAdvanceBookingWindow = new gagvc::HotelAdvanceBookingWindowInfo(), HotelLengthOfStay = new gagvc::HotelLengthOfStayInfo(), HotelCheckInDay = new gagvc::HotelCheckInDayInfo(), - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), BidModifierSource = gagve::BidModifierSourceEnum.Types.BidModifierSource.AdGroup, Device = new gagvc::DeviceInfo(), PreferredContent = new gagvc::PreferredContentInfo(), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195068951933E+17, + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupBidModifierAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupBidModifierServiceClient client = new AdGroupBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -161,22 +161,22 @@ public void GetAdGroupBidModifierResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupBidModifierRequest request = new GetAdGroupBidModifierRequest { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupBidModifier expectedResponse = new gagvr::AdGroupBidModifier { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - CriterionId = 8584655242409302840L, - BidModifier = 1.6595195068951933E+17, + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), HotelDateSelectionType = new gagvc::HotelDateSelectionTypeInfo(), HotelAdvanceBookingWindow = new gagvc::HotelAdvanceBookingWindowInfo(), HotelLengthOfStay = new gagvc::HotelLengthOfStayInfo(), HotelCheckInDay = new gagvc::HotelCheckInDayInfo(), - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), BidModifierSource = gagve::BidModifierSourceEnum.Types.BidModifierSource.AdGroup, Device = new gagvc::DeviceInfo(), PreferredContent = new gagvc::PreferredContentInfo(), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195068951933E+17, + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupBidModifier(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupBidModifierServiceClient client = new AdGroupBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -191,22 +191,22 @@ public void GetAdGroupBidModifierResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupBidModifierRequest request = new GetAdGroupBidModifierRequest { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupBidModifier expectedResponse = new gagvr::AdGroupBidModifier { - ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - CriterionId = 8584655242409302840L, - BidModifier = 1.6595195068951933E+17, + ResourceNameAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), HotelDateSelectionType = new gagvc::HotelDateSelectionTypeInfo(), HotelAdvanceBookingWindow = new gagvc::HotelAdvanceBookingWindowInfo(), HotelLengthOfStay = new gagvc::HotelLengthOfStayInfo(), HotelCheckInDay = new gagvc::HotelCheckInDayInfo(), - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), BidModifierSource = gagve::BidModifierSourceEnum.Types.BidModifierSource.AdGroup, Device = new gagvc::DeviceInfo(), PreferredContent = new gagvc::PreferredContentInfo(), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195068951933E+17, + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupBidModifierAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupBidModifierServiceClient client = new AdGroupBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -230,6 +230,7 @@ public void MutateAdGroupBidModifiersRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupBidModifiersResponse expectedResponse = new MutateAdGroupBidModifiersResponse { @@ -259,6 +260,7 @@ public void MutateAdGroupBidModifiersRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupBidModifiersResponse expectedResponse = new MutateAdGroupBidModifiersResponse { diff --git a/tests/V2/Services/AdGroupCriterionLabelServiceClientTest.g.cs b/tests/V6/Services/AdGroupCriterionLabelServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/AdGroupCriterionLabelServiceClientTest.g.cs rename to tests/V6/Services/AdGroupCriterionLabelServiceClientTest.g.cs index 1b2662bcb..6fa6c299c 100644 --- a/tests/V2/Services/AdGroupCriterionLabelServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupCriterionLabelServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupCriterionLabelServiceClientTest @@ -35,13 +35,13 @@ public void GetAdGroupCriterionLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), }; gagvr::AdGroupCriterionLabel expectedResponse = new gagvr::AdGroupCriterionLabel { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -56,13 +56,13 @@ public void GetAdGroupCriterionLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), }; gagvr::AdGroupCriterionLabel expectedResponse = new gagvr::AdGroupCriterionLabel { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -79,13 +79,13 @@ public void GetAdGroupCriterionLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), }; gagvr::AdGroupCriterionLabel expectedResponse = new gagvr::AdGroupCriterionLabel { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -100,13 +100,13 @@ public void GetAdGroupCriterionLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), }; gagvr::AdGroupCriterionLabel expectedResponse = new gagvr::AdGroupCriterionLabel { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -123,13 +123,13 @@ public void GetAdGroupCriterionLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), }; gagvr::AdGroupCriterionLabel expectedResponse = new gagvr::AdGroupCriterionLabel { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -144,13 +144,13 @@ public void GetAdGroupCriterionLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionLabelRequest request = new GetAdGroupCriterionLabelRequest { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), }; gagvr::AdGroupCriterionLabel expectedResponse = new gagvr::AdGroupCriterionLabel { - ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER]", "[AD_GROUP_CRITERION_LABEL]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupCriterionLabelName = gagvr::AdGroupCriterionLabelName.FromCustomerAdGroupCriterionLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[LABEL_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionLabelServiceClient client = new AdGroupCriterionLabelServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupCriterionServiceClientTest.g.cs b/tests/V6/Services/AdGroupCriterionServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/AdGroupCriterionServiceClientTest.g.cs rename to tests/V6/Services/AdGroupCriterionServiceClientTest.g.cs index ac93d5005..c895ba988 100644 --- a/tests/V2/Services/AdGroupCriterionServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupCriterionServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupCriterionServiceClientTest @@ -37,43 +37,27 @@ public void GetAdGroupCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionRequest request = new GetAdGroupCriterionRequest { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupCriterion expectedResponse = new gagvr::AdGroupCriterion { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), Status = gagve::AdGroupCriterionStatusEnum.Types.AdGroupCriterionStatus.Removed, QualityInfo = new gagvr::AdGroupCriterion.Types.QualityInfo(), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), PositionEstimates = new gagvr::AdGroupCriterion.Types.PositionEstimates(), - FinalUrls = - { - "final_urls3ed0b71b", - }, - TrackingUrlTemplate = "tracking_url_template157f152a", UrlCustomParameters = { new gagvc::CustomParameter(), }, - CpcBidMicros = 7321761304249472746L, - CpmBidMicros = -6938481569984464040L, - EffectiveCpcBidMicros = -8231435192357073166L, - EffectiveCpmBidMicros = -8933191455000353270L, - EffectiveCpvBidMicros = 3707485164400289602L, EffectiveCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, EffectiveCpmBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, EffectiveCpvBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unspecified, - CpvBidMicros = 3393527949878021854L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - CriterionId = 8584655242409302840L, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), - Negative = false, ListingGroup = new gagvc::ListingGroupInfo(), - PercentCpcBidMicros = 3342096754779167220L, - EffectivePercentCpcBidMicros = 8313662352690151473L, EffectivePercentCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -83,19 +67,41 @@ public void GetAdGroupCriterionRequestObject() YoutubeChannel = new gagvc::YouTubeChannelInfo(), UserList = new gagvc::UserListInfo(), Topic = new gagvc::TopicInfo(), - BidModifier = 1.6595195068951933E+17, UserInterest = new gagvc::UserInterestInfo(), Webpage = new gagvc::WebpageInfo(), AppPaymentModel = new gagvc::AppPaymentModelInfo(), CustomAffinity = new gagvc::CustomAffinityInfo(), CustomIntent = new gagvc::CustomIntentInfo(), - FinalUrlSuffix = "final_url_suffix046ed37a", + SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, + ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + CriterionId = 8584655242409302840L, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Negative = false, + DisapprovalReasons = + { + "disapproval_reasons9e26b1a0", + }, + BidModifier = 1.6595195068951933E+17, + CpcBidMicros = 7321761304249472746L, + CpmBidMicros = -6938481569984464040L, + CpvBidMicros = 3393527949878021854L, + PercentCpcBidMicros = 3342096754779167220L, + EffectiveCpcBidMicros = -8231435192357073166L, + EffectiveCpmBidMicros = -8933191455000353270L, + EffectiveCpvBidMicros = 3707485164400289602L, + EffectivePercentCpcBidMicros = 8313662352690151473L, + FinalUrls = + { + "final_urls3ed0b71b", + }, FinalMobileUrls = { "final_mobile_urlsf4131aa0", }, - SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, - ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + FinalUrlSuffix = "final_url_suffix046ed37a", + TrackingUrlTemplate = "tracking_url_template157f152a", + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterion(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionServiceClient client = new AdGroupCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -110,43 +116,27 @@ public void GetAdGroupCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionRequest request = new GetAdGroupCriterionRequest { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupCriterion expectedResponse = new gagvr::AdGroupCriterion { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), Status = gagve::AdGroupCriterionStatusEnum.Types.AdGroupCriterionStatus.Removed, QualityInfo = new gagvr::AdGroupCriterion.Types.QualityInfo(), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), PositionEstimates = new gagvr::AdGroupCriterion.Types.PositionEstimates(), - FinalUrls = - { - "final_urls3ed0b71b", - }, - TrackingUrlTemplate = "tracking_url_template157f152a", UrlCustomParameters = { new gagvc::CustomParameter(), }, - CpcBidMicros = 7321761304249472746L, - CpmBidMicros = -6938481569984464040L, - EffectiveCpcBidMicros = -8231435192357073166L, - EffectiveCpmBidMicros = -8933191455000353270L, - EffectiveCpvBidMicros = 3707485164400289602L, EffectiveCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, EffectiveCpmBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, EffectiveCpvBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unspecified, - CpvBidMicros = 3393527949878021854L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - CriterionId = 8584655242409302840L, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), - Negative = false, ListingGroup = new gagvc::ListingGroupInfo(), - PercentCpcBidMicros = 3342096754779167220L, - EffectivePercentCpcBidMicros = 8313662352690151473L, EffectivePercentCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -156,19 +146,41 @@ public void GetAdGroupCriterionRequestObject() YoutubeChannel = new gagvc::YouTubeChannelInfo(), UserList = new gagvc::UserListInfo(), Topic = new gagvc::TopicInfo(), - BidModifier = 1.6595195068951933E+17, UserInterest = new gagvc::UserInterestInfo(), Webpage = new gagvc::WebpageInfo(), AppPaymentModel = new gagvc::AppPaymentModelInfo(), CustomAffinity = new gagvc::CustomAffinityInfo(), CustomIntent = new gagvc::CustomIntentInfo(), - FinalUrlSuffix = "final_url_suffix046ed37a", + SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, + ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + CriterionId = 8584655242409302840L, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Negative = false, + DisapprovalReasons = + { + "disapproval_reasons9e26b1a0", + }, + BidModifier = 1.6595195068951933E+17, + CpcBidMicros = 7321761304249472746L, + CpmBidMicros = -6938481569984464040L, + CpvBidMicros = 3393527949878021854L, + PercentCpcBidMicros = 3342096754779167220L, + EffectiveCpcBidMicros = -8231435192357073166L, + EffectiveCpmBidMicros = -8933191455000353270L, + EffectiveCpvBidMicros = 3707485164400289602L, + EffectivePercentCpcBidMicros = 8313662352690151473L, + FinalUrls = + { + "final_urls3ed0b71b", + }, FinalMobileUrls = { "final_mobile_urlsf4131aa0", }, - SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, - ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + FinalUrlSuffix = "final_url_suffix046ed37a", + TrackingUrlTemplate = "tracking_url_template157f152a", + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionServiceClient client = new AdGroupCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -185,43 +197,27 @@ public void GetAdGroupCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionRequest request = new GetAdGroupCriterionRequest { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupCriterion expectedResponse = new gagvr::AdGroupCriterion { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), Status = gagve::AdGroupCriterionStatusEnum.Types.AdGroupCriterionStatus.Removed, QualityInfo = new gagvr::AdGroupCriterion.Types.QualityInfo(), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), PositionEstimates = new gagvr::AdGroupCriterion.Types.PositionEstimates(), - FinalUrls = - { - "final_urls3ed0b71b", - }, - TrackingUrlTemplate = "tracking_url_template157f152a", UrlCustomParameters = { new gagvc::CustomParameter(), }, - CpcBidMicros = 7321761304249472746L, - CpmBidMicros = -6938481569984464040L, - EffectiveCpcBidMicros = -8231435192357073166L, - EffectiveCpmBidMicros = -8933191455000353270L, - EffectiveCpvBidMicros = 3707485164400289602L, EffectiveCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, EffectiveCpmBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, EffectiveCpvBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unspecified, - CpvBidMicros = 3393527949878021854L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - CriterionId = 8584655242409302840L, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), - Negative = false, ListingGroup = new gagvc::ListingGroupInfo(), - PercentCpcBidMicros = 3342096754779167220L, - EffectivePercentCpcBidMicros = 8313662352690151473L, EffectivePercentCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -231,19 +227,41 @@ public void GetAdGroupCriterion() YoutubeChannel = new gagvc::YouTubeChannelInfo(), UserList = new gagvc::UserListInfo(), Topic = new gagvc::TopicInfo(), - BidModifier = 1.6595195068951933E+17, UserInterest = new gagvc::UserInterestInfo(), Webpage = new gagvc::WebpageInfo(), AppPaymentModel = new gagvc::AppPaymentModelInfo(), CustomAffinity = new gagvc::CustomAffinityInfo(), CustomIntent = new gagvc::CustomIntentInfo(), - FinalUrlSuffix = "final_url_suffix046ed37a", + SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, + ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + CriterionId = 8584655242409302840L, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Negative = false, + DisapprovalReasons = + { + "disapproval_reasons9e26b1a0", + }, + BidModifier = 1.6595195068951933E+17, + CpcBidMicros = 7321761304249472746L, + CpmBidMicros = -6938481569984464040L, + CpvBidMicros = 3393527949878021854L, + PercentCpcBidMicros = 3342096754779167220L, + EffectiveCpcBidMicros = -8231435192357073166L, + EffectiveCpmBidMicros = -8933191455000353270L, + EffectiveCpvBidMicros = 3707485164400289602L, + EffectivePercentCpcBidMicros = 8313662352690151473L, + FinalUrls = + { + "final_urls3ed0b71b", + }, FinalMobileUrls = { "final_mobile_urlsf4131aa0", }, - SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, - ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + FinalUrlSuffix = "final_url_suffix046ed37a", + TrackingUrlTemplate = "tracking_url_template157f152a", + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterion(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionServiceClient client = new AdGroupCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -258,43 +276,27 @@ public void GetAdGroupCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionRequest request = new GetAdGroupCriterionRequest { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupCriterion expectedResponse = new gagvr::AdGroupCriterion { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), Status = gagve::AdGroupCriterionStatusEnum.Types.AdGroupCriterionStatus.Removed, QualityInfo = new gagvr::AdGroupCriterion.Types.QualityInfo(), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), PositionEstimates = new gagvr::AdGroupCriterion.Types.PositionEstimates(), - FinalUrls = - { - "final_urls3ed0b71b", - }, - TrackingUrlTemplate = "tracking_url_template157f152a", UrlCustomParameters = { new gagvc::CustomParameter(), }, - CpcBidMicros = 7321761304249472746L, - CpmBidMicros = -6938481569984464040L, - EffectiveCpcBidMicros = -8231435192357073166L, - EffectiveCpmBidMicros = -8933191455000353270L, - EffectiveCpvBidMicros = 3707485164400289602L, EffectiveCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, EffectiveCpmBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, EffectiveCpvBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unspecified, - CpvBidMicros = 3393527949878021854L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - CriterionId = 8584655242409302840L, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), - Negative = false, ListingGroup = new gagvc::ListingGroupInfo(), - PercentCpcBidMicros = 3342096754779167220L, - EffectivePercentCpcBidMicros = 8313662352690151473L, EffectivePercentCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -304,19 +306,41 @@ public void GetAdGroupCriterion() YoutubeChannel = new gagvc::YouTubeChannelInfo(), UserList = new gagvc::UserListInfo(), Topic = new gagvc::TopicInfo(), - BidModifier = 1.6595195068951933E+17, UserInterest = new gagvc::UserInterestInfo(), Webpage = new gagvc::WebpageInfo(), AppPaymentModel = new gagvc::AppPaymentModelInfo(), CustomAffinity = new gagvc::CustomAffinityInfo(), CustomIntent = new gagvc::CustomIntentInfo(), - FinalUrlSuffix = "final_url_suffix046ed37a", + SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, + ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + CriterionId = 8584655242409302840L, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Negative = false, + DisapprovalReasons = + { + "disapproval_reasons9e26b1a0", + }, + BidModifier = 1.6595195068951933E+17, + CpcBidMicros = 7321761304249472746L, + CpmBidMicros = -6938481569984464040L, + CpvBidMicros = 3393527949878021854L, + PercentCpcBidMicros = 3342096754779167220L, + EffectiveCpcBidMicros = -8231435192357073166L, + EffectiveCpmBidMicros = -8933191455000353270L, + EffectiveCpvBidMicros = 3707485164400289602L, + EffectivePercentCpcBidMicros = 8313662352690151473L, + FinalUrls = + { + "final_urls3ed0b71b", + }, FinalMobileUrls = { "final_mobile_urlsf4131aa0", }, - SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, - ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + FinalUrlSuffix = "final_url_suffix046ed37a", + TrackingUrlTemplate = "tracking_url_template157f152a", + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionServiceClient client = new AdGroupCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -333,43 +357,27 @@ public void GetAdGroupCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionRequest request = new GetAdGroupCriterionRequest { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupCriterion expectedResponse = new gagvr::AdGroupCriterion { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), Status = gagve::AdGroupCriterionStatusEnum.Types.AdGroupCriterionStatus.Removed, QualityInfo = new gagvr::AdGroupCriterion.Types.QualityInfo(), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), PositionEstimates = new gagvr::AdGroupCriterion.Types.PositionEstimates(), - FinalUrls = - { - "final_urls3ed0b71b", - }, - TrackingUrlTemplate = "tracking_url_template157f152a", UrlCustomParameters = { new gagvc::CustomParameter(), }, - CpcBidMicros = 7321761304249472746L, - CpmBidMicros = -6938481569984464040L, - EffectiveCpcBidMicros = -8231435192357073166L, - EffectiveCpmBidMicros = -8933191455000353270L, - EffectiveCpvBidMicros = 3707485164400289602L, EffectiveCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, EffectiveCpmBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, EffectiveCpvBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unspecified, - CpvBidMicros = 3393527949878021854L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - CriterionId = 8584655242409302840L, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), - Negative = false, ListingGroup = new gagvc::ListingGroupInfo(), - PercentCpcBidMicros = 3342096754779167220L, - EffectivePercentCpcBidMicros = 8313662352690151473L, EffectivePercentCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -379,19 +387,41 @@ public void GetAdGroupCriterionResourceNames() YoutubeChannel = new gagvc::YouTubeChannelInfo(), UserList = new gagvc::UserListInfo(), Topic = new gagvc::TopicInfo(), - BidModifier = 1.6595195068951933E+17, UserInterest = new gagvc::UserInterestInfo(), Webpage = new gagvc::WebpageInfo(), AppPaymentModel = new gagvc::AppPaymentModelInfo(), CustomAffinity = new gagvc::CustomAffinityInfo(), CustomIntent = new gagvc::CustomIntentInfo(), - FinalUrlSuffix = "final_url_suffix046ed37a", + SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, + ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + CriterionId = 8584655242409302840L, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Negative = false, + DisapprovalReasons = + { + "disapproval_reasons9e26b1a0", + }, + BidModifier = 1.6595195068951933E+17, + CpcBidMicros = 7321761304249472746L, + CpmBidMicros = -6938481569984464040L, + CpvBidMicros = 3393527949878021854L, + PercentCpcBidMicros = 3342096754779167220L, + EffectiveCpcBidMicros = -8231435192357073166L, + EffectiveCpmBidMicros = -8933191455000353270L, + EffectiveCpvBidMicros = 3707485164400289602L, + EffectivePercentCpcBidMicros = 8313662352690151473L, + FinalUrls = + { + "final_urls3ed0b71b", + }, FinalMobileUrls = { "final_mobile_urlsf4131aa0", }, - SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, - ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + FinalUrlSuffix = "final_url_suffix046ed37a", + TrackingUrlTemplate = "tracking_url_template157f152a", + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterion(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionServiceClient client = new AdGroupCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -406,43 +436,27 @@ public void GetAdGroupCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionRequest request = new GetAdGroupCriterionRequest { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AdGroupCriterion expectedResponse = new gagvr::AdGroupCriterion { - ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), Status = gagve::AdGroupCriterionStatusEnum.Types.AdGroupCriterionStatus.Removed, QualityInfo = new gagvr::AdGroupCriterion.Types.QualityInfo(), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), PositionEstimates = new gagvr::AdGroupCriterion.Types.PositionEstimates(), - FinalUrls = - { - "final_urls3ed0b71b", - }, - TrackingUrlTemplate = "tracking_url_template157f152a", UrlCustomParameters = { new gagvc::CustomParameter(), }, - CpcBidMicros = 7321761304249472746L, - CpmBidMicros = -6938481569984464040L, - EffectiveCpcBidMicros = -8231435192357073166L, - EffectiveCpmBidMicros = -8933191455000353270L, - EffectiveCpvBidMicros = 3707485164400289602L, EffectiveCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, EffectiveCpmBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, EffectiveCpvBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unspecified, - CpvBidMicros = 3393527949878021854L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - CriterionId = 8584655242409302840L, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), - Negative = false, ListingGroup = new gagvc::ListingGroupInfo(), - PercentCpcBidMicros = 3342096754779167220L, - EffectivePercentCpcBidMicros = 8313662352690151473L, EffectivePercentCpcBidSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroup, AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -452,19 +466,41 @@ public void GetAdGroupCriterionResourceNames() YoutubeChannel = new gagvc::YouTubeChannelInfo(), UserList = new gagvc::UserListInfo(), Topic = new gagvc::TopicInfo(), - BidModifier = 1.6595195068951933E+17, UserInterest = new gagvc::UserInterestInfo(), Webpage = new gagvc::WebpageInfo(), AppPaymentModel = new gagvc::AppPaymentModelInfo(), CustomAffinity = new gagvc::CustomAffinityInfo(), CustomIntent = new gagvc::CustomIntentInfo(), - FinalUrlSuffix = "final_url_suffix046ed37a", + SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, + ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + CriterionId = 8584655242409302840L, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Negative = false, + DisapprovalReasons = + { + "disapproval_reasons9e26b1a0", + }, + BidModifier = 1.6595195068951933E+17, + CpcBidMicros = 7321761304249472746L, + CpmBidMicros = -6938481569984464040L, + CpvBidMicros = 3393527949878021854L, + PercentCpcBidMicros = 3342096754779167220L, + EffectiveCpcBidMicros = -8231435192357073166L, + EffectiveCpmBidMicros = -8933191455000353270L, + EffectiveCpvBidMicros = 3707485164400289602L, + EffectivePercentCpcBidMicros = 8313662352690151473L, + FinalUrls = + { + "final_urls3ed0b71b", + }, FinalMobileUrls = { "final_mobile_urlsf4131aa0", }, - SystemServingStatus = gagve::CriterionSystemServingStatusEnum.Types.CriterionSystemServingStatus.Unknown, - ApprovalStatus = gagve::AdGroupCriterionApprovalStatusEnum.Types.AdGroupCriterionApprovalStatus.Approved, + FinalUrlSuffix = "final_url_suffix046ed37a", + TrackingUrlTemplate = "tracking_url_template157f152a", + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionServiceClient client = new AdGroupCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -488,6 +524,7 @@ public void MutateAdGroupCriteriaRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupCriteriaResponse expectedResponse = new MutateAdGroupCriteriaResponse { @@ -517,6 +554,7 @@ public void MutateAdGroupCriteriaRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupCriteriaResponse expectedResponse = new MutateAdGroupCriteriaResponse { diff --git a/tests/V2/Services/AdGroupCriterionSimulationServiceClientTest.g.cs b/tests/V6/Services/AdGroupCriterionSimulationServiceClientTest.g.cs similarity index 82% rename from tests/V2/Services/AdGroupCriterionSimulationServiceClientTest.g.cs rename to tests/V6/Services/AdGroupCriterionSimulationServiceClientTest.g.cs index 445bbcde2..15333b6d0 100644 --- a/tests/V2/Services/AdGroupCriterionSimulationServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupCriterionSimulationServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupCriterionSimulationServiceClientTest @@ -36,18 +36,19 @@ public void GetAdGroupCriterionSimulationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionSimulationRequest request = new GetAdGroupCriterionSimulationRequest { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupCriterionSimulation expectedResponse = new gagvr::AdGroupCriterionSimulation { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + CpcBidPointList = new gagvc::CpcBidSimulationPointList(), AdGroupId = -2072405675042603230L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - CpcBidPointList = new gagvc::CpcBidSimulationPointList(), + PercentCpcBidPointList = new gagvc::PercentCpcBidSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionSimulation(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionSimulationServiceClient client = new AdGroupCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -62,18 +63,19 @@ public void GetAdGroupCriterionSimulationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionSimulationRequest request = new GetAdGroupCriterionSimulationRequest { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupCriterionSimulation expectedResponse = new gagvr::AdGroupCriterionSimulation { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + CpcBidPointList = new gagvc::CpcBidSimulationPointList(), AdGroupId = -2072405675042603230L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - CpcBidPointList = new gagvc::CpcBidSimulationPointList(), + PercentCpcBidPointList = new gagvc::PercentCpcBidSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionSimulationServiceClient client = new AdGroupCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -90,18 +92,19 @@ public void GetAdGroupCriterionSimulation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionSimulationRequest request = new GetAdGroupCriterionSimulationRequest { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupCriterionSimulation expectedResponse = new gagvr::AdGroupCriterionSimulation { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + CpcBidPointList = new gagvc::CpcBidSimulationPointList(), AdGroupId = -2072405675042603230L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - CpcBidPointList = new gagvc::CpcBidSimulationPointList(), + PercentCpcBidPointList = new gagvc::PercentCpcBidSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionSimulation(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionSimulationServiceClient client = new AdGroupCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -116,18 +119,19 @@ public void GetAdGroupCriterionSimulation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionSimulationRequest request = new GetAdGroupCriterionSimulationRequest { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupCriterionSimulation expectedResponse = new gagvr::AdGroupCriterionSimulation { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + CpcBidPointList = new gagvc::CpcBidSimulationPointList(), AdGroupId = -2072405675042603230L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - CpcBidPointList = new gagvc::CpcBidSimulationPointList(), + PercentCpcBidPointList = new gagvc::PercentCpcBidSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionSimulationServiceClient client = new AdGroupCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -144,18 +148,19 @@ public void GetAdGroupCriterionSimulationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionSimulationRequest request = new GetAdGroupCriterionSimulationRequest { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupCriterionSimulation expectedResponse = new gagvr::AdGroupCriterionSimulation { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + CpcBidPointList = new gagvc::CpcBidSimulationPointList(), AdGroupId = -2072405675042603230L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - CpcBidPointList = new gagvc::CpcBidSimulationPointList(), + PercentCpcBidPointList = new gagvc::PercentCpcBidSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionSimulation(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupCriterionSimulationServiceClient client = new AdGroupCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -170,18 +175,19 @@ public void GetAdGroupCriterionSimulationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupCriterionSimulationRequest request = new GetAdGroupCriterionSimulationRequest { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupCriterionSimulation expectedResponse = new gagvr::AdGroupCriterionSimulation { - ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionSimulation("[CUSTOMER]", "[AD_GROUP_CRITERION_SIMULATION]"), + ResourceNameAsAdGroupCriterionSimulationName = gagvr::AdGroupCriterionSimulationName.FromCustomerAdGroupCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + CpcBidPointList = new gagvc::CpcBidSimulationPointList(), AdGroupId = -2072405675042603230L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - CpcBidPointList = new gagvc::CpcBidSimulationPointList(), + PercentCpcBidPointList = new gagvc::PercentCpcBidSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetAdGroupCriterionSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupCriterionSimulationServiceClient client = new AdGroupCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupExtensionSettingServiceClientTest.g.cs b/tests/V6/Services/AdGroupExtensionSettingServiceClientTest.g.cs similarity index 88% rename from tests/V2/Services/AdGroupExtensionSettingServiceClientTest.g.cs rename to tests/V6/Services/AdGroupExtensionSettingServiceClientTest.g.cs index 6f1348311..6ee3c8f72 100644 --- a/tests/V2/Services/AdGroupExtensionSettingServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupExtensionSettingServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupExtensionSettingServiceClientTest @@ -36,18 +36,18 @@ public void GetAdGroupExtensionSettingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupExtensionSettingRequest request = new GetAdGroupExtensionSettingRequest { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), }; gagvr::AdGroupExtensionSetting expectedResponse = new gagvr::AdGroupExtensionSetting { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetAdGroupExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupExtensionSettingServiceClient client = new AdGroupExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -62,18 +62,18 @@ public void GetAdGroupExtensionSettingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupExtensionSettingRequest request = new GetAdGroupExtensionSettingRequest { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), }; gagvr::AdGroupExtensionSetting expectedResponse = new gagvr::AdGroupExtensionSetting { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetAdGroupExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupExtensionSettingServiceClient client = new AdGroupExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -90,18 +90,18 @@ public void GetAdGroupExtensionSetting() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupExtensionSettingRequest request = new GetAdGroupExtensionSettingRequest { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), }; gagvr::AdGroupExtensionSetting expectedResponse = new gagvr::AdGroupExtensionSetting { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetAdGroupExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupExtensionSettingServiceClient client = new AdGroupExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -116,18 +116,18 @@ public void GetAdGroupExtensionSetting() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupExtensionSettingRequest request = new GetAdGroupExtensionSettingRequest { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), }; gagvr::AdGroupExtensionSetting expectedResponse = new gagvr::AdGroupExtensionSetting { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetAdGroupExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupExtensionSettingServiceClient client = new AdGroupExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -144,18 +144,18 @@ public void GetAdGroupExtensionSettingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupExtensionSettingRequest request = new GetAdGroupExtensionSettingRequest { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), }; gagvr::AdGroupExtensionSetting expectedResponse = new gagvr::AdGroupExtensionSetting { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetAdGroupExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupExtensionSettingServiceClient client = new AdGroupExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -170,18 +170,18 @@ public void GetAdGroupExtensionSettingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupExtensionSettingRequest request = new GetAdGroupExtensionSettingRequest { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), }; gagvr::AdGroupExtensionSetting expectedResponse = new gagvr::AdGroupExtensionSetting { - ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionSetting("[CUSTOMER]", "[AD_GROUP_EXTENSION_SETTING]"), + ResourceNameAsAdGroupExtensionSettingName = gagvr::AdGroupExtensionSettingName.FromCustomerAdGroupExtensionType("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetAdGroupExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupExtensionSettingServiceClient client = new AdGroupExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupFeedServiceClientTest.g.cs b/tests/V6/Services/AdGroupFeedServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/AdGroupFeedServiceClientTest.g.cs rename to tests/V6/Services/AdGroupFeedServiceClientTest.g.cs index 3d61a63e4..50692c3de 100644 --- a/tests/V2/Services/AdGroupFeedServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupFeedServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupFeedServiceClientTest @@ -37,19 +37,19 @@ public void GetAdGroupFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupFeedRequest request = new GetAdGroupFeedRequest { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), }; gagvr::AdGroupFeed expectedResponse = new gagvr::AdGroupFeed { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupFeed(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupFeedServiceClient client = new AdGroupFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -64,19 +64,19 @@ public void GetAdGroupFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupFeedRequest request = new GetAdGroupFeedRequest { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), }; gagvr::AdGroupFeed expectedResponse = new gagvr::AdGroupFeed { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupFeedServiceClient client = new AdGroupFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -93,19 +93,19 @@ public void GetAdGroupFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupFeedRequest request = new GetAdGroupFeedRequest { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), }; gagvr::AdGroupFeed expectedResponse = new gagvr::AdGroupFeed { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupFeed(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupFeedServiceClient client = new AdGroupFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -120,19 +120,19 @@ public void GetAdGroupFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupFeedRequest request = new GetAdGroupFeedRequest { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), }; gagvr::AdGroupFeed expectedResponse = new gagvr::AdGroupFeed { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupFeedServiceClient client = new AdGroupFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -149,19 +149,19 @@ public void GetAdGroupFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupFeedRequest request = new GetAdGroupFeedRequest { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), }; gagvr::AdGroupFeed expectedResponse = new gagvr::AdGroupFeed { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupFeed(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupFeedServiceClient client = new AdGroupFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -176,19 +176,19 @@ public void GetAdGroupFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupFeedRequest request = new GetAdGroupFeedRequest { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), }; gagvr::AdGroupFeed expectedResponse = new gagvr::AdGroupFeed { - ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupFeedServiceClient client = new AdGroupFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -212,6 +212,7 @@ public void MutateAdGroupFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupFeedsResponse expectedResponse = new MutateAdGroupFeedsResponse { @@ -241,6 +242,7 @@ public void MutateAdGroupFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupFeedsResponse expectedResponse = new MutateAdGroupFeedsResponse { diff --git a/tests/V2/Services/AdGroupLabelServiceClientTest.g.cs b/tests/V6/Services/AdGroupLabelServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/AdGroupLabelServiceClientTest.g.cs rename to tests/V6/Services/AdGroupLabelServiceClientTest.g.cs index ed3a9a693..093cde4c4 100644 --- a/tests/V2/Services/AdGroupLabelServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupLabelServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupLabelServiceClientTest @@ -35,13 +35,13 @@ public void GetAdGroupLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupLabelRequest request = new GetAdGroupLabelRequest { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }; gagvr::AdGroupLabel expectedResponse = new gagvr::AdGroupLabel { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupLabelServiceClient client = new AdGroupLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -56,13 +56,13 @@ public void GetAdGroupLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupLabelRequest request = new GetAdGroupLabelRequest { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }; gagvr::AdGroupLabel expectedResponse = new gagvr::AdGroupLabel { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupLabelServiceClient client = new AdGroupLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -79,13 +79,13 @@ public void GetAdGroupLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupLabelRequest request = new GetAdGroupLabelRequest { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }; gagvr::AdGroupLabel expectedResponse = new gagvr::AdGroupLabel { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupLabelServiceClient client = new AdGroupLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -100,13 +100,13 @@ public void GetAdGroupLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupLabelRequest request = new GetAdGroupLabelRequest { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }; gagvr::AdGroupLabel expectedResponse = new gagvr::AdGroupLabel { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupLabelServiceClient client = new AdGroupLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -123,13 +123,13 @@ public void GetAdGroupLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupLabelRequest request = new GetAdGroupLabelRequest { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }; gagvr::AdGroupLabel expectedResponse = new gagvr::AdGroupLabel { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupLabel(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupLabelServiceClient client = new AdGroupLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -144,13 +144,13 @@ public void GetAdGroupLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupLabelRequest request = new GetAdGroupLabelRequest { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }; gagvr::AdGroupLabel expectedResponse = new gagvr::AdGroupLabel { - ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsAdGroupLabelName = gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetAdGroupLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupLabelServiceClient client = new AdGroupLabelServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdGroupServiceClientTest.g.cs b/tests/V6/Services/AdGroupServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/AdGroupServiceClientTest.g.cs rename to tests/V6/Services/AdGroupServiceClientTest.g.cs index af01487e7..5fb935bb2 100644 --- a/tests/V2/Services/AdGroupServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupServiceClientTest @@ -37,41 +37,41 @@ public void GetAdGroupRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupRequest request = new GetAdGroupRequest { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; gagvr::AdGroup expectedResponse = new gagvr::AdGroup { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - Id = -6774108720365892680L, - AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), Status = gagve::AdGroupStatusEnum.Types.AdGroupStatus.Removed, UrlCustomParameters = { new gagvc::CustomParameter(), }, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoOutstream, + Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoBumper, + ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), + AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, + DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, + TargetingSetting = new gagvc::TargetingSetting(), + EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, + EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, + Id = -6774108720365892680L, + AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), TrackingUrlTemplate = "tracking_url_template157f152a", + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CpcBidMicros = 7321761304249472746L, CpmBidMicros = -6938481569984464040L, + TargetCpaMicros = 5263516020894046876L, CpvBidMicros = 3393527949878021854L, - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + TargetCpmMicros = 2683842186664132327L, + TargetRoas = 1.0830159587289216E+18, PercentCpcBidMicros = 3342096754779167220L, - ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), - AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, - DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, FinalUrlSuffix = "final_url_suffix046ed37a", - TargetingSetting = new gagvc::TargetingSetting(), - TargetCpmMicros = 2683842186664132327L, - TargetCpaMicros = 5263516020894046876L, EffectiveTargetCpaMicros = 9173558632194584770L, - EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, - TargetRoas = 1.0830159587289216E+18, EffectiveTargetRoas = -5.789428044530098E+17, - EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, LabelsAsAdGroupLabelNames = { - gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }, }; mockGrpcClient.Setup(x => x.GetAdGroup(request, moq::It.IsAny())).Returns(expectedResponse); @@ -87,41 +87,41 @@ public void GetAdGroupRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupRequest request = new GetAdGroupRequest { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; gagvr::AdGroup expectedResponse = new gagvr::AdGroup { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - Id = -6774108720365892680L, - AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), Status = gagve::AdGroupStatusEnum.Types.AdGroupStatus.Removed, UrlCustomParameters = { new gagvc::CustomParameter(), }, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoOutstream, + Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoBumper, + ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), + AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, + DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, + TargetingSetting = new gagvc::TargetingSetting(), + EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, + EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, + Id = -6774108720365892680L, + AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), TrackingUrlTemplate = "tracking_url_template157f152a", + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CpcBidMicros = 7321761304249472746L, CpmBidMicros = -6938481569984464040L, + TargetCpaMicros = 5263516020894046876L, CpvBidMicros = 3393527949878021854L, - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + TargetCpmMicros = 2683842186664132327L, + TargetRoas = 1.0830159587289216E+18, PercentCpcBidMicros = 3342096754779167220L, - ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), - AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, - DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, FinalUrlSuffix = "final_url_suffix046ed37a", - TargetingSetting = new gagvc::TargetingSetting(), - TargetCpmMicros = 2683842186664132327L, - TargetCpaMicros = 5263516020894046876L, EffectiveTargetCpaMicros = 9173558632194584770L, - EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, - TargetRoas = 1.0830159587289216E+18, EffectiveTargetRoas = -5.789428044530098E+17, - EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, LabelsAsAdGroupLabelNames = { - gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }, }; mockGrpcClient.Setup(x => x.GetAdGroupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -139,41 +139,41 @@ public void GetAdGroup() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupRequest request = new GetAdGroupRequest { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; gagvr::AdGroup expectedResponse = new gagvr::AdGroup { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - Id = -6774108720365892680L, - AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), Status = gagve::AdGroupStatusEnum.Types.AdGroupStatus.Removed, UrlCustomParameters = { new gagvc::CustomParameter(), }, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoOutstream, + Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoBumper, + ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), + AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, + DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, + TargetingSetting = new gagvc::TargetingSetting(), + EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, + EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, + Id = -6774108720365892680L, + AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), TrackingUrlTemplate = "tracking_url_template157f152a", + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CpcBidMicros = 7321761304249472746L, CpmBidMicros = -6938481569984464040L, + TargetCpaMicros = 5263516020894046876L, CpvBidMicros = 3393527949878021854L, - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + TargetCpmMicros = 2683842186664132327L, + TargetRoas = 1.0830159587289216E+18, PercentCpcBidMicros = 3342096754779167220L, - ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), - AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, - DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, FinalUrlSuffix = "final_url_suffix046ed37a", - TargetingSetting = new gagvc::TargetingSetting(), - TargetCpmMicros = 2683842186664132327L, - TargetCpaMicros = 5263516020894046876L, EffectiveTargetCpaMicros = 9173558632194584770L, - EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, - TargetRoas = 1.0830159587289216E+18, EffectiveTargetRoas = -5.789428044530098E+17, - EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, LabelsAsAdGroupLabelNames = { - gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }, }; mockGrpcClient.Setup(x => x.GetAdGroup(request, moq::It.IsAny())).Returns(expectedResponse); @@ -189,41 +189,41 @@ public void GetAdGroup() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupRequest request = new GetAdGroupRequest { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; gagvr::AdGroup expectedResponse = new gagvr::AdGroup { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - Id = -6774108720365892680L, - AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), Status = gagve::AdGroupStatusEnum.Types.AdGroupStatus.Removed, UrlCustomParameters = { new gagvc::CustomParameter(), }, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoOutstream, + Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoBumper, + ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), + AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, + DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, + TargetingSetting = new gagvc::TargetingSetting(), + EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, + EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, + Id = -6774108720365892680L, + AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), TrackingUrlTemplate = "tracking_url_template157f152a", + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CpcBidMicros = 7321761304249472746L, CpmBidMicros = -6938481569984464040L, + TargetCpaMicros = 5263516020894046876L, CpvBidMicros = 3393527949878021854L, - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + TargetCpmMicros = 2683842186664132327L, + TargetRoas = 1.0830159587289216E+18, PercentCpcBidMicros = 3342096754779167220L, - ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), - AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, - DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, FinalUrlSuffix = "final_url_suffix046ed37a", - TargetingSetting = new gagvc::TargetingSetting(), - TargetCpmMicros = 2683842186664132327L, - TargetCpaMicros = 5263516020894046876L, EffectiveTargetCpaMicros = 9173558632194584770L, - EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, - TargetRoas = 1.0830159587289216E+18, EffectiveTargetRoas = -5.789428044530098E+17, - EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, LabelsAsAdGroupLabelNames = { - gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }, }; mockGrpcClient.Setup(x => x.GetAdGroupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -241,41 +241,41 @@ public void GetAdGroupResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupRequest request = new GetAdGroupRequest { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; gagvr::AdGroup expectedResponse = new gagvr::AdGroup { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - Id = -6774108720365892680L, - AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), Status = gagve::AdGroupStatusEnum.Types.AdGroupStatus.Removed, UrlCustomParameters = { new gagvc::CustomParameter(), }, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoOutstream, + Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoBumper, + ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), + AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, + DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, + TargetingSetting = new gagvc::TargetingSetting(), + EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, + EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, + Id = -6774108720365892680L, + AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), TrackingUrlTemplate = "tracking_url_template157f152a", + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CpcBidMicros = 7321761304249472746L, CpmBidMicros = -6938481569984464040L, + TargetCpaMicros = 5263516020894046876L, CpvBidMicros = 3393527949878021854L, - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + TargetCpmMicros = 2683842186664132327L, + TargetRoas = 1.0830159587289216E+18, PercentCpcBidMicros = 3342096754779167220L, - ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), - AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, - DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, FinalUrlSuffix = "final_url_suffix046ed37a", - TargetingSetting = new gagvc::TargetingSetting(), - TargetCpmMicros = 2683842186664132327L, - TargetCpaMicros = 5263516020894046876L, EffectiveTargetCpaMicros = 9173558632194584770L, - EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, - TargetRoas = 1.0830159587289216E+18, EffectiveTargetRoas = -5.789428044530098E+17, - EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, LabelsAsAdGroupLabelNames = { - gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }, }; mockGrpcClient.Setup(x => x.GetAdGroup(request, moq::It.IsAny())).Returns(expectedResponse); @@ -291,41 +291,41 @@ public void GetAdGroupResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupRequest request = new GetAdGroupRequest { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; gagvr::AdGroup expectedResponse = new gagvr::AdGroup { - ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - Id = -6774108720365892680L, - AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), Status = gagve::AdGroupStatusEnum.Types.AdGroupStatus.Removed, UrlCustomParameters = { new gagvc::CustomParameter(), }, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoOutstream, + Type = gagve::AdGroupTypeEnum.Types.AdGroupType.VideoBumper, + ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), + AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, + DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, + TargetingSetting = new gagvc::TargetingSetting(), + EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, + EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, + Id = -6774108720365892680L, + AdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), TrackingUrlTemplate = "tracking_url_template157f152a", + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CpcBidMicros = 7321761304249472746L, CpmBidMicros = -6938481569984464040L, + TargetCpaMicros = 5263516020894046876L, CpvBidMicros = 3393527949878021854L, - BaseAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + TargetCpmMicros = 2683842186664132327L, + TargetRoas = 1.0830159587289216E+18, PercentCpcBidMicros = 3342096754779167220L, - ExplorerAutoOptimizerSetting = new gagvc::ExplorerAutoOptimizerSetting(), - AdRotationMode = gagve::AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode.Unspecified, - DisplayCustomBidDimension = gagve::TargetingDimensionEnum.Types.TargetingDimension.AgeRange, FinalUrlSuffix = "final_url_suffix046ed37a", - TargetingSetting = new gagvc::TargetingSetting(), - TargetCpmMicros = 2683842186664132327L, - TargetCpaMicros = 5263516020894046876L, EffectiveTargetCpaMicros = 9173558632194584770L, - EffectiveTargetCpaSource = gagve::BiddingSourceEnum.Types.BiddingSource.Unknown, - TargetRoas = 1.0830159587289216E+18, EffectiveTargetRoas = -5.789428044530098E+17, - EffectiveTargetRoasSource = gagve::BiddingSourceEnum.Types.BiddingSource.AdGroupCriterion, LabelsAsAdGroupLabelNames = { - gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER]", "[AD_GROUP_LABEL]"), + gagvr::AdGroupLabelName.FromCustomerAdGroupLabel("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[LABEL_ID]"), }, }; mockGrpcClient.Setup(x => x.GetAdGroupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -350,6 +350,7 @@ public void MutateAdGroupsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupsResponse expectedResponse = new MutateAdGroupsResponse { @@ -379,6 +380,7 @@ public void MutateAdGroupsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdGroupsResponse expectedResponse = new MutateAdGroupsResponse { diff --git a/tests/V2/Services/AdGroupSimulationServiceClientTest.g.cs b/tests/V6/Services/AdGroupSimulationServiceClientTest.g.cs similarity index 80% rename from tests/V2/Services/AdGroupSimulationServiceClientTest.g.cs rename to tests/V6/Services/AdGroupSimulationServiceClientTest.g.cs index 2d8379b90..8981530d4 100644 --- a/tests/V2/Services/AdGroupSimulationServiceClientTest.g.cs +++ b/tests/V6/Services/AdGroupSimulationServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdGroupSimulationServiceClientTest @@ -36,19 +36,20 @@ public void GetAdGroupSimulationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupSimulationRequest request = new GetAdGroupSimulationRequest { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupSimulation expectedResponse = new gagvr::AdGroupSimulation { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), - AdGroupId = -2072405675042603230L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", CpcBidPointList = new gagvc::CpcBidSimulationPointList(), TargetCpaPointList = new gagvc::TargetCpaSimulationPointList(), CpvBidPointList = new gagvc::CpvBidSimulationPointList(), + TargetRoasPointList = new gagvc::TargetRoasSimulationPointList(), + AdGroupId = -2072405675042603230L, + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", }; mockGrpcClient.Setup(x => x.GetAdGroupSimulation(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupSimulationServiceClient client = new AdGroupSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -63,19 +64,20 @@ public void GetAdGroupSimulationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupSimulationRequest request = new GetAdGroupSimulationRequest { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupSimulation expectedResponse = new gagvr::AdGroupSimulation { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), - AdGroupId = -2072405675042603230L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", CpcBidPointList = new gagvc::CpcBidSimulationPointList(), TargetCpaPointList = new gagvc::TargetCpaSimulationPointList(), CpvBidPointList = new gagvc::CpvBidSimulationPointList(), + TargetRoasPointList = new gagvc::TargetRoasSimulationPointList(), + AdGroupId = -2072405675042603230L, + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", }; mockGrpcClient.Setup(x => x.GetAdGroupSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupSimulationServiceClient client = new AdGroupSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -92,19 +94,20 @@ public void GetAdGroupSimulation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupSimulationRequest request = new GetAdGroupSimulationRequest { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupSimulation expectedResponse = new gagvr::AdGroupSimulation { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), - AdGroupId = -2072405675042603230L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", CpcBidPointList = new gagvc::CpcBidSimulationPointList(), TargetCpaPointList = new gagvc::TargetCpaSimulationPointList(), CpvBidPointList = new gagvc::CpvBidSimulationPointList(), + TargetRoasPointList = new gagvc::TargetRoasSimulationPointList(), + AdGroupId = -2072405675042603230L, + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", }; mockGrpcClient.Setup(x => x.GetAdGroupSimulation(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupSimulationServiceClient client = new AdGroupSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -119,19 +122,20 @@ public void GetAdGroupSimulation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupSimulationRequest request = new GetAdGroupSimulationRequest { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupSimulation expectedResponse = new gagvr::AdGroupSimulation { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), - AdGroupId = -2072405675042603230L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", CpcBidPointList = new gagvc::CpcBidSimulationPointList(), TargetCpaPointList = new gagvc::TargetCpaSimulationPointList(), CpvBidPointList = new gagvc::CpvBidSimulationPointList(), + TargetRoasPointList = new gagvc::TargetRoasSimulationPointList(), + AdGroupId = -2072405675042603230L, + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", }; mockGrpcClient.Setup(x => x.GetAdGroupSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupSimulationServiceClient client = new AdGroupSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -148,19 +152,20 @@ public void GetAdGroupSimulationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupSimulationRequest request = new GetAdGroupSimulationRequest { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupSimulation expectedResponse = new gagvr::AdGroupSimulation { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), - AdGroupId = -2072405675042603230L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", CpcBidPointList = new gagvc::CpcBidSimulationPointList(), TargetCpaPointList = new gagvc::TargetCpaSimulationPointList(), CpvBidPointList = new gagvc::CpvBidSimulationPointList(), + TargetRoasPointList = new gagvc::TargetRoasSimulationPointList(), + AdGroupId = -2072405675042603230L, + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", }; mockGrpcClient.Setup(x => x.GetAdGroupSimulation(request, moq::It.IsAny())).Returns(expectedResponse); AdGroupSimulationServiceClient client = new AdGroupSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -175,19 +180,20 @@ public void GetAdGroupSimulationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdGroupSimulationRequest request = new GetAdGroupSimulationRequest { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::AdGroupSimulation expectedResponse = new gagvr::AdGroupSimulation { - ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupSimulation("[CUSTOMER]", "[AD_GROUP_SIMULATION]"), - AdGroupId = -2072405675042603230L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, + ResourceNameAsAdGroupSimulationName = gagvr::AdGroupSimulationName.FromCustomerAdGroupTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", CpcBidPointList = new gagvc::CpcBidSimulationPointList(), TargetCpaPointList = new gagvc::TargetCpaSimulationPointList(), CpvBidPointList = new gagvc::CpvBidSimulationPointList(), + TargetRoasPointList = new gagvc::TargetRoasSimulationPointList(), + AdGroupId = -2072405675042603230L, + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", }; mockGrpcClient.Setup(x => x.GetAdGroupSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdGroupSimulationServiceClient client = new AdGroupSimulationServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdParameterServiceClientTest.g.cs b/tests/V6/Services/AdParameterServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/AdParameterServiceClientTest.g.cs rename to tests/V6/Services/AdParameterServiceClientTest.g.cs index 8910eae71..bb982c0cd 100644 --- a/tests/V2/Services/AdParameterServiceClientTest.g.cs +++ b/tests/V6/Services/AdParameterServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdParameterServiceClientTest @@ -35,12 +35,12 @@ public void GetAdParameterRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdParameterRequest request = new GetAdParameterRequest { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), }; gagvr::AdParameter expectedResponse = new gagvr::AdParameter { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), ParameterIndex = 2776974389611536835L, InsertionText = "insertion_text562a41ad", }; @@ -57,12 +57,12 @@ public void GetAdParameterRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdParameterRequest request = new GetAdParameterRequest { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), }; gagvr::AdParameter expectedResponse = new gagvr::AdParameter { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), ParameterIndex = 2776974389611536835L, InsertionText = "insertion_text562a41ad", }; @@ -81,12 +81,12 @@ public void GetAdParameter() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdParameterRequest request = new GetAdParameterRequest { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), }; gagvr::AdParameter expectedResponse = new gagvr::AdParameter { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), ParameterIndex = 2776974389611536835L, InsertionText = "insertion_text562a41ad", }; @@ -103,12 +103,12 @@ public void GetAdParameter() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdParameterRequest request = new GetAdParameterRequest { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), }; gagvr::AdParameter expectedResponse = new gagvr::AdParameter { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), ParameterIndex = 2776974389611536835L, InsertionText = "insertion_text562a41ad", }; @@ -127,12 +127,12 @@ public void GetAdParameterResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdParameterRequest request = new GetAdParameterRequest { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), }; gagvr::AdParameter expectedResponse = new gagvr::AdParameter { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), ParameterIndex = 2776974389611536835L, InsertionText = "insertion_text562a41ad", }; @@ -149,12 +149,12 @@ public void GetAdParameterResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdParameterRequest request = new GetAdParameterRequest { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), }; gagvr::AdParameter expectedResponse = new gagvr::AdParameter { - ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdParameter("[CUSTOMER]", "[AD_PARAMETER]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), + ResourceNameAsAdParameterName = gagvr::AdParameterName.FromCustomerAdGroupCriterionParameterIndex("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]", "[PARAMETER_INDEX]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), ParameterIndex = 2776974389611536835L, InsertionText = "insertion_text562a41ad", }; diff --git a/tests/V2/Services/AdScheduleViewServiceClientTest.g.cs b/tests/V6/Services/AdScheduleViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/AdScheduleViewServiceClientTest.g.cs rename to tests/V6/Services/AdScheduleViewServiceClientTest.g.cs index e05b6f0c0..8078715e3 100644 --- a/tests/V2/Services/AdScheduleViewServiceClientTest.g.cs +++ b/tests/V6/Services/AdScheduleViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdScheduleViewServiceClientTest @@ -34,11 +34,11 @@ public void GetAdScheduleViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::AdScheduleView expectedResponse = new gagvr::AdScheduleView { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdScheduleView(request, moq::It.IsAny())).Returns(expectedResponse); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetAdScheduleViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::AdScheduleView expectedResponse = new gagvr::AdScheduleView { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdScheduleViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetAdScheduleView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::AdScheduleView expectedResponse = new gagvr::AdScheduleView { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdScheduleView(request, moq::It.IsAny())).Returns(expectedResponse); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetAdScheduleView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::AdScheduleView expectedResponse = new gagvr::AdScheduleView { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdScheduleViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetAdScheduleViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::AdScheduleView expectedResponse = new gagvr::AdScheduleView { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdScheduleView(request, moq::It.IsAny())).Returns(expectedResponse); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetAdScheduleViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdScheduleViewRequest request = new GetAdScheduleViewRequest { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::AdScheduleView expectedResponse = new gagvr::AdScheduleView { - ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerAdScheduleView("[CUSTOMER]", "[AD_SCHEDULE_VIEW]"), + ResourceNameAsAdScheduleViewName = gagvr::AdScheduleViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAdScheduleViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdScheduleViewServiceClient client = new AdScheduleViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AdServiceClientTest.g.cs b/tests/V6/Services/AdServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/AdServiceClientTest.g.cs rename to tests/V6/Services/AdServiceClientTest.g.cs index 151d807d1..0646f9992 100644 --- a/tests/V2/Services/AdServiceClientTest.g.cs +++ b/tests/V6/Services/AdServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAdServiceClientTest @@ -36,38 +36,25 @@ public void GetAdRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdRequest request = new GetAdRequest { - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; gagvr::Ad expectedResponse = new gagvr::Ad { - Id = -6774108720365892680L, - FinalUrls = - { - "final_urls3ed0b71b", - }, - DisplayUrl = "display_url12de0d0c", - Type = gagve::AdTypeEnum.Types.AdType.DynamicHtml5Ad, + Type = gagve::AdTypeEnum.Types.AdType.ImageAd, TextAd = new gagvc::TextAdInfo(), ExpandedTextAd = new gagvc::ExpandedTextAdInfo(), UrlCustomParameters = { new gagvc::CustomParameter(), }, - TrackingUrlTemplate = "tracking_url_template157f152a", CallOnlyAd = new gagvc::CallOnlyAdInfo(), ExpandedDynamicSearchAd = new gagvc::ExpandedDynamicSearchAdInfo(), HotelAd = new gagvc::HotelAdInfo(), - FinalMobileUrls = - { - "final_mobile_urlsf4131aa0", - }, ShoppingSmartAd = new gagvc::ShoppingSmartAdInfo(), ShoppingProductAd = new gagvc::ShoppingProductAdInfo(), - AddedByGoogleAds = true, DevicePreference = gagve::DeviceEnum.Types.Device.Desktop, GmailAd = new gagvc::GmailAdInfo(), ImageAd = new gagvc::ImageAdInfo(), - AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), VideoAd = new gagvc::VideoAdInfo(), ResponsiveSearchAd = new gagvc::ResponsiveSearchAdInfo(), UrlCollections = @@ -79,6 +66,7 @@ public void GetAdRequestObject() AppAd = new gagvc::AppAdInfo(), LegacyAppInstallAd = new gagvc::LegacyAppInstallAdInfo(), ResponsiveDisplayAd = new gagvc::ResponsiveDisplayAdInfo(), + LocalAd = new gagvc::LocalAdInfo(), DisplayUploadAd = new gagvc::DisplayUploadAdInfo(), AppEngagementAd = new gagvc::AppEngagementAdInfo(), FinalAppUrls = @@ -86,8 +74,22 @@ public void GetAdRequestObject() new gagvc::FinalAppUrl(), }, ShoppingComparisonListingAd = new gagvc::ShoppingComparisonListingAdInfo(), - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), + VideoResponsiveAd = new gagvc::VideoResponsiveAdInfo(), + Id = -6774108720365892680L, + FinalUrls = + { + "final_urls3ed0b71b", + }, + FinalMobileUrls = + { + "final_mobile_urlsf4131aa0", + }, + TrackingUrlTemplate = "tracking_url_template157f152a", FinalUrlSuffix = "final_url_suffix046ed37a", + DisplayUrl = "display_url12de0d0c", + AddedByGoogleAds = true, + AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; mockGrpcClient.Setup(x => x.GetAd(request, moq::It.IsAny())).Returns(expectedResponse); AdServiceClient client = new AdServiceClientImpl(mockGrpcClient.Object, null); @@ -102,38 +104,25 @@ public void GetAdRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdRequest request = new GetAdRequest { - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; gagvr::Ad expectedResponse = new gagvr::Ad { - Id = -6774108720365892680L, - FinalUrls = - { - "final_urls3ed0b71b", - }, - DisplayUrl = "display_url12de0d0c", - Type = gagve::AdTypeEnum.Types.AdType.DynamicHtml5Ad, + Type = gagve::AdTypeEnum.Types.AdType.ImageAd, TextAd = new gagvc::TextAdInfo(), ExpandedTextAd = new gagvc::ExpandedTextAdInfo(), UrlCustomParameters = { new gagvc::CustomParameter(), }, - TrackingUrlTemplate = "tracking_url_template157f152a", CallOnlyAd = new gagvc::CallOnlyAdInfo(), ExpandedDynamicSearchAd = new gagvc::ExpandedDynamicSearchAdInfo(), HotelAd = new gagvc::HotelAdInfo(), - FinalMobileUrls = - { - "final_mobile_urlsf4131aa0", - }, ShoppingSmartAd = new gagvc::ShoppingSmartAdInfo(), ShoppingProductAd = new gagvc::ShoppingProductAdInfo(), - AddedByGoogleAds = true, DevicePreference = gagve::DeviceEnum.Types.Device.Desktop, GmailAd = new gagvc::GmailAdInfo(), ImageAd = new gagvc::ImageAdInfo(), - AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), VideoAd = new gagvc::VideoAdInfo(), ResponsiveSearchAd = new gagvc::ResponsiveSearchAdInfo(), UrlCollections = @@ -145,6 +134,7 @@ public void GetAdRequestObject() AppAd = new gagvc::AppAdInfo(), LegacyAppInstallAd = new gagvc::LegacyAppInstallAdInfo(), ResponsiveDisplayAd = new gagvc::ResponsiveDisplayAdInfo(), + LocalAd = new gagvc::LocalAdInfo(), DisplayUploadAd = new gagvc::DisplayUploadAdInfo(), AppEngagementAd = new gagvc::AppEngagementAdInfo(), FinalAppUrls = @@ -152,8 +142,22 @@ public void GetAdRequestObject() new gagvc::FinalAppUrl(), }, ShoppingComparisonListingAd = new gagvc::ShoppingComparisonListingAdInfo(), - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), + VideoResponsiveAd = new gagvc::VideoResponsiveAdInfo(), + Id = -6774108720365892680L, + FinalUrls = + { + "final_urls3ed0b71b", + }, + FinalMobileUrls = + { + "final_mobile_urlsf4131aa0", + }, + TrackingUrlTemplate = "tracking_url_template157f152a", FinalUrlSuffix = "final_url_suffix046ed37a", + DisplayUrl = "display_url12de0d0c", + AddedByGoogleAds = true, + AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; mockGrpcClient.Setup(x => x.GetAdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdServiceClient client = new AdServiceClientImpl(mockGrpcClient.Object, null); @@ -170,38 +174,25 @@ public void GetAd() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdRequest request = new GetAdRequest { - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; gagvr::Ad expectedResponse = new gagvr::Ad { - Id = -6774108720365892680L, - FinalUrls = - { - "final_urls3ed0b71b", - }, - DisplayUrl = "display_url12de0d0c", - Type = gagve::AdTypeEnum.Types.AdType.DynamicHtml5Ad, + Type = gagve::AdTypeEnum.Types.AdType.ImageAd, TextAd = new gagvc::TextAdInfo(), ExpandedTextAd = new gagvc::ExpandedTextAdInfo(), UrlCustomParameters = { new gagvc::CustomParameter(), }, - TrackingUrlTemplate = "tracking_url_template157f152a", CallOnlyAd = new gagvc::CallOnlyAdInfo(), ExpandedDynamicSearchAd = new gagvc::ExpandedDynamicSearchAdInfo(), HotelAd = new gagvc::HotelAdInfo(), - FinalMobileUrls = - { - "final_mobile_urlsf4131aa0", - }, ShoppingSmartAd = new gagvc::ShoppingSmartAdInfo(), ShoppingProductAd = new gagvc::ShoppingProductAdInfo(), - AddedByGoogleAds = true, DevicePreference = gagve::DeviceEnum.Types.Device.Desktop, GmailAd = new gagvc::GmailAdInfo(), ImageAd = new gagvc::ImageAdInfo(), - AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), VideoAd = new gagvc::VideoAdInfo(), ResponsiveSearchAd = new gagvc::ResponsiveSearchAdInfo(), UrlCollections = @@ -213,6 +204,7 @@ public void GetAd() AppAd = new gagvc::AppAdInfo(), LegacyAppInstallAd = new gagvc::LegacyAppInstallAdInfo(), ResponsiveDisplayAd = new gagvc::ResponsiveDisplayAdInfo(), + LocalAd = new gagvc::LocalAdInfo(), DisplayUploadAd = new gagvc::DisplayUploadAdInfo(), AppEngagementAd = new gagvc::AppEngagementAdInfo(), FinalAppUrls = @@ -220,8 +212,22 @@ public void GetAd() new gagvc::FinalAppUrl(), }, ShoppingComparisonListingAd = new gagvc::ShoppingComparisonListingAdInfo(), - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), + VideoResponsiveAd = new gagvc::VideoResponsiveAdInfo(), + Id = -6774108720365892680L, + FinalUrls = + { + "final_urls3ed0b71b", + }, + FinalMobileUrls = + { + "final_mobile_urlsf4131aa0", + }, + TrackingUrlTemplate = "tracking_url_template157f152a", FinalUrlSuffix = "final_url_suffix046ed37a", + DisplayUrl = "display_url12de0d0c", + AddedByGoogleAds = true, + AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; mockGrpcClient.Setup(x => x.GetAd(request, moq::It.IsAny())).Returns(expectedResponse); AdServiceClient client = new AdServiceClientImpl(mockGrpcClient.Object, null); @@ -236,38 +242,25 @@ public void GetAd() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdRequest request = new GetAdRequest { - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; gagvr::Ad expectedResponse = new gagvr::Ad { - Id = -6774108720365892680L, - FinalUrls = - { - "final_urls3ed0b71b", - }, - DisplayUrl = "display_url12de0d0c", - Type = gagve::AdTypeEnum.Types.AdType.DynamicHtml5Ad, + Type = gagve::AdTypeEnum.Types.AdType.ImageAd, TextAd = new gagvc::TextAdInfo(), ExpandedTextAd = new gagvc::ExpandedTextAdInfo(), UrlCustomParameters = { new gagvc::CustomParameter(), }, - TrackingUrlTemplate = "tracking_url_template157f152a", CallOnlyAd = new gagvc::CallOnlyAdInfo(), ExpandedDynamicSearchAd = new gagvc::ExpandedDynamicSearchAdInfo(), HotelAd = new gagvc::HotelAdInfo(), - FinalMobileUrls = - { - "final_mobile_urlsf4131aa0", - }, ShoppingSmartAd = new gagvc::ShoppingSmartAdInfo(), ShoppingProductAd = new gagvc::ShoppingProductAdInfo(), - AddedByGoogleAds = true, DevicePreference = gagve::DeviceEnum.Types.Device.Desktop, GmailAd = new gagvc::GmailAdInfo(), ImageAd = new gagvc::ImageAdInfo(), - AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), VideoAd = new gagvc::VideoAdInfo(), ResponsiveSearchAd = new gagvc::ResponsiveSearchAdInfo(), UrlCollections = @@ -279,6 +272,7 @@ public void GetAd() AppAd = new gagvc::AppAdInfo(), LegacyAppInstallAd = new gagvc::LegacyAppInstallAdInfo(), ResponsiveDisplayAd = new gagvc::ResponsiveDisplayAdInfo(), + LocalAd = new gagvc::LocalAdInfo(), DisplayUploadAd = new gagvc::DisplayUploadAdInfo(), AppEngagementAd = new gagvc::AppEngagementAdInfo(), FinalAppUrls = @@ -286,8 +280,22 @@ public void GetAd() new gagvc::FinalAppUrl(), }, ShoppingComparisonListingAd = new gagvc::ShoppingComparisonListingAdInfo(), - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), + VideoResponsiveAd = new gagvc::VideoResponsiveAdInfo(), + Id = -6774108720365892680L, + FinalUrls = + { + "final_urls3ed0b71b", + }, + FinalMobileUrls = + { + "final_mobile_urlsf4131aa0", + }, + TrackingUrlTemplate = "tracking_url_template157f152a", FinalUrlSuffix = "final_url_suffix046ed37a", + DisplayUrl = "display_url12de0d0c", + AddedByGoogleAds = true, + AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; mockGrpcClient.Setup(x => x.GetAdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdServiceClient client = new AdServiceClientImpl(mockGrpcClient.Object, null); @@ -304,38 +312,25 @@ public void GetAdResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdRequest request = new GetAdRequest { - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; gagvr::Ad expectedResponse = new gagvr::Ad { - Id = -6774108720365892680L, - FinalUrls = - { - "final_urls3ed0b71b", - }, - DisplayUrl = "display_url12de0d0c", - Type = gagve::AdTypeEnum.Types.AdType.DynamicHtml5Ad, + Type = gagve::AdTypeEnum.Types.AdType.ImageAd, TextAd = new gagvc::TextAdInfo(), ExpandedTextAd = new gagvc::ExpandedTextAdInfo(), UrlCustomParameters = { new gagvc::CustomParameter(), }, - TrackingUrlTemplate = "tracking_url_template157f152a", CallOnlyAd = new gagvc::CallOnlyAdInfo(), ExpandedDynamicSearchAd = new gagvc::ExpandedDynamicSearchAdInfo(), HotelAd = new gagvc::HotelAdInfo(), - FinalMobileUrls = - { - "final_mobile_urlsf4131aa0", - }, ShoppingSmartAd = new gagvc::ShoppingSmartAdInfo(), ShoppingProductAd = new gagvc::ShoppingProductAdInfo(), - AddedByGoogleAds = true, DevicePreference = gagve::DeviceEnum.Types.Device.Desktop, GmailAd = new gagvc::GmailAdInfo(), ImageAd = new gagvc::ImageAdInfo(), - AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), VideoAd = new gagvc::VideoAdInfo(), ResponsiveSearchAd = new gagvc::ResponsiveSearchAdInfo(), UrlCollections = @@ -347,6 +342,7 @@ public void GetAdResourceNames() AppAd = new gagvc::AppAdInfo(), LegacyAppInstallAd = new gagvc::LegacyAppInstallAdInfo(), ResponsiveDisplayAd = new gagvc::ResponsiveDisplayAdInfo(), + LocalAd = new gagvc::LocalAdInfo(), DisplayUploadAd = new gagvc::DisplayUploadAdInfo(), AppEngagementAd = new gagvc::AppEngagementAdInfo(), FinalAppUrls = @@ -354,8 +350,22 @@ public void GetAdResourceNames() new gagvc::FinalAppUrl(), }, ShoppingComparisonListingAd = new gagvc::ShoppingComparisonListingAdInfo(), - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), + VideoResponsiveAd = new gagvc::VideoResponsiveAdInfo(), + Id = -6774108720365892680L, + FinalUrls = + { + "final_urls3ed0b71b", + }, + FinalMobileUrls = + { + "final_mobile_urlsf4131aa0", + }, + TrackingUrlTemplate = "tracking_url_template157f152a", FinalUrlSuffix = "final_url_suffix046ed37a", + DisplayUrl = "display_url12de0d0c", + AddedByGoogleAds = true, + AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; mockGrpcClient.Setup(x => x.GetAd(request, moq::It.IsAny())).Returns(expectedResponse); AdServiceClient client = new AdServiceClientImpl(mockGrpcClient.Object, null); @@ -370,38 +380,25 @@ public void GetAdResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAdRequest request = new GetAdRequest { - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; gagvr::Ad expectedResponse = new gagvr::Ad { - Id = -6774108720365892680L, - FinalUrls = - { - "final_urls3ed0b71b", - }, - DisplayUrl = "display_url12de0d0c", - Type = gagve::AdTypeEnum.Types.AdType.DynamicHtml5Ad, + Type = gagve::AdTypeEnum.Types.AdType.ImageAd, TextAd = new gagvc::TextAdInfo(), ExpandedTextAd = new gagvc::ExpandedTextAdInfo(), UrlCustomParameters = { new gagvc::CustomParameter(), }, - TrackingUrlTemplate = "tracking_url_template157f152a", CallOnlyAd = new gagvc::CallOnlyAdInfo(), ExpandedDynamicSearchAd = new gagvc::ExpandedDynamicSearchAdInfo(), HotelAd = new gagvc::HotelAdInfo(), - FinalMobileUrls = - { - "final_mobile_urlsf4131aa0", - }, ShoppingSmartAd = new gagvc::ShoppingSmartAdInfo(), ShoppingProductAd = new gagvc::ShoppingProductAdInfo(), - AddedByGoogleAds = true, DevicePreference = gagve::DeviceEnum.Types.Device.Desktop, GmailAd = new gagvc::GmailAdInfo(), ImageAd = new gagvc::ImageAdInfo(), - AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), VideoAd = new gagvc::VideoAdInfo(), ResponsiveSearchAd = new gagvc::ResponsiveSearchAdInfo(), UrlCollections = @@ -413,6 +410,7 @@ public void GetAdResourceNames() AppAd = new gagvc::AppAdInfo(), LegacyAppInstallAd = new gagvc::LegacyAppInstallAdInfo(), ResponsiveDisplayAd = new gagvc::ResponsiveDisplayAdInfo(), + LocalAd = new gagvc::LocalAdInfo(), DisplayUploadAd = new gagvc::DisplayUploadAdInfo(), AppEngagementAd = new gagvc::AppEngagementAdInfo(), FinalAppUrls = @@ -420,8 +418,22 @@ public void GetAdResourceNames() new gagvc::FinalAppUrl(), }, ShoppingComparisonListingAd = new gagvc::ShoppingComparisonListingAdInfo(), - ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER]", "[AD]"), + ResourceNameAsAdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), + VideoResponsiveAd = new gagvc::VideoResponsiveAdInfo(), + Id = -6774108720365892680L, + FinalUrls = + { + "final_urls3ed0b71b", + }, + FinalMobileUrls = + { + "final_mobile_urlsf4131aa0", + }, + TrackingUrlTemplate = "tracking_url_template157f152a", FinalUrlSuffix = "final_url_suffix046ed37a", + DisplayUrl = "display_url12de0d0c", + AddedByGoogleAds = true, + AdName = gagvr::AdName.FromCustomerAd("[CUSTOMER_ID]", "[AD_ID]"), }; mockGrpcClient.Setup(x => x.GetAdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AdServiceClient client = new AdServiceClientImpl(mockGrpcClient.Object, null); @@ -440,6 +452,7 @@ public void MutateAdsRequestObject() { CustomerId = "customer_id3b3724cb", Operations = { new AdOperation(), }, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdsResponse expectedResponse = new MutateAdsResponse { @@ -463,6 +476,7 @@ public void MutateAdsRequestObject() { CustomerId = "customer_id3b3724cb", Operations = { new AdOperation(), }, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAdsResponse expectedResponse = new MutateAdsResponse { diff --git a/tests/V2/Services/AgeRangeViewServiceClientTest.g.cs b/tests/V6/Services/AgeRangeViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/AgeRangeViewServiceClientTest.g.cs rename to tests/V6/Services/AgeRangeViewServiceClientTest.g.cs index d177bf27f..e2f2d1582 100644 --- a/tests/V2/Services/AgeRangeViewServiceClientTest.g.cs +++ b/tests/V6/Services/AgeRangeViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAgeRangeViewServiceClientTest @@ -34,11 +34,11 @@ public void GetAgeRangeViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAgeRangeViewRequest request = new GetAgeRangeViewRequest { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AgeRangeView expectedResponse = new gagvr::AgeRangeView { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAgeRangeView(request, moq::It.IsAny())).Returns(expectedResponse); AgeRangeViewServiceClient client = new AgeRangeViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetAgeRangeViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAgeRangeViewRequest request = new GetAgeRangeViewRequest { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AgeRangeView expectedResponse = new gagvr::AgeRangeView { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAgeRangeViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AgeRangeViewServiceClient client = new AgeRangeViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetAgeRangeView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAgeRangeViewRequest request = new GetAgeRangeViewRequest { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AgeRangeView expectedResponse = new gagvr::AgeRangeView { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAgeRangeView(request, moq::It.IsAny())).Returns(expectedResponse); AgeRangeViewServiceClient client = new AgeRangeViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetAgeRangeView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAgeRangeViewRequest request = new GetAgeRangeViewRequest { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AgeRangeView expectedResponse = new gagvr::AgeRangeView { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAgeRangeViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AgeRangeViewServiceClient client = new AgeRangeViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetAgeRangeViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAgeRangeViewRequest request = new GetAgeRangeViewRequest { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AgeRangeView expectedResponse = new gagvr::AgeRangeView { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAgeRangeView(request, moq::It.IsAny())).Returns(expectedResponse); AgeRangeViewServiceClient client = new AgeRangeViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetAgeRangeViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAgeRangeViewRequest request = new GetAgeRangeViewRequest { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::AgeRangeView expectedResponse = new gagvr::AgeRangeView { - ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAgeRangeView("[CUSTOMER]", "[AGE_RANGE_VIEW]"), + ResourceNameAsAgeRangeViewName = gagvr::AgeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetAgeRangeViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AgeRangeViewServiceClient client = new AgeRangeViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/AssetServiceClientTest.g.cs b/tests/V6/Services/AssetServiceClientTest.g.cs similarity index 81% rename from tests/V2/Services/AssetServiceClientTest.g.cs rename to tests/V6/Services/AssetServiceClientTest.g.cs index 90e7e19c8..e0c8e5f79 100644 --- a/tests/V2/Services/AssetServiceClientTest.g.cs +++ b/tests/V6/Services/AssetServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedAssetServiceClientTest @@ -36,18 +36,25 @@ public void GetAssetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAssetRequest request = new GetAssetRequest { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; gagvr::Asset expectedResponse = new gagvr::Asset { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Id = -6774108720365892680L, - AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Type = gagve::AssetTypeEnum.Types.AssetType.MediaBundle, + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + Type = gagve::AssetTypeEnum.Types.AssetType.BookOnGoogle, YoutubeVideoAsset = new gagvc::YoutubeVideoAsset(), MediaBundleAsset = new gagvc::MediaBundleAsset(), ImageAsset = new gagvc::ImageAsset(), TextAsset = new gagvc::TextAsset(), + LeadFormAsset = new gagvc::LeadFormAsset(), + BookOnGoogleAsset = new gagvc::BookOnGoogleAsset(), + Id = -6774108720365892680L, + AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + PolicySummary = new gagvr::AssetPolicySummary(), + FinalUrls = + { + "final_urls3ed0b71b", + }, }; mockGrpcClient.Setup(x => x.GetAsset(request, moq::It.IsAny())).Returns(expectedResponse); AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null); @@ -62,18 +69,25 @@ public void GetAssetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAssetRequest request = new GetAssetRequest { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; gagvr::Asset expectedResponse = new gagvr::Asset { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Id = -6774108720365892680L, - AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Type = gagve::AssetTypeEnum.Types.AssetType.MediaBundle, + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + Type = gagve::AssetTypeEnum.Types.AssetType.BookOnGoogle, YoutubeVideoAsset = new gagvc::YoutubeVideoAsset(), MediaBundleAsset = new gagvc::MediaBundleAsset(), ImageAsset = new gagvc::ImageAsset(), TextAsset = new gagvc::TextAsset(), + LeadFormAsset = new gagvc::LeadFormAsset(), + BookOnGoogleAsset = new gagvc::BookOnGoogleAsset(), + Id = -6774108720365892680L, + AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + PolicySummary = new gagvr::AssetPolicySummary(), + FinalUrls = + { + "final_urls3ed0b71b", + }, }; mockGrpcClient.Setup(x => x.GetAssetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null); @@ -90,18 +104,25 @@ public void GetAsset() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAssetRequest request = new GetAssetRequest { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; gagvr::Asset expectedResponse = new gagvr::Asset { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Id = -6774108720365892680L, - AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Type = gagve::AssetTypeEnum.Types.AssetType.MediaBundle, + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + Type = gagve::AssetTypeEnum.Types.AssetType.BookOnGoogle, YoutubeVideoAsset = new gagvc::YoutubeVideoAsset(), MediaBundleAsset = new gagvc::MediaBundleAsset(), ImageAsset = new gagvc::ImageAsset(), TextAsset = new gagvc::TextAsset(), + LeadFormAsset = new gagvc::LeadFormAsset(), + BookOnGoogleAsset = new gagvc::BookOnGoogleAsset(), + Id = -6774108720365892680L, + AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + PolicySummary = new gagvr::AssetPolicySummary(), + FinalUrls = + { + "final_urls3ed0b71b", + }, }; mockGrpcClient.Setup(x => x.GetAsset(request, moq::It.IsAny())).Returns(expectedResponse); AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null); @@ -116,18 +137,25 @@ public void GetAsset() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAssetRequest request = new GetAssetRequest { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; gagvr::Asset expectedResponse = new gagvr::Asset { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Id = -6774108720365892680L, - AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Type = gagve::AssetTypeEnum.Types.AssetType.MediaBundle, + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + Type = gagve::AssetTypeEnum.Types.AssetType.BookOnGoogle, YoutubeVideoAsset = new gagvc::YoutubeVideoAsset(), MediaBundleAsset = new gagvc::MediaBundleAsset(), ImageAsset = new gagvc::ImageAsset(), TextAsset = new gagvc::TextAsset(), + LeadFormAsset = new gagvc::LeadFormAsset(), + BookOnGoogleAsset = new gagvc::BookOnGoogleAsset(), + Id = -6774108720365892680L, + AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + PolicySummary = new gagvr::AssetPolicySummary(), + FinalUrls = + { + "final_urls3ed0b71b", + }, }; mockGrpcClient.Setup(x => x.GetAssetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null); @@ -144,18 +172,25 @@ public void GetAssetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAssetRequest request = new GetAssetRequest { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; gagvr::Asset expectedResponse = new gagvr::Asset { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Id = -6774108720365892680L, - AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Type = gagve::AssetTypeEnum.Types.AssetType.MediaBundle, + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + Type = gagve::AssetTypeEnum.Types.AssetType.BookOnGoogle, YoutubeVideoAsset = new gagvc::YoutubeVideoAsset(), MediaBundleAsset = new gagvc::MediaBundleAsset(), ImageAsset = new gagvc::ImageAsset(), TextAsset = new gagvc::TextAsset(), + LeadFormAsset = new gagvc::LeadFormAsset(), + BookOnGoogleAsset = new gagvc::BookOnGoogleAsset(), + Id = -6774108720365892680L, + AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + PolicySummary = new gagvr::AssetPolicySummary(), + FinalUrls = + { + "final_urls3ed0b71b", + }, }; mockGrpcClient.Setup(x => x.GetAsset(request, moq::It.IsAny())).Returns(expectedResponse); AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null); @@ -170,18 +205,25 @@ public void GetAssetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetAssetRequest request = new GetAssetRequest { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), }; gagvr::Asset expectedResponse = new gagvr::Asset { - ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Id = -6774108720365892680L, - AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER]", "[ASSET]"), - Type = gagve::AssetTypeEnum.Types.AssetType.MediaBundle, + ResourceNameAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + Type = gagve::AssetTypeEnum.Types.AssetType.BookOnGoogle, YoutubeVideoAsset = new gagvc::YoutubeVideoAsset(), MediaBundleAsset = new gagvc::MediaBundleAsset(), ImageAsset = new gagvc::ImageAsset(), TextAsset = new gagvc::TextAsset(), + LeadFormAsset = new gagvc::LeadFormAsset(), + BookOnGoogleAsset = new gagvc::BookOnGoogleAsset(), + Id = -6774108720365892680L, + AssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + PolicySummary = new gagvr::AssetPolicySummary(), + FinalUrls = + { + "final_urls3ed0b71b", + }, }; mockGrpcClient.Setup(x => x.GetAssetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); AssetServiceClient client = new AssetServiceClientImpl(mockGrpcClient.Object, null); @@ -203,6 +245,7 @@ public void MutateAssetsRequestObject() { new AssetOperation(), }, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAssetsResponse expectedResponse = new MutateAssetsResponse { @@ -229,6 +272,7 @@ public void MutateAssetsRequestObject() { new AssetOperation(), }, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateAssetsResponse expectedResponse = new MutateAssetsResponse { diff --git a/tests/V6/Services/BatchJobServiceClientTest.g.cs b/tests/V6/Services/BatchJobServiceClientTest.g.cs new file mode 100644 index 000000000..eb245fc6f --- /dev/null +++ b/tests/V6/Services/BatchJobServiceClientTest.g.cs @@ -0,0 +1,543 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using lro = Google.LongRunning; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedBatchJobServiceClientTest + { + [Category("Smoke")][Test] + public void MutateBatchJobRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + MutateBatchJobRequest request = new MutateBatchJobRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new BatchJobOperation(), + }; + MutateBatchJobResponse expectedResponse = new MutateBatchJobResponse + { + Result = new MutateBatchJobResult(), + }; + mockGrpcClient.Setup(x => x.MutateBatchJob(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + MutateBatchJobResponse response = client.MutateBatchJob(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateBatchJobRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + MutateBatchJobRequest request = new MutateBatchJobRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new BatchJobOperation(), + }; + MutateBatchJobResponse expectedResponse = new MutateBatchJobResponse + { + Result = new MutateBatchJobResult(), + }; + mockGrpcClient.Setup(x => x.MutateBatchJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + MutateBatchJobResponse responseCallSettings = await client.MutateBatchJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateBatchJobResponse responseCancellationToken = await client.MutateBatchJobAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateBatchJob() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + MutateBatchJobRequest request = new MutateBatchJobRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new BatchJobOperation(), + }; + MutateBatchJobResponse expectedResponse = new MutateBatchJobResponse + { + Result = new MutateBatchJobResult(), + }; + mockGrpcClient.Setup(x => x.MutateBatchJob(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + MutateBatchJobResponse response = client.MutateBatchJob(request.CustomerId, request.Operation); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateBatchJobAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + MutateBatchJobRequest request = new MutateBatchJobRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new BatchJobOperation(), + }; + MutateBatchJobResponse expectedResponse = new MutateBatchJobResponse + { + Result = new MutateBatchJobResult(), + }; + mockGrpcClient.Setup(x => x.MutateBatchJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + MutateBatchJobResponse responseCallSettings = await client.MutateBatchJobAsync(request.CustomerId, request.Operation, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateBatchJobResponse responseCancellationToken = await client.MutateBatchJobAsync(request.CustomerId, request.Operation, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetBatchJobRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetBatchJobRequest request = new GetBatchJobRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + }; + gagvr::BatchJob expectedResponse = new gagvr::BatchJob + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + Metadata = new gagvr::BatchJob.Types.BatchJobMetadata(), + Status = gagve::BatchJobStatusEnum.Types.BatchJobStatus.Done, + Id = -6774108720365892680L, + NextAddSequenceToken = "next_add_sequence_token93fee49d", + LongRunningOperation = "long_running_operation0897bd41", + }; + mockGrpcClient.Setup(x => x.GetBatchJob(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::BatchJob response = client.GetBatchJob(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetBatchJobRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetBatchJobRequest request = new GetBatchJobRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + }; + gagvr::BatchJob expectedResponse = new gagvr::BatchJob + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + Metadata = new gagvr::BatchJob.Types.BatchJobMetadata(), + Status = gagve::BatchJobStatusEnum.Types.BatchJobStatus.Done, + Id = -6774108720365892680L, + NextAddSequenceToken = "next_add_sequence_token93fee49d", + LongRunningOperation = "long_running_operation0897bd41", + }; + mockGrpcClient.Setup(x => x.GetBatchJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::BatchJob responseCallSettings = await client.GetBatchJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::BatchJob responseCancellationToken = await client.GetBatchJobAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetBatchJob() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetBatchJobRequest request = new GetBatchJobRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + }; + gagvr::BatchJob expectedResponse = new gagvr::BatchJob + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + Metadata = new gagvr::BatchJob.Types.BatchJobMetadata(), + Status = gagve::BatchJobStatusEnum.Types.BatchJobStatus.Done, + Id = -6774108720365892680L, + NextAddSequenceToken = "next_add_sequence_token93fee49d", + LongRunningOperation = "long_running_operation0897bd41", + }; + mockGrpcClient.Setup(x => x.GetBatchJob(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::BatchJob response = client.GetBatchJob(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetBatchJobAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetBatchJobRequest request = new GetBatchJobRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + }; + gagvr::BatchJob expectedResponse = new gagvr::BatchJob + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + Metadata = new gagvr::BatchJob.Types.BatchJobMetadata(), + Status = gagve::BatchJobStatusEnum.Types.BatchJobStatus.Done, + Id = -6774108720365892680L, + NextAddSequenceToken = "next_add_sequence_token93fee49d", + LongRunningOperation = "long_running_operation0897bd41", + }; + mockGrpcClient.Setup(x => x.GetBatchJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::BatchJob responseCallSettings = await client.GetBatchJobAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::BatchJob responseCancellationToken = await client.GetBatchJobAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetBatchJobResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetBatchJobRequest request = new GetBatchJobRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + }; + gagvr::BatchJob expectedResponse = new gagvr::BatchJob + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + Metadata = new gagvr::BatchJob.Types.BatchJobMetadata(), + Status = gagve::BatchJobStatusEnum.Types.BatchJobStatus.Done, + Id = -6774108720365892680L, + NextAddSequenceToken = "next_add_sequence_token93fee49d", + LongRunningOperation = "long_running_operation0897bd41", + }; + mockGrpcClient.Setup(x => x.GetBatchJob(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::BatchJob response = client.GetBatchJob(request.ResourceNameAsBatchJobName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetBatchJobResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetBatchJobRequest request = new GetBatchJobRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + }; + gagvr::BatchJob expectedResponse = new gagvr::BatchJob + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + Metadata = new gagvr::BatchJob.Types.BatchJobMetadata(), + Status = gagve::BatchJobStatusEnum.Types.BatchJobStatus.Done, + Id = -6774108720365892680L, + NextAddSequenceToken = "next_add_sequence_token93fee49d", + LongRunningOperation = "long_running_operation0897bd41", + }; + mockGrpcClient.Setup(x => x.GetBatchJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::BatchJob responseCallSettings = await client.GetBatchJobAsync(request.ResourceNameAsBatchJobName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::BatchJob responseCancellationToken = await client.GetBatchJobAsync(request.ResourceNameAsBatchJobName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddBatchJobOperationsRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + SequenceToken = "sequence_tokene6b46f6e", + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse response = client.AddBatchJobOperations(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddBatchJobOperationsRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + SequenceToken = "sequence_tokene6b46f6e", + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse responseCallSettings = await client.AddBatchJobOperationsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddBatchJobOperationsResponse responseCancellationToken = await client.AddBatchJobOperationsAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddBatchJobOperations1() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + SequenceToken = "sequence_tokene6b46f6e", + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse response = client.AddBatchJobOperations(request.ResourceName, request.SequenceToken, request.MutateOperations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddBatchJobOperations1Async() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + SequenceToken = "sequence_tokene6b46f6e", + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse responseCallSettings = await client.AddBatchJobOperationsAsync(request.ResourceName, request.SequenceToken, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddBatchJobOperationsResponse responseCancellationToken = await client.AddBatchJobOperationsAsync(request.ResourceName, request.SequenceToken, request.MutateOperations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddBatchJobOperations1ResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + SequenceToken = "sequence_tokene6b46f6e", + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse response = client.AddBatchJobOperations(request.ResourceNameAsBatchJobName, request.SequenceToken, request.MutateOperations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddBatchJobOperations1ResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + SequenceToken = "sequence_tokene6b46f6e", + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse responseCallSettings = await client.AddBatchJobOperationsAsync(request.ResourceNameAsBatchJobName, request.SequenceToken, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddBatchJobOperationsResponse responseCancellationToken = await client.AddBatchJobOperationsAsync(request.ResourceNameAsBatchJobName, request.SequenceToken, request.MutateOperations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddBatchJobOperations2() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse response = client.AddBatchJobOperations(request.ResourceName, request.MutateOperations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddBatchJobOperations2Async() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse responseCallSettings = await client.AddBatchJobOperationsAsync(request.ResourceName, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddBatchJobOperationsResponse responseCancellationToken = await client.AddBatchJobOperationsAsync(request.ResourceName, request.MutateOperations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddBatchJobOperations2ResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse response = client.AddBatchJobOperations(request.ResourceNameAsBatchJobName, request.MutateOperations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddBatchJobOperations2ResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddBatchJobOperationsRequest request = new AddBatchJobOperationsRequest + { + ResourceNameAsBatchJobName = gagvr::BatchJobName.FromCustomerBatchJob("[CUSTOMER_ID]", "[BATCH_JOB_ID]"), + MutateOperations = + { + new MutateOperation(), + }, + }; + AddBatchJobOperationsResponse expectedResponse = new AddBatchJobOperationsResponse + { + TotalOperations = -8188520186954789005L, + NextSequenceToken = "next_sequence_token160dabc7", + }; + mockGrpcClient.Setup(x => x.AddBatchJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + BatchJobServiceClient client = new BatchJobServiceClientImpl(mockGrpcClient.Object, null); + AddBatchJobOperationsResponse responseCallSettings = await client.AddBatchJobOperationsAsync(request.ResourceNameAsBatchJobName, request.MutateOperations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddBatchJobOperationsResponse responseCancellationToken = await client.AddBatchJobOperationsAsync(request.ResourceNameAsBatchJobName, request.MutateOperations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/BiddingStrategyServiceClientTest.g.cs b/tests/V6/Services/BiddingStrategyServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/BiddingStrategyServiceClientTest.g.cs rename to tests/V6/Services/BiddingStrategyServiceClientTest.g.cs index f55876eee..9e5788031 100644 --- a/tests/V2/Services/BiddingStrategyServiceClientTest.g.cs +++ b/tests/V6/Services/BiddingStrategyServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedBiddingStrategyServiceClientTest @@ -37,23 +37,24 @@ public void GetBiddingStrategyRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBiddingStrategyRequest request = new GetBiddingStrategyRequest { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; gagvr::BiddingStrategy expectedResponse = new gagvr::BiddingStrategy { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), - Id = -6774108720365892680L, - BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), Type = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.ManualCpm, EnhancedCpc = new gagvc::EnhancedCpc(), - PageOnePromoted = new gagvc::PageOnePromoted(), TargetCpa = new gagvc::TargetCpa(), - TargetOutrankShare = new gagvc::TargetOutrankShare(), TargetRoas = new gagvc::TargetRoas(), TargetSpend = new gagvc::TargetSpend(), + Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + Id = -6774108720365892680L, + BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), CampaignCount = 7086295369533367171L, NonRemovedCampaignCount = 8279371121198864414L, - Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + EffectiveCurrencyCode = "effective_currency_code0045faae", + MaximizeConversionValue = new gagvc::MaximizeConversionValue(), + MaximizeConversions = new gagvc::MaximizeConversions(), TargetImpressionShare = new gagvc::TargetImpressionShare(), }; mockGrpcClient.Setup(x => x.GetBiddingStrategy(request, moq::It.IsAny())).Returns(expectedResponse); @@ -69,23 +70,24 @@ public void GetBiddingStrategyRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBiddingStrategyRequest request = new GetBiddingStrategyRequest { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; gagvr::BiddingStrategy expectedResponse = new gagvr::BiddingStrategy { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), - Id = -6774108720365892680L, - BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), Type = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.ManualCpm, EnhancedCpc = new gagvc::EnhancedCpc(), - PageOnePromoted = new gagvc::PageOnePromoted(), TargetCpa = new gagvc::TargetCpa(), - TargetOutrankShare = new gagvc::TargetOutrankShare(), TargetRoas = new gagvc::TargetRoas(), TargetSpend = new gagvc::TargetSpend(), + Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + Id = -6774108720365892680L, + BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), CampaignCount = 7086295369533367171L, NonRemovedCampaignCount = 8279371121198864414L, - Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + EffectiveCurrencyCode = "effective_currency_code0045faae", + MaximizeConversionValue = new gagvc::MaximizeConversionValue(), + MaximizeConversions = new gagvc::MaximizeConversions(), TargetImpressionShare = new gagvc::TargetImpressionShare(), }; mockGrpcClient.Setup(x => x.GetBiddingStrategyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -103,23 +105,24 @@ public void GetBiddingStrategy() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBiddingStrategyRequest request = new GetBiddingStrategyRequest { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; gagvr::BiddingStrategy expectedResponse = new gagvr::BiddingStrategy { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), - Id = -6774108720365892680L, - BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), Type = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.ManualCpm, EnhancedCpc = new gagvc::EnhancedCpc(), - PageOnePromoted = new gagvc::PageOnePromoted(), TargetCpa = new gagvc::TargetCpa(), - TargetOutrankShare = new gagvc::TargetOutrankShare(), TargetRoas = new gagvc::TargetRoas(), TargetSpend = new gagvc::TargetSpend(), + Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + Id = -6774108720365892680L, + BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), CampaignCount = 7086295369533367171L, NonRemovedCampaignCount = 8279371121198864414L, - Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + EffectiveCurrencyCode = "effective_currency_code0045faae", + MaximizeConversionValue = new gagvc::MaximizeConversionValue(), + MaximizeConversions = new gagvc::MaximizeConversions(), TargetImpressionShare = new gagvc::TargetImpressionShare(), }; mockGrpcClient.Setup(x => x.GetBiddingStrategy(request, moq::It.IsAny())).Returns(expectedResponse); @@ -135,23 +138,24 @@ public void GetBiddingStrategy() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBiddingStrategyRequest request = new GetBiddingStrategyRequest { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; gagvr::BiddingStrategy expectedResponse = new gagvr::BiddingStrategy { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), - Id = -6774108720365892680L, - BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), Type = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.ManualCpm, EnhancedCpc = new gagvc::EnhancedCpc(), - PageOnePromoted = new gagvc::PageOnePromoted(), TargetCpa = new gagvc::TargetCpa(), - TargetOutrankShare = new gagvc::TargetOutrankShare(), TargetRoas = new gagvc::TargetRoas(), TargetSpend = new gagvc::TargetSpend(), + Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + Id = -6774108720365892680L, + BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), CampaignCount = 7086295369533367171L, NonRemovedCampaignCount = 8279371121198864414L, - Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + EffectiveCurrencyCode = "effective_currency_code0045faae", + MaximizeConversionValue = new gagvc::MaximizeConversionValue(), + MaximizeConversions = new gagvc::MaximizeConversions(), TargetImpressionShare = new gagvc::TargetImpressionShare(), }; mockGrpcClient.Setup(x => x.GetBiddingStrategyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -169,23 +173,24 @@ public void GetBiddingStrategyResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBiddingStrategyRequest request = new GetBiddingStrategyRequest { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; gagvr::BiddingStrategy expectedResponse = new gagvr::BiddingStrategy { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), - Id = -6774108720365892680L, - BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), Type = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.ManualCpm, EnhancedCpc = new gagvc::EnhancedCpc(), - PageOnePromoted = new gagvc::PageOnePromoted(), TargetCpa = new gagvc::TargetCpa(), - TargetOutrankShare = new gagvc::TargetOutrankShare(), TargetRoas = new gagvc::TargetRoas(), TargetSpend = new gagvc::TargetSpend(), + Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + Id = -6774108720365892680L, + BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), CampaignCount = 7086295369533367171L, NonRemovedCampaignCount = 8279371121198864414L, - Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + EffectiveCurrencyCode = "effective_currency_code0045faae", + MaximizeConversionValue = new gagvc::MaximizeConversionValue(), + MaximizeConversions = new gagvc::MaximizeConversions(), TargetImpressionShare = new gagvc::TargetImpressionShare(), }; mockGrpcClient.Setup(x => x.GetBiddingStrategy(request, moq::It.IsAny())).Returns(expectedResponse); @@ -201,23 +206,24 @@ public void GetBiddingStrategyResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBiddingStrategyRequest request = new GetBiddingStrategyRequest { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; gagvr::BiddingStrategy expectedResponse = new gagvr::BiddingStrategy { - ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), - Id = -6774108720365892680L, - BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), + ResourceNameAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), Type = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.ManualCpm, EnhancedCpc = new gagvc::EnhancedCpc(), - PageOnePromoted = new gagvc::PageOnePromoted(), TargetCpa = new gagvc::TargetCpa(), - TargetOutrankShare = new gagvc::TargetOutrankShare(), TargetRoas = new gagvc::TargetRoas(), TargetSpend = new gagvc::TargetSpend(), + Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + Id = -6774108720365892680L, + BiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), CampaignCount = 7086295369533367171L, NonRemovedCampaignCount = 8279371121198864414L, - Status = gagve::BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Enabled, + EffectiveCurrencyCode = "effective_currency_code0045faae", + MaximizeConversionValue = new gagvc::MaximizeConversionValue(), + MaximizeConversions = new gagvc::MaximizeConversions(), TargetImpressionShare = new gagvc::TargetImpressionShare(), }; mockGrpcClient.Setup(x => x.GetBiddingStrategyAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/BillingSetupServiceClientTest.g.cs b/tests/V6/Services/BillingSetupServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/BillingSetupServiceClientTest.g.cs rename to tests/V6/Services/BillingSetupServiceClientTest.g.cs index 54adac639..522cafa6e 100644 --- a/tests/V2/Services/BillingSetupServiceClientTest.g.cs +++ b/tests/V6/Services/BillingSetupServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedBillingSetupServiceClientTest @@ -35,19 +35,19 @@ public void GetBillingSetupRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBillingSetupRequest request = new GetBillingSetupRequest { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), }; gagvr::BillingSetup expectedResponse = new gagvr::BillingSetup { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - Id = -6774108720365892680L, + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), Status = gagve::BillingSetupStatusEnum.Types.BillingSetupStatus.Pending, - StartDateTime = "start_date_timeea924cb1", StartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER]", "[PAYMENTS_ACCOUNT]"), PaymentsAccountInfo = new gagvr::BillingSetup.Types.PaymentsAccountInfo(), - EndDateTime = "end_date_timea95363f3", EndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER_ID]", "[PAYMENTS_ACCOUNT_ID]"), }; mockGrpcClient.Setup(x => x.GetBillingSetup(request, moq::It.IsAny())).Returns(expectedResponse); BillingSetupServiceClient client = new BillingSetupServiceClientImpl(mockGrpcClient.Object, null); @@ -62,19 +62,19 @@ public void GetBillingSetupRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBillingSetupRequest request = new GetBillingSetupRequest { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), }; gagvr::BillingSetup expectedResponse = new gagvr::BillingSetup { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - Id = -6774108720365892680L, + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), Status = gagve::BillingSetupStatusEnum.Types.BillingSetupStatus.Pending, - StartDateTime = "start_date_timeea924cb1", StartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER]", "[PAYMENTS_ACCOUNT]"), PaymentsAccountInfo = new gagvr::BillingSetup.Types.PaymentsAccountInfo(), - EndDateTime = "end_date_timea95363f3", EndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER_ID]", "[PAYMENTS_ACCOUNT_ID]"), }; mockGrpcClient.Setup(x => x.GetBillingSetupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); BillingSetupServiceClient client = new BillingSetupServiceClientImpl(mockGrpcClient.Object, null); @@ -91,19 +91,19 @@ public void GetBillingSetup() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBillingSetupRequest request = new GetBillingSetupRequest { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), }; gagvr::BillingSetup expectedResponse = new gagvr::BillingSetup { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - Id = -6774108720365892680L, + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), Status = gagve::BillingSetupStatusEnum.Types.BillingSetupStatus.Pending, - StartDateTime = "start_date_timeea924cb1", StartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER]", "[PAYMENTS_ACCOUNT]"), PaymentsAccountInfo = new gagvr::BillingSetup.Types.PaymentsAccountInfo(), - EndDateTime = "end_date_timea95363f3", EndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER_ID]", "[PAYMENTS_ACCOUNT_ID]"), }; mockGrpcClient.Setup(x => x.GetBillingSetup(request, moq::It.IsAny())).Returns(expectedResponse); BillingSetupServiceClient client = new BillingSetupServiceClientImpl(mockGrpcClient.Object, null); @@ -118,19 +118,19 @@ public void GetBillingSetup() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBillingSetupRequest request = new GetBillingSetupRequest { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), }; gagvr::BillingSetup expectedResponse = new gagvr::BillingSetup { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - Id = -6774108720365892680L, + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), Status = gagve::BillingSetupStatusEnum.Types.BillingSetupStatus.Pending, - StartDateTime = "start_date_timeea924cb1", StartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER]", "[PAYMENTS_ACCOUNT]"), PaymentsAccountInfo = new gagvr::BillingSetup.Types.PaymentsAccountInfo(), - EndDateTime = "end_date_timea95363f3", EndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER_ID]", "[PAYMENTS_ACCOUNT_ID]"), }; mockGrpcClient.Setup(x => x.GetBillingSetupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); BillingSetupServiceClient client = new BillingSetupServiceClientImpl(mockGrpcClient.Object, null); @@ -147,19 +147,19 @@ public void GetBillingSetupResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBillingSetupRequest request = new GetBillingSetupRequest { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), }; gagvr::BillingSetup expectedResponse = new gagvr::BillingSetup { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - Id = -6774108720365892680L, + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), Status = gagve::BillingSetupStatusEnum.Types.BillingSetupStatus.Pending, - StartDateTime = "start_date_timeea924cb1", StartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER]", "[PAYMENTS_ACCOUNT]"), PaymentsAccountInfo = new gagvr::BillingSetup.Types.PaymentsAccountInfo(), - EndDateTime = "end_date_timea95363f3", EndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER_ID]", "[PAYMENTS_ACCOUNT_ID]"), }; mockGrpcClient.Setup(x => x.GetBillingSetup(request, moq::It.IsAny())).Returns(expectedResponse); BillingSetupServiceClient client = new BillingSetupServiceClientImpl(mockGrpcClient.Object, null); @@ -174,19 +174,19 @@ public void GetBillingSetupResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetBillingSetupRequest request = new GetBillingSetupRequest { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), }; gagvr::BillingSetup expectedResponse = new gagvr::BillingSetup { - ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER]", "[BILLING_SETUP]"), - Id = -6774108720365892680L, + ResourceNameAsBillingSetupName = gagvr::BillingSetupName.FromCustomerBillingSetup("[CUSTOMER_ID]", "[BILLING_SETUP_ID]"), Status = gagve::BillingSetupStatusEnum.Types.BillingSetupStatus.Pending, - StartDateTime = "start_date_timeea924cb1", StartTimeType = gagve::TimeTypeEnum.Types.TimeType.Unknown, - PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER]", "[PAYMENTS_ACCOUNT]"), PaymentsAccountInfo = new gagvr::BillingSetup.Types.PaymentsAccountInfo(), - EndDateTime = "end_date_timea95363f3", EndTimeType = gagve::TimeTypeEnum.Types.TimeType.Unspecified, + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + PaymentsAccountAsPaymentsAccountName = gagvr::PaymentsAccountName.FromCustomerPaymentsAccount("[CUSTOMER_ID]", "[PAYMENTS_ACCOUNT_ID]"), }; mockGrpcClient.Setup(x => x.GetBillingSetupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); BillingSetupServiceClient client = new BillingSetupServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/CampaignAssetServiceClientTest.g.cs b/tests/V6/Services/CampaignAssetServiceClientTest.g.cs new file mode 100644 index 000000000..d1ac95488 --- /dev/null +++ b/tests/V6/Services/CampaignAssetServiceClientTest.g.cs @@ -0,0 +1,293 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using gr = Google.Rpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedCampaignAssetServiceClientTest + { + [Category("Smoke")][Test] + public void GetCampaignAssetRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCampaignAssetRequest request = new GetCampaignAssetRequest + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + }; + gagvr::CampaignAsset expectedResponse = new gagvr::CampaignAsset + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, + Status = gagve::AssetLinkStatusEnum.Types.AssetLinkStatus.Enabled, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetCampaignAsset(request, moq::It.IsAny())).Returns(expectedResponse); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CampaignAsset response = client.GetCampaignAsset(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCampaignAssetRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCampaignAssetRequest request = new GetCampaignAssetRequest + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + }; + gagvr::CampaignAsset expectedResponse = new gagvr::CampaignAsset + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, + Status = gagve::AssetLinkStatusEnum.Types.AssetLinkStatus.Enabled, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetCampaignAssetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CampaignAsset responseCallSettings = await client.GetCampaignAssetAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CampaignAsset responseCancellationToken = await client.GetCampaignAssetAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCampaignAsset() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCampaignAssetRequest request = new GetCampaignAssetRequest + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + }; + gagvr::CampaignAsset expectedResponse = new gagvr::CampaignAsset + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, + Status = gagve::AssetLinkStatusEnum.Types.AssetLinkStatus.Enabled, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetCampaignAsset(request, moq::It.IsAny())).Returns(expectedResponse); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CampaignAsset response = client.GetCampaignAsset(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCampaignAssetAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCampaignAssetRequest request = new GetCampaignAssetRequest + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + }; + gagvr::CampaignAsset expectedResponse = new gagvr::CampaignAsset + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, + Status = gagve::AssetLinkStatusEnum.Types.AssetLinkStatus.Enabled, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetCampaignAssetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CampaignAsset responseCallSettings = await client.GetCampaignAssetAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CampaignAsset responseCancellationToken = await client.GetCampaignAssetAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCampaignAssetResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCampaignAssetRequest request = new GetCampaignAssetRequest + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + }; + gagvr::CampaignAsset expectedResponse = new gagvr::CampaignAsset + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, + Status = gagve::AssetLinkStatusEnum.Types.AssetLinkStatus.Enabled, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetCampaignAsset(request, moq::It.IsAny())).Returns(expectedResponse); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CampaignAsset response = client.GetCampaignAsset(request.ResourceNameAsCampaignAssetName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCampaignAssetResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCampaignAssetRequest request = new GetCampaignAssetRequest + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + }; + gagvr::CampaignAsset expectedResponse = new gagvr::CampaignAsset + { + ResourceNameAsCampaignAssetName = gagvr::CampaignAssetName.FromCustomerCampaignAssetFieldType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[ASSET_ID]", "[FIELD_TYPE]"), + FieldType = gagve::AssetFieldTypeEnum.Types.AssetFieldType.YoutubeVideo, + Status = gagve::AssetLinkStatusEnum.Types.AssetLinkStatus.Enabled, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AssetAsAssetName = gagvr::AssetName.FromCustomerAsset("[CUSTOMER_ID]", "[ASSET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetCampaignAssetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CampaignAsset responseCallSettings = await client.GetCampaignAssetAsync(request.ResourceNameAsCampaignAssetName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CampaignAsset responseCancellationToken = await client.GetCampaignAssetAsync(request.ResourceNameAsCampaignAssetName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateCampaignAssetsRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCampaignAssetsRequest request = new MutateCampaignAssetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CampaignAssetOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateCampaignAssetsResponse expectedResponse = new MutateCampaignAssetsResponse + { + PartialFailureError = new gr::Status(), + Results = + { + new MutateCampaignAssetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCampaignAssets(request, moq::It.IsAny())).Returns(expectedResponse); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + MutateCampaignAssetsResponse response = client.MutateCampaignAssets(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateCampaignAssetsRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCampaignAssetsRequest request = new MutateCampaignAssetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CampaignAssetOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateCampaignAssetsResponse expectedResponse = new MutateCampaignAssetsResponse + { + PartialFailureError = new gr::Status(), + Results = + { + new MutateCampaignAssetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCampaignAssetsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + MutateCampaignAssetsResponse responseCallSettings = await client.MutateCampaignAssetsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateCampaignAssetsResponse responseCancellationToken = await client.MutateCampaignAssetsAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateCampaignAssets() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCampaignAssetsRequest request = new MutateCampaignAssetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CampaignAssetOperation(), + }, + }; + MutateCampaignAssetsResponse expectedResponse = new MutateCampaignAssetsResponse + { + PartialFailureError = new gr::Status(), + Results = + { + new MutateCampaignAssetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCampaignAssets(request, moq::It.IsAny())).Returns(expectedResponse); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + MutateCampaignAssetsResponse response = client.MutateCampaignAssets(request.CustomerId, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateCampaignAssetsAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCampaignAssetsRequest request = new MutateCampaignAssetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CampaignAssetOperation(), + }, + }; + MutateCampaignAssetsResponse expectedResponse = new MutateCampaignAssetsResponse + { + PartialFailureError = new gr::Status(), + Results = + { + new MutateCampaignAssetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCampaignAssetsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CampaignAssetServiceClient client = new CampaignAssetServiceClientImpl(mockGrpcClient.Object, null); + MutateCampaignAssetsResponse responseCallSettings = await client.MutateCampaignAssetsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateCampaignAssetsResponse responseCancellationToken = await client.MutateCampaignAssetsAsync(request.CustomerId, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/CampaignAudienceViewServiceClientTest.g.cs b/tests/V6/Services/CampaignAudienceViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/CampaignAudienceViewServiceClientTest.g.cs rename to tests/V6/Services/CampaignAudienceViewServiceClientTest.g.cs index 6ad37f845..80779115d 100644 --- a/tests/V2/Services/CampaignAudienceViewServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignAudienceViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignAudienceViewServiceClientTest @@ -34,11 +34,11 @@ public void GetCampaignAudienceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignAudienceViewRequest request = new GetCampaignAudienceViewRequest { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignAudienceView expectedResponse = new gagvr::CampaignAudienceView { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAudienceView(request, moq::It.IsAny())).Returns(expectedResponse); CampaignAudienceViewServiceClient client = new CampaignAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetCampaignAudienceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignAudienceViewRequest request = new GetCampaignAudienceViewRequest { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignAudienceView expectedResponse = new gagvr::CampaignAudienceView { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAudienceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignAudienceViewServiceClient client = new CampaignAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetCampaignAudienceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignAudienceViewRequest request = new GetCampaignAudienceViewRequest { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignAudienceView expectedResponse = new gagvr::CampaignAudienceView { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAudienceView(request, moq::It.IsAny())).Returns(expectedResponse); CampaignAudienceViewServiceClient client = new CampaignAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetCampaignAudienceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignAudienceViewRequest request = new GetCampaignAudienceViewRequest { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignAudienceView expectedResponse = new gagvr::CampaignAudienceView { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAudienceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignAudienceViewServiceClient client = new CampaignAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetCampaignAudienceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignAudienceViewRequest request = new GetCampaignAudienceViewRequest { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignAudienceView expectedResponse = new gagvr::CampaignAudienceView { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAudienceView(request, moq::It.IsAny())).Returns(expectedResponse); CampaignAudienceViewServiceClient client = new CampaignAudienceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetCampaignAudienceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignAudienceViewRequest request = new GetCampaignAudienceViewRequest { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignAudienceView expectedResponse = new gagvr::CampaignAudienceView { - ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignAudienceView("[CUSTOMER]", "[CAMPAIGN_AUDIENCE_VIEW]"), + ResourceNameAsCampaignAudienceViewName = gagvr::CampaignAudienceViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAudienceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignAudienceViewServiceClient client = new CampaignAudienceViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CampaignBidModifierServiceClientTest.g.cs b/tests/V6/Services/CampaignBidModifierServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/CampaignBidModifierServiceClientTest.g.cs rename to tests/V6/Services/CampaignBidModifierServiceClientTest.g.cs index ac0310a6c..a3697635c 100644 --- a/tests/V2/Services/CampaignBidModifierServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignBidModifierServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignBidModifierServiceClientTest @@ -36,15 +36,15 @@ public void GetCampaignBidModifierRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignBidModifier expectedResponse = new gagvr::CampaignBidModifier { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + InteractionType = new gagvc::InteractionTypeInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CriterionId = 8584655242409302840L, BidModifier = 1.6595195068951933E+17, - InteractionType = new gagvc::InteractionTypeInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignBidModifier(request, moq::It.IsAny())).Returns(expectedResponse); CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -59,15 +59,15 @@ public void GetCampaignBidModifierRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignBidModifier expectedResponse = new gagvr::CampaignBidModifier { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + InteractionType = new gagvc::InteractionTypeInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CriterionId = 8584655242409302840L, BidModifier = 1.6595195068951933E+17, - InteractionType = new gagvc::InteractionTypeInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignBidModifierAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -84,15 +84,15 @@ public void GetCampaignBidModifier() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignBidModifier expectedResponse = new gagvr::CampaignBidModifier { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + InteractionType = new gagvc::InteractionTypeInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CriterionId = 8584655242409302840L, BidModifier = 1.6595195068951933E+17, - InteractionType = new gagvc::InteractionTypeInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignBidModifier(request, moq::It.IsAny())).Returns(expectedResponse); CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -107,15 +107,15 @@ public void GetCampaignBidModifier() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignBidModifier expectedResponse = new gagvr::CampaignBidModifier { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + InteractionType = new gagvc::InteractionTypeInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CriterionId = 8584655242409302840L, BidModifier = 1.6595195068951933E+17, - InteractionType = new gagvc::InteractionTypeInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignBidModifierAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -132,15 +132,15 @@ public void GetCampaignBidModifierResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignBidModifier expectedResponse = new gagvr::CampaignBidModifier { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + InteractionType = new gagvc::InteractionTypeInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CriterionId = 8584655242409302840L, BidModifier = 1.6595195068951933E+17, - InteractionType = new gagvc::InteractionTypeInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignBidModifier(request, moq::It.IsAny())).Returns(expectedResponse); CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null); @@ -155,15 +155,15 @@ public void GetCampaignBidModifierResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBidModifierRequest request = new GetCampaignBidModifierRequest { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignBidModifier expectedResponse = new gagvr::CampaignBidModifier { - ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignBidModifier("[CUSTOMER]", "[CAMPAIGN_BID_MODIFIER]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignBidModifierName = gagvr::CampaignBidModifierName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + InteractionType = new gagvc::InteractionTypeInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), CriterionId = 8584655242409302840L, BidModifier = 1.6595195068951933E+17, - InteractionType = new gagvc::InteractionTypeInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignBidModifierAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignBidModifierServiceClient client = new CampaignBidModifierServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CampaignBudgetServiceClientTest.g.cs b/tests/V6/Services/CampaignBudgetServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/CampaignBudgetServiceClientTest.g.cs rename to tests/V6/Services/CampaignBudgetServiceClientTest.g.cs index 9e062bcd2..b8564f87a 100644 --- a/tests/V2/Services/CampaignBudgetServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignBudgetServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignBudgetServiceClientTest @@ -36,27 +36,27 @@ public void GetCampaignBudgetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBudgetRequest request = new GetCampaignBudgetRequest { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), }; gagvr::CampaignBudget expectedResponse = new gagvr::CampaignBudget { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - Id = -6774108720365892680L, - CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - AmountMicros = -5708430407335026218L, + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), Status = gagve::BudgetStatusEnum.Types.BudgetStatus.Enabled, DeliveryMethod = gagve::BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Standard, + Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Unspecified, + Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, + Id = -6774108720365892680L, + CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + AmountMicros = -5708430407335026218L, + TotalAmountMicros = -8735537612243809071L, ExplicitlyShared = true, ReferenceCount = -8440758895662409664L, - TotalAmountMicros = -8735537612243809071L, HasRecommendedBudget = false, RecommendedBudgetAmountMicros = -5174015606152417050L, - Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Daily, RecommendedBudgetEstimatedChangeWeeklyClicks = 5003538975719544582L, RecommendedBudgetEstimatedChangeWeeklyCostMicros = 6886876539534848907L, RecommendedBudgetEstimatedChangeWeeklyInteractions = -4068174795511900246L, RecommendedBudgetEstimatedChangeWeeklyViews = -4598204636615893095L, - Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, }; mockGrpcClient.Setup(x => x.GetCampaignBudget(request, moq::It.IsAny())).Returns(expectedResponse); CampaignBudgetServiceClient client = new CampaignBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -71,27 +71,27 @@ public void GetCampaignBudgetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBudgetRequest request = new GetCampaignBudgetRequest { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), }; gagvr::CampaignBudget expectedResponse = new gagvr::CampaignBudget { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - Id = -6774108720365892680L, - CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - AmountMicros = -5708430407335026218L, + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), Status = gagve::BudgetStatusEnum.Types.BudgetStatus.Enabled, DeliveryMethod = gagve::BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Standard, + Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Unspecified, + Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, + Id = -6774108720365892680L, + CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + AmountMicros = -5708430407335026218L, + TotalAmountMicros = -8735537612243809071L, ExplicitlyShared = true, ReferenceCount = -8440758895662409664L, - TotalAmountMicros = -8735537612243809071L, HasRecommendedBudget = false, RecommendedBudgetAmountMicros = -5174015606152417050L, - Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Daily, RecommendedBudgetEstimatedChangeWeeklyClicks = 5003538975719544582L, RecommendedBudgetEstimatedChangeWeeklyCostMicros = 6886876539534848907L, RecommendedBudgetEstimatedChangeWeeklyInteractions = -4068174795511900246L, RecommendedBudgetEstimatedChangeWeeklyViews = -4598204636615893095L, - Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, }; mockGrpcClient.Setup(x => x.GetCampaignBudgetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignBudgetServiceClient client = new CampaignBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -108,27 +108,27 @@ public void GetCampaignBudget() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBudgetRequest request = new GetCampaignBudgetRequest { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), }; gagvr::CampaignBudget expectedResponse = new gagvr::CampaignBudget { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - Id = -6774108720365892680L, - CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - AmountMicros = -5708430407335026218L, + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), Status = gagve::BudgetStatusEnum.Types.BudgetStatus.Enabled, DeliveryMethod = gagve::BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Standard, + Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Unspecified, + Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, + Id = -6774108720365892680L, + CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + AmountMicros = -5708430407335026218L, + TotalAmountMicros = -8735537612243809071L, ExplicitlyShared = true, ReferenceCount = -8440758895662409664L, - TotalAmountMicros = -8735537612243809071L, HasRecommendedBudget = false, RecommendedBudgetAmountMicros = -5174015606152417050L, - Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Daily, RecommendedBudgetEstimatedChangeWeeklyClicks = 5003538975719544582L, RecommendedBudgetEstimatedChangeWeeklyCostMicros = 6886876539534848907L, RecommendedBudgetEstimatedChangeWeeklyInteractions = -4068174795511900246L, RecommendedBudgetEstimatedChangeWeeklyViews = -4598204636615893095L, - Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, }; mockGrpcClient.Setup(x => x.GetCampaignBudget(request, moq::It.IsAny())).Returns(expectedResponse); CampaignBudgetServiceClient client = new CampaignBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -143,27 +143,27 @@ public void GetCampaignBudget() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBudgetRequest request = new GetCampaignBudgetRequest { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), }; gagvr::CampaignBudget expectedResponse = new gagvr::CampaignBudget { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - Id = -6774108720365892680L, - CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - AmountMicros = -5708430407335026218L, + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), Status = gagve::BudgetStatusEnum.Types.BudgetStatus.Enabled, DeliveryMethod = gagve::BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Standard, + Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Unspecified, + Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, + Id = -6774108720365892680L, + CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + AmountMicros = -5708430407335026218L, + TotalAmountMicros = -8735537612243809071L, ExplicitlyShared = true, ReferenceCount = -8440758895662409664L, - TotalAmountMicros = -8735537612243809071L, HasRecommendedBudget = false, RecommendedBudgetAmountMicros = -5174015606152417050L, - Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Daily, RecommendedBudgetEstimatedChangeWeeklyClicks = 5003538975719544582L, RecommendedBudgetEstimatedChangeWeeklyCostMicros = 6886876539534848907L, RecommendedBudgetEstimatedChangeWeeklyInteractions = -4068174795511900246L, RecommendedBudgetEstimatedChangeWeeklyViews = -4598204636615893095L, - Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, }; mockGrpcClient.Setup(x => x.GetCampaignBudgetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignBudgetServiceClient client = new CampaignBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -180,27 +180,27 @@ public void GetCampaignBudgetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBudgetRequest request = new GetCampaignBudgetRequest { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), }; gagvr::CampaignBudget expectedResponse = new gagvr::CampaignBudget { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - Id = -6774108720365892680L, - CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - AmountMicros = -5708430407335026218L, + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), Status = gagve::BudgetStatusEnum.Types.BudgetStatus.Enabled, DeliveryMethod = gagve::BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Standard, + Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Unspecified, + Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, + Id = -6774108720365892680L, + CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + AmountMicros = -5708430407335026218L, + TotalAmountMicros = -8735537612243809071L, ExplicitlyShared = true, ReferenceCount = -8440758895662409664L, - TotalAmountMicros = -8735537612243809071L, HasRecommendedBudget = false, RecommendedBudgetAmountMicros = -5174015606152417050L, - Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Daily, RecommendedBudgetEstimatedChangeWeeklyClicks = 5003538975719544582L, RecommendedBudgetEstimatedChangeWeeklyCostMicros = 6886876539534848907L, RecommendedBudgetEstimatedChangeWeeklyInteractions = -4068174795511900246L, RecommendedBudgetEstimatedChangeWeeklyViews = -4598204636615893095L, - Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, }; mockGrpcClient.Setup(x => x.GetCampaignBudget(request, moq::It.IsAny())).Returns(expectedResponse); CampaignBudgetServiceClient client = new CampaignBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -215,27 +215,27 @@ public void GetCampaignBudgetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignBudgetRequest request = new GetCampaignBudgetRequest { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), }; gagvr::CampaignBudget expectedResponse = new gagvr::CampaignBudget { - ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - Id = -6774108720365892680L, - CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - AmountMicros = -5708430407335026218L, + ResourceNameAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), Status = gagve::BudgetStatusEnum.Types.BudgetStatus.Enabled, DeliveryMethod = gagve::BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Standard, + Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Unspecified, + Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, + Id = -6774108720365892680L, + CampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + AmountMicros = -5708430407335026218L, + TotalAmountMicros = -8735537612243809071L, ExplicitlyShared = true, ReferenceCount = -8440758895662409664L, - TotalAmountMicros = -8735537612243809071L, HasRecommendedBudget = false, RecommendedBudgetAmountMicros = -5174015606152417050L, - Period = gagve::BudgetPeriodEnum.Types.BudgetPeriod.Daily, RecommendedBudgetEstimatedChangeWeeklyClicks = 5003538975719544582L, RecommendedBudgetEstimatedChangeWeeklyCostMicros = 6886876539534848907L, RecommendedBudgetEstimatedChangeWeeklyInteractions = -4068174795511900246L, RecommendedBudgetEstimatedChangeWeeklyViews = -4598204636615893095L, - Type = gagve::BudgetTypeEnum.Types.BudgetType.Unspecified, }; mockGrpcClient.Setup(x => x.GetCampaignBudgetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignBudgetServiceClient client = new CampaignBudgetServiceClientImpl(mockGrpcClient.Object, null); @@ -259,6 +259,7 @@ public void MutateCampaignBudgetsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignBudgetsResponse expectedResponse = new MutateCampaignBudgetsResponse { @@ -288,6 +289,7 @@ public void MutateCampaignBudgetsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignBudgetsResponse expectedResponse = new MutateCampaignBudgetsResponse { diff --git a/tests/V2/Services/CampaignCriterionServiceClientTest.g.cs b/tests/V6/Services/CampaignCriterionServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/CampaignCriterionServiceClientTest.g.cs rename to tests/V6/Services/CampaignCriterionServiceClientTest.g.cs index e05019cd1..a300ef490 100644 --- a/tests/V2/Services/CampaignCriterionServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignCriterionServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignCriterionServiceClientTest @@ -37,22 +37,18 @@ public void GetCampaignCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionRequest request = new GetCampaignCriterionRequest { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CriterionId = 8584655242409302840L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - Negative = false, + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), Location = new gagvc::LocationInfo(), Device = new gagvc::DeviceInfo(), - BidModifier = 1.6595195E+17F, AdSchedule = new gagvc::AdScheduleInfo(), AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -75,6 +71,12 @@ public void GetCampaignCriterionRequestObject() LocationGroup = new gagvc::LocationGroupInfo(), Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed, CustomAffinity = new gagvc::CustomAffinityInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195E+17F, + Negative = false, + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterion(request, moq::It.IsAny())).Returns(expectedResponse); CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -89,22 +91,18 @@ public void GetCampaignCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionRequest request = new GetCampaignCriterionRequest { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CriterionId = 8584655242409302840L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - Negative = false, + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), Location = new gagvc::LocationInfo(), Device = new gagvc::DeviceInfo(), - BidModifier = 1.6595195E+17F, AdSchedule = new gagvc::AdScheduleInfo(), AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -127,6 +125,12 @@ public void GetCampaignCriterionRequestObject() LocationGroup = new gagvc::LocationGroupInfo(), Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed, CustomAffinity = new gagvc::CustomAffinityInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195E+17F, + Negative = false, + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -143,22 +147,18 @@ public void GetCampaignCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionRequest request = new GetCampaignCriterionRequest { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CriterionId = 8584655242409302840L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - Negative = false, + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), Location = new gagvc::LocationInfo(), Device = new gagvc::DeviceInfo(), - BidModifier = 1.6595195E+17F, AdSchedule = new gagvc::AdScheduleInfo(), AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -181,6 +181,12 @@ public void GetCampaignCriterion() LocationGroup = new gagvc::LocationGroupInfo(), Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed, CustomAffinity = new gagvc::CustomAffinityInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195E+17F, + Negative = false, + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterion(request, moq::It.IsAny())).Returns(expectedResponse); CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -195,22 +201,18 @@ public void GetCampaignCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionRequest request = new GetCampaignCriterionRequest { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CriterionId = 8584655242409302840L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - Negative = false, + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), Location = new gagvc::LocationInfo(), Device = new gagvc::DeviceInfo(), - BidModifier = 1.6595195E+17F, AdSchedule = new gagvc::AdScheduleInfo(), AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -233,6 +235,12 @@ public void GetCampaignCriterion() LocationGroup = new gagvc::LocationGroupInfo(), Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed, CustomAffinity = new gagvc::CustomAffinityInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195E+17F, + Negative = false, + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -249,22 +257,18 @@ public void GetCampaignCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionRequest request = new GetCampaignCriterionRequest { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CriterionId = 8584655242409302840L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - Negative = false, + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), Location = new gagvc::LocationInfo(), Device = new gagvc::DeviceInfo(), - BidModifier = 1.6595195E+17F, AdSchedule = new gagvc::AdScheduleInfo(), AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -287,6 +291,12 @@ public void GetCampaignCriterionResourceNames() LocationGroup = new gagvc::LocationGroupInfo(), Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed, CustomAffinity = new gagvc::CustomAffinityInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195E+17F, + Negative = false, + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterion(request, moq::It.IsAny())).Returns(expectedResponse); CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -301,22 +311,18 @@ public void GetCampaignCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionRequest request = new GetCampaignCriterionRequest { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::CampaignCriterion expectedResponse = new gagvr::CampaignCriterion { - ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CriterionId = 8584655242409302840L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, - Negative = false, + ResourceNameAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, Keyword = new gagvc::KeywordInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), Location = new gagvc::LocationInfo(), Device = new gagvc::DeviceInfo(), - BidModifier = 1.6595195E+17F, AdSchedule = new gagvc::AdScheduleInfo(), AgeRange = new gagvc::AgeRangeInfo(), Gender = new gagvc::GenderInfo(), @@ -339,6 +345,12 @@ public void GetCampaignCriterionResourceNames() LocationGroup = new gagvc::LocationGroupInfo(), Status = gagve::CampaignCriterionStatusEnum.Types.CampaignCriterionStatus.Removed, CustomAffinity = new gagvc::CustomAffinityInfo(), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CriterionId = 8584655242409302840L, + BidModifier = 1.6595195E+17F, + Negative = false, + CustomAudience = new gagvc::CustomAudienceInfo(), + CombinedAudience = new gagvc::CombinedAudienceInfo(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignCriterionServiceClient client = new CampaignCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -362,6 +374,7 @@ public void MutateCampaignCriteriaRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignCriteriaResponse expectedResponse = new MutateCampaignCriteriaResponse { @@ -391,6 +404,7 @@ public void MutateCampaignCriteriaRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignCriteriaResponse expectedResponse = new MutateCampaignCriteriaResponse { diff --git a/tests/V2/Services/CampaignCriterionSimulationServiceClientTest.g.cs b/tests/V6/Services/CampaignCriterionSimulationServiceClientTest.g.cs similarity index 85% rename from tests/V2/Services/CampaignCriterionSimulationServiceClientTest.g.cs rename to tests/V6/Services/CampaignCriterionSimulationServiceClientTest.g.cs index 050815f26..67de01ce6 100644 --- a/tests/V2/Services/CampaignCriterionSimulationServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignCriterionSimulationServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignCriterionSimulationServiceClientTest @@ -36,18 +36,18 @@ public void GetCampaignCriterionSimulationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionSimulationRequest request = new GetCampaignCriterionSimulationRequest { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::CampaignCriterionSimulation expectedResponse = new gagvr::CampaignCriterionSimulation { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + BidModifierPointList = new gagvc::BidModifierSimulationPointList(), CampaignId = -3743237468908008719L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - BidModifierPointList = new gagvc::BidModifierSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionSimulation(request, moq::It.IsAny())).Returns(expectedResponse); CampaignCriterionSimulationServiceClient client = new CampaignCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -62,18 +62,18 @@ public void GetCampaignCriterionSimulationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionSimulationRequest request = new GetCampaignCriterionSimulationRequest { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::CampaignCriterionSimulation expectedResponse = new gagvr::CampaignCriterionSimulation { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + BidModifierPointList = new gagvc::BidModifierSimulationPointList(), CampaignId = -3743237468908008719L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - BidModifierPointList = new gagvc::BidModifierSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignCriterionSimulationServiceClient client = new CampaignCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -90,18 +90,18 @@ public void GetCampaignCriterionSimulation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionSimulationRequest request = new GetCampaignCriterionSimulationRequest { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::CampaignCriterionSimulation expectedResponse = new gagvr::CampaignCriterionSimulation { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + BidModifierPointList = new gagvc::BidModifierSimulationPointList(), CampaignId = -3743237468908008719L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - BidModifierPointList = new gagvc::BidModifierSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionSimulation(request, moq::It.IsAny())).Returns(expectedResponse); CampaignCriterionSimulationServiceClient client = new CampaignCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -116,18 +116,18 @@ public void GetCampaignCriterionSimulation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionSimulationRequest request = new GetCampaignCriterionSimulationRequest { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::CampaignCriterionSimulation expectedResponse = new gagvr::CampaignCriterionSimulation { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + BidModifierPointList = new gagvc::BidModifierSimulationPointList(), CampaignId = -3743237468908008719L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - BidModifierPointList = new gagvc::BidModifierSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignCriterionSimulationServiceClient client = new CampaignCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -144,18 +144,18 @@ public void GetCampaignCriterionSimulationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionSimulationRequest request = new GetCampaignCriterionSimulationRequest { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::CampaignCriterionSimulation expectedResponse = new gagvr::CampaignCriterionSimulation { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + BidModifierPointList = new gagvc::BidModifierSimulationPointList(), CampaignId = -3743237468908008719L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - BidModifierPointList = new gagvc::BidModifierSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionSimulation(request, moq::It.IsAny())).Returns(expectedResponse); CampaignCriterionSimulationServiceClient client = new CampaignCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); @@ -170,18 +170,18 @@ public void GetCampaignCriterionSimulationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignCriterionSimulationRequest request = new GetCampaignCriterionSimulationRequest { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), }; gagvr::CampaignCriterionSimulation expectedResponse = new gagvr::CampaignCriterionSimulation { - ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionSimulation("[CUSTOMER]", "[CAMPAIGN_CRITERION_SIMULATION]"), + ResourceNameAsCampaignCriterionSimulationName = gagvr::CampaignCriterionSimulationName.FromCustomerCampaignCriterionTypeModificationMethodStartDateEndDate("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]", "[TYPE]", "[MODIFICATION_METHOD]", "[START_DATE]", "[END_DATE]"), + Type = gagve::SimulationTypeEnum.Types.SimulationType.PercentCpcBid, + ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, + BidModifierPointList = new gagvc::BidModifierSimulationPointList(), CampaignId = -3743237468908008719L, CriterionId = 8584655242409302840L, - Type = gagve::SimulationTypeEnum.Types.SimulationType.CpvBid, - ModificationMethod = gagve::SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unknown, StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", - BidModifierPointList = new gagvc::BidModifierSimulationPointList(), }; mockGrpcClient.Setup(x => x.GetCampaignCriterionSimulationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignCriterionSimulationServiceClient client = new CampaignCriterionSimulationServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CampaignDraftServiceClientTest.g.cs b/tests/V6/Services/CampaignDraftServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/CampaignDraftServiceClientTest.g.cs rename to tests/V6/Services/CampaignDraftServiceClientTest.g.cs index 2599173de..4a6e6d6b3 100644 --- a/tests/V2/Services/CampaignDraftServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignDraftServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using lro = Google.LongRunning; using gr = Google.Rpc; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignDraftServiceClientTest @@ -38,16 +38,16 @@ public void GetCampaignDraftRequestObject() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignDraftRequest request = new GetCampaignDraftRequest { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), }; gagvr::CampaignDraft expectedResponse = new gagvr::CampaignDraft { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftId = -3652444185194679204L, - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), Status = gagve::CampaignDraftStatusEnum.Types.CampaignDraftStatus.Removed, + DraftId = -3652444185194679204L, + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), HasExperimentRunning = true, LongRunningOperation = "long_running_operation0897bd41", }; @@ -65,16 +65,16 @@ public void GetCampaignDraftRequestObject() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignDraftRequest request = new GetCampaignDraftRequest { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), }; gagvr::CampaignDraft expectedResponse = new gagvr::CampaignDraft { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftId = -3652444185194679204L, - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), Status = gagve::CampaignDraftStatusEnum.Types.CampaignDraftStatus.Removed, + DraftId = -3652444185194679204L, + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), HasExperimentRunning = true, LongRunningOperation = "long_running_operation0897bd41", }; @@ -94,16 +94,16 @@ public void GetCampaignDraft() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignDraftRequest request = new GetCampaignDraftRequest { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), }; gagvr::CampaignDraft expectedResponse = new gagvr::CampaignDraft { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftId = -3652444185194679204L, - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), Status = gagve::CampaignDraftStatusEnum.Types.CampaignDraftStatus.Removed, + DraftId = -3652444185194679204L, + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), HasExperimentRunning = true, LongRunningOperation = "long_running_operation0897bd41", }; @@ -121,16 +121,16 @@ public void GetCampaignDraft() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignDraftRequest request = new GetCampaignDraftRequest { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), }; gagvr::CampaignDraft expectedResponse = new gagvr::CampaignDraft { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftId = -3652444185194679204L, - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), Status = gagve::CampaignDraftStatusEnum.Types.CampaignDraftStatus.Removed, + DraftId = -3652444185194679204L, + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), HasExperimentRunning = true, LongRunningOperation = "long_running_operation0897bd41", }; @@ -150,16 +150,16 @@ public void GetCampaignDraftResourceNames() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignDraftRequest request = new GetCampaignDraftRequest { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), }; gagvr::CampaignDraft expectedResponse = new gagvr::CampaignDraft { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftId = -3652444185194679204L, - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), Status = gagve::CampaignDraftStatusEnum.Types.CampaignDraftStatus.Removed, + DraftId = -3652444185194679204L, + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), HasExperimentRunning = true, LongRunningOperation = "long_running_operation0897bd41", }; @@ -177,16 +177,16 @@ public void GetCampaignDraftResourceNames() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignDraftRequest request = new GetCampaignDraftRequest { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), }; gagvr::CampaignDraft expectedResponse = new gagvr::CampaignDraft { - ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftId = -3652444185194679204L, - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - CampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), Status = gagve::CampaignDraftStatusEnum.Types.CampaignDraftStatus.Removed, + DraftId = -3652444185194679204L, + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + DraftCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), HasExperimentRunning = true, LongRunningOperation = "long_running_operation0897bd41", }; @@ -213,6 +213,7 @@ public void MutateCampaignDraftsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignDraftsResponse expectedResponse = new MutateCampaignDraftsResponse { @@ -243,6 +244,7 @@ public void MutateCampaignDraftsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignDraftsResponse expectedResponse = new MutateCampaignDraftsResponse { diff --git a/tests/V2/Services/CampaignExperimentServiceClientTest.g.cs b/tests/V6/Services/CampaignExperimentServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/CampaignExperimentServiceClientTest.g.cs rename to tests/V6/Services/CampaignExperimentServiceClientTest.g.cs index 35054b02c..4a5fadadd 100644 --- a/tests/V2/Services/CampaignExperimentServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignExperimentServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using lro = Google.LongRunning; using wkt = Google.Protobuf.WellKnownTypes; @@ -25,9 +25,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignExperimentServiceClientTest @@ -39,19 +39,19 @@ public void GetCampaignExperimentRequestObject() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignExperimentRequest request = new GetCampaignExperimentRequest { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), }; gagvr::CampaignExperiment expectedResponse = new gagvr::CampaignExperiment { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), + TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, + Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, Id = -6774108720365892680L, - CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), Description = "description2cf9da67", TrafficSplitPercent = -7167375592409567671L, - TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, - ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, + ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), LongRunningOperation = "long_running_operation0897bd41", StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", @@ -70,19 +70,19 @@ public void GetCampaignExperimentRequestObject() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignExperimentRequest request = new GetCampaignExperimentRequest { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), }; gagvr::CampaignExperiment expectedResponse = new gagvr::CampaignExperiment { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), + TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, + Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, Id = -6774108720365892680L, - CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), Description = "description2cf9da67", TrafficSplitPercent = -7167375592409567671L, - TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, - ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, + ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), LongRunningOperation = "long_running_operation0897bd41", StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", @@ -103,19 +103,19 @@ public void GetCampaignExperiment() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignExperimentRequest request = new GetCampaignExperimentRequest { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), }; gagvr::CampaignExperiment expectedResponse = new gagvr::CampaignExperiment { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), + TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, + Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, Id = -6774108720365892680L, - CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), Description = "description2cf9da67", TrafficSplitPercent = -7167375592409567671L, - TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, - ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, + ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), LongRunningOperation = "long_running_operation0897bd41", StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", @@ -134,19 +134,19 @@ public void GetCampaignExperiment() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignExperimentRequest request = new GetCampaignExperimentRequest { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), }; gagvr::CampaignExperiment expectedResponse = new gagvr::CampaignExperiment { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), + TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, + Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, Id = -6774108720365892680L, - CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), Description = "description2cf9da67", TrafficSplitPercent = -7167375592409567671L, - TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, - ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, + ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), LongRunningOperation = "long_running_operation0897bd41", StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", @@ -167,19 +167,19 @@ public void GetCampaignExperimentResourceNames() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignExperimentRequest request = new GetCampaignExperimentRequest { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), }; gagvr::CampaignExperiment expectedResponse = new gagvr::CampaignExperiment { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), + TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, + Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, Id = -6774108720365892680L, - CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), Description = "description2cf9da67", TrafficSplitPercent = -7167375592409567671L, - TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, - ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, + ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), LongRunningOperation = "long_running_operation0897bd41", StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", @@ -198,19 +198,19 @@ public void GetCampaignExperimentResourceNames() mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); GetCampaignExperimentRequest request = new GetCampaignExperimentRequest { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), }; gagvr::CampaignExperiment expectedResponse = new gagvr::CampaignExperiment { - ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + ResourceNameAsCampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), + TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, + Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, Id = -6774108720365892680L, - CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerCampaignDraft("[CUSTOMER]", "[CAMPAIGN_DRAFT]"), - CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"), + CampaignDraftAsCampaignDraftName = gagvr::CampaignDraftName.FromCustomerBaseCampaignDraft("[CUSTOMER_ID]", "[BASE_CAMPAIGN_ID]", "[DRAFT_ID]"), + CampaignExperimentName = gagvr::CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"), Description = "description2cf9da67", TrafficSplitPercent = -7167375592409567671L, - TrafficSplitType = gagve::CampaignExperimentTrafficSplitTypeEnum.Types.CampaignExperimentTrafficSplitType.RandomQuery, - ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Status = gagve::CampaignExperimentStatusEnum.Types.CampaignExperimentStatus.Initializing, + ExperimentCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), LongRunningOperation = "long_running_operation0897bd41", StartDate = "start_date11b9dbea", EndDate = "end_date89dae890", @@ -238,6 +238,7 @@ public void MutateCampaignExperimentsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignExperimentsResponse expectedResponse = new MutateCampaignExperimentsResponse { @@ -268,6 +269,7 @@ public void MutateCampaignExperimentsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignExperimentsResponse expectedResponse = new MutateCampaignExperimentsResponse { diff --git a/tests/V2/Services/CampaignExtensionSettingServiceClientTest.g.cs b/tests/V6/Services/CampaignExtensionSettingServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/CampaignExtensionSettingServiceClientTest.g.cs rename to tests/V6/Services/CampaignExtensionSettingServiceClientTest.g.cs index 6bb822949..f63d6a9e3 100644 --- a/tests/V2/Services/CampaignExtensionSettingServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignExtensionSettingServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignExtensionSettingServiceClientTest @@ -36,18 +36,18 @@ public void GetCampaignExtensionSettingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), }; gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCampaignExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -62,18 +62,18 @@ public void GetCampaignExtensionSettingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), }; gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCampaignExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -90,18 +90,18 @@ public void GetCampaignExtensionSetting() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), }; gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCampaignExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -116,18 +116,18 @@ public void GetCampaignExtensionSetting() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), }; gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCampaignExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -144,18 +144,18 @@ public void GetCampaignExtensionSettingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), }; gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCampaignExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -170,18 +170,18 @@ public void GetCampaignExtensionSettingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignExtensionSettingRequest request = new GetCampaignExtensionSettingRequest { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), }; gagvr::CampaignExtensionSetting expectedResponse = new gagvr::CampaignExtensionSetting { - ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionSetting("[CUSTOMER]", "[CAMPAIGN_EXTENSION_SETTING]"), + ResourceNameAsCampaignExtensionSettingName = gagvr::CampaignExtensionSettingName.FromCustomerCampaignExtensionType("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCampaignExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignExtensionSettingServiceClient client = new CampaignExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CampaignFeedServiceClientTest.g.cs b/tests/V6/Services/CampaignFeedServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/CampaignFeedServiceClientTest.g.cs rename to tests/V6/Services/CampaignFeedServiceClientTest.g.cs index 30385c50c..f94d44a3b 100644 --- a/tests/V2/Services/CampaignFeedServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignFeedServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignFeedServiceClientTest @@ -37,19 +37,19 @@ public void GetCampaignFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignFeedRequest request = new GetCampaignFeedRequest { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), }; gagvr::CampaignFeed expectedResponse = new gagvr::CampaignFeed { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignFeed(request, moq::It.IsAny())).Returns(expectedResponse); CampaignFeedServiceClient client = new CampaignFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -64,19 +64,19 @@ public void GetCampaignFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignFeedRequest request = new GetCampaignFeedRequest { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), }; gagvr::CampaignFeed expectedResponse = new gagvr::CampaignFeed { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignFeedServiceClient client = new CampaignFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -93,19 +93,19 @@ public void GetCampaignFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignFeedRequest request = new GetCampaignFeedRequest { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), }; gagvr::CampaignFeed expectedResponse = new gagvr::CampaignFeed { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignFeed(request, moq::It.IsAny())).Returns(expectedResponse); CampaignFeedServiceClient client = new CampaignFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -120,19 +120,19 @@ public void GetCampaignFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignFeedRequest request = new GetCampaignFeedRequest { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), }; gagvr::CampaignFeed expectedResponse = new gagvr::CampaignFeed { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignFeedServiceClient client = new CampaignFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -149,19 +149,19 @@ public void GetCampaignFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignFeedRequest request = new GetCampaignFeedRequest { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), }; gagvr::CampaignFeed expectedResponse = new gagvr::CampaignFeed { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignFeed(request, moq::It.IsAny())).Returns(expectedResponse); CampaignFeedServiceClient client = new CampaignFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -176,19 +176,19 @@ public void GetCampaignFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignFeedRequest request = new GetCampaignFeedRequest { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), }; gagvr::CampaignFeed expectedResponse = new gagvr::CampaignFeed { - ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignFeedServiceClient client = new CampaignFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -212,6 +212,7 @@ public void MutateCampaignFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignFeedsResponse expectedResponse = new MutateCampaignFeedsResponse { @@ -241,6 +242,7 @@ public void MutateCampaignFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignFeedsResponse expectedResponse = new MutateCampaignFeedsResponse { diff --git a/tests/V2/Services/CampaignLabelServiceClientTest.g.cs b/tests/V6/Services/CampaignLabelServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/CampaignLabelServiceClientTest.g.cs rename to tests/V6/Services/CampaignLabelServiceClientTest.g.cs index 4e37c633d..b549f8b97 100644 --- a/tests/V2/Services/CampaignLabelServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignLabelServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignLabelServiceClientTest @@ -35,13 +35,13 @@ public void GetCampaignLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignLabelRequest request = new GetCampaignLabelRequest { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }; gagvr::CampaignLabel expectedResponse = new gagvr::CampaignLabel { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignLabel(request, moq::It.IsAny())).Returns(expectedResponse); CampaignLabelServiceClient client = new CampaignLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -56,13 +56,13 @@ public void GetCampaignLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignLabelRequest request = new GetCampaignLabelRequest { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }; gagvr::CampaignLabel expectedResponse = new gagvr::CampaignLabel { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignLabelServiceClient client = new CampaignLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -79,13 +79,13 @@ public void GetCampaignLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignLabelRequest request = new GetCampaignLabelRequest { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }; gagvr::CampaignLabel expectedResponse = new gagvr::CampaignLabel { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignLabel(request, moq::It.IsAny())).Returns(expectedResponse); CampaignLabelServiceClient client = new CampaignLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -100,13 +100,13 @@ public void GetCampaignLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignLabelRequest request = new GetCampaignLabelRequest { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }; gagvr::CampaignLabel expectedResponse = new gagvr::CampaignLabel { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignLabelServiceClient client = new CampaignLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -123,13 +123,13 @@ public void GetCampaignLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignLabelRequest request = new GetCampaignLabelRequest { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }; gagvr::CampaignLabel expectedResponse = new gagvr::CampaignLabel { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignLabel(request, moq::It.IsAny())).Returns(expectedResponse); CampaignLabelServiceClient client = new CampaignLabelServiceClientImpl(mockGrpcClient.Object, null); @@ -144,13 +144,13 @@ public void GetCampaignLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignLabelRequest request = new GetCampaignLabelRequest { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }; gagvr::CampaignLabel expectedResponse = new gagvr::CampaignLabel { - ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsCampaignLabelName = gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + LabelAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignLabelServiceClient client = new CampaignLabelServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CampaignServiceClientTest.g.cs b/tests/V6/Services/CampaignServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/CampaignServiceClientTest.g.cs rename to tests/V6/Services/CampaignServiceClientTest.g.cs index 93898fc31..3fd276648 100644 --- a/tests/V2/Services/CampaignServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignServiceClientTest @@ -37,35 +37,27 @@ public void GetCampaignRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignRequest request = new GetCampaignRequest { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; gagvr::Campaign expectedResponse = new gagvr::Campaign { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Id = -6774108720365892680L, - CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Status = gagve::CampaignStatusEnum.Types.CampaignStatus.Removed, - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), AdServingOptimizationStatus = gagve::AdServingOptimizationStatusEnum.Types.AdServingOptimizationStatus.ConversionOptimize, AdvertisingChannelType = gagve::AdvertisingChannelTypeEnum.Types.AdvertisingChannelType.MultiChannel, - AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.VideoOutstream, - TrackingUrlTemplate = "tracking_url_template157f152a", + AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.AppCampaign, UrlCustomParameters = { new gagvc::CustomParameter(), }, NetworkSettings = new gagvr::Campaign.Types.NetworkSettings(), ExperimentType = gagve::CampaignExperimentTypeEnum.Types.CampaignExperimentType.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", ServingStatus = gagve::CampaignServingStatusEnum.Types.CampaignServingStatus.Ended, BiddingStrategyType = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.TargetCpa, - BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), ManualCpc = new gagvc::ManualCpc(), ManualCpm = new gagvc::ManualCpm(), TargetCpa = new gagvc::TargetCpa(), TargetSpend = new gagvc::TargetSpend(), - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), TargetRoas = new gagvc::TargetRoas(), MaximizeConversions = new gagvc::MaximizeConversions(), MaximizeConversionValue = new gagvc::MaximizeConversionValue(), @@ -74,7 +66,6 @@ public void GetCampaignRequestObject() PercentCpc = new gagvc::PercentCpc(), ShoppingSetting = new gagvr::Campaign.Types.ShoppingSetting(), ManualCpv = new gagvc::ManualCpv(), - FinalUrlSuffix = "final_url_suffix046ed37a", RealTimeBiddingSetting = new gagvc::RealTimeBiddingSetting(), FrequencyCaps = { @@ -89,12 +80,24 @@ public void GetCampaignRequestObject() GeoTargetTypeSetting = new gagvr::Campaign.Types.GeoTargetTypeSetting(), TargetImpressionShare = new gagvc::TargetImpressionShare(), Commission = new gagvc::Commission(), + LocalCampaignSetting = new gagvr::Campaign.Types.LocalCampaignSetting(), AppCampaignSetting = new gagvr::Campaign.Types.AppCampaignSetting(), - PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Conversions, + PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Clicks, + OptimizationGoalSetting = new gagvr::Campaign.Types.OptimizationGoalSetting(), + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + Id = -6774108720365892680L, + TrackingUrlTemplate = "tracking_url_template157f152a", LabelsAsCampaignLabelNames = { - gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }, + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", + FinalUrlSuffix = "final_url_suffix046ed37a", + OptimizationScore = -4.7741588361660064E+17, + BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaign(request, moq::It.IsAny())).Returns(expectedResponse); CampaignServiceClient client = new CampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -109,35 +112,27 @@ public void GetCampaignRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignRequest request = new GetCampaignRequest { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; gagvr::Campaign expectedResponse = new gagvr::Campaign { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Id = -6774108720365892680L, - CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Status = gagve::CampaignStatusEnum.Types.CampaignStatus.Removed, - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), AdServingOptimizationStatus = gagve::AdServingOptimizationStatusEnum.Types.AdServingOptimizationStatus.ConversionOptimize, AdvertisingChannelType = gagve::AdvertisingChannelTypeEnum.Types.AdvertisingChannelType.MultiChannel, - AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.VideoOutstream, - TrackingUrlTemplate = "tracking_url_template157f152a", + AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.AppCampaign, UrlCustomParameters = { new gagvc::CustomParameter(), }, NetworkSettings = new gagvr::Campaign.Types.NetworkSettings(), ExperimentType = gagve::CampaignExperimentTypeEnum.Types.CampaignExperimentType.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", ServingStatus = gagve::CampaignServingStatusEnum.Types.CampaignServingStatus.Ended, BiddingStrategyType = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.TargetCpa, - BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), ManualCpc = new gagvc::ManualCpc(), ManualCpm = new gagvc::ManualCpm(), TargetCpa = new gagvc::TargetCpa(), TargetSpend = new gagvc::TargetSpend(), - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), TargetRoas = new gagvc::TargetRoas(), MaximizeConversions = new gagvc::MaximizeConversions(), MaximizeConversionValue = new gagvc::MaximizeConversionValue(), @@ -146,7 +141,6 @@ public void GetCampaignRequestObject() PercentCpc = new gagvc::PercentCpc(), ShoppingSetting = new gagvr::Campaign.Types.ShoppingSetting(), ManualCpv = new gagvc::ManualCpv(), - FinalUrlSuffix = "final_url_suffix046ed37a", RealTimeBiddingSetting = new gagvc::RealTimeBiddingSetting(), FrequencyCaps = { @@ -161,12 +155,24 @@ public void GetCampaignRequestObject() GeoTargetTypeSetting = new gagvr::Campaign.Types.GeoTargetTypeSetting(), TargetImpressionShare = new gagvc::TargetImpressionShare(), Commission = new gagvc::Commission(), + LocalCampaignSetting = new gagvr::Campaign.Types.LocalCampaignSetting(), AppCampaignSetting = new gagvr::Campaign.Types.AppCampaignSetting(), - PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Conversions, + PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Clicks, + OptimizationGoalSetting = new gagvr::Campaign.Types.OptimizationGoalSetting(), + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + Id = -6774108720365892680L, + TrackingUrlTemplate = "tracking_url_template157f152a", LabelsAsCampaignLabelNames = { - gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }, + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", + FinalUrlSuffix = "final_url_suffix046ed37a", + OptimizationScore = -4.7741588361660064E+17, + BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignServiceClient client = new CampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -183,35 +189,27 @@ public void GetCampaign() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignRequest request = new GetCampaignRequest { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; gagvr::Campaign expectedResponse = new gagvr::Campaign { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Id = -6774108720365892680L, - CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Status = gagve::CampaignStatusEnum.Types.CampaignStatus.Removed, - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), AdServingOptimizationStatus = gagve::AdServingOptimizationStatusEnum.Types.AdServingOptimizationStatus.ConversionOptimize, AdvertisingChannelType = gagve::AdvertisingChannelTypeEnum.Types.AdvertisingChannelType.MultiChannel, - AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.VideoOutstream, - TrackingUrlTemplate = "tracking_url_template157f152a", + AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.AppCampaign, UrlCustomParameters = { new gagvc::CustomParameter(), }, NetworkSettings = new gagvr::Campaign.Types.NetworkSettings(), ExperimentType = gagve::CampaignExperimentTypeEnum.Types.CampaignExperimentType.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", ServingStatus = gagve::CampaignServingStatusEnum.Types.CampaignServingStatus.Ended, BiddingStrategyType = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.TargetCpa, - BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), ManualCpc = new gagvc::ManualCpc(), ManualCpm = new gagvc::ManualCpm(), TargetCpa = new gagvc::TargetCpa(), TargetSpend = new gagvc::TargetSpend(), - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), TargetRoas = new gagvc::TargetRoas(), MaximizeConversions = new gagvc::MaximizeConversions(), MaximizeConversionValue = new gagvc::MaximizeConversionValue(), @@ -220,7 +218,6 @@ public void GetCampaign() PercentCpc = new gagvc::PercentCpc(), ShoppingSetting = new gagvr::Campaign.Types.ShoppingSetting(), ManualCpv = new gagvc::ManualCpv(), - FinalUrlSuffix = "final_url_suffix046ed37a", RealTimeBiddingSetting = new gagvc::RealTimeBiddingSetting(), FrequencyCaps = { @@ -235,12 +232,24 @@ public void GetCampaign() GeoTargetTypeSetting = new gagvr::Campaign.Types.GeoTargetTypeSetting(), TargetImpressionShare = new gagvc::TargetImpressionShare(), Commission = new gagvc::Commission(), + LocalCampaignSetting = new gagvr::Campaign.Types.LocalCampaignSetting(), AppCampaignSetting = new gagvr::Campaign.Types.AppCampaignSetting(), - PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Conversions, + PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Clicks, + OptimizationGoalSetting = new gagvr::Campaign.Types.OptimizationGoalSetting(), + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + Id = -6774108720365892680L, + TrackingUrlTemplate = "tracking_url_template157f152a", LabelsAsCampaignLabelNames = { - gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }, + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", + FinalUrlSuffix = "final_url_suffix046ed37a", + OptimizationScore = -4.7741588361660064E+17, + BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaign(request, moq::It.IsAny())).Returns(expectedResponse); CampaignServiceClient client = new CampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -255,35 +264,27 @@ public void GetCampaign() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignRequest request = new GetCampaignRequest { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; gagvr::Campaign expectedResponse = new gagvr::Campaign { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Id = -6774108720365892680L, - CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Status = gagve::CampaignStatusEnum.Types.CampaignStatus.Removed, - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), AdServingOptimizationStatus = gagve::AdServingOptimizationStatusEnum.Types.AdServingOptimizationStatus.ConversionOptimize, AdvertisingChannelType = gagve::AdvertisingChannelTypeEnum.Types.AdvertisingChannelType.MultiChannel, - AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.VideoOutstream, - TrackingUrlTemplate = "tracking_url_template157f152a", + AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.AppCampaign, UrlCustomParameters = { new gagvc::CustomParameter(), }, NetworkSettings = new gagvr::Campaign.Types.NetworkSettings(), ExperimentType = gagve::CampaignExperimentTypeEnum.Types.CampaignExperimentType.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", ServingStatus = gagve::CampaignServingStatusEnum.Types.CampaignServingStatus.Ended, BiddingStrategyType = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.TargetCpa, - BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), ManualCpc = new gagvc::ManualCpc(), ManualCpm = new gagvc::ManualCpm(), TargetCpa = new gagvc::TargetCpa(), TargetSpend = new gagvc::TargetSpend(), - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), TargetRoas = new gagvc::TargetRoas(), MaximizeConversions = new gagvc::MaximizeConversions(), MaximizeConversionValue = new gagvc::MaximizeConversionValue(), @@ -292,7 +293,6 @@ public void GetCampaign() PercentCpc = new gagvc::PercentCpc(), ShoppingSetting = new gagvr::Campaign.Types.ShoppingSetting(), ManualCpv = new gagvc::ManualCpv(), - FinalUrlSuffix = "final_url_suffix046ed37a", RealTimeBiddingSetting = new gagvc::RealTimeBiddingSetting(), FrequencyCaps = { @@ -307,12 +307,24 @@ public void GetCampaign() GeoTargetTypeSetting = new gagvr::Campaign.Types.GeoTargetTypeSetting(), TargetImpressionShare = new gagvc::TargetImpressionShare(), Commission = new gagvc::Commission(), + LocalCampaignSetting = new gagvr::Campaign.Types.LocalCampaignSetting(), AppCampaignSetting = new gagvr::Campaign.Types.AppCampaignSetting(), - PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Conversions, + PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Clicks, + OptimizationGoalSetting = new gagvr::Campaign.Types.OptimizationGoalSetting(), + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + Id = -6774108720365892680L, + TrackingUrlTemplate = "tracking_url_template157f152a", LabelsAsCampaignLabelNames = { - gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }, + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", + FinalUrlSuffix = "final_url_suffix046ed37a", + OptimizationScore = -4.7741588361660064E+17, + BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignServiceClient client = new CampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -329,35 +341,27 @@ public void GetCampaignResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignRequest request = new GetCampaignRequest { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; gagvr::Campaign expectedResponse = new gagvr::Campaign { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Id = -6774108720365892680L, - CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Status = gagve::CampaignStatusEnum.Types.CampaignStatus.Removed, - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), AdServingOptimizationStatus = gagve::AdServingOptimizationStatusEnum.Types.AdServingOptimizationStatus.ConversionOptimize, AdvertisingChannelType = gagve::AdvertisingChannelTypeEnum.Types.AdvertisingChannelType.MultiChannel, - AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.VideoOutstream, - TrackingUrlTemplate = "tracking_url_template157f152a", + AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.AppCampaign, UrlCustomParameters = { new gagvc::CustomParameter(), }, NetworkSettings = new gagvr::Campaign.Types.NetworkSettings(), ExperimentType = gagve::CampaignExperimentTypeEnum.Types.CampaignExperimentType.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", ServingStatus = gagve::CampaignServingStatusEnum.Types.CampaignServingStatus.Ended, BiddingStrategyType = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.TargetCpa, - BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), ManualCpc = new gagvc::ManualCpc(), ManualCpm = new gagvc::ManualCpm(), TargetCpa = new gagvc::TargetCpa(), TargetSpend = new gagvc::TargetSpend(), - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), TargetRoas = new gagvc::TargetRoas(), MaximizeConversions = new gagvc::MaximizeConversions(), MaximizeConversionValue = new gagvc::MaximizeConversionValue(), @@ -366,7 +370,6 @@ public void GetCampaignResourceNames() PercentCpc = new gagvc::PercentCpc(), ShoppingSetting = new gagvr::Campaign.Types.ShoppingSetting(), ManualCpv = new gagvc::ManualCpv(), - FinalUrlSuffix = "final_url_suffix046ed37a", RealTimeBiddingSetting = new gagvc::RealTimeBiddingSetting(), FrequencyCaps = { @@ -381,12 +384,24 @@ public void GetCampaignResourceNames() GeoTargetTypeSetting = new gagvr::Campaign.Types.GeoTargetTypeSetting(), TargetImpressionShare = new gagvc::TargetImpressionShare(), Commission = new gagvc::Commission(), + LocalCampaignSetting = new gagvr::Campaign.Types.LocalCampaignSetting(), AppCampaignSetting = new gagvr::Campaign.Types.AppCampaignSetting(), - PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Conversions, + PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Clicks, + OptimizationGoalSetting = new gagvr::Campaign.Types.OptimizationGoalSetting(), + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + Id = -6774108720365892680L, + TrackingUrlTemplate = "tracking_url_template157f152a", LabelsAsCampaignLabelNames = { - gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }, + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", + FinalUrlSuffix = "final_url_suffix046ed37a", + OptimizationScore = -4.7741588361660064E+17, + BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaign(request, moq::It.IsAny())).Returns(expectedResponse); CampaignServiceClient client = new CampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -401,35 +416,27 @@ public void GetCampaignResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignRequest request = new GetCampaignRequest { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), }; gagvr::Campaign expectedResponse = new gagvr::Campaign { - ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - Id = -6774108720365892680L, - CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Status = gagve::CampaignStatusEnum.Types.CampaignStatus.Removed, - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), AdServingOptimizationStatus = gagve::AdServingOptimizationStatusEnum.Types.AdServingOptimizationStatus.ConversionOptimize, AdvertisingChannelType = gagve::AdvertisingChannelTypeEnum.Types.AdvertisingChannelType.MultiChannel, - AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.VideoOutstream, - TrackingUrlTemplate = "tracking_url_template157f152a", + AdvertisingChannelSubType = gagve::AdvertisingChannelSubTypeEnum.Types.AdvertisingChannelSubType.AppCampaign, UrlCustomParameters = { new gagvc::CustomParameter(), }, NetworkSettings = new gagvr::Campaign.Types.NetworkSettings(), ExperimentType = gagve::CampaignExperimentTypeEnum.Types.CampaignExperimentType.Unknown, - StartDate = "start_date11b9dbea", - EndDate = "end_date89dae890", ServingStatus = gagve::CampaignServingStatusEnum.Types.CampaignServingStatus.Ended, BiddingStrategyType = gagve::BiddingStrategyTypeEnum.Types.BiddingStrategyType.TargetCpa, - BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER]", "[BIDDING_STRATEGY]"), ManualCpc = new gagvc::ManualCpc(), ManualCpm = new gagvc::ManualCpm(), TargetCpa = new gagvc::TargetCpa(), TargetSpend = new gagvc::TargetSpend(), - BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), TargetRoas = new gagvc::TargetRoas(), MaximizeConversions = new gagvc::MaximizeConversions(), MaximizeConversionValue = new gagvc::MaximizeConversionValue(), @@ -438,7 +445,6 @@ public void GetCampaignResourceNames() PercentCpc = new gagvc::PercentCpc(), ShoppingSetting = new gagvr::Campaign.Types.ShoppingSetting(), ManualCpv = new gagvc::ManualCpv(), - FinalUrlSuffix = "final_url_suffix046ed37a", RealTimeBiddingSetting = new gagvc::RealTimeBiddingSetting(), FrequencyCaps = { @@ -453,12 +459,24 @@ public void GetCampaignResourceNames() GeoTargetTypeSetting = new gagvr::Campaign.Types.GeoTargetTypeSetting(), TargetImpressionShare = new gagvc::TargetImpressionShare(), Commission = new gagvc::Commission(), + LocalCampaignSetting = new gagvr::Campaign.Types.LocalCampaignSetting(), AppCampaignSetting = new gagvr::Campaign.Types.AppCampaignSetting(), - PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Conversions, + PaymentMode = gagve::PaymentModeEnum.Types.PaymentMode.Clicks, + OptimizationGoalSetting = new gagvr::Campaign.Types.OptimizationGoalSetting(), + BaseCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + CampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + Id = -6774108720365892680L, + TrackingUrlTemplate = "tracking_url_template157f152a", LabelsAsCampaignLabelNames = { - gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER]", "[CAMPAIGN_LABEL]"), + gagvr::CampaignLabelName.FromCustomerCampaignLabel("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[LABEL_ID]"), }, + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + StartDate = "start_date11b9dbea", + EndDate = "end_date89dae890", + FinalUrlSuffix = "final_url_suffix046ed37a", + OptimizationScore = -4.7741588361660064E+17, + BiddingStrategyAsBiddingStrategyName = gagvr::BiddingStrategyName.FromCustomerBiddingStrategy("[CUSTOMER_ID]", "[BIDDING_STRATEGY_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignServiceClient client = new CampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -482,6 +500,7 @@ public void MutateCampaignsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignsResponse expectedResponse = new MutateCampaignsResponse { @@ -511,6 +530,7 @@ public void MutateCampaignsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCampaignsResponse expectedResponse = new MutateCampaignsResponse { diff --git a/tests/V2/Services/CampaignSharedSetServiceClientTest.g.cs b/tests/V6/Services/CampaignSharedSetServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/CampaignSharedSetServiceClientTest.g.cs rename to tests/V6/Services/CampaignSharedSetServiceClientTest.g.cs index c915fa43c..ce94ce6d4 100644 --- a/tests/V2/Services/CampaignSharedSetServiceClientTest.g.cs +++ b/tests/V6/Services/CampaignSharedSetServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCampaignSharedSetServiceClientTest @@ -36,14 +36,14 @@ public void GetCampaignSharedSetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignSharedSetRequest request = new GetCampaignSharedSetRequest { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), }; gagvr::CampaignSharedSet expectedResponse = new gagvr::CampaignSharedSet { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), Status = gagve::CampaignSharedSetStatusEnum.Types.CampaignSharedSetStatus.Enabled, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignSharedSet(request, moq::It.IsAny())).Returns(expectedResponse); CampaignSharedSetServiceClient client = new CampaignSharedSetServiceClientImpl(mockGrpcClient.Object, null); @@ -58,14 +58,14 @@ public void GetCampaignSharedSetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignSharedSetRequest request = new GetCampaignSharedSetRequest { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), }; gagvr::CampaignSharedSet expectedResponse = new gagvr::CampaignSharedSet { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), Status = gagve::CampaignSharedSetStatusEnum.Types.CampaignSharedSetStatus.Enabled, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignSharedSetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignSharedSetServiceClient client = new CampaignSharedSetServiceClientImpl(mockGrpcClient.Object, null); @@ -82,14 +82,14 @@ public void GetCampaignSharedSet() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignSharedSetRequest request = new GetCampaignSharedSetRequest { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), }; gagvr::CampaignSharedSet expectedResponse = new gagvr::CampaignSharedSet { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), Status = gagve::CampaignSharedSetStatusEnum.Types.CampaignSharedSetStatus.Enabled, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignSharedSet(request, moq::It.IsAny())).Returns(expectedResponse); CampaignSharedSetServiceClient client = new CampaignSharedSetServiceClientImpl(mockGrpcClient.Object, null); @@ -104,14 +104,14 @@ public void GetCampaignSharedSet() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignSharedSetRequest request = new GetCampaignSharedSetRequest { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), }; gagvr::CampaignSharedSet expectedResponse = new gagvr::CampaignSharedSet { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), Status = gagve::CampaignSharedSetStatusEnum.Types.CampaignSharedSetStatus.Enabled, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignSharedSetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignSharedSetServiceClient client = new CampaignSharedSetServiceClientImpl(mockGrpcClient.Object, null); @@ -128,14 +128,14 @@ public void GetCampaignSharedSetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignSharedSetRequest request = new GetCampaignSharedSetRequest { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), }; gagvr::CampaignSharedSet expectedResponse = new gagvr::CampaignSharedSet { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), Status = gagve::CampaignSharedSetStatusEnum.Types.CampaignSharedSetStatus.Enabled, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignSharedSet(request, moq::It.IsAny())).Returns(expectedResponse); CampaignSharedSetServiceClient client = new CampaignSharedSetServiceClientImpl(mockGrpcClient.Object, null); @@ -150,14 +150,14 @@ public void GetCampaignSharedSetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCampaignSharedSetRequest request = new GetCampaignSharedSetRequest { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), }; gagvr::CampaignSharedSet expectedResponse = new gagvr::CampaignSharedSet { - ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER]", "[CAMPAIGN_SHARED_SET]"), + ResourceNameAsCampaignSharedSetName = gagvr::CampaignSharedSetName.FromCustomerCampaignSharedSet("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[SHARED_SET_ID]"), Status = gagve::CampaignSharedSetStatusEnum.Types.CampaignSharedSetStatus.Enabled, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; mockGrpcClient.Setup(x => x.GetCampaignSharedSetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CampaignSharedSetServiceClient client = new CampaignSharedSetServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CarrierConstantServiceClientTest.g.cs b/tests/V6/Services/CarrierConstantServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/CarrierConstantServiceClientTest.g.cs rename to tests/V6/Services/CarrierConstantServiceClientTest.g.cs index 0b817a5d6..cc8183008 100644 --- a/tests/V2/Services/CarrierConstantServiceClientTest.g.cs +++ b/tests/V6/Services/CarrierConstantServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCarrierConstantServiceClientTest @@ -34,13 +34,13 @@ public void GetCarrierConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCarrierConstantRequest request = new GetCarrierConstantRequest { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::CarrierConstant expectedResponse = new gagvr::CarrierConstant { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - CarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + CarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", }; mockGrpcClient.Setup(x => x.GetCarrierConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -56,13 +56,13 @@ public void GetCarrierConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCarrierConstantRequest request = new GetCarrierConstantRequest { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::CarrierConstant expectedResponse = new gagvr::CarrierConstant { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - CarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + CarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", }; mockGrpcClient.Setup(x => x.GetCarrierConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -80,13 +80,13 @@ public void GetCarrierConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCarrierConstantRequest request = new GetCarrierConstantRequest { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::CarrierConstant expectedResponse = new gagvr::CarrierConstant { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - CarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + CarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", }; mockGrpcClient.Setup(x => x.GetCarrierConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -102,13 +102,13 @@ public void GetCarrierConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCarrierConstantRequest request = new GetCarrierConstantRequest { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::CarrierConstant expectedResponse = new gagvr::CarrierConstant { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - CarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + CarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", }; mockGrpcClient.Setup(x => x.GetCarrierConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -126,13 +126,13 @@ public void GetCarrierConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCarrierConstantRequest request = new GetCarrierConstantRequest { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::CarrierConstant expectedResponse = new gagvr::CarrierConstant { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - CarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + CarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", }; mockGrpcClient.Setup(x => x.GetCarrierConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -148,13 +148,13 @@ public void GetCarrierConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCarrierConstantRequest request = new GetCarrierConstantRequest { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::CarrierConstant expectedResponse = new gagvr::CarrierConstant { - ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + ResourceNameAsCarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - CarrierConstantName = gagvr::CarrierConstantName.FromCarrierConstant("[CARRIER_CONSTANT]"), + CarrierConstantName = gagvr::CarrierConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", }; mockGrpcClient.Setup(x => x.GetCarrierConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/ChangeStatusServiceClientTest.g.cs b/tests/V6/Services/ChangeStatusServiceClientTest.g.cs similarity index 73% rename from tests/V2/Services/ChangeStatusServiceClientTest.g.cs rename to tests/V6/Services/ChangeStatusServiceClientTest.g.cs index cc22e8399..4695a3d83 100644 --- a/tests/V2/Services/ChangeStatusServiceClientTest.g.cs +++ b/tests/V6/Services/ChangeStatusServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedChangeStatusServiceClientTest @@ -35,24 +35,24 @@ public void GetChangeStatusRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetChangeStatusRequest request = new GetChangeStatusRequest { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), }; gagvr::ChangeStatus expectedResponse = new gagvr::ChangeStatus { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), - LastChangeDateTime = "last_change_date_time05524d04", + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), ResourceType = gagve::ChangeStatusResourceTypeEnum.Types.ChangeStatusResourceType.Feed, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), ResourceStatus = gagve::ChangeStatusOperationEnum.Types.ChangeStatusOperation.Unspecified, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LastChangeDateTime = "last_change_date_time05524d04", + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), + CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), + AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetChangeStatus(request, moq::It.IsAny())).Returns(expectedResponse); ChangeStatusServiceClient client = new ChangeStatusServiceClientImpl(mockGrpcClient.Object, null); @@ -67,24 +67,24 @@ public void GetChangeStatusRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetChangeStatusRequest request = new GetChangeStatusRequest { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), }; gagvr::ChangeStatus expectedResponse = new gagvr::ChangeStatus { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), - LastChangeDateTime = "last_change_date_time05524d04", + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), ResourceType = gagve::ChangeStatusResourceTypeEnum.Types.ChangeStatusResourceType.Feed, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), ResourceStatus = gagve::ChangeStatusOperationEnum.Types.ChangeStatusOperation.Unspecified, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LastChangeDateTime = "last_change_date_time05524d04", + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), + CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), + AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetChangeStatusAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ChangeStatusServiceClient client = new ChangeStatusServiceClientImpl(mockGrpcClient.Object, null); @@ -101,24 +101,24 @@ public void GetChangeStatus() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetChangeStatusRequest request = new GetChangeStatusRequest { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), }; gagvr::ChangeStatus expectedResponse = new gagvr::ChangeStatus { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), - LastChangeDateTime = "last_change_date_time05524d04", + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), ResourceType = gagve::ChangeStatusResourceTypeEnum.Types.ChangeStatusResourceType.Feed, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), ResourceStatus = gagve::ChangeStatusOperationEnum.Types.ChangeStatusOperation.Unspecified, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LastChangeDateTime = "last_change_date_time05524d04", + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), + CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), + AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetChangeStatus(request, moq::It.IsAny())).Returns(expectedResponse); ChangeStatusServiceClient client = new ChangeStatusServiceClientImpl(mockGrpcClient.Object, null); @@ -133,24 +133,24 @@ public void GetChangeStatus() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetChangeStatusRequest request = new GetChangeStatusRequest { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), }; gagvr::ChangeStatus expectedResponse = new gagvr::ChangeStatus { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), - LastChangeDateTime = "last_change_date_time05524d04", + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), ResourceType = gagve::ChangeStatusResourceTypeEnum.Types.ChangeStatusResourceType.Feed, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), ResourceStatus = gagve::ChangeStatusOperationEnum.Types.ChangeStatusOperation.Unspecified, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LastChangeDateTime = "last_change_date_time05524d04", + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), + CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), + AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetChangeStatusAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ChangeStatusServiceClient client = new ChangeStatusServiceClientImpl(mockGrpcClient.Object, null); @@ -167,24 +167,24 @@ public void GetChangeStatusResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetChangeStatusRequest request = new GetChangeStatusRequest { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), }; gagvr::ChangeStatus expectedResponse = new gagvr::ChangeStatus { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), - LastChangeDateTime = "last_change_date_time05524d04", + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), ResourceType = gagve::ChangeStatusResourceTypeEnum.Types.ChangeStatusResourceType.Feed, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), ResourceStatus = gagve::ChangeStatusOperationEnum.Types.ChangeStatusOperation.Unspecified, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LastChangeDateTime = "last_change_date_time05524d04", + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), + CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), + AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetChangeStatus(request, moq::It.IsAny())).Returns(expectedResponse); ChangeStatusServiceClient client = new ChangeStatusServiceClientImpl(mockGrpcClient.Object, null); @@ -199,24 +199,24 @@ public void GetChangeStatusResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetChangeStatusRequest request = new GetChangeStatusRequest { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), }; gagvr::ChangeStatus expectedResponse = new gagvr::ChangeStatus { - ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER]", "[CHANGE_STATUS]"), - LastChangeDateTime = "last_change_date_time05524d04", + ResourceNameAsChangeStatusName = gagvr::ChangeStatusName.FromCustomerChangeStatus("[CUSTOMER_ID]", "[CHANGE_STATUS_ID]"), ResourceType = gagve::ChangeStatusResourceTypeEnum.Types.ChangeStatusResourceType.Feed, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), ResourceStatus = gagve::ChangeStatusOperationEnum.Types.ChangeStatusOperation.Unspecified, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), - AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER]", "[AD_GROUP_CRITERION]"), - CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER]", "[CAMPAIGN_CRITERION]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER]", "[AD_GROUP_FEED]"), - CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER]", "[CAMPAIGN_FEED]"), - AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupBidModifier("[CUSTOMER]", "[AD_GROUP_BID_MODIFIER]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + LastChangeDateTime = "last_change_date_time05524d04", + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + AdGroupCriterionAsAdGroupCriterionName = gagvr::AdGroupCriterionName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + CampaignCriterionAsCampaignCriterionName = gagvr::CampaignCriterionName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + AdGroupFeedAsAdGroupFeedName = gagvr::AdGroupFeedName.FromCustomerAdGroupFeed("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[FEED_ID]"), + CampaignFeedAsCampaignFeedName = gagvr::CampaignFeedName.FromCustomerCampaignFeed("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[FEED_ID]"), + AdGroupBidModifierAsAdGroupBidModifierName = gagvr::AdGroupBidModifierName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetChangeStatusAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ChangeStatusServiceClient client = new ChangeStatusServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/ClickViewServiceClientTest.g.cs b/tests/V6/Services/ClickViewServiceClientTest.g.cs similarity index 77% rename from tests/V2/Services/ClickViewServiceClientTest.g.cs rename to tests/V6/Services/ClickViewServiceClientTest.g.cs index e71cfee77..6cdfd1cc7 100644 --- a/tests/V2/Services/ClickViewServiceClientTest.g.cs +++ b/tests/V6/Services/ClickViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedClickViewServiceClientTest @@ -35,16 +35,18 @@ public void GetClickViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetClickViewRequest request = new GetClickViewRequest { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), }; gagvr::ClickView expectedResponse = new gagvr::ClickView { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), - Gclid = "gclid3179810b", + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), AreaOfInterest = new gagvc::ClickLocation(), LocationOfPresence = new gagvc::ClickLocation(), + Gclid = "gclid3179810b", PageNumber = -4823514921865917552L, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + CampaignLocationTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + UserListAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; mockGrpcClient.Setup(x => x.GetClickView(request, moq::It.IsAny())).Returns(expectedResponse); ClickViewServiceClient client = new ClickViewServiceClientImpl(mockGrpcClient.Object, null); @@ -59,16 +61,18 @@ public void GetClickViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetClickViewRequest request = new GetClickViewRequest { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), }; gagvr::ClickView expectedResponse = new gagvr::ClickView { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), - Gclid = "gclid3179810b", + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), AreaOfInterest = new gagvc::ClickLocation(), LocationOfPresence = new gagvc::ClickLocation(), + Gclid = "gclid3179810b", PageNumber = -4823514921865917552L, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + CampaignLocationTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + UserListAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; mockGrpcClient.Setup(x => x.GetClickViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ClickViewServiceClient client = new ClickViewServiceClientImpl(mockGrpcClient.Object, null); @@ -85,16 +89,18 @@ public void GetClickView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetClickViewRequest request = new GetClickViewRequest { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), }; gagvr::ClickView expectedResponse = new gagvr::ClickView { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), - Gclid = "gclid3179810b", + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), AreaOfInterest = new gagvc::ClickLocation(), LocationOfPresence = new gagvc::ClickLocation(), + Gclid = "gclid3179810b", PageNumber = -4823514921865917552L, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + CampaignLocationTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + UserListAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; mockGrpcClient.Setup(x => x.GetClickView(request, moq::It.IsAny())).Returns(expectedResponse); ClickViewServiceClient client = new ClickViewServiceClientImpl(mockGrpcClient.Object, null); @@ -109,16 +115,18 @@ public void GetClickView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetClickViewRequest request = new GetClickViewRequest { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), }; gagvr::ClickView expectedResponse = new gagvr::ClickView { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), - Gclid = "gclid3179810b", + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), AreaOfInterest = new gagvc::ClickLocation(), LocationOfPresence = new gagvc::ClickLocation(), + Gclid = "gclid3179810b", PageNumber = -4823514921865917552L, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + CampaignLocationTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + UserListAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; mockGrpcClient.Setup(x => x.GetClickViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ClickViewServiceClient client = new ClickViewServiceClientImpl(mockGrpcClient.Object, null); @@ -135,16 +143,18 @@ public void GetClickViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetClickViewRequest request = new GetClickViewRequest { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), }; gagvr::ClickView expectedResponse = new gagvr::ClickView { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), - Gclid = "gclid3179810b", + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), AreaOfInterest = new gagvc::ClickLocation(), LocationOfPresence = new gagvc::ClickLocation(), + Gclid = "gclid3179810b", PageNumber = -4823514921865917552L, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + CampaignLocationTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + UserListAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; mockGrpcClient.Setup(x => x.GetClickView(request, moq::It.IsAny())).Returns(expectedResponse); ClickViewServiceClient client = new ClickViewServiceClientImpl(mockGrpcClient.Object, null); @@ -159,16 +169,18 @@ public void GetClickViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetClickViewRequest request = new GetClickViewRequest { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), }; gagvr::ClickView expectedResponse = new gagvr::ClickView { - ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerClickView("[CUSTOMER]", "[CLICK_VIEW]"), - Gclid = "gclid3179810b", + ResourceNameAsClickViewName = gagvr::ClickViewName.FromCustomerDateGclid("[CUSTOMER_ID]", "[DATE]", "[GCLID]"), AreaOfInterest = new gagvc::ClickLocation(), LocationOfPresence = new gagvc::ClickLocation(), + Gclid = "gclid3179810b", PageNumber = -4823514921865917552L, - AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER]", "[AD_GROUP_AD]"), + AdGroupAdAsAdGroupAdName = gagvr::AdGroupAdName.FromCustomerAdGroupAd("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[AD_ID]"), + CampaignLocationTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + UserListAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; mockGrpcClient.Setup(x => x.GetClickViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ClickViewServiceClient client = new ClickViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/CombinedAudienceServiceClientTest.g.cs b/tests/V6/Services/CombinedAudienceServiceClientTest.g.cs new file mode 100644 index 000000000..d86d061a9 --- /dev/null +++ b/tests/V6/Services/CombinedAudienceServiceClientTest.g.cs @@ -0,0 +1,176 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedCombinedAudienceServiceClientTest + { + [Category("Smoke")][Test] + public void GetCombinedAudienceRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCombinedAudienceRequest request = new GetCombinedAudienceRequest + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + }; + gagvr::CombinedAudience expectedResponse = new gagvr::CombinedAudience + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CombinedAudienceStatusEnum.Types.CombinedAudienceStatus.Enabled, + CombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Description = "description2cf9da67", + }; + mockGrpcClient.Setup(x => x.GetCombinedAudience(request, moq::It.IsAny())).Returns(expectedResponse); + CombinedAudienceServiceClient client = new CombinedAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CombinedAudience response = client.GetCombinedAudience(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCombinedAudienceRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCombinedAudienceRequest request = new GetCombinedAudienceRequest + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + }; + gagvr::CombinedAudience expectedResponse = new gagvr::CombinedAudience + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CombinedAudienceStatusEnum.Types.CombinedAudienceStatus.Enabled, + CombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Description = "description2cf9da67", + }; + mockGrpcClient.Setup(x => x.GetCombinedAudienceAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CombinedAudienceServiceClient client = new CombinedAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CombinedAudience responseCallSettings = await client.GetCombinedAudienceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CombinedAudience responseCancellationToken = await client.GetCombinedAudienceAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCombinedAudience() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCombinedAudienceRequest request = new GetCombinedAudienceRequest + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + }; + gagvr::CombinedAudience expectedResponse = new gagvr::CombinedAudience + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CombinedAudienceStatusEnum.Types.CombinedAudienceStatus.Enabled, + CombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Description = "description2cf9da67", + }; + mockGrpcClient.Setup(x => x.GetCombinedAudience(request, moq::It.IsAny())).Returns(expectedResponse); + CombinedAudienceServiceClient client = new CombinedAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CombinedAudience response = client.GetCombinedAudience(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCombinedAudienceAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCombinedAudienceRequest request = new GetCombinedAudienceRequest + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + }; + gagvr::CombinedAudience expectedResponse = new gagvr::CombinedAudience + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CombinedAudienceStatusEnum.Types.CombinedAudienceStatus.Enabled, + CombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Description = "description2cf9da67", + }; + mockGrpcClient.Setup(x => x.GetCombinedAudienceAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CombinedAudienceServiceClient client = new CombinedAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CombinedAudience responseCallSettings = await client.GetCombinedAudienceAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CombinedAudience responseCancellationToken = await client.GetCombinedAudienceAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCombinedAudienceResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCombinedAudienceRequest request = new GetCombinedAudienceRequest + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + }; + gagvr::CombinedAudience expectedResponse = new gagvr::CombinedAudience + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CombinedAudienceStatusEnum.Types.CombinedAudienceStatus.Enabled, + CombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Description = "description2cf9da67", + }; + mockGrpcClient.Setup(x => x.GetCombinedAudience(request, moq::It.IsAny())).Returns(expectedResponse); + CombinedAudienceServiceClient client = new CombinedAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CombinedAudience response = client.GetCombinedAudience(request.ResourceNameAsCombinedAudienceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCombinedAudienceResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCombinedAudienceRequest request = new GetCombinedAudienceRequest + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + }; + gagvr::CombinedAudience expectedResponse = new gagvr::CombinedAudience + { + ResourceNameAsCombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CombinedAudienceStatusEnum.Types.CombinedAudienceStatus.Enabled, + CombinedAudienceName = gagvr::CombinedAudienceName.FromCustomerCombinedAudience("[CUSTOMER_ID]", "[COMBINED_AUDIENCE_ID]"), + Description = "description2cf9da67", + }; + mockGrpcClient.Setup(x => x.GetCombinedAudienceAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CombinedAudienceServiceClient client = new CombinedAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CombinedAudience responseCallSettings = await client.GetCombinedAudienceAsync(request.ResourceNameAsCombinedAudienceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CombinedAudience responseCancellationToken = await client.GetCombinedAudienceAsync(request.ResourceNameAsCombinedAudienceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/ConversionActionServiceClientTest.g.cs b/tests/V6/Services/ConversionActionServiceClientTest.g.cs similarity index 84% rename from tests/V2/Services/ConversionActionServiceClientTest.g.cs rename to tests/V6/Services/ConversionActionServiceClientTest.g.cs index 05752eb49..dd18dda17 100644 --- a/tests/V2/Services/ConversionActionServiceClientTest.g.cs +++ b/tests/V6/Services/ConversionActionServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedConversionActionServiceClientTest @@ -37,20 +37,14 @@ public void GetConversionActionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetConversionActionRequest request = new GetConversionActionRequest { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), }; gagvr::ConversionAction expectedResponse = new gagvr::ConversionAction { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), - Id = -6774108720365892680L, - ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), Status = gagve::ConversionActionStatusEnum.Types.ConversionActionStatus.Hidden, - Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.GooglePlayInAppPurchase, - Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.Purchase, - OwnerCustomer = "owner_customer43abc24a", - IncludeInConversionsMetric = false, - ClickThroughLookbackWindowDays = -4831593457096707011L, - ViewThroughLookbackWindowDays = -8283075401830951626L, + Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.Salesforce, + Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.AddToCart, ValueSettings = new gagvr::ConversionAction.Types.ValueSettings(), CountingType = gagve::ConversionActionCountingTypeEnum.Types.ConversionActionCountingType.Unspecified, AttributionModelSettings = new gagvr::ConversionAction.Types.AttributionModelSettings(), @@ -58,6 +52,15 @@ public void GetConversionActionRequestObject() { new gagvc::TagSnippet(), }, + MobileAppVendor = gagve::MobileAppVendorEnum.Types.MobileAppVendor.GoogleAppStore, + FirebaseSettings = new gagvr::ConversionAction.Types.FirebaseSettings(), + ThirdPartyAppAnalyticsSettings = new gagvr::ConversionAction.Types.ThirdPartyAppAnalyticsSettings(), + Id = -6774108720365892680L, + ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), + OwnerCustomer = "owner_customer43abc24a", + IncludeInConversionsMetric = false, + ClickThroughLookbackWindowDays = -4831593457096707011L, + ViewThroughLookbackWindowDays = -8283075401830951626L, PhoneCallDurationSeconds = -8070508326407639729L, AppId = "app_idfead82f3", }; @@ -74,20 +77,14 @@ public void GetConversionActionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetConversionActionRequest request = new GetConversionActionRequest { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), }; gagvr::ConversionAction expectedResponse = new gagvr::ConversionAction { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), - Id = -6774108720365892680L, - ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), Status = gagve::ConversionActionStatusEnum.Types.ConversionActionStatus.Hidden, - Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.GooglePlayInAppPurchase, - Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.Purchase, - OwnerCustomer = "owner_customer43abc24a", - IncludeInConversionsMetric = false, - ClickThroughLookbackWindowDays = -4831593457096707011L, - ViewThroughLookbackWindowDays = -8283075401830951626L, + Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.Salesforce, + Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.AddToCart, ValueSettings = new gagvr::ConversionAction.Types.ValueSettings(), CountingType = gagve::ConversionActionCountingTypeEnum.Types.ConversionActionCountingType.Unspecified, AttributionModelSettings = new gagvr::ConversionAction.Types.AttributionModelSettings(), @@ -95,6 +92,15 @@ public void GetConversionActionRequestObject() { new gagvc::TagSnippet(), }, + MobileAppVendor = gagve::MobileAppVendorEnum.Types.MobileAppVendor.GoogleAppStore, + FirebaseSettings = new gagvr::ConversionAction.Types.FirebaseSettings(), + ThirdPartyAppAnalyticsSettings = new gagvr::ConversionAction.Types.ThirdPartyAppAnalyticsSettings(), + Id = -6774108720365892680L, + ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), + OwnerCustomer = "owner_customer43abc24a", + IncludeInConversionsMetric = false, + ClickThroughLookbackWindowDays = -4831593457096707011L, + ViewThroughLookbackWindowDays = -8283075401830951626L, PhoneCallDurationSeconds = -8070508326407639729L, AppId = "app_idfead82f3", }; @@ -113,20 +119,14 @@ public void GetConversionAction() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetConversionActionRequest request = new GetConversionActionRequest { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), }; gagvr::ConversionAction expectedResponse = new gagvr::ConversionAction { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), - Id = -6774108720365892680L, - ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), Status = gagve::ConversionActionStatusEnum.Types.ConversionActionStatus.Hidden, - Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.GooglePlayInAppPurchase, - Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.Purchase, - OwnerCustomer = "owner_customer43abc24a", - IncludeInConversionsMetric = false, - ClickThroughLookbackWindowDays = -4831593457096707011L, - ViewThroughLookbackWindowDays = -8283075401830951626L, + Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.Salesforce, + Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.AddToCart, ValueSettings = new gagvr::ConversionAction.Types.ValueSettings(), CountingType = gagve::ConversionActionCountingTypeEnum.Types.ConversionActionCountingType.Unspecified, AttributionModelSettings = new gagvr::ConversionAction.Types.AttributionModelSettings(), @@ -134,6 +134,15 @@ public void GetConversionAction() { new gagvc::TagSnippet(), }, + MobileAppVendor = gagve::MobileAppVendorEnum.Types.MobileAppVendor.GoogleAppStore, + FirebaseSettings = new gagvr::ConversionAction.Types.FirebaseSettings(), + ThirdPartyAppAnalyticsSettings = new gagvr::ConversionAction.Types.ThirdPartyAppAnalyticsSettings(), + Id = -6774108720365892680L, + ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), + OwnerCustomer = "owner_customer43abc24a", + IncludeInConversionsMetric = false, + ClickThroughLookbackWindowDays = -4831593457096707011L, + ViewThroughLookbackWindowDays = -8283075401830951626L, PhoneCallDurationSeconds = -8070508326407639729L, AppId = "app_idfead82f3", }; @@ -150,20 +159,14 @@ public void GetConversionAction() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetConversionActionRequest request = new GetConversionActionRequest { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), }; gagvr::ConversionAction expectedResponse = new gagvr::ConversionAction { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), - Id = -6774108720365892680L, - ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), Status = gagve::ConversionActionStatusEnum.Types.ConversionActionStatus.Hidden, - Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.GooglePlayInAppPurchase, - Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.Purchase, - OwnerCustomer = "owner_customer43abc24a", - IncludeInConversionsMetric = false, - ClickThroughLookbackWindowDays = -4831593457096707011L, - ViewThroughLookbackWindowDays = -8283075401830951626L, + Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.Salesforce, + Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.AddToCart, ValueSettings = new gagvr::ConversionAction.Types.ValueSettings(), CountingType = gagve::ConversionActionCountingTypeEnum.Types.ConversionActionCountingType.Unspecified, AttributionModelSettings = new gagvr::ConversionAction.Types.AttributionModelSettings(), @@ -171,6 +174,15 @@ public void GetConversionAction() { new gagvc::TagSnippet(), }, + MobileAppVendor = gagve::MobileAppVendorEnum.Types.MobileAppVendor.GoogleAppStore, + FirebaseSettings = new gagvr::ConversionAction.Types.FirebaseSettings(), + ThirdPartyAppAnalyticsSettings = new gagvr::ConversionAction.Types.ThirdPartyAppAnalyticsSettings(), + Id = -6774108720365892680L, + ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), + OwnerCustomer = "owner_customer43abc24a", + IncludeInConversionsMetric = false, + ClickThroughLookbackWindowDays = -4831593457096707011L, + ViewThroughLookbackWindowDays = -8283075401830951626L, PhoneCallDurationSeconds = -8070508326407639729L, AppId = "app_idfead82f3", }; @@ -189,20 +201,14 @@ public void GetConversionActionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetConversionActionRequest request = new GetConversionActionRequest { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), }; gagvr::ConversionAction expectedResponse = new gagvr::ConversionAction { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), - Id = -6774108720365892680L, - ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), Status = gagve::ConversionActionStatusEnum.Types.ConversionActionStatus.Hidden, - Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.GooglePlayInAppPurchase, - Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.Purchase, - OwnerCustomer = "owner_customer43abc24a", - IncludeInConversionsMetric = false, - ClickThroughLookbackWindowDays = -4831593457096707011L, - ViewThroughLookbackWindowDays = -8283075401830951626L, + Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.Salesforce, + Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.AddToCart, ValueSettings = new gagvr::ConversionAction.Types.ValueSettings(), CountingType = gagve::ConversionActionCountingTypeEnum.Types.ConversionActionCountingType.Unspecified, AttributionModelSettings = new gagvr::ConversionAction.Types.AttributionModelSettings(), @@ -210,6 +216,15 @@ public void GetConversionActionResourceNames() { new gagvc::TagSnippet(), }, + MobileAppVendor = gagve::MobileAppVendorEnum.Types.MobileAppVendor.GoogleAppStore, + FirebaseSettings = new gagvr::ConversionAction.Types.FirebaseSettings(), + ThirdPartyAppAnalyticsSettings = new gagvr::ConversionAction.Types.ThirdPartyAppAnalyticsSettings(), + Id = -6774108720365892680L, + ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), + OwnerCustomer = "owner_customer43abc24a", + IncludeInConversionsMetric = false, + ClickThroughLookbackWindowDays = -4831593457096707011L, + ViewThroughLookbackWindowDays = -8283075401830951626L, PhoneCallDurationSeconds = -8070508326407639729L, AppId = "app_idfead82f3", }; @@ -226,20 +241,14 @@ public void GetConversionActionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetConversionActionRequest request = new GetConversionActionRequest { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), }; gagvr::ConversionAction expectedResponse = new gagvr::ConversionAction { - ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), - Id = -6774108720365892680L, - ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER]", "[CONVERSION_ACTION]"), + ResourceNameAsConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), Status = gagve::ConversionActionStatusEnum.Types.ConversionActionStatus.Hidden, - Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.GooglePlayInAppPurchase, - Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.Purchase, - OwnerCustomer = "owner_customer43abc24a", - IncludeInConversionsMetric = false, - ClickThroughLookbackWindowDays = -4831593457096707011L, - ViewThroughLookbackWindowDays = -8283075401830951626L, + Type = gagve::ConversionActionTypeEnum.Types.ConversionActionType.Salesforce, + Category = gagve::ConversionActionCategoryEnum.Types.ConversionActionCategory.AddToCart, ValueSettings = new gagvr::ConversionAction.Types.ValueSettings(), CountingType = gagve::ConversionActionCountingTypeEnum.Types.ConversionActionCountingType.Unspecified, AttributionModelSettings = new gagvr::ConversionAction.Types.AttributionModelSettings(), @@ -247,6 +256,15 @@ public void GetConversionActionResourceNames() { new gagvc::TagSnippet(), }, + MobileAppVendor = gagve::MobileAppVendorEnum.Types.MobileAppVendor.GoogleAppStore, + FirebaseSettings = new gagvr::ConversionAction.Types.FirebaseSettings(), + ThirdPartyAppAnalyticsSettings = new gagvr::ConversionAction.Types.ThirdPartyAppAnalyticsSettings(), + Id = -6774108720365892680L, + ConversionActionName = gagvr::ConversionActionName.FromCustomerConversionAction("[CUSTOMER_ID]", "[CONVERSION_ACTION_ID]"), + OwnerCustomer = "owner_customer43abc24a", + IncludeInConversionsMetric = false, + ClickThroughLookbackWindowDays = -4831593457096707011L, + ViewThroughLookbackWindowDays = -8283075401830951626L, PhoneCallDurationSeconds = -8070508326407639729L, AppId = "app_idfead82f3", }; diff --git a/tests/V2/Services/ConversionAdjustmentUploadServiceClientTest.g.cs b/tests/V6/Services/ConversionAdjustmentUploadServiceClientTest.g.cs similarity index 98% rename from tests/V2/Services/ConversionAdjustmentUploadServiceClientTest.g.cs rename to tests/V6/Services/ConversionAdjustmentUploadServiceClientTest.g.cs index 41f40186b..5f47fbc1f 100644 --- a/tests/V2/Services/ConversionAdjustmentUploadServiceClientTest.g.cs +++ b/tests/V6/Services/ConversionAdjustmentUploadServiceClientTest.g.cs @@ -21,9 +21,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedConversionAdjustmentUploadServiceClientTest diff --git a/tests/V2/Services/ConversionUploadServiceClientTest.g.cs b/tests/V6/Services/ConversionUploadServiceClientTest.g.cs similarity index 99% rename from tests/V2/Services/ConversionUploadServiceClientTest.g.cs rename to tests/V6/Services/ConversionUploadServiceClientTest.g.cs index 8b4220a5d..9e0fbf266 100644 --- a/tests/V2/Services/ConversionUploadServiceClientTest.g.cs +++ b/tests/V6/Services/ConversionUploadServiceClientTest.g.cs @@ -21,9 +21,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedConversionUploadServiceClientTest diff --git a/tests/V6/Services/CurrencyConstantServiceClientTest.g.cs b/tests/V6/Services/CurrencyConstantServiceClientTest.g.cs new file mode 100644 index 000000000..38cb75da9 --- /dev/null +++ b/tests/V6/Services/CurrencyConstantServiceClientTest.g.cs @@ -0,0 +1,175 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedCurrencyConstantServiceClientTest + { + [Category("Smoke")][Test] + public void GetCurrencyConstantRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCurrencyConstantRequest request = new GetCurrencyConstantRequest + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + }; + gagvr::CurrencyConstant expectedResponse = new gagvr::CurrencyConstant + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Code = "code946733c1", + CurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Symbol = "symbol68f2bf97", + BillableUnitMicros = -4065431154313687083L, + }; + mockGrpcClient.Setup(x => x.GetCurrencyConstant(request, moq::It.IsAny())).Returns(expectedResponse); + CurrencyConstantServiceClient client = new CurrencyConstantServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CurrencyConstant response = client.GetCurrencyConstant(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCurrencyConstantRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCurrencyConstantRequest request = new GetCurrencyConstantRequest + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + }; + gagvr::CurrencyConstant expectedResponse = new gagvr::CurrencyConstant + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Code = "code946733c1", + CurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Symbol = "symbol68f2bf97", + BillableUnitMicros = -4065431154313687083L, + }; + mockGrpcClient.Setup(x => x.GetCurrencyConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CurrencyConstantServiceClient client = new CurrencyConstantServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CurrencyConstant responseCallSettings = await client.GetCurrencyConstantAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CurrencyConstant responseCancellationToken = await client.GetCurrencyConstantAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCurrencyConstant() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCurrencyConstantRequest request = new GetCurrencyConstantRequest + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + }; + gagvr::CurrencyConstant expectedResponse = new gagvr::CurrencyConstant + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Code = "code946733c1", + CurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Symbol = "symbol68f2bf97", + BillableUnitMicros = -4065431154313687083L, + }; + mockGrpcClient.Setup(x => x.GetCurrencyConstant(request, moq::It.IsAny())).Returns(expectedResponse); + CurrencyConstantServiceClient client = new CurrencyConstantServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CurrencyConstant response = client.GetCurrencyConstant(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCurrencyConstantAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCurrencyConstantRequest request = new GetCurrencyConstantRequest + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + }; + gagvr::CurrencyConstant expectedResponse = new gagvr::CurrencyConstant + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Code = "code946733c1", + CurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Symbol = "symbol68f2bf97", + BillableUnitMicros = -4065431154313687083L, + }; + mockGrpcClient.Setup(x => x.GetCurrencyConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CurrencyConstantServiceClient client = new CurrencyConstantServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CurrencyConstant responseCallSettings = await client.GetCurrencyConstantAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CurrencyConstant responseCancellationToken = await client.GetCurrencyConstantAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCurrencyConstantResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCurrencyConstantRequest request = new GetCurrencyConstantRequest + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + }; + gagvr::CurrencyConstant expectedResponse = new gagvr::CurrencyConstant + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Code = "code946733c1", + CurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Symbol = "symbol68f2bf97", + BillableUnitMicros = -4065431154313687083L, + }; + mockGrpcClient.Setup(x => x.GetCurrencyConstant(request, moq::It.IsAny())).Returns(expectedResponse); + CurrencyConstantServiceClient client = new CurrencyConstantServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CurrencyConstant response = client.GetCurrencyConstant(request.ResourceNameAsCurrencyConstantName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCurrencyConstantResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCurrencyConstantRequest request = new GetCurrencyConstantRequest + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + }; + gagvr::CurrencyConstant expectedResponse = new gagvr::CurrencyConstant + { + ResourceNameAsCurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Code = "code946733c1", + CurrencyConstantName = gagvr::CurrencyConstantName.FromCode("[CODE]"), + Symbol = "symbol68f2bf97", + BillableUnitMicros = -4065431154313687083L, + }; + mockGrpcClient.Setup(x => x.GetCurrencyConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CurrencyConstantServiceClient client = new CurrencyConstantServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CurrencyConstant responseCallSettings = await client.GetCurrencyConstantAsync(request.ResourceNameAsCurrencyConstantName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CurrencyConstant responseCancellationToken = await client.GetCurrencyConstantAsync(request.ResourceNameAsCurrencyConstantName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V6/Services/CustomAudienceServiceClientTest.g.cs b/tests/V6/Services/CustomAudienceServiceClientTest.g.cs new file mode 100644 index 000000000..4799e1fdd --- /dev/null +++ b/tests/V6/Services/CustomAudienceServiceClientTest.g.cs @@ -0,0 +1,316 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedCustomAudienceServiceClientTest + { + [Category("Smoke")][Test] + public void GetCustomAudienceRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomAudienceRequest request = new GetCustomAudienceRequest + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + }; + gagvr::CustomAudience expectedResponse = new gagvr::CustomAudience + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CustomAudienceStatusEnum.Types.CustomAudienceStatus.Enabled, + CustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Type = gagve::CustomAudienceTypeEnum.Types.CustomAudienceType.Interest, + Description = "description2cf9da67", + Members = + { + new gagvr::CustomAudienceMember(), + }, + }; + mockGrpcClient.Setup(x => x.GetCustomAudience(request, moq::It.IsAny())).Returns(expectedResponse); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomAudience response = client.GetCustomAudience(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCustomAudienceRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomAudienceRequest request = new GetCustomAudienceRequest + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + }; + gagvr::CustomAudience expectedResponse = new gagvr::CustomAudience + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CustomAudienceStatusEnum.Types.CustomAudienceStatus.Enabled, + CustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Type = gagve::CustomAudienceTypeEnum.Types.CustomAudienceType.Interest, + Description = "description2cf9da67", + Members = + { + new gagvr::CustomAudienceMember(), + }, + }; + mockGrpcClient.Setup(x => x.GetCustomAudienceAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomAudience responseCallSettings = await client.GetCustomAudienceAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CustomAudience responseCancellationToken = await client.GetCustomAudienceAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCustomAudience() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomAudienceRequest request = new GetCustomAudienceRequest + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + }; + gagvr::CustomAudience expectedResponse = new gagvr::CustomAudience + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CustomAudienceStatusEnum.Types.CustomAudienceStatus.Enabled, + CustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Type = gagve::CustomAudienceTypeEnum.Types.CustomAudienceType.Interest, + Description = "description2cf9da67", + Members = + { + new gagvr::CustomAudienceMember(), + }, + }; + mockGrpcClient.Setup(x => x.GetCustomAudience(request, moq::It.IsAny())).Returns(expectedResponse); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomAudience response = client.GetCustomAudience(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCustomAudienceAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomAudienceRequest request = new GetCustomAudienceRequest + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + }; + gagvr::CustomAudience expectedResponse = new gagvr::CustomAudience + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CustomAudienceStatusEnum.Types.CustomAudienceStatus.Enabled, + CustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Type = gagve::CustomAudienceTypeEnum.Types.CustomAudienceType.Interest, + Description = "description2cf9da67", + Members = + { + new gagvr::CustomAudienceMember(), + }, + }; + mockGrpcClient.Setup(x => x.GetCustomAudienceAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomAudience responseCallSettings = await client.GetCustomAudienceAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CustomAudience responseCancellationToken = await client.GetCustomAudienceAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCustomAudienceResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomAudienceRequest request = new GetCustomAudienceRequest + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + }; + gagvr::CustomAudience expectedResponse = new gagvr::CustomAudience + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CustomAudienceStatusEnum.Types.CustomAudienceStatus.Enabled, + CustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Type = gagve::CustomAudienceTypeEnum.Types.CustomAudienceType.Interest, + Description = "description2cf9da67", + Members = + { + new gagvr::CustomAudienceMember(), + }, + }; + mockGrpcClient.Setup(x => x.GetCustomAudience(request, moq::It.IsAny())).Returns(expectedResponse); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomAudience response = client.GetCustomAudience(request.ResourceNameAsCustomAudienceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCustomAudienceResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomAudienceRequest request = new GetCustomAudienceRequest + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + }; + gagvr::CustomAudience expectedResponse = new gagvr::CustomAudience + { + ResourceNameAsCustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Id = -6774108720365892680L, + Status = gagve::CustomAudienceStatusEnum.Types.CustomAudienceStatus.Enabled, + CustomAudienceName = gagvr::CustomAudienceName.FromCustomerCustomAudience("[CUSTOMER_ID]", "[CUSTOM_AUDIENCE_ID]"), + Type = gagve::CustomAudienceTypeEnum.Types.CustomAudienceType.Interest, + Description = "description2cf9da67", + Members = + { + new gagvr::CustomAudienceMember(), + }, + }; + mockGrpcClient.Setup(x => x.GetCustomAudienceAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomAudience responseCallSettings = await client.GetCustomAudienceAsync(request.ResourceNameAsCustomAudienceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CustomAudience responseCancellationToken = await client.GetCustomAudienceAsync(request.ResourceNameAsCustomAudienceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateCustomAudiencesRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomAudiencesRequest request = new MutateCustomAudiencesRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CustomAudienceOperation(), + }, + ValidateOnly = true, + }; + MutateCustomAudiencesResponse expectedResponse = new MutateCustomAudiencesResponse + { + Results = + { + new MutateCustomAudienceResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCustomAudiences(request, moq::It.IsAny())).Returns(expectedResponse); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomAudiencesResponse response = client.MutateCustomAudiences(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateCustomAudiencesRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomAudiencesRequest request = new MutateCustomAudiencesRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CustomAudienceOperation(), + }, + ValidateOnly = true, + }; + MutateCustomAudiencesResponse expectedResponse = new MutateCustomAudiencesResponse + { + Results = + { + new MutateCustomAudienceResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCustomAudiencesAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomAudiencesResponse responseCallSettings = await client.MutateCustomAudiencesAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateCustomAudiencesResponse responseCancellationToken = await client.MutateCustomAudiencesAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateCustomAudiences() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomAudiencesRequest request = new MutateCustomAudiencesRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CustomAudienceOperation(), + }, + }; + MutateCustomAudiencesResponse expectedResponse = new MutateCustomAudiencesResponse + { + Results = + { + new MutateCustomAudienceResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCustomAudiences(request, moq::It.IsAny())).Returns(expectedResponse); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomAudiencesResponse response = client.MutateCustomAudiences(request.CustomerId, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateCustomAudiencesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomAudiencesRequest request = new MutateCustomAudiencesRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new CustomAudienceOperation(), + }, + }; + MutateCustomAudiencesResponse expectedResponse = new MutateCustomAudiencesResponse + { + Results = + { + new MutateCustomAudienceResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateCustomAudiencesAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomAudienceServiceClient client = new CustomAudienceServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomAudiencesResponse responseCallSettings = await client.MutateCustomAudiencesAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateCustomAudiencesResponse responseCancellationToken = await client.MutateCustomAudiencesAsync(request.CustomerId, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/CustomInterestServiceClientTest.g.cs b/tests/V6/Services/CustomInterestServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/CustomInterestServiceClientTest.g.cs rename to tests/V6/Services/CustomInterestServiceClientTest.g.cs index 076b15555..1a3d07349 100644 --- a/tests/V2/Services/CustomInterestServiceClientTest.g.cs +++ b/tests/V6/Services/CustomInterestServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomInterestServiceClientTest @@ -35,20 +35,20 @@ public void GetCustomInterestRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomInterestRequest request = new GetCustomInterestRequest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), }; gagvr::CustomInterest expectedResponse = new gagvr::CustomInterest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), - Id = -6774108720365892680L, + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), Status = gagve::CustomInterestStatusEnum.Types.CustomInterestStatus.Enabled, - CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), Type = gagve::CustomInterestTypeEnum.Types.CustomInterestType.CustomIntent, - Description = "description2cf9da67", Members = { new gagvr::CustomInterestMember(), }, + Id = -6774108720365892680L, + CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), + Description = "description2cf9da67", }; mockGrpcClient.Setup(x => x.GetCustomInterest(request, moq::It.IsAny())).Returns(expectedResponse); CustomInterestServiceClient client = new CustomInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -63,20 +63,20 @@ public void GetCustomInterestRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomInterestRequest request = new GetCustomInterestRequest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), }; gagvr::CustomInterest expectedResponse = new gagvr::CustomInterest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), - Id = -6774108720365892680L, + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), Status = gagve::CustomInterestStatusEnum.Types.CustomInterestStatus.Enabled, - CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), Type = gagve::CustomInterestTypeEnum.Types.CustomInterestType.CustomIntent, - Description = "description2cf9da67", Members = { new gagvr::CustomInterestMember(), }, + Id = -6774108720365892680L, + CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), + Description = "description2cf9da67", }; mockGrpcClient.Setup(x => x.GetCustomInterestAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomInterestServiceClient client = new CustomInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -93,20 +93,20 @@ public void GetCustomInterest() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomInterestRequest request = new GetCustomInterestRequest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), }; gagvr::CustomInterest expectedResponse = new gagvr::CustomInterest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), - Id = -6774108720365892680L, + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), Status = gagve::CustomInterestStatusEnum.Types.CustomInterestStatus.Enabled, - CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), Type = gagve::CustomInterestTypeEnum.Types.CustomInterestType.CustomIntent, - Description = "description2cf9da67", Members = { new gagvr::CustomInterestMember(), }, + Id = -6774108720365892680L, + CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), + Description = "description2cf9da67", }; mockGrpcClient.Setup(x => x.GetCustomInterest(request, moq::It.IsAny())).Returns(expectedResponse); CustomInterestServiceClient client = new CustomInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -121,20 +121,20 @@ public void GetCustomInterest() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomInterestRequest request = new GetCustomInterestRequest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), }; gagvr::CustomInterest expectedResponse = new gagvr::CustomInterest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), - Id = -6774108720365892680L, + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), Status = gagve::CustomInterestStatusEnum.Types.CustomInterestStatus.Enabled, - CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), Type = gagve::CustomInterestTypeEnum.Types.CustomInterestType.CustomIntent, - Description = "description2cf9da67", Members = { new gagvr::CustomInterestMember(), }, + Id = -6774108720365892680L, + CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), + Description = "description2cf9da67", }; mockGrpcClient.Setup(x => x.GetCustomInterestAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomInterestServiceClient client = new CustomInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -151,20 +151,20 @@ public void GetCustomInterestResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomInterestRequest request = new GetCustomInterestRequest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), }; gagvr::CustomInterest expectedResponse = new gagvr::CustomInterest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), - Id = -6774108720365892680L, + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), Status = gagve::CustomInterestStatusEnum.Types.CustomInterestStatus.Enabled, - CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), Type = gagve::CustomInterestTypeEnum.Types.CustomInterestType.CustomIntent, - Description = "description2cf9da67", Members = { new gagvr::CustomInterestMember(), }, + Id = -6774108720365892680L, + CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), + Description = "description2cf9da67", }; mockGrpcClient.Setup(x => x.GetCustomInterest(request, moq::It.IsAny())).Returns(expectedResponse); CustomInterestServiceClient client = new CustomInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -179,20 +179,20 @@ public void GetCustomInterestResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomInterestRequest request = new GetCustomInterestRequest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), }; gagvr::CustomInterest expectedResponse = new gagvr::CustomInterest { - ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), - Id = -6774108720365892680L, + ResourceNameAsCustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), Status = gagve::CustomInterestStatusEnum.Types.CustomInterestStatus.Enabled, - CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER]", "[CUSTOM_INTEREST]"), Type = gagve::CustomInterestTypeEnum.Types.CustomInterestType.CustomIntent, - Description = "description2cf9da67", Members = { new gagvr::CustomInterestMember(), }, + Id = -6774108720365892680L, + CustomInterestName = gagvr::CustomInterestName.FromCustomerCustomInterest("[CUSTOMER_ID]", "[CUSTOM_INTEREST_ID]"), + Description = "description2cf9da67", }; mockGrpcClient.Setup(x => x.GetCustomInterestAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomInterestServiceClient client = new CustomInterestServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CustomerClientLinkServiceClientTest.g.cs b/tests/V6/Services/CustomerClientLinkServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/CustomerClientLinkServiceClientTest.g.cs rename to tests/V6/Services/CustomerClientLinkServiceClientTest.g.cs index 110bfe1f3..6c5b9649d 100644 --- a/tests/V2/Services/CustomerClientLinkServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerClientLinkServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerClientLinkServiceClientTest @@ -35,14 +35,14 @@ public void GetCustomerClientLinkRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientLinkRequest request = new GetCustomerClientLinkRequest { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerClientLink expectedResponse = new gagvr::CustomerClientLink { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ClientCustomer = "client_customerf58ac5fa", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, Hidden = true, }; mockGrpcClient.Setup(x => x.GetCustomerClientLink(request, moq::It.IsAny())).Returns(expectedResponse); @@ -58,14 +58,14 @@ public void GetCustomerClientLinkRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientLinkRequest request = new GetCustomerClientLinkRequest { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerClientLink expectedResponse = new gagvr::CustomerClientLink { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ClientCustomer = "client_customerf58ac5fa", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, Hidden = true, }; mockGrpcClient.Setup(x => x.GetCustomerClientLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -83,14 +83,14 @@ public void GetCustomerClientLink() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientLinkRequest request = new GetCustomerClientLinkRequest { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerClientLink expectedResponse = new gagvr::CustomerClientLink { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ClientCustomer = "client_customerf58ac5fa", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, Hidden = true, }; mockGrpcClient.Setup(x => x.GetCustomerClientLink(request, moq::It.IsAny())).Returns(expectedResponse); @@ -106,14 +106,14 @@ public void GetCustomerClientLink() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientLinkRequest request = new GetCustomerClientLinkRequest { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerClientLink expectedResponse = new gagvr::CustomerClientLink { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ClientCustomer = "client_customerf58ac5fa", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, Hidden = true, }; mockGrpcClient.Setup(x => x.GetCustomerClientLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -131,14 +131,14 @@ public void GetCustomerClientLinkResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientLinkRequest request = new GetCustomerClientLinkRequest { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerClientLink expectedResponse = new gagvr::CustomerClientLink { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ClientCustomer = "client_customerf58ac5fa", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, Hidden = true, }; mockGrpcClient.Setup(x => x.GetCustomerClientLink(request, moq::It.IsAny())).Returns(expectedResponse); @@ -154,14 +154,14 @@ public void GetCustomerClientLinkResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientLinkRequest request = new GetCustomerClientLinkRequest { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerClientLink expectedResponse = new gagvr::CustomerClientLink { - ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerCustomerClientLink("[CUSTOMER]", "[CUSTOMER_CLIENT_LINK]"), + ResourceNameAsCustomerClientLinkName = gagvr::CustomerClientLinkName.FromCustomerClientCustomerManagerLink("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ClientCustomer = "client_customerf58ac5fa", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, Hidden = true, }; mockGrpcClient.Setup(x => x.GetCustomerClientLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/CustomerClientServiceClientTest.g.cs b/tests/V6/Services/CustomerClientServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/CustomerClientServiceClientTest.g.cs rename to tests/V6/Services/CustomerClientServiceClientTest.g.cs index cd7415869..51ad3f65e 100644 --- a/tests/V2/Services/CustomerClientServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerClientServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerClientServiceClientTest @@ -34,11 +34,11 @@ public void GetCustomerClientRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientRequest request = new GetCustomerClientRequest { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), }; gagvr::CustomerClient expectedResponse = new gagvr::CustomerClient { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), ClientCustomer = "client_customerf58ac5fa", Hidden = true, Level = -1767934904342353463L, @@ -62,11 +62,11 @@ public void GetCustomerClientRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientRequest request = new GetCustomerClientRequest { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), }; gagvr::CustomerClient expectedResponse = new gagvr::CustomerClient { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), ClientCustomer = "client_customerf58ac5fa", Hidden = true, Level = -1767934904342353463L, @@ -92,11 +92,11 @@ public void GetCustomerClient() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientRequest request = new GetCustomerClientRequest { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), }; gagvr::CustomerClient expectedResponse = new gagvr::CustomerClient { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), ClientCustomer = "client_customerf58ac5fa", Hidden = true, Level = -1767934904342353463L, @@ -120,11 +120,11 @@ public void GetCustomerClient() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientRequest request = new GetCustomerClientRequest { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), }; gagvr::CustomerClient expectedResponse = new gagvr::CustomerClient { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), ClientCustomer = "client_customerf58ac5fa", Hidden = true, Level = -1767934904342353463L, @@ -150,11 +150,11 @@ public void GetCustomerClientResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientRequest request = new GetCustomerClientRequest { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), }; gagvr::CustomerClient expectedResponse = new gagvr::CustomerClient { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), ClientCustomer = "client_customerf58ac5fa", Hidden = true, Level = -1767934904342353463L, @@ -178,11 +178,11 @@ public void GetCustomerClientResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerClientRequest request = new GetCustomerClientRequest { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), }; gagvr::CustomerClient expectedResponse = new gagvr::CustomerClient { - ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerCustomerClient("[CUSTOMER]", "[CUSTOMER_CLIENT]"), + ResourceNameAsCustomerClientName = gagvr::CustomerClientName.FromCustomerClientCustomer("[CUSTOMER_ID]", "[CLIENT_CUSTOMER_ID]"), ClientCustomer = "client_customerf58ac5fa", Hidden = true, Level = -1767934904342353463L, diff --git a/tests/V2/Services/CustomerExtensionSettingServiceClientTest.g.cs b/tests/V6/Services/CustomerExtensionSettingServiceClientTest.g.cs similarity index 88% rename from tests/V2/Services/CustomerExtensionSettingServiceClientTest.g.cs rename to tests/V6/Services/CustomerExtensionSettingServiceClientTest.g.cs index 0a1cf1fc9..8df751419 100644 --- a/tests/V2/Services/CustomerExtensionSettingServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerExtensionSettingServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerExtensionSettingServiceClientTest @@ -36,17 +36,17 @@ public void GetCustomerExtensionSettingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerExtensionSettingRequest request = new GetCustomerExtensionSettingRequest { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), }; gagvr::CustomerExtensionSetting expectedResponse = new gagvr::CustomerExtensionSetting { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCustomerExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); CustomerExtensionSettingServiceClient client = new CustomerExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -61,17 +61,17 @@ public void GetCustomerExtensionSettingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerExtensionSettingRequest request = new GetCustomerExtensionSettingRequest { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), }; gagvr::CustomerExtensionSetting expectedResponse = new gagvr::CustomerExtensionSetting { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCustomerExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerExtensionSettingServiceClient client = new CustomerExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -88,17 +88,17 @@ public void GetCustomerExtensionSetting() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerExtensionSettingRequest request = new GetCustomerExtensionSettingRequest { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), }; gagvr::CustomerExtensionSetting expectedResponse = new gagvr::CustomerExtensionSetting { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCustomerExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); CustomerExtensionSettingServiceClient client = new CustomerExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -113,17 +113,17 @@ public void GetCustomerExtensionSetting() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerExtensionSettingRequest request = new GetCustomerExtensionSettingRequest { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), }; gagvr::CustomerExtensionSetting expectedResponse = new gagvr::CustomerExtensionSetting { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCustomerExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerExtensionSettingServiceClient client = new CustomerExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -140,17 +140,17 @@ public void GetCustomerExtensionSettingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerExtensionSettingRequest request = new GetCustomerExtensionSettingRequest { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), }; gagvr::CustomerExtensionSetting expectedResponse = new gagvr::CustomerExtensionSetting { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCustomerExtensionSetting(request, moq::It.IsAny())).Returns(expectedResponse); CustomerExtensionSettingServiceClient client = new CustomerExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); @@ -165,17 +165,17 @@ public void GetCustomerExtensionSettingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerExtensionSettingRequest request = new GetCustomerExtensionSettingRequest { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), }; gagvr::CustomerExtensionSetting expectedResponse = new gagvr::CustomerExtensionSetting { - ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerCustomerExtensionSetting("[CUSTOMER]", "[CUSTOMER_EXTENSION_SETTING]"), + ResourceNameAsCustomerExtensionSettingName = gagvr::CustomerExtensionSettingName.FromCustomerExtensionType("[CUSTOMER_ID]", "[EXTENSION_TYPE]"), ExtensionType = gagve::ExtensionTypeEnum.Types.ExtensionType.Promotion, + Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, ExtensionFeedItemsAsExtensionFeedItemNames = { - gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }, - Device = gagve::ExtensionSettingDeviceEnum.Types.ExtensionSettingDevice.Unknown, }; mockGrpcClient.Setup(x => x.GetCustomerExtensionSettingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerExtensionSettingServiceClient client = new CustomerExtensionSettingServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CustomerFeedServiceClientTest.g.cs b/tests/V6/Services/CustomerFeedServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/CustomerFeedServiceClientTest.g.cs rename to tests/V6/Services/CustomerFeedServiceClientTest.g.cs index 004acf564..f848cb05b 100644 --- a/tests/V2/Services/CustomerFeedServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerFeedServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerFeedServiceClientTest @@ -37,18 +37,18 @@ public void GetCustomerFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerFeedRequest request = new GetCustomerFeedRequest { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::CustomerFeed expectedResponse = new gagvr::CustomerFeed { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetCustomerFeed(request, moq::It.IsAny())).Returns(expectedResponse); CustomerFeedServiceClient client = new CustomerFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -63,18 +63,18 @@ public void GetCustomerFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerFeedRequest request = new GetCustomerFeedRequest { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::CustomerFeed expectedResponse = new gagvr::CustomerFeed { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetCustomerFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerFeedServiceClient client = new CustomerFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -91,18 +91,18 @@ public void GetCustomerFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerFeedRequest request = new GetCustomerFeedRequest { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::CustomerFeed expectedResponse = new gagvr::CustomerFeed { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetCustomerFeed(request, moq::It.IsAny())).Returns(expectedResponse); CustomerFeedServiceClient client = new CustomerFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -117,18 +117,18 @@ public void GetCustomerFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerFeedRequest request = new GetCustomerFeedRequest { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::CustomerFeed expectedResponse = new gagvr::CustomerFeed { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetCustomerFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerFeedServiceClient client = new CustomerFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -145,18 +145,18 @@ public void GetCustomerFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerFeedRequest request = new GetCustomerFeedRequest { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::CustomerFeed expectedResponse = new gagvr::CustomerFeed { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetCustomerFeed(request, moq::It.IsAny())).Returns(expectedResponse); CustomerFeedServiceClient client = new CustomerFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -171,18 +171,18 @@ public void GetCustomerFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerFeedRequest request = new GetCustomerFeedRequest { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::CustomerFeed expectedResponse = new gagvr::CustomerFeed { - ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerCustomerFeed("[CUSTOMER]", "[CUSTOMER_FEED]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsCustomerFeedName = gagvr::CustomerFeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), PlaceholderTypes = { - gagve::PlaceholderTypeEnum.Types.PlaceholderType.Location, + gagve::PlaceholderTypeEnum.Types.PlaceholderType.AdCustomizer, }, MatchingFunction = new gagvc::MatchingFunction(), Status = gagve::FeedLinkStatusEnum.Types.FeedLinkStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetCustomerFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerFeedServiceClient client = new CustomerFeedServiceClientImpl(mockGrpcClient.Object, null); @@ -206,6 +206,7 @@ public void MutateCustomerFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCustomerFeedsResponse expectedResponse = new MutateCustomerFeedsResponse { @@ -235,6 +236,7 @@ public void MutateCustomerFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCustomerFeedsResponse expectedResponse = new MutateCustomerFeedsResponse { diff --git a/tests/V2/Services/CustomerLabelServiceClientTest.g.cs b/tests/V6/Services/CustomerLabelServiceClientTest.g.cs similarity index 93% rename from tests/V2/Services/CustomerLabelServiceClientTest.g.cs rename to tests/V6/Services/CustomerLabelServiceClientTest.g.cs index 1851dcc78..3080eb86e 100644 --- a/tests/V2/Services/CustomerLabelServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerLabelServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerLabelServiceClientTest @@ -35,11 +35,11 @@ public void GetCustomerLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerLabelRequest request = new GetCustomerLabelRequest { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::CustomerLabel expectedResponse = new gagvr::CustomerLabel { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Customer = "customer931fec91", Label = "label20ba04d3", }; @@ -56,11 +56,11 @@ public void GetCustomerLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerLabelRequest request = new GetCustomerLabelRequest { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::CustomerLabel expectedResponse = new gagvr::CustomerLabel { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Customer = "customer931fec91", Label = "label20ba04d3", }; @@ -79,11 +79,11 @@ public void GetCustomerLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerLabelRequest request = new GetCustomerLabelRequest { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::CustomerLabel expectedResponse = new gagvr::CustomerLabel { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Customer = "customer931fec91", Label = "label20ba04d3", }; @@ -100,11 +100,11 @@ public void GetCustomerLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerLabelRequest request = new GetCustomerLabelRequest { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::CustomerLabel expectedResponse = new gagvr::CustomerLabel { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Customer = "customer931fec91", Label = "label20ba04d3", }; @@ -123,11 +123,11 @@ public void GetCustomerLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerLabelRequest request = new GetCustomerLabelRequest { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::CustomerLabel expectedResponse = new gagvr::CustomerLabel { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Customer = "customer931fec91", Label = "label20ba04d3", }; @@ -144,11 +144,11 @@ public void GetCustomerLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerLabelRequest request = new GetCustomerLabelRequest { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::CustomerLabel expectedResponse = new gagvr::CustomerLabel { - ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerCustomerLabel("[CUSTOMER]", "[CUSTOMER_LABEL]"), + ResourceNameAsCustomerLabelName = gagvr::CustomerLabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Customer = "customer931fec91", Label = "label20ba04d3", }; diff --git a/tests/V2/Services/CustomerManagerLinkServiceClientTest.g.cs b/tests/V6/Services/CustomerManagerLinkServiceClientTest.g.cs similarity index 68% rename from tests/V2/Services/CustomerManagerLinkServiceClientTest.g.cs rename to tests/V6/Services/CustomerManagerLinkServiceClientTest.g.cs index 1c464288a..5d4a8f07a 100644 --- a/tests/V2/Services/CustomerManagerLinkServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerManagerLinkServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerManagerLinkServiceClientTest @@ -35,14 +35,14 @@ public void GetCustomerManagerLinkRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerManagerLinkRequest request = new GetCustomerManagerLinkRequest { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerManagerLink expectedResponse = new gagvr::CustomerManagerLink { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ManagerCustomer = "manager_customer3075601e", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, }; mockGrpcClient.Setup(x => x.GetCustomerManagerLink(request, moq::It.IsAny())).Returns(expectedResponse); CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -57,14 +57,14 @@ public void GetCustomerManagerLinkRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerManagerLinkRequest request = new GetCustomerManagerLinkRequest { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerManagerLink expectedResponse = new gagvr::CustomerManagerLink { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ManagerCustomer = "manager_customer3075601e", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, }; mockGrpcClient.Setup(x => x.GetCustomerManagerLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -81,14 +81,14 @@ public void GetCustomerManagerLink() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerManagerLinkRequest request = new GetCustomerManagerLinkRequest { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerManagerLink expectedResponse = new gagvr::CustomerManagerLink { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ManagerCustomer = "manager_customer3075601e", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, }; mockGrpcClient.Setup(x => x.GetCustomerManagerLink(request, moq::It.IsAny())).Returns(expectedResponse); CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -103,14 +103,14 @@ public void GetCustomerManagerLink() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerManagerLinkRequest request = new GetCustomerManagerLinkRequest { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerManagerLink expectedResponse = new gagvr::CustomerManagerLink { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ManagerCustomer = "manager_customer3075601e", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, }; mockGrpcClient.Setup(x => x.GetCustomerManagerLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -127,14 +127,14 @@ public void GetCustomerManagerLinkResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerManagerLinkRequest request = new GetCustomerManagerLinkRequest { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerManagerLink expectedResponse = new gagvr::CustomerManagerLink { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ManagerCustomer = "manager_customer3075601e", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, }; mockGrpcClient.Setup(x => x.GetCustomerManagerLink(request, moq::It.IsAny())).Returns(expectedResponse); CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -149,14 +149,14 @@ public void GetCustomerManagerLinkResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerManagerLinkRequest request = new GetCustomerManagerLinkRequest { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), }; gagvr::CustomerManagerLink expectedResponse = new gagvr::CustomerManagerLink { - ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerCustomerManagerLink("[CUSTOMER]", "[CUSTOMER_MANAGER_LINK]"), + ResourceNameAsCustomerManagerLinkName = gagvr::CustomerManagerLinkName.FromCustomerManagerCustomerManagerLink("[CUSTOMER_ID]", "[MANAGER_CUSTOMER_ID]", "[MANAGER_LINK_ID]"), + Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, ManagerCustomer = "manager_customer3075601e", ManagerLinkId = 1955158851327798968L, - Status = gagve::ManagerLinkStatusEnum.Types.ManagerLinkStatus.Inactive, }; mockGrpcClient.Setup(x => x.GetCustomerManagerLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -274,5 +274,93 @@ public void MutateCustomerManagerLink() Assert.AreEqual(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); } + + [Category("Smoke")][Test] + public void MoveManagerLinkRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MoveManagerLinkRequest request = new MoveManagerLinkRequest + { + CustomerId = "customer_id3b3724cb", + PreviousCustomerManagerLink = "previous_customer_manager_linkb33a0aa8", + NewManager = "new_managerbf35b8c4", + }; + MoveManagerLinkResponse expectedResponse = new MoveManagerLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.MoveManagerLink(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); + MoveManagerLinkResponse response = client.MoveManagerLink(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MoveManagerLinkRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MoveManagerLinkRequest request = new MoveManagerLinkRequest + { + CustomerId = "customer_id3b3724cb", + PreviousCustomerManagerLink = "previous_customer_manager_linkb33a0aa8", + NewManager = "new_managerbf35b8c4", + }; + MoveManagerLinkResponse expectedResponse = new MoveManagerLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.MoveManagerLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); + MoveManagerLinkResponse responseCallSettings = await client.MoveManagerLinkAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MoveManagerLinkResponse responseCancellationToken = await client.MoveManagerLinkAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MoveManagerLink() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MoveManagerLinkRequest request = new MoveManagerLinkRequest + { + CustomerId = "customer_id3b3724cb", + PreviousCustomerManagerLink = "previous_customer_manager_linkb33a0aa8", + NewManager = "new_managerbf35b8c4", + }; + MoveManagerLinkResponse expectedResponse = new MoveManagerLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.MoveManagerLink(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); + MoveManagerLinkResponse response = client.MoveManagerLink(request.CustomerId, request.PreviousCustomerManagerLink, request.NewManager); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MoveManagerLinkAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MoveManagerLinkRequest request = new MoveManagerLinkRequest + { + CustomerId = "customer_id3b3724cb", + PreviousCustomerManagerLink = "previous_customer_manager_linkb33a0aa8", + NewManager = "new_managerbf35b8c4", + }; + MoveManagerLinkResponse expectedResponse = new MoveManagerLinkResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.MoveManagerLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerManagerLinkServiceClient client = new CustomerManagerLinkServiceClientImpl(mockGrpcClient.Object, null); + MoveManagerLinkResponse responseCallSettings = await client.MoveManagerLinkAsync(request.CustomerId, request.PreviousCustomerManagerLink, request.NewManager, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MoveManagerLinkResponse responseCancellationToken = await client.MoveManagerLinkAsync(request.CustomerId, request.PreviousCustomerManagerLink, request.NewManager, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } } } diff --git a/tests/V2/Services/CustomerNegativeCriterionServiceClientTest.g.cs b/tests/V6/Services/CustomerNegativeCriterionServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/CustomerNegativeCriterionServiceClientTest.g.cs rename to tests/V6/Services/CustomerNegativeCriterionServiceClientTest.g.cs index 8302f78af..61a334da0 100644 --- a/tests/V2/Services/CustomerNegativeCriterionServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerNegativeCriterionServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerNegativeCriterionServiceClientTest @@ -37,19 +37,19 @@ public void GetCustomerNegativeCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerNegativeCriterionRequest request = new GetCustomerNegativeCriterionRequest { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), }; gagvr::CustomerNegativeCriterion expectedResponse = new gagvr::CustomerNegativeCriterion { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), - Id = -6774108720365892680L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, ContentLabel = new gagvc::ContentLabelInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), Placement = new gagvc::PlacementInfo(), YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), + Id = -6774108720365892680L, }; mockGrpcClient.Setup(x => x.GetCustomerNegativeCriterion(request, moq::It.IsAny())).Returns(expectedResponse); CustomerNegativeCriterionServiceClient client = new CustomerNegativeCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -64,19 +64,19 @@ public void GetCustomerNegativeCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerNegativeCriterionRequest request = new GetCustomerNegativeCriterionRequest { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), }; gagvr::CustomerNegativeCriterion expectedResponse = new gagvr::CustomerNegativeCriterion { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), - Id = -6774108720365892680L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, ContentLabel = new gagvc::ContentLabelInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), Placement = new gagvc::PlacementInfo(), YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), + Id = -6774108720365892680L, }; mockGrpcClient.Setup(x => x.GetCustomerNegativeCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerNegativeCriterionServiceClient client = new CustomerNegativeCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -93,19 +93,19 @@ public void GetCustomerNegativeCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerNegativeCriterionRequest request = new GetCustomerNegativeCriterionRequest { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), }; gagvr::CustomerNegativeCriterion expectedResponse = new gagvr::CustomerNegativeCriterion { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), - Id = -6774108720365892680L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, ContentLabel = new gagvc::ContentLabelInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), Placement = new gagvc::PlacementInfo(), YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), + Id = -6774108720365892680L, }; mockGrpcClient.Setup(x => x.GetCustomerNegativeCriterion(request, moq::It.IsAny())).Returns(expectedResponse); CustomerNegativeCriterionServiceClient client = new CustomerNegativeCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -120,19 +120,19 @@ public void GetCustomerNegativeCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerNegativeCriterionRequest request = new GetCustomerNegativeCriterionRequest { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), }; gagvr::CustomerNegativeCriterion expectedResponse = new gagvr::CustomerNegativeCriterion { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), - Id = -6774108720365892680L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, ContentLabel = new gagvc::ContentLabelInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), Placement = new gagvc::PlacementInfo(), YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), + Id = -6774108720365892680L, }; mockGrpcClient.Setup(x => x.GetCustomerNegativeCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerNegativeCriterionServiceClient client = new CustomerNegativeCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -149,19 +149,19 @@ public void GetCustomerNegativeCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerNegativeCriterionRequest request = new GetCustomerNegativeCriterionRequest { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), }; gagvr::CustomerNegativeCriterion expectedResponse = new gagvr::CustomerNegativeCriterion { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), - Id = -6774108720365892680L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, ContentLabel = new gagvc::ContentLabelInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), Placement = new gagvc::PlacementInfo(), YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), + Id = -6774108720365892680L, }; mockGrpcClient.Setup(x => x.GetCustomerNegativeCriterion(request, moq::It.IsAny())).Returns(expectedResponse); CustomerNegativeCriterionServiceClient client = new CustomerNegativeCriterionServiceClientImpl(mockGrpcClient.Object, null); @@ -176,19 +176,19 @@ public void GetCustomerNegativeCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerNegativeCriterionRequest request = new GetCustomerNegativeCriterionRequest { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), }; gagvr::CustomerNegativeCriterion expectedResponse = new gagvr::CustomerNegativeCriterion { - ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCustomerNegativeCriterion("[CUSTOMER]", "[CUSTOMER_NEGATIVE_CRITERION]"), - Id = -6774108720365892680L, - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + ResourceNameAsCustomerNegativeCriterionName = gagvr::CustomerNegativeCriterionName.FromCustomerCriterion("[CUSTOMER_ID]", "[CRITERION_ID]"), + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, ContentLabel = new gagvc::ContentLabelInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), Placement = new gagvc::PlacementInfo(), YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), + Id = -6774108720365892680L, }; mockGrpcClient.Setup(x => x.GetCustomerNegativeCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerNegativeCriterionServiceClient client = new CustomerNegativeCriterionServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/CustomerServiceClientTest.g.cs b/tests/V6/Services/CustomerServiceClientTest.g.cs similarity index 93% rename from tests/V2/Services/CustomerServiceClientTest.g.cs rename to tests/V6/Services/CustomerServiceClientTest.g.cs index 3cacdb305..979c38aca 100644 --- a/tests/V2/Services/CustomerServiceClientTest.g.cs +++ b/tests/V6/Services/CustomerServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedCustomerServiceClientTest @@ -35,28 +35,30 @@ public void GetCustomerRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerRequest request = new GetCustomerRequest { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::Customer expectedResponse = new gagvr::Customer { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), + CallReportingSetting = new gagvr::CallReportingSetting(), + ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), + RemarketingSetting = new gagvr::RemarketingSetting(), + PayPerConversionEligibilityFailureReasons = + { + gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, + }, Id = -6774108720365892680L, DescriptiveName = "descriptive_nameee37a0bc", CurrencyCode = "currency_code7f81e352", TimeZone = "time_zone73f23b20", TrackingUrlTemplate = "tracking_url_template157f152a", + FinalUrlSuffix = "final_url_suffix046ed37a", AutoTaggingEnabled = true, HasPartnersBadge = true, - CallReportingSetting = new gagvr::CallReportingSetting(), - FinalUrlSuffix = "final_url_suffix046ed37a", Manager = false, TestAccount = true, - ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), - RemarketingSetting = new gagvr::RemarketingSetting(), - PayPerConversionEligibilityFailureReasons = - { - gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, - }, + OptimizationScore = -4.7741588361660064E+17, + OptimizationScoreWeight = -89016329767571470, }; mockGrpcClient.Setup(x => x.GetCustomer(request, moq::It.IsAny())).Returns(expectedResponse); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -71,28 +73,30 @@ public void GetCustomerRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerRequest request = new GetCustomerRequest { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::Customer expectedResponse = new gagvr::Customer { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), + CallReportingSetting = new gagvr::CallReportingSetting(), + ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), + RemarketingSetting = new gagvr::RemarketingSetting(), + PayPerConversionEligibilityFailureReasons = + { + gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, + }, Id = -6774108720365892680L, DescriptiveName = "descriptive_nameee37a0bc", CurrencyCode = "currency_code7f81e352", TimeZone = "time_zone73f23b20", TrackingUrlTemplate = "tracking_url_template157f152a", + FinalUrlSuffix = "final_url_suffix046ed37a", AutoTaggingEnabled = true, HasPartnersBadge = true, - CallReportingSetting = new gagvr::CallReportingSetting(), - FinalUrlSuffix = "final_url_suffix046ed37a", Manager = false, TestAccount = true, - ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), - RemarketingSetting = new gagvr::RemarketingSetting(), - PayPerConversionEligibilityFailureReasons = - { - gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, - }, + OptimizationScore = -4.7741588361660064E+17, + OptimizationScoreWeight = -89016329767571470, }; mockGrpcClient.Setup(x => x.GetCustomerAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -109,28 +113,30 @@ public void GetCustomer() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerRequest request = new GetCustomerRequest { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::Customer expectedResponse = new gagvr::Customer { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), + CallReportingSetting = new gagvr::CallReportingSetting(), + ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), + RemarketingSetting = new gagvr::RemarketingSetting(), + PayPerConversionEligibilityFailureReasons = + { + gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, + }, Id = -6774108720365892680L, DescriptiveName = "descriptive_nameee37a0bc", CurrencyCode = "currency_code7f81e352", TimeZone = "time_zone73f23b20", TrackingUrlTemplate = "tracking_url_template157f152a", + FinalUrlSuffix = "final_url_suffix046ed37a", AutoTaggingEnabled = true, HasPartnersBadge = true, - CallReportingSetting = new gagvr::CallReportingSetting(), - FinalUrlSuffix = "final_url_suffix046ed37a", Manager = false, TestAccount = true, - ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), - RemarketingSetting = new gagvr::RemarketingSetting(), - PayPerConversionEligibilityFailureReasons = - { - gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, - }, + OptimizationScore = -4.7741588361660064E+17, + OptimizationScoreWeight = -89016329767571470, }; mockGrpcClient.Setup(x => x.GetCustomer(request, moq::It.IsAny())).Returns(expectedResponse); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -145,28 +151,30 @@ public void GetCustomer() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerRequest request = new GetCustomerRequest { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::Customer expectedResponse = new gagvr::Customer { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), + CallReportingSetting = new gagvr::CallReportingSetting(), + ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), + RemarketingSetting = new gagvr::RemarketingSetting(), + PayPerConversionEligibilityFailureReasons = + { + gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, + }, Id = -6774108720365892680L, DescriptiveName = "descriptive_nameee37a0bc", CurrencyCode = "currency_code7f81e352", TimeZone = "time_zone73f23b20", TrackingUrlTemplate = "tracking_url_template157f152a", + FinalUrlSuffix = "final_url_suffix046ed37a", AutoTaggingEnabled = true, HasPartnersBadge = true, - CallReportingSetting = new gagvr::CallReportingSetting(), - FinalUrlSuffix = "final_url_suffix046ed37a", Manager = false, TestAccount = true, - ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), - RemarketingSetting = new gagvr::RemarketingSetting(), - PayPerConversionEligibilityFailureReasons = - { - gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, - }, + OptimizationScore = -4.7741588361660064E+17, + OptimizationScoreWeight = -89016329767571470, }; mockGrpcClient.Setup(x => x.GetCustomerAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -183,28 +191,30 @@ public void GetCustomerResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerRequest request = new GetCustomerRequest { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::Customer expectedResponse = new gagvr::Customer { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), + CallReportingSetting = new gagvr::CallReportingSetting(), + ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), + RemarketingSetting = new gagvr::RemarketingSetting(), + PayPerConversionEligibilityFailureReasons = + { + gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, + }, Id = -6774108720365892680L, DescriptiveName = "descriptive_nameee37a0bc", CurrencyCode = "currency_code7f81e352", TimeZone = "time_zone73f23b20", TrackingUrlTemplate = "tracking_url_template157f152a", + FinalUrlSuffix = "final_url_suffix046ed37a", AutoTaggingEnabled = true, HasPartnersBadge = true, - CallReportingSetting = new gagvr::CallReportingSetting(), - FinalUrlSuffix = "final_url_suffix046ed37a", Manager = false, TestAccount = true, - ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), - RemarketingSetting = new gagvr::RemarketingSetting(), - PayPerConversionEligibilityFailureReasons = - { - gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, - }, + OptimizationScore = -4.7741588361660064E+17, + OptimizationScoreWeight = -89016329767571470, }; mockGrpcClient.Setup(x => x.GetCustomer(request, moq::It.IsAny())).Returns(expectedResponse); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -219,28 +229,30 @@ public void GetCustomerResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetCustomerRequest request = new GetCustomerRequest { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::Customer expectedResponse = new gagvr::Customer { - ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER]"), + ResourceNameAsCustomerName = gagvr::CustomerName.FromCustomer("[CUSTOMER_ID]"), + CallReportingSetting = new gagvr::CallReportingSetting(), + ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), + RemarketingSetting = new gagvr::RemarketingSetting(), + PayPerConversionEligibilityFailureReasons = + { + gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, + }, Id = -6774108720365892680L, DescriptiveName = "descriptive_nameee37a0bc", CurrencyCode = "currency_code7f81e352", TimeZone = "time_zone73f23b20", TrackingUrlTemplate = "tracking_url_template157f152a", + FinalUrlSuffix = "final_url_suffix046ed37a", AutoTaggingEnabled = true, HasPartnersBadge = true, - CallReportingSetting = new gagvr::CallReportingSetting(), - FinalUrlSuffix = "final_url_suffix046ed37a", Manager = false, TestAccount = true, - ConversionTrackingSetting = new gagvr::ConversionTrackingSetting(), - RemarketingSetting = new gagvr::RemarketingSetting(), - PayPerConversionEligibilityFailureReasons = - { - gagve::CustomerPayPerConversionEligibilityFailureReasonEnum.Types.CustomerPayPerConversionEligibilityFailureReason.HasCampaignWithSharedBudget, - }, + OptimizationScore = -4.7741588361660064E+17, + OptimizationScoreWeight = -89016329767571470, }; mockGrpcClient.Setup(x => x.GetCustomerAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -260,6 +272,7 @@ public void MutateCustomerRequestObject() CustomerId = "customer_id3b3724cb", Operation = new CustomerOperation(), ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCustomerResponse expectedResponse = new MutateCustomerResponse { @@ -281,6 +294,7 @@ public void MutateCustomerRequestObject() CustomerId = "customer_id3b3724cb", Operation = new CustomerOperation(), ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateCustomerResponse expectedResponse = new MutateCustomerResponse { @@ -385,12 +399,13 @@ public void CreateCustomerClientRequestObject() { CustomerId = "customer_id3b3724cb", CustomerClient = new gagvr::Customer(), - EmailAddress = "email_addressf3aae0b5", AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + EmailAddress = "email_addressf3aae0b5", }; CreateCustomerClientResponse expectedResponse = new CreateCustomerClientResponse { ResourceName = "resource_name8cc2e687", + InvitationLink = "invitation_linkd5742ce9", }; mockGrpcClient.Setup(x => x.CreateCustomerClient(request, moq::It.IsAny())).Returns(expectedResponse); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -407,12 +422,13 @@ public void CreateCustomerClientRequestObject() { CustomerId = "customer_id3b3724cb", CustomerClient = new gagvr::Customer(), - EmailAddress = "email_addressf3aae0b5", AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + EmailAddress = "email_addressf3aae0b5", }; CreateCustomerClientResponse expectedResponse = new CreateCustomerClientResponse { ResourceName = "resource_name8cc2e687", + InvitationLink = "invitation_linkd5742ce9", }; mockGrpcClient.Setup(x => x.CreateCustomerClientAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -435,6 +451,7 @@ public void CreateCustomerClient() CreateCustomerClientResponse expectedResponse = new CreateCustomerClientResponse { ResourceName = "resource_name8cc2e687", + InvitationLink = "invitation_linkd5742ce9", }; mockGrpcClient.Setup(x => x.CreateCustomerClient(request, moq::It.IsAny())).Returns(expectedResponse); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); @@ -455,6 +472,7 @@ public void CreateCustomerClient() CreateCustomerClientResponse expectedResponse = new CreateCustomerClientResponse { ResourceName = "resource_name8cc2e687", + InvitationLink = "invitation_linkd5742ce9", }; mockGrpcClient.Setup(x => x.CreateCustomerClientAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); CustomerServiceClient client = new CustomerServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/CustomerUserAccessServiceClientTest.g.cs b/tests/V6/Services/CustomerUserAccessServiceClientTest.g.cs new file mode 100644 index 000000000..7c5b96f94 --- /dev/null +++ b/tests/V6/Services/CustomerUserAccessServiceClientTest.g.cs @@ -0,0 +1,266 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedCustomerUserAccessServiceClientTest + { + [Category("Smoke")][Test] + public void GetCustomerUserAccessRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomerUserAccessRequest request = new GetCustomerUserAccessRequest + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + }; + gagvr::CustomerUserAccess expectedResponse = new gagvr::CustomerUserAccess + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + UserId = -7972883667886640920L, + EmailAddress = "email_addressf3aae0b5", + AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + AccessCreationDateTime = "access_creation_date_time7709b5b1", + InviterUserEmailAddress = "inviter_user_email_address38e90785", + }; + mockGrpcClient.Setup(x => x.GetCustomerUserAccess(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomerUserAccess response = client.GetCustomerUserAccess(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCustomerUserAccessRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomerUserAccessRequest request = new GetCustomerUserAccessRequest + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + }; + gagvr::CustomerUserAccess expectedResponse = new gagvr::CustomerUserAccess + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + UserId = -7972883667886640920L, + EmailAddress = "email_addressf3aae0b5", + AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + AccessCreationDateTime = "access_creation_date_time7709b5b1", + InviterUserEmailAddress = "inviter_user_email_address38e90785", + }; + mockGrpcClient.Setup(x => x.GetCustomerUserAccessAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomerUserAccess responseCallSettings = await client.GetCustomerUserAccessAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CustomerUserAccess responseCancellationToken = await client.GetCustomerUserAccessAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCustomerUserAccess() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomerUserAccessRequest request = new GetCustomerUserAccessRequest + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + }; + gagvr::CustomerUserAccess expectedResponse = new gagvr::CustomerUserAccess + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + UserId = -7972883667886640920L, + EmailAddress = "email_addressf3aae0b5", + AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + AccessCreationDateTime = "access_creation_date_time7709b5b1", + InviterUserEmailAddress = "inviter_user_email_address38e90785", + }; + mockGrpcClient.Setup(x => x.GetCustomerUserAccess(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomerUserAccess response = client.GetCustomerUserAccess(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCustomerUserAccessAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomerUserAccessRequest request = new GetCustomerUserAccessRequest + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + }; + gagvr::CustomerUserAccess expectedResponse = new gagvr::CustomerUserAccess + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + UserId = -7972883667886640920L, + EmailAddress = "email_addressf3aae0b5", + AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + AccessCreationDateTime = "access_creation_date_time7709b5b1", + InviterUserEmailAddress = "inviter_user_email_address38e90785", + }; + mockGrpcClient.Setup(x => x.GetCustomerUserAccessAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomerUserAccess responseCallSettings = await client.GetCustomerUserAccessAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CustomerUserAccess responseCancellationToken = await client.GetCustomerUserAccessAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetCustomerUserAccessResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomerUserAccessRequest request = new GetCustomerUserAccessRequest + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + }; + gagvr::CustomerUserAccess expectedResponse = new gagvr::CustomerUserAccess + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + UserId = -7972883667886640920L, + EmailAddress = "email_addressf3aae0b5", + AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + AccessCreationDateTime = "access_creation_date_time7709b5b1", + InviterUserEmailAddress = "inviter_user_email_address38e90785", + }; + mockGrpcClient.Setup(x => x.GetCustomerUserAccess(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomerUserAccess response = client.GetCustomerUserAccess(request.ResourceNameAsCustomerUserAccessName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetCustomerUserAccessResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetCustomerUserAccessRequest request = new GetCustomerUserAccessRequest + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + }; + gagvr::CustomerUserAccess expectedResponse = new gagvr::CustomerUserAccess + { + ResourceNameAsCustomerUserAccessName = gagvr::CustomerUserAccessName.FromCustomerUser("[CUSTOMER_ID]", "[USER_ID]"), + UserId = -7972883667886640920L, + EmailAddress = "email_addressf3aae0b5", + AccessRole = gagve::AccessRoleEnum.Types.AccessRole.Unspecified, + AccessCreationDateTime = "access_creation_date_time7709b5b1", + InviterUserEmailAddress = "inviter_user_email_address38e90785", + }; + mockGrpcClient.Setup(x => x.GetCustomerUserAccessAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + gagvr::CustomerUserAccess responseCallSettings = await client.GetCustomerUserAccessAsync(request.ResourceNameAsCustomerUserAccessName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::CustomerUserAccess responseCancellationToken = await client.GetCustomerUserAccessAsync(request.ResourceNameAsCustomerUserAccessName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateCustomerUserAccessRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomerUserAccessRequest request = new MutateCustomerUserAccessRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new CustomerUserAccessOperation(), + }; + MutateCustomerUserAccessResponse expectedResponse = new MutateCustomerUserAccessResponse + { + Result = new MutateCustomerUserAccessResult(), + }; + mockGrpcClient.Setup(x => x.MutateCustomerUserAccess(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomerUserAccessResponse response = client.MutateCustomerUserAccess(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateCustomerUserAccessRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomerUserAccessRequest request = new MutateCustomerUserAccessRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new CustomerUserAccessOperation(), + }; + MutateCustomerUserAccessResponse expectedResponse = new MutateCustomerUserAccessResponse + { + Result = new MutateCustomerUserAccessResult(), + }; + mockGrpcClient.Setup(x => x.MutateCustomerUserAccessAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomerUserAccessResponse responseCallSettings = await client.MutateCustomerUserAccessAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateCustomerUserAccessResponse responseCancellationToken = await client.MutateCustomerUserAccessAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateCustomerUserAccess() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomerUserAccessRequest request = new MutateCustomerUserAccessRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new CustomerUserAccessOperation(), + }; + MutateCustomerUserAccessResponse expectedResponse = new MutateCustomerUserAccessResponse + { + Result = new MutateCustomerUserAccessResult(), + }; + mockGrpcClient.Setup(x => x.MutateCustomerUserAccess(request, moq::It.IsAny())).Returns(expectedResponse); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomerUserAccessResponse response = client.MutateCustomerUserAccess(request.CustomerId, request.Operation); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateCustomerUserAccessAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateCustomerUserAccessRequest request = new MutateCustomerUserAccessRequest + { + CustomerId = "customer_id3b3724cb", + Operation = new CustomerUserAccessOperation(), + }; + MutateCustomerUserAccessResponse expectedResponse = new MutateCustomerUserAccessResponse + { + Result = new MutateCustomerUserAccessResult(), + }; + mockGrpcClient.Setup(x => x.MutateCustomerUserAccessAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + CustomerUserAccessServiceClient client = new CustomerUserAccessServiceClientImpl(mockGrpcClient.Object, null); + MutateCustomerUserAccessResponse responseCallSettings = await client.MutateCustomerUserAccessAsync(request.CustomerId, request.Operation, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateCustomerUserAccessResponse responseCancellationToken = await client.MutateCustomerUserAccessAsync(request.CustomerId, request.Operation, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/DetailPlacementViewServiceClientTest.g.cs b/tests/V6/Services/DetailPlacementViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/DetailPlacementViewServiceClientTest.g.cs rename to tests/V6/Services/DetailPlacementViewServiceClientTest.g.cs index e250943f3..993d87718 100644 --- a/tests/V2/Services/DetailPlacementViewServiceClientTest.g.cs +++ b/tests/V6/Services/DetailPlacementViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedDetailPlacementViewServiceClientTest @@ -35,16 +35,16 @@ public void GetDetailPlacementViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDetailPlacementViewRequest request = new GetDetailPlacementViewRequest { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::DetailPlacementView expectedResponse = new gagvr::DetailPlacementView { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", GroupPlacementTargetUrl = "group_placement_target_urlb7f47882", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetDetailPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); DetailPlacementViewServiceClient client = new DetailPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -59,16 +59,16 @@ public void GetDetailPlacementViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDetailPlacementViewRequest request = new GetDetailPlacementViewRequest { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::DetailPlacementView expectedResponse = new gagvr::DetailPlacementView { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", GroupPlacementTargetUrl = "group_placement_target_urlb7f47882", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetDetailPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DetailPlacementViewServiceClient client = new DetailPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -85,16 +85,16 @@ public void GetDetailPlacementView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDetailPlacementViewRequest request = new GetDetailPlacementViewRequest { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::DetailPlacementView expectedResponse = new gagvr::DetailPlacementView { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", GroupPlacementTargetUrl = "group_placement_target_urlb7f47882", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetDetailPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); DetailPlacementViewServiceClient client = new DetailPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -109,16 +109,16 @@ public void GetDetailPlacementView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDetailPlacementViewRequest request = new GetDetailPlacementViewRequest { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::DetailPlacementView expectedResponse = new gagvr::DetailPlacementView { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", GroupPlacementTargetUrl = "group_placement_target_urlb7f47882", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetDetailPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DetailPlacementViewServiceClient client = new DetailPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -135,16 +135,16 @@ public void GetDetailPlacementViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDetailPlacementViewRequest request = new GetDetailPlacementViewRequest { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::DetailPlacementView expectedResponse = new gagvr::DetailPlacementView { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", GroupPlacementTargetUrl = "group_placement_target_urlb7f47882", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetDetailPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); DetailPlacementViewServiceClient client = new DetailPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -159,16 +159,16 @@ public void GetDetailPlacementViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDetailPlacementViewRequest request = new GetDetailPlacementViewRequest { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::DetailPlacementView expectedResponse = new gagvr::DetailPlacementView { - ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerDetailPlacementView("[CUSTOMER]", "[DETAIL_PLACEMENT_VIEW]"), + ResourceNameAsDetailPlacementViewName = gagvr::DetailPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", GroupPlacementTargetUrl = "group_placement_target_urlb7f47882", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetDetailPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DetailPlacementViewServiceClient client = new DetailPlacementViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/DisplayKeywordViewServiceClientTest.g.cs b/tests/V6/Services/DisplayKeywordViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/DisplayKeywordViewServiceClientTest.g.cs rename to tests/V6/Services/DisplayKeywordViewServiceClientTest.g.cs index 1c3d30267..237756fce 100644 --- a/tests/V2/Services/DisplayKeywordViewServiceClientTest.g.cs +++ b/tests/V6/Services/DisplayKeywordViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedDisplayKeywordViewServiceClientTest @@ -34,11 +34,11 @@ public void GetDisplayKeywordViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDisplayKeywordViewRequest request = new GetDisplayKeywordViewRequest { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::DisplayKeywordView expectedResponse = new gagvr::DisplayKeywordView { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetDisplayKeywordView(request, moq::It.IsAny())).Returns(expectedResponse); DisplayKeywordViewServiceClient client = new DisplayKeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetDisplayKeywordViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDisplayKeywordViewRequest request = new GetDisplayKeywordViewRequest { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::DisplayKeywordView expectedResponse = new gagvr::DisplayKeywordView { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetDisplayKeywordViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DisplayKeywordViewServiceClient client = new DisplayKeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetDisplayKeywordView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDisplayKeywordViewRequest request = new GetDisplayKeywordViewRequest { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::DisplayKeywordView expectedResponse = new gagvr::DisplayKeywordView { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetDisplayKeywordView(request, moq::It.IsAny())).Returns(expectedResponse); DisplayKeywordViewServiceClient client = new DisplayKeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetDisplayKeywordView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDisplayKeywordViewRequest request = new GetDisplayKeywordViewRequest { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::DisplayKeywordView expectedResponse = new gagvr::DisplayKeywordView { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetDisplayKeywordViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DisplayKeywordViewServiceClient client = new DisplayKeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetDisplayKeywordViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDisplayKeywordViewRequest request = new GetDisplayKeywordViewRequest { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::DisplayKeywordView expectedResponse = new gagvr::DisplayKeywordView { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetDisplayKeywordView(request, moq::It.IsAny())).Returns(expectedResponse); DisplayKeywordViewServiceClient client = new DisplayKeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetDisplayKeywordViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDisplayKeywordViewRequest request = new GetDisplayKeywordViewRequest { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::DisplayKeywordView expectedResponse = new gagvr::DisplayKeywordView { - ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerDisplayKeywordView("[CUSTOMER]", "[DISPLAY_KEYWORD_VIEW]"), + ResourceNameAsDisplayKeywordViewName = gagvr::DisplayKeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetDisplayKeywordViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DisplayKeywordViewServiceClient client = new DisplayKeywordViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/DistanceViewServiceClientTest.g.cs b/tests/V6/Services/DistanceViewServiceClientTest.g.cs similarity index 85% rename from tests/V2/Services/DistanceViewServiceClientTest.g.cs rename to tests/V6/Services/DistanceViewServiceClientTest.g.cs index d79bd4d23..1e36178ad 100644 --- a/tests/V2/Services/DistanceViewServiceClientTest.g.cs +++ b/tests/V6/Services/DistanceViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedDistanceViewServiceClientTest @@ -35,11 +35,11 @@ public void GetDistanceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDistanceViewRequest request = new GetDistanceViewRequest { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), }; gagvr::DistanceView expectedResponse = new gagvr::DistanceView { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), DistanceBucket = gagve::DistanceBucketEnum.Types.DistanceBucket.Within25Miles, MetricSystem = true, }; @@ -56,11 +56,11 @@ public void GetDistanceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDistanceViewRequest request = new GetDistanceViewRequest { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), }; gagvr::DistanceView expectedResponse = new gagvr::DistanceView { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), DistanceBucket = gagve::DistanceBucketEnum.Types.DistanceBucket.Within25Miles, MetricSystem = true, }; @@ -79,11 +79,11 @@ public void GetDistanceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDistanceViewRequest request = new GetDistanceViewRequest { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), }; gagvr::DistanceView expectedResponse = new gagvr::DistanceView { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), DistanceBucket = gagve::DistanceBucketEnum.Types.DistanceBucket.Within25Miles, MetricSystem = true, }; @@ -100,11 +100,11 @@ public void GetDistanceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDistanceViewRequest request = new GetDistanceViewRequest { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), }; gagvr::DistanceView expectedResponse = new gagvr::DistanceView { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), DistanceBucket = gagve::DistanceBucketEnum.Types.DistanceBucket.Within25Miles, MetricSystem = true, }; @@ -123,11 +123,11 @@ public void GetDistanceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDistanceViewRequest request = new GetDistanceViewRequest { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), }; gagvr::DistanceView expectedResponse = new gagvr::DistanceView { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), DistanceBucket = gagve::DistanceBucketEnum.Types.DistanceBucket.Within25Miles, MetricSystem = true, }; @@ -144,11 +144,11 @@ public void GetDistanceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDistanceViewRequest request = new GetDistanceViewRequest { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), }; gagvr::DistanceView expectedResponse = new gagvr::DistanceView { - ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerDistanceView("[CUSTOMER]", "[DISTANCE_VIEW]"), + ResourceNameAsDistanceViewName = gagvr::DistanceViewName.FromCustomerPlaceholderChainDistanceBucket("[CUSTOMER_ID]", "[PLACEHOLDER_CHAIN_ID]", "[DISTANCE_BUCKET]"), DistanceBucket = gagve::DistanceBucketEnum.Types.DistanceBucket.Within25Miles, MetricSystem = true, }; diff --git a/tests/V2/Services/DomainCategoryServiceClientTest.g.cs b/tests/V6/Services/DomainCategoryServiceClientTest.g.cs similarity index 84% rename from tests/V2/Services/DomainCategoryServiceClientTest.g.cs rename to tests/V6/Services/DomainCategoryServiceClientTest.g.cs index 4f1797b4b..416e30cdd 100644 --- a/tests/V2/Services/DomainCategoryServiceClientTest.g.cs +++ b/tests/V6/Services/DomainCategoryServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedDomainCategoryServiceClientTest @@ -34,12 +34,12 @@ public void GetDomainCategoryRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDomainCategoryRequest request = new GetDomainCategoryRequest { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), }; gagvr::DomainCategory expectedResponse = new gagvr::DomainCategory { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Category = "category2f35efc4", LanguageCode = "language_code2f6c7160", Domain = "domaine8825fad", @@ -61,12 +61,12 @@ public void GetDomainCategoryRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDomainCategoryRequest request = new GetDomainCategoryRequest { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), }; gagvr::DomainCategory expectedResponse = new gagvr::DomainCategory { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Category = "category2f35efc4", LanguageCode = "language_code2f6c7160", Domain = "domaine8825fad", @@ -90,12 +90,12 @@ public void GetDomainCategory() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDomainCategoryRequest request = new GetDomainCategoryRequest { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), }; gagvr::DomainCategory expectedResponse = new gagvr::DomainCategory { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Category = "category2f35efc4", LanguageCode = "language_code2f6c7160", Domain = "domaine8825fad", @@ -117,12 +117,12 @@ public void GetDomainCategory() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDomainCategoryRequest request = new GetDomainCategoryRequest { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), }; gagvr::DomainCategory expectedResponse = new gagvr::DomainCategory { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Category = "category2f35efc4", LanguageCode = "language_code2f6c7160", Domain = "domaine8825fad", @@ -146,12 +146,12 @@ public void GetDomainCategoryResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDomainCategoryRequest request = new GetDomainCategoryRequest { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), }; gagvr::DomainCategory expectedResponse = new gagvr::DomainCategory { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Category = "category2f35efc4", LanguageCode = "language_code2f6c7160", Domain = "domaine8825fad", @@ -173,12 +173,12 @@ public void GetDomainCategoryResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDomainCategoryRequest request = new GetDomainCategoryRequest { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), }; gagvr::DomainCategory expectedResponse = new gagvr::DomainCategory { - ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerDomainCategory("[CUSTOMER]", "[DOMAIN_CATEGORY]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), + ResourceNameAsDomainCategoryName = gagvr::DomainCategoryName.FromCustomerCampaignBase64CategoryLanguageCode("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[BASE64_CATEGORY]", "[LANGUAGE_CODE]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), Category = "category2f35efc4", LanguageCode = "language_code2f6c7160", Domain = "domaine8825fad", diff --git a/tests/V2/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs b/tests/V6/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs similarity index 72% rename from tests/V2/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs rename to tests/V6/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs index 99e31b402..80115921d 100644 --- a/tests/V2/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs +++ b/tests/V6/Services/DynamicSearchAdsSearchTermViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedDynamicSearchAdsSearchTermViewServiceClientTest @@ -34,15 +34,18 @@ public void GetDynamicSearchAdsSearchTermViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDynamicSearchAdsSearchTermViewRequest request = new GetDynamicSearchAdsSearchTermViewRequest { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), }; gagvr::DynamicSearchAdsSearchTermView expectedResponse = new gagvr::DynamicSearchAdsSearchTermView { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), SearchTerm = "search_term6c01a1df", Headline = "headline583098ef", LandingPage = "landing_page89bf8d81", PageUrl = "page_url886e2c07", + HasNegativeKeyword = false, + HasMatchingKeyword = true, + HasNegativeUrl = true, }; mockGrpcClient.Setup(x => x.GetDynamicSearchAdsSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); DynamicSearchAdsSearchTermViewServiceClient client = new DynamicSearchAdsSearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -57,15 +60,18 @@ public void GetDynamicSearchAdsSearchTermViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDynamicSearchAdsSearchTermViewRequest request = new GetDynamicSearchAdsSearchTermViewRequest { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), }; gagvr::DynamicSearchAdsSearchTermView expectedResponse = new gagvr::DynamicSearchAdsSearchTermView { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), SearchTerm = "search_term6c01a1df", Headline = "headline583098ef", LandingPage = "landing_page89bf8d81", PageUrl = "page_url886e2c07", + HasNegativeKeyword = false, + HasMatchingKeyword = true, + HasNegativeUrl = true, }; mockGrpcClient.Setup(x => x.GetDynamicSearchAdsSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DynamicSearchAdsSearchTermViewServiceClient client = new DynamicSearchAdsSearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -82,15 +88,18 @@ public void GetDynamicSearchAdsSearchTermView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDynamicSearchAdsSearchTermViewRequest request = new GetDynamicSearchAdsSearchTermViewRequest { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), }; gagvr::DynamicSearchAdsSearchTermView expectedResponse = new gagvr::DynamicSearchAdsSearchTermView { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), SearchTerm = "search_term6c01a1df", Headline = "headline583098ef", LandingPage = "landing_page89bf8d81", PageUrl = "page_url886e2c07", + HasNegativeKeyword = false, + HasMatchingKeyword = true, + HasNegativeUrl = true, }; mockGrpcClient.Setup(x => x.GetDynamicSearchAdsSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); DynamicSearchAdsSearchTermViewServiceClient client = new DynamicSearchAdsSearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -105,15 +114,18 @@ public void GetDynamicSearchAdsSearchTermView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDynamicSearchAdsSearchTermViewRequest request = new GetDynamicSearchAdsSearchTermViewRequest { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), }; gagvr::DynamicSearchAdsSearchTermView expectedResponse = new gagvr::DynamicSearchAdsSearchTermView { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), SearchTerm = "search_term6c01a1df", Headline = "headline583098ef", LandingPage = "landing_page89bf8d81", PageUrl = "page_url886e2c07", + HasNegativeKeyword = false, + HasMatchingKeyword = true, + HasNegativeUrl = true, }; mockGrpcClient.Setup(x => x.GetDynamicSearchAdsSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DynamicSearchAdsSearchTermViewServiceClient client = new DynamicSearchAdsSearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -130,15 +142,18 @@ public void GetDynamicSearchAdsSearchTermViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDynamicSearchAdsSearchTermViewRequest request = new GetDynamicSearchAdsSearchTermViewRequest { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), }; gagvr::DynamicSearchAdsSearchTermView expectedResponse = new gagvr::DynamicSearchAdsSearchTermView { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), SearchTerm = "search_term6c01a1df", Headline = "headline583098ef", LandingPage = "landing_page89bf8d81", PageUrl = "page_url886e2c07", + HasNegativeKeyword = false, + HasMatchingKeyword = true, + HasNegativeUrl = true, }; mockGrpcClient.Setup(x => x.GetDynamicSearchAdsSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); DynamicSearchAdsSearchTermViewServiceClient client = new DynamicSearchAdsSearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -153,15 +168,18 @@ public void GetDynamicSearchAdsSearchTermViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetDynamicSearchAdsSearchTermViewRequest request = new GetDynamicSearchAdsSearchTermViewRequest { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), }; gagvr::DynamicSearchAdsSearchTermView expectedResponse = new gagvr::DynamicSearchAdsSearchTermView { - ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerDynamicSearchAdsSearchTermView("[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]"), + ResourceNameAsDynamicSearchAdsSearchTermViewName = gagvr::DynamicSearchAdsSearchTermViewName.FromCustomerAdGroupSearchTermFingerprintHeadlineFingerprintLandingPageFingerprintPageUrlFingerprint("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[SEARCH_TERM_FINGERPRINT]", "[HEADLINE_FINGERPRINT]", "[LANDING_PAGE_FINGERPRINT]", "[PAGE_URL_FINGERPRINT]"), SearchTerm = "search_term6c01a1df", Headline = "headline583098ef", LandingPage = "landing_page89bf8d81", PageUrl = "page_url886e2c07", + HasNegativeKeyword = false, + HasMatchingKeyword = true, + HasNegativeUrl = true, }; mockGrpcClient.Setup(x => x.GetDynamicSearchAdsSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); DynamicSearchAdsSearchTermViewServiceClient client = new DynamicSearchAdsSearchTermViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/ExpandedLandingPageViewServiceClientTest.g.cs b/tests/V6/Services/ExpandedLandingPageViewServiceClientTest.g.cs similarity index 85% rename from tests/V2/Services/ExpandedLandingPageViewServiceClientTest.g.cs rename to tests/V6/Services/ExpandedLandingPageViewServiceClientTest.g.cs index 2d62a810d..690147431 100644 --- a/tests/V2/Services/ExpandedLandingPageViewServiceClientTest.g.cs +++ b/tests/V6/Services/ExpandedLandingPageViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedExpandedLandingPageViewServiceClientTest @@ -34,11 +34,11 @@ public void GetExpandedLandingPageViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExpandedLandingPageViewRequest request = new GetExpandedLandingPageViewRequest { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::ExpandedLandingPageView expectedResponse = new gagvr::ExpandedLandingPageView { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), ExpandedFinalUrl = "expanded_final_url4339aa97", }; mockGrpcClient.Setup(x => x.GetExpandedLandingPageView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -54,11 +54,11 @@ public void GetExpandedLandingPageViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExpandedLandingPageViewRequest request = new GetExpandedLandingPageViewRequest { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::ExpandedLandingPageView expectedResponse = new gagvr::ExpandedLandingPageView { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), ExpandedFinalUrl = "expanded_final_url4339aa97", }; mockGrpcClient.Setup(x => x.GetExpandedLandingPageViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -76,11 +76,11 @@ public void GetExpandedLandingPageView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExpandedLandingPageViewRequest request = new GetExpandedLandingPageViewRequest { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::ExpandedLandingPageView expectedResponse = new gagvr::ExpandedLandingPageView { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), ExpandedFinalUrl = "expanded_final_url4339aa97", }; mockGrpcClient.Setup(x => x.GetExpandedLandingPageView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -96,11 +96,11 @@ public void GetExpandedLandingPageView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExpandedLandingPageViewRequest request = new GetExpandedLandingPageViewRequest { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::ExpandedLandingPageView expectedResponse = new gagvr::ExpandedLandingPageView { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), ExpandedFinalUrl = "expanded_final_url4339aa97", }; mockGrpcClient.Setup(x => x.GetExpandedLandingPageViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -118,11 +118,11 @@ public void GetExpandedLandingPageViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExpandedLandingPageViewRequest request = new GetExpandedLandingPageViewRequest { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::ExpandedLandingPageView expectedResponse = new gagvr::ExpandedLandingPageView { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), ExpandedFinalUrl = "expanded_final_url4339aa97", }; mockGrpcClient.Setup(x => x.GetExpandedLandingPageView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -138,11 +138,11 @@ public void GetExpandedLandingPageViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExpandedLandingPageViewRequest request = new GetExpandedLandingPageViewRequest { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::ExpandedLandingPageView expectedResponse = new gagvr::ExpandedLandingPageView { - ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedLandingPageView("[CUSTOMER]", "[EXPANDED_LANDING_PAGE_VIEW]"), + ResourceNameAsExpandedLandingPageViewName = gagvr::ExpandedLandingPageViewName.FromCustomerExpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[EXPANDED_FINAL_URL_FINGERPRINT]"), ExpandedFinalUrl = "expanded_final_url4339aa97", }; mockGrpcClient.Setup(x => x.GetExpandedLandingPageViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/ExtensionFeedItemServiceClientTest.g.cs b/tests/V6/Services/ExtensionFeedItemServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/ExtensionFeedItemServiceClientTest.g.cs rename to tests/V6/Services/ExtensionFeedItemServiceClientTest.g.cs index 5fd7c13e9..511ab6fd9 100644 --- a/tests/V2/Services/ExtensionFeedItemServiceClientTest.g.cs +++ b/tests/V6/Services/ExtensionFeedItemServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedExtensionFeedItemServiceClientTest @@ -37,16 +37,14 @@ public void GetExtensionFeedItemRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExtensionFeedItemRequest request = new GetExtensionFeedItemRequest { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }; gagvr::ExtensionFeedItem expectedResponse = new gagvr::ExtensionFeedItem { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), SitelinkFeedItem = new gagvc::SitelinkFeedItem(), StructuredSnippetFeedItem = new gagvc::StructuredSnippetFeedItem(), Status = gagve::FeedItemStatusEnum.Types.FeedItemStatus.Enabled, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", AppFeedItem = new gagvc::AppFeedItem(), CallFeedItem = new gagvc::CallFeedItem(), CalloutFeedItem = new gagvc::CalloutFeedItem(), @@ -61,12 +59,15 @@ public void GetExtensionFeedItemRequestObject() new gagvc::AdScheduleInfo(), }, Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, - TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), TargetedKeyword = new gagvc::KeywordInfo(), HotelCalloutFeedItem = new gagvc::HotelCalloutFeedItem(), Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + ImageFeedItem = new gagvc::ImageFeedItem(), }; mockGrpcClient.Setup(x => x.GetExtensionFeedItem(request, moq::It.IsAny())).Returns(expectedResponse); ExtensionFeedItemServiceClient client = new ExtensionFeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -81,16 +82,14 @@ public void GetExtensionFeedItemRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExtensionFeedItemRequest request = new GetExtensionFeedItemRequest { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }; gagvr::ExtensionFeedItem expectedResponse = new gagvr::ExtensionFeedItem { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), SitelinkFeedItem = new gagvc::SitelinkFeedItem(), StructuredSnippetFeedItem = new gagvc::StructuredSnippetFeedItem(), Status = gagve::FeedItemStatusEnum.Types.FeedItemStatus.Enabled, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", AppFeedItem = new gagvc::AppFeedItem(), CallFeedItem = new gagvc::CallFeedItem(), CalloutFeedItem = new gagvc::CalloutFeedItem(), @@ -105,12 +104,15 @@ public void GetExtensionFeedItemRequestObject() new gagvc::AdScheduleInfo(), }, Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, - TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), TargetedKeyword = new gagvc::KeywordInfo(), HotelCalloutFeedItem = new gagvc::HotelCalloutFeedItem(), Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + ImageFeedItem = new gagvc::ImageFeedItem(), }; mockGrpcClient.Setup(x => x.GetExtensionFeedItemAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ExtensionFeedItemServiceClient client = new ExtensionFeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -127,16 +129,14 @@ public void GetExtensionFeedItem() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExtensionFeedItemRequest request = new GetExtensionFeedItemRequest { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }; gagvr::ExtensionFeedItem expectedResponse = new gagvr::ExtensionFeedItem { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), SitelinkFeedItem = new gagvc::SitelinkFeedItem(), StructuredSnippetFeedItem = new gagvc::StructuredSnippetFeedItem(), Status = gagve::FeedItemStatusEnum.Types.FeedItemStatus.Enabled, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", AppFeedItem = new gagvc::AppFeedItem(), CallFeedItem = new gagvc::CallFeedItem(), CalloutFeedItem = new gagvc::CalloutFeedItem(), @@ -151,12 +151,15 @@ public void GetExtensionFeedItem() new gagvc::AdScheduleInfo(), }, Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, - TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), TargetedKeyword = new gagvc::KeywordInfo(), HotelCalloutFeedItem = new gagvc::HotelCalloutFeedItem(), Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + ImageFeedItem = new gagvc::ImageFeedItem(), }; mockGrpcClient.Setup(x => x.GetExtensionFeedItem(request, moq::It.IsAny())).Returns(expectedResponse); ExtensionFeedItemServiceClient client = new ExtensionFeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -171,16 +174,14 @@ public void GetExtensionFeedItem() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExtensionFeedItemRequest request = new GetExtensionFeedItemRequest { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }; gagvr::ExtensionFeedItem expectedResponse = new gagvr::ExtensionFeedItem { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), SitelinkFeedItem = new gagvc::SitelinkFeedItem(), StructuredSnippetFeedItem = new gagvc::StructuredSnippetFeedItem(), Status = gagve::FeedItemStatusEnum.Types.FeedItemStatus.Enabled, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", AppFeedItem = new gagvc::AppFeedItem(), CallFeedItem = new gagvc::CallFeedItem(), CalloutFeedItem = new gagvc::CalloutFeedItem(), @@ -195,12 +196,15 @@ public void GetExtensionFeedItem() new gagvc::AdScheduleInfo(), }, Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, - TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), TargetedKeyword = new gagvc::KeywordInfo(), HotelCalloutFeedItem = new gagvc::HotelCalloutFeedItem(), Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + ImageFeedItem = new gagvc::ImageFeedItem(), }; mockGrpcClient.Setup(x => x.GetExtensionFeedItemAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ExtensionFeedItemServiceClient client = new ExtensionFeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -217,16 +221,14 @@ public void GetExtensionFeedItemResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExtensionFeedItemRequest request = new GetExtensionFeedItemRequest { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }; gagvr::ExtensionFeedItem expectedResponse = new gagvr::ExtensionFeedItem { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), SitelinkFeedItem = new gagvc::SitelinkFeedItem(), StructuredSnippetFeedItem = new gagvc::StructuredSnippetFeedItem(), Status = gagve::FeedItemStatusEnum.Types.FeedItemStatus.Enabled, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", AppFeedItem = new gagvc::AppFeedItem(), CallFeedItem = new gagvc::CallFeedItem(), CalloutFeedItem = new gagvc::CalloutFeedItem(), @@ -241,12 +243,15 @@ public void GetExtensionFeedItemResourceNames() new gagvc::AdScheduleInfo(), }, Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, - TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), TargetedKeyword = new gagvc::KeywordInfo(), HotelCalloutFeedItem = new gagvc::HotelCalloutFeedItem(), Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + ImageFeedItem = new gagvc::ImageFeedItem(), }; mockGrpcClient.Setup(x => x.GetExtensionFeedItem(request, moq::It.IsAny())).Returns(expectedResponse); ExtensionFeedItemServiceClient client = new ExtensionFeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -261,16 +266,14 @@ public void GetExtensionFeedItemResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetExtensionFeedItemRequest request = new GetExtensionFeedItemRequest { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), }; gagvr::ExtensionFeedItem expectedResponse = new gagvr::ExtensionFeedItem { - ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerExtensionFeedItem("[CUSTOMER]", "[EXTENSION_FEED_ITEM]"), + ResourceNameAsExtensionFeedItemName = gagvr::ExtensionFeedItemName.FromCustomerFeedItem("[CUSTOMER_ID]", "[FEED_ITEM_ID]"), SitelinkFeedItem = new gagvc::SitelinkFeedItem(), StructuredSnippetFeedItem = new gagvc::StructuredSnippetFeedItem(), Status = gagve::FeedItemStatusEnum.Types.FeedItemStatus.Enabled, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", AppFeedItem = new gagvc::AppFeedItem(), CallFeedItem = new gagvc::CallFeedItem(), CalloutFeedItem = new gagvc::CalloutFeedItem(), @@ -285,12 +288,15 @@ public void GetExtensionFeedItemResourceNames() new gagvc::AdScheduleInfo(), }, Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, - TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), TargetedKeyword = new gagvc::KeywordInfo(), HotelCalloutFeedItem = new gagvc::HotelCalloutFeedItem(), Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", + TargetedCampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + TargetedAdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + TargetedGeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + ImageFeedItem = new gagvc::ImageFeedItem(), }; mockGrpcClient.Setup(x => x.GetExtensionFeedItemAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ExtensionFeedItemServiceClient client = new ExtensionFeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -314,6 +320,7 @@ public void MutateExtensionFeedItemsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateExtensionFeedItemsResponse expectedResponse = new MutateExtensionFeedItemsResponse { @@ -343,6 +350,7 @@ public void MutateExtensionFeedItemsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateExtensionFeedItemsResponse expectedResponse = new MutateExtensionFeedItemsResponse { diff --git a/tests/V2/Services/FeedItemServiceClientTest.g.cs b/tests/V6/Services/FeedItemServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/FeedItemServiceClientTest.g.cs rename to tests/V6/Services/FeedItemServiceClientTest.g.cs index 49ae50e55..bf592c9df 100644 --- a/tests/V2/Services/FeedItemServiceClientTest.g.cs +++ b/tests/V6/Services/FeedItemServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedFeedItemServiceClientTest @@ -37,15 +37,11 @@ public void GetFeedItemRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemRequest request = new GetFeedItemRequest { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), }; gagvr::FeedItem expectedResponse = new gagvr::FeedItem { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), AttributeValues = { new gagvr::FeedItemAttributeValue(), @@ -60,6 +56,10 @@ public void GetFeedItemRequestObject() { new gagvr::FeedItemPlaceholderPolicyInfo(), }, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", }; mockGrpcClient.Setup(x => x.GetFeedItem(request, moq::It.IsAny())).Returns(expectedResponse); FeedItemServiceClient client = new FeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -74,15 +74,11 @@ public void GetFeedItemRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemRequest request = new GetFeedItemRequest { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), }; gagvr::FeedItem expectedResponse = new gagvr::FeedItem { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), AttributeValues = { new gagvr::FeedItemAttributeValue(), @@ -97,6 +93,10 @@ public void GetFeedItemRequestObject() { new gagvr::FeedItemPlaceholderPolicyInfo(), }, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", }; mockGrpcClient.Setup(x => x.GetFeedItemAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedItemServiceClient client = new FeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -113,15 +113,11 @@ public void GetFeedItem() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemRequest request = new GetFeedItemRequest { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), }; gagvr::FeedItem expectedResponse = new gagvr::FeedItem { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), AttributeValues = { new gagvr::FeedItemAttributeValue(), @@ -136,6 +132,10 @@ public void GetFeedItem() { new gagvr::FeedItemPlaceholderPolicyInfo(), }, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", }; mockGrpcClient.Setup(x => x.GetFeedItem(request, moq::It.IsAny())).Returns(expectedResponse); FeedItemServiceClient client = new FeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -150,15 +150,11 @@ public void GetFeedItem() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemRequest request = new GetFeedItemRequest { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), }; gagvr::FeedItem expectedResponse = new gagvr::FeedItem { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), AttributeValues = { new gagvr::FeedItemAttributeValue(), @@ -173,6 +169,10 @@ public void GetFeedItem() { new gagvr::FeedItemPlaceholderPolicyInfo(), }, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", }; mockGrpcClient.Setup(x => x.GetFeedItemAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedItemServiceClient client = new FeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -189,15 +189,11 @@ public void GetFeedItemResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemRequest request = new GetFeedItemRequest { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), }; gagvr::FeedItem expectedResponse = new gagvr::FeedItem { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), AttributeValues = { new gagvr::FeedItemAttributeValue(), @@ -212,6 +208,10 @@ public void GetFeedItemResourceNames() { new gagvr::FeedItemPlaceholderPolicyInfo(), }, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", }; mockGrpcClient.Setup(x => x.GetFeedItem(request, moq::It.IsAny())).Returns(expectedResponse); FeedItemServiceClient client = new FeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -226,15 +226,11 @@ public void GetFeedItemResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemRequest request = new GetFeedItemRequest { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), }; gagvr::FeedItem expectedResponse = new gagvr::FeedItem { - ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - StartDateTime = "start_date_timeea924cb1", - EndDateTime = "end_date_timea95363f3", + ResourceNameAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), AttributeValues = { new gagvr::FeedItemAttributeValue(), @@ -249,6 +245,10 @@ public void GetFeedItemResourceNames() { new gagvr::FeedItemPlaceholderPolicyInfo(), }, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + Id = -6774108720365892680L, + StartDateTime = "start_date_timeea924cb1", + EndDateTime = "end_date_timea95363f3", }; mockGrpcClient.Setup(x => x.GetFeedItemAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedItemServiceClient client = new FeedItemServiceClientImpl(mockGrpcClient.Object, null); @@ -272,6 +272,7 @@ public void MutateFeedItemsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateFeedItemsResponse expectedResponse = new MutateFeedItemsResponse { @@ -301,6 +302,7 @@ public void MutateFeedItemsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateFeedItemsResponse expectedResponse = new MutateFeedItemsResponse { diff --git a/tests/V6/Services/FeedItemSetLinkServiceClientTest.g.cs b/tests/V6/Services/FeedItemSetLinkServiceClientTest.g.cs new file mode 100644 index 000000000..ced4a42a0 --- /dev/null +++ b/tests/V6/Services/FeedItemSetLinkServiceClientTest.g.cs @@ -0,0 +1,275 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedFeedItemSetLinkServiceClientTest + { + [Category("Smoke")][Test] + public void GetFeedItemSetLinkRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetLinkRequest request = new GetFeedItemSetLinkRequest + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + }; + gagvr::FeedItemSetLink expectedResponse = new gagvr::FeedItemSetLink + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemSetAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetLink(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSetLink response = client.GetFeedItemSetLink(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetFeedItemSetLinkRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetLinkRequest request = new GetFeedItemSetLinkRequest + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + }; + gagvr::FeedItemSetLink expectedResponse = new gagvr::FeedItemSetLink + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemSetAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSetLink responseCallSettings = await client.GetFeedItemSetLinkAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::FeedItemSetLink responseCancellationToken = await client.GetFeedItemSetLinkAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetFeedItemSetLink() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetLinkRequest request = new GetFeedItemSetLinkRequest + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + }; + gagvr::FeedItemSetLink expectedResponse = new gagvr::FeedItemSetLink + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemSetAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetLink(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSetLink response = client.GetFeedItemSetLink(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetFeedItemSetLinkAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetLinkRequest request = new GetFeedItemSetLinkRequest + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + }; + gagvr::FeedItemSetLink expectedResponse = new gagvr::FeedItemSetLink + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemSetAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSetLink responseCallSettings = await client.GetFeedItemSetLinkAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::FeedItemSetLink responseCancellationToken = await client.GetFeedItemSetLinkAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetFeedItemSetLinkResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetLinkRequest request = new GetFeedItemSetLinkRequest + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + }; + gagvr::FeedItemSetLink expectedResponse = new gagvr::FeedItemSetLink + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemSetAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetLink(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSetLink response = client.GetFeedItemSetLink(request.ResourceNameAsFeedItemSetLinkName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetFeedItemSetLinkResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetLinkRequest request = new GetFeedItemSetLinkRequest + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + }; + gagvr::FeedItemSetLink expectedResponse = new gagvr::FeedItemSetLink + { + ResourceNameAsFeedItemSetLinkName = gagvr::FeedItemSetLinkName.FromCustomerFeedFeedItemSetFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]", "[FEED_ITEM_ID]"), + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemSetAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSetLink responseCallSettings = await client.GetFeedItemSetLinkAsync(request.ResourceNameAsFeedItemSetLinkName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::FeedItemSetLink responseCancellationToken = await client.GetFeedItemSetLinkAsync(request.ResourceNameAsFeedItemSetLinkName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateFeedItemSetLinksRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetLinksRequest request = new MutateFeedItemSetLinksRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetLinkOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateFeedItemSetLinksResponse expectedResponse = new MutateFeedItemSetLinksResponse + { + Results = + { + new MutateFeedItemSetLinkResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSetLinks(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetLinksResponse response = client.MutateFeedItemSetLinks(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateFeedItemSetLinksRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetLinksRequest request = new MutateFeedItemSetLinksRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetLinkOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateFeedItemSetLinksResponse expectedResponse = new MutateFeedItemSetLinksResponse + { + Results = + { + new MutateFeedItemSetLinkResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSetLinksAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetLinksResponse responseCallSettings = await client.MutateFeedItemSetLinksAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateFeedItemSetLinksResponse responseCancellationToken = await client.MutateFeedItemSetLinksAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateFeedItemSetLinks() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetLinksRequest request = new MutateFeedItemSetLinksRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetLinkOperation(), + }, + }; + MutateFeedItemSetLinksResponse expectedResponse = new MutateFeedItemSetLinksResponse + { + Results = + { + new MutateFeedItemSetLinkResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSetLinks(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetLinksResponse response = client.MutateFeedItemSetLinks(request.CustomerId, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateFeedItemSetLinksAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetLinksRequest request = new MutateFeedItemSetLinksRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetLinkOperation(), + }, + }; + MutateFeedItemSetLinksResponse expectedResponse = new MutateFeedItemSetLinksResponse + { + Results = + { + new MutateFeedItemSetLinkResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSetLinksAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetLinkServiceClient client = new FeedItemSetLinkServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetLinksResponse responseCallSettings = await client.MutateFeedItemSetLinksAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateFeedItemSetLinksResponse responseCancellationToken = await client.MutateFeedItemSetLinksAsync(request.CustomerId, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V6/Services/FeedItemSetServiceClientTest.g.cs b/tests/V6/Services/FeedItemSetServiceClientTest.g.cs new file mode 100644 index 000000000..43615b67c --- /dev/null +++ b/tests/V6/Services/FeedItemSetServiceClientTest.g.cs @@ -0,0 +1,301 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedFeedItemSetServiceClientTest + { + [Category("Smoke")][Test] + public void GetFeedItemSetRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetRequest request = new GetFeedItemSetRequest + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + gagvr::FeedItemSet expectedResponse = new gagvr::FeedItemSet + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemSetId = 2017070211045731158L, + DisplayName = "display_name137f65c2", + DynamicLocationSetFilter = new gagvc::DynamicLocationSetFilter(), + DynamicAffiliateLocationSetFilter = new gagvc::DynamicAffiliateLocationSetFilter(), + Status = gagve::FeedItemSetStatusEnum.Types.FeedItemSetStatus.Enabled, + }; + mockGrpcClient.Setup(x => x.GetFeedItemSet(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSet response = client.GetFeedItemSet(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetFeedItemSetRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetRequest request = new GetFeedItemSetRequest + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + gagvr::FeedItemSet expectedResponse = new gagvr::FeedItemSet + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemSetId = 2017070211045731158L, + DisplayName = "display_name137f65c2", + DynamicLocationSetFilter = new gagvc::DynamicLocationSetFilter(), + DynamicAffiliateLocationSetFilter = new gagvc::DynamicAffiliateLocationSetFilter(), + Status = gagve::FeedItemSetStatusEnum.Types.FeedItemSetStatus.Enabled, + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSet responseCallSettings = await client.GetFeedItemSetAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::FeedItemSet responseCancellationToken = await client.GetFeedItemSetAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetFeedItemSet() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetRequest request = new GetFeedItemSetRequest + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + gagvr::FeedItemSet expectedResponse = new gagvr::FeedItemSet + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemSetId = 2017070211045731158L, + DisplayName = "display_name137f65c2", + DynamicLocationSetFilter = new gagvc::DynamicLocationSetFilter(), + DynamicAffiliateLocationSetFilter = new gagvc::DynamicAffiliateLocationSetFilter(), + Status = gagve::FeedItemSetStatusEnum.Types.FeedItemSetStatus.Enabled, + }; + mockGrpcClient.Setup(x => x.GetFeedItemSet(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSet response = client.GetFeedItemSet(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetFeedItemSetAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetRequest request = new GetFeedItemSetRequest + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + gagvr::FeedItemSet expectedResponse = new gagvr::FeedItemSet + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemSetId = 2017070211045731158L, + DisplayName = "display_name137f65c2", + DynamicLocationSetFilter = new gagvc::DynamicLocationSetFilter(), + DynamicAffiliateLocationSetFilter = new gagvc::DynamicAffiliateLocationSetFilter(), + Status = gagve::FeedItemSetStatusEnum.Types.FeedItemSetStatus.Enabled, + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSet responseCallSettings = await client.GetFeedItemSetAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::FeedItemSet responseCancellationToken = await client.GetFeedItemSetAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetFeedItemSetResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetRequest request = new GetFeedItemSetRequest + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + gagvr::FeedItemSet expectedResponse = new gagvr::FeedItemSet + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemSetId = 2017070211045731158L, + DisplayName = "display_name137f65c2", + DynamicLocationSetFilter = new gagvc::DynamicLocationSetFilter(), + DynamicAffiliateLocationSetFilter = new gagvc::DynamicAffiliateLocationSetFilter(), + Status = gagve::FeedItemSetStatusEnum.Types.FeedItemSetStatus.Enabled, + }; + mockGrpcClient.Setup(x => x.GetFeedItemSet(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSet response = client.GetFeedItemSet(request.ResourceNameAsFeedItemSetName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetFeedItemSetResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetFeedItemSetRequest request = new GetFeedItemSetRequest + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + }; + gagvr::FeedItemSet expectedResponse = new gagvr::FeedItemSet + { + ResourceNameAsFeedItemSetName = gagvr::FeedItemSetName.FromCustomerFeedFeedItemSet("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_SET_ID]"), + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), + FeedItemSetId = 2017070211045731158L, + DisplayName = "display_name137f65c2", + DynamicLocationSetFilter = new gagvc::DynamicLocationSetFilter(), + DynamicAffiliateLocationSetFilter = new gagvc::DynamicAffiliateLocationSetFilter(), + Status = gagve::FeedItemSetStatusEnum.Types.FeedItemSetStatus.Enabled, + }; + mockGrpcClient.Setup(x => x.GetFeedItemSetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + gagvr::FeedItemSet responseCallSettings = await client.GetFeedItemSetAsync(request.ResourceNameAsFeedItemSetName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::FeedItemSet responseCancellationToken = await client.GetFeedItemSetAsync(request.ResourceNameAsFeedItemSetName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateFeedItemSetsRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetsRequest request = new MutateFeedItemSetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateFeedItemSetsResponse expectedResponse = new MutateFeedItemSetsResponse + { + Results = + { + new MutateFeedItemSetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSets(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetsResponse response = client.MutateFeedItemSets(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateFeedItemSetsRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetsRequest request = new MutateFeedItemSetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateFeedItemSetsResponse expectedResponse = new MutateFeedItemSetsResponse + { + Results = + { + new MutateFeedItemSetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSetsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetsResponse responseCallSettings = await client.MutateFeedItemSetsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateFeedItemSetsResponse responseCancellationToken = await client.MutateFeedItemSetsAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateFeedItemSets() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetsRequest request = new MutateFeedItemSetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetOperation(), + }, + }; + MutateFeedItemSetsResponse expectedResponse = new MutateFeedItemSetsResponse + { + Results = + { + new MutateFeedItemSetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSets(request, moq::It.IsAny())).Returns(expectedResponse); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetsResponse response = client.MutateFeedItemSets(request.CustomerId, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateFeedItemSetsAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateFeedItemSetsRequest request = new MutateFeedItemSetsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new FeedItemSetOperation(), + }, + }; + MutateFeedItemSetsResponse expectedResponse = new MutateFeedItemSetsResponse + { + Results = + { + new MutateFeedItemSetResult(), + }, + }; + mockGrpcClient.Setup(x => x.MutateFeedItemSetsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + FeedItemSetServiceClient client = new FeedItemSetServiceClientImpl(mockGrpcClient.Object, null); + MutateFeedItemSetsResponse responseCallSettings = await client.MutateFeedItemSetsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateFeedItemSetsResponse responseCancellationToken = await client.MutateFeedItemSetsAsync(request.CustomerId, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/FeedItemTargetServiceClientTest.g.cs b/tests/V6/Services/FeedItemTargetServiceClientTest.g.cs similarity index 80% rename from tests/V2/Services/FeedItemTargetServiceClientTest.g.cs rename to tests/V6/Services/FeedItemTargetServiceClientTest.g.cs index 2be65cde8..84f8c6e6d 100644 --- a/tests/V2/Services/FeedItemTargetServiceClientTest.g.cs +++ b/tests/V6/Services/FeedItemTargetServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedFeedItemTargetServiceClientTest @@ -36,20 +36,21 @@ public void GetFeedItemTargetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemTargetRequest request = new GetFeedItemTargetRequest { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), }; gagvr::FeedItemTarget expectedResponse = new gagvr::FeedItemTarget { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), FeedItemTargetType = gagve::FeedItemTargetTypeEnum.Types.FeedItemTargetType.Criterion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - FeedItemTargetId = -5234855566520350663L, Keyword = new gagvc::KeywordInfo(), - GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, AdSchedule = new gagvc::AdScheduleInfo(), + Status = gagve::FeedItemTargetStatusEnum.Types.FeedItemTargetStatus.Enabled, + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemTargetId = -5234855566520350663L, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedItemTarget(request, moq::It.IsAny())).Returns(expectedResponse); FeedItemTargetServiceClient client = new FeedItemTargetServiceClientImpl(mockGrpcClient.Object, null); @@ -64,20 +65,21 @@ public void GetFeedItemTargetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemTargetRequest request = new GetFeedItemTargetRequest { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), }; gagvr::FeedItemTarget expectedResponse = new gagvr::FeedItemTarget { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), FeedItemTargetType = gagve::FeedItemTargetTypeEnum.Types.FeedItemTargetType.Criterion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - FeedItemTargetId = -5234855566520350663L, Keyword = new gagvc::KeywordInfo(), - GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, AdSchedule = new gagvc::AdScheduleInfo(), + Status = gagve::FeedItemTargetStatusEnum.Types.FeedItemTargetStatus.Enabled, + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemTargetId = -5234855566520350663L, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedItemTargetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedItemTargetServiceClient client = new FeedItemTargetServiceClientImpl(mockGrpcClient.Object, null); @@ -94,20 +96,21 @@ public void GetFeedItemTarget() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemTargetRequest request = new GetFeedItemTargetRequest { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), }; gagvr::FeedItemTarget expectedResponse = new gagvr::FeedItemTarget { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), FeedItemTargetType = gagve::FeedItemTargetTypeEnum.Types.FeedItemTargetType.Criterion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - FeedItemTargetId = -5234855566520350663L, Keyword = new gagvc::KeywordInfo(), - GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, AdSchedule = new gagvc::AdScheduleInfo(), + Status = gagve::FeedItemTargetStatusEnum.Types.FeedItemTargetStatus.Enabled, + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemTargetId = -5234855566520350663L, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedItemTarget(request, moq::It.IsAny())).Returns(expectedResponse); FeedItemTargetServiceClient client = new FeedItemTargetServiceClientImpl(mockGrpcClient.Object, null); @@ -122,20 +125,21 @@ public void GetFeedItemTarget() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemTargetRequest request = new GetFeedItemTargetRequest { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), }; gagvr::FeedItemTarget expectedResponse = new gagvr::FeedItemTarget { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), FeedItemTargetType = gagve::FeedItemTargetTypeEnum.Types.FeedItemTargetType.Criterion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - FeedItemTargetId = -5234855566520350663L, Keyword = new gagvc::KeywordInfo(), - GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, AdSchedule = new gagvc::AdScheduleInfo(), + Status = gagve::FeedItemTargetStatusEnum.Types.FeedItemTargetStatus.Enabled, + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemTargetId = -5234855566520350663L, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedItemTargetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedItemTargetServiceClient client = new FeedItemTargetServiceClientImpl(mockGrpcClient.Object, null); @@ -152,20 +156,21 @@ public void GetFeedItemTargetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemTargetRequest request = new GetFeedItemTargetRequest { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), }; gagvr::FeedItemTarget expectedResponse = new gagvr::FeedItemTarget { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), FeedItemTargetType = gagve::FeedItemTargetTypeEnum.Types.FeedItemTargetType.Criterion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - FeedItemTargetId = -5234855566520350663L, Keyword = new gagvc::KeywordInfo(), - GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, AdSchedule = new gagvc::AdScheduleInfo(), + Status = gagve::FeedItemTargetStatusEnum.Types.FeedItemTargetStatus.Enabled, + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemTargetId = -5234855566520350663L, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedItemTarget(request, moq::It.IsAny())).Returns(expectedResponse); FeedItemTargetServiceClient client = new FeedItemTargetServiceClientImpl(mockGrpcClient.Object, null); @@ -180,20 +185,21 @@ public void GetFeedItemTargetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedItemTargetRequest request = new GetFeedItemTargetRequest { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), }; gagvr::FeedItemTarget expectedResponse = new gagvr::FeedItemTarget { - ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedItemTarget("[CUSTOMER]", "[FEED_ITEM_TARGET]"), - FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedItem("[CUSTOMER]", "[FEED_ITEM]"), + ResourceNameAsFeedItemTargetName = gagvr::FeedItemTargetName.FromCustomerFeedFeedItemFeedItemTargetTypeFeedItemTarget("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]", "[FEED_ITEM_TARGET_TYPE]", "[FEED_ITEM_TARGET_ID]"), FeedItemTargetType = gagve::FeedItemTargetTypeEnum.Types.FeedItemTargetType.Criterion, - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), - FeedItemTargetId = -5234855566520350663L, Keyword = new gagvc::KeywordInfo(), - GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), Device = gagve::FeedItemTargetDeviceEnum.Types.FeedItemTargetDevice.Mobile, AdSchedule = new gagvc::AdScheduleInfo(), + Status = gagve::FeedItemTargetStatusEnum.Types.FeedItemTargetStatus.Enabled, + FeedItemAsFeedItemName = gagvr::FeedItemName.FromCustomerFeedFeedItem("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_ITEM_ID]"), + FeedItemTargetId = -5234855566520350663L, + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + GeoTargetConstantAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedItemTargetAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedItemTargetServiceClient client = new FeedItemTargetServiceClientImpl(mockGrpcClient.Object, null); @@ -215,6 +221,7 @@ public void MutateFeedItemTargetsRequestObject() { new FeedItemTargetOperation(), }, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateFeedItemTargetsResponse expectedResponse = new MutateFeedItemTargetsResponse { @@ -241,6 +248,7 @@ public void MutateFeedItemTargetsRequestObject() { new FeedItemTargetOperation(), }, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateFeedItemTargetsResponse expectedResponse = new MutateFeedItemTargetsResponse { diff --git a/tests/V2/Services/FeedMappingServiceClientTest.g.cs b/tests/V6/Services/FeedMappingServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/FeedMappingServiceClientTest.g.cs rename to tests/V6/Services/FeedMappingServiceClientTest.g.cs index 4245e9101..6228a35f1 100644 --- a/tests/V2/Services/FeedMappingServiceClientTest.g.cs +++ b/tests/V6/Services/FeedMappingServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedFeedMappingServiceClientTest @@ -36,19 +36,19 @@ public void GetFeedMappingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedMappingRequest request = new GetFeedMappingRequest { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), }; gagvr::FeedMapping expectedResponse = new gagvr::FeedMapping { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, CriterionType = gagve::FeedMappingCriterionTypeEnum.Types.FeedMappingCriterionType.Unknown, AttributeFieldMappings = { new gagvr::AttributeFieldMapping(), }, Status = gagve::FeedMappingStatusEnum.Types.FeedMappingStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedMapping(request, moq::It.IsAny())).Returns(expectedResponse); FeedMappingServiceClient client = new FeedMappingServiceClientImpl(mockGrpcClient.Object, null); @@ -63,19 +63,19 @@ public void GetFeedMappingRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedMappingRequest request = new GetFeedMappingRequest { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), }; gagvr::FeedMapping expectedResponse = new gagvr::FeedMapping { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, CriterionType = gagve::FeedMappingCriterionTypeEnum.Types.FeedMappingCriterionType.Unknown, AttributeFieldMappings = { new gagvr::AttributeFieldMapping(), }, Status = gagve::FeedMappingStatusEnum.Types.FeedMappingStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedMappingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedMappingServiceClient client = new FeedMappingServiceClientImpl(mockGrpcClient.Object, null); @@ -92,19 +92,19 @@ public void GetFeedMapping() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedMappingRequest request = new GetFeedMappingRequest { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), }; gagvr::FeedMapping expectedResponse = new gagvr::FeedMapping { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, CriterionType = gagve::FeedMappingCriterionTypeEnum.Types.FeedMappingCriterionType.Unknown, AttributeFieldMappings = { new gagvr::AttributeFieldMapping(), }, Status = gagve::FeedMappingStatusEnum.Types.FeedMappingStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedMapping(request, moq::It.IsAny())).Returns(expectedResponse); FeedMappingServiceClient client = new FeedMappingServiceClientImpl(mockGrpcClient.Object, null); @@ -119,19 +119,19 @@ public void GetFeedMapping() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedMappingRequest request = new GetFeedMappingRequest { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), }; gagvr::FeedMapping expectedResponse = new gagvr::FeedMapping { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, CriterionType = gagve::FeedMappingCriterionTypeEnum.Types.FeedMappingCriterionType.Unknown, AttributeFieldMappings = { new gagvr::AttributeFieldMapping(), }, Status = gagve::FeedMappingStatusEnum.Types.FeedMappingStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedMappingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedMappingServiceClient client = new FeedMappingServiceClientImpl(mockGrpcClient.Object, null); @@ -148,19 +148,19 @@ public void GetFeedMappingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedMappingRequest request = new GetFeedMappingRequest { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), }; gagvr::FeedMapping expectedResponse = new gagvr::FeedMapping { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, CriterionType = gagve::FeedMappingCriterionTypeEnum.Types.FeedMappingCriterionType.Unknown, AttributeFieldMappings = { new gagvr::AttributeFieldMapping(), }, Status = gagve::FeedMappingStatusEnum.Types.FeedMappingStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedMapping(request, moq::It.IsAny())).Returns(expectedResponse); FeedMappingServiceClient client = new FeedMappingServiceClientImpl(mockGrpcClient.Object, null); @@ -175,19 +175,19 @@ public void GetFeedMappingResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedMappingRequest request = new GetFeedMappingRequest { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), }; gagvr::FeedMapping expectedResponse = new gagvr::FeedMapping { - ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedMapping("[CUSTOMER]", "[FEED_MAPPING]"), - FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedMappingName = gagvr::FeedMappingName.FromCustomerFeedFeedMapping("[CUSTOMER_ID]", "[FEED_ID]", "[FEED_MAPPING_ID]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, CriterionType = gagve::FeedMappingCriterionTypeEnum.Types.FeedMappingCriterionType.Unknown, AttributeFieldMappings = { new gagvr::AttributeFieldMapping(), }, Status = gagve::FeedMappingStatusEnum.Types.FeedMappingStatus.Enabled, + FeedAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedMappingAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedMappingServiceClient client = new FeedMappingServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/FeedPlaceholderViewServiceClientTest.g.cs b/tests/V6/Services/FeedPlaceholderViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/FeedPlaceholderViewServiceClientTest.g.cs rename to tests/V6/Services/FeedPlaceholderViewServiceClientTest.g.cs index 2cc76b498..a81f90620 100644 --- a/tests/V2/Services/FeedPlaceholderViewServiceClientTest.g.cs +++ b/tests/V6/Services/FeedPlaceholderViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedFeedPlaceholderViewServiceClientTest @@ -35,12 +35,12 @@ public void GetFeedPlaceholderViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), }; gagvr::FeedPlaceholderView expectedResponse = new gagvr::FeedPlaceholderView { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, }; mockGrpcClient.Setup(x => x.GetFeedPlaceholderView(request, moq::It.IsAny())).Returns(expectedResponse); FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -55,12 +55,12 @@ public void GetFeedPlaceholderViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), }; gagvr::FeedPlaceholderView expectedResponse = new gagvr::FeedPlaceholderView { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, }; mockGrpcClient.Setup(x => x.GetFeedPlaceholderViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -77,12 +77,12 @@ public void GetFeedPlaceholderView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), }; gagvr::FeedPlaceholderView expectedResponse = new gagvr::FeedPlaceholderView { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, }; mockGrpcClient.Setup(x => x.GetFeedPlaceholderView(request, moq::It.IsAny())).Returns(expectedResponse); FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -97,12 +97,12 @@ public void GetFeedPlaceholderView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), }; gagvr::FeedPlaceholderView expectedResponse = new gagvr::FeedPlaceholderView { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, }; mockGrpcClient.Setup(x => x.GetFeedPlaceholderViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -119,12 +119,12 @@ public void GetFeedPlaceholderViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), }; gagvr::FeedPlaceholderView expectedResponse = new gagvr::FeedPlaceholderView { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, }; mockGrpcClient.Setup(x => x.GetFeedPlaceholderView(request, moq::It.IsAny())).Returns(expectedResponse); FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -139,12 +139,12 @@ public void GetFeedPlaceholderViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), }; gagvr::FeedPlaceholderView expectedResponse = new gagvr::FeedPlaceholderView { - ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"), - PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.Message, + ResourceNameAsFeedPlaceholderViewName = gagvr::FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"), + PlaceholderType = gagve::PlaceholderTypeEnum.Types.PlaceholderType.App, }; mockGrpcClient.Setup(x => x.GetFeedPlaceholderViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/FeedServiceClientTest.g.cs b/tests/V6/Services/FeedServiceClientTest.g.cs similarity index 94% rename from tests/V2/Services/FeedServiceClientTest.g.cs rename to tests/V6/Services/FeedServiceClientTest.g.cs index 099519958..34378b9a7 100644 --- a/tests/V2/Services/FeedServiceClientTest.g.cs +++ b/tests/V6/Services/FeedServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedFeedServiceClientTest @@ -36,13 +36,11 @@ public void GetFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedRequest request = new GetFeedRequest { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::Feed expectedResponse = new gagvr::Feed { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), Attributes = { new gagvr::FeedAttribute(), @@ -55,6 +53,8 @@ public void GetFeedRequestObject() { new gagvr::FeedAttributeOperation(), }, + Id = -6774108720365892680L, + FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeed(request, moq::It.IsAny())).Returns(expectedResponse); FeedServiceClient client = new FeedServiceClientImpl(mockGrpcClient.Object, null); @@ -69,13 +69,11 @@ public void GetFeedRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedRequest request = new GetFeedRequest { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::Feed expectedResponse = new gagvr::Feed { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), Attributes = { new gagvr::FeedAttribute(), @@ -88,6 +86,8 @@ public void GetFeedRequestObject() { new gagvr::FeedAttributeOperation(), }, + Id = -6774108720365892680L, + FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedServiceClient client = new FeedServiceClientImpl(mockGrpcClient.Object, null); @@ -104,13 +104,11 @@ public void GetFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedRequest request = new GetFeedRequest { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::Feed expectedResponse = new gagvr::Feed { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), Attributes = { new gagvr::FeedAttribute(), @@ -123,6 +121,8 @@ public void GetFeed() { new gagvr::FeedAttributeOperation(), }, + Id = -6774108720365892680L, + FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeed(request, moq::It.IsAny())).Returns(expectedResponse); FeedServiceClient client = new FeedServiceClientImpl(mockGrpcClient.Object, null); @@ -137,13 +137,11 @@ public void GetFeed() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedRequest request = new GetFeedRequest { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::Feed expectedResponse = new gagvr::Feed { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), Attributes = { new gagvr::FeedAttribute(), @@ -156,6 +154,8 @@ public void GetFeed() { new gagvr::FeedAttributeOperation(), }, + Id = -6774108720365892680L, + FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedServiceClient client = new FeedServiceClientImpl(mockGrpcClient.Object, null); @@ -172,13 +172,11 @@ public void GetFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedRequest request = new GetFeedRequest { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::Feed expectedResponse = new gagvr::Feed { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), Attributes = { new gagvr::FeedAttribute(), @@ -191,6 +189,8 @@ public void GetFeedResourceNames() { new gagvr::FeedAttributeOperation(), }, + Id = -6774108720365892680L, + FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeed(request, moq::It.IsAny())).Returns(expectedResponse); FeedServiceClient client = new FeedServiceClientImpl(mockGrpcClient.Object, null); @@ -205,13 +205,11 @@ public void GetFeedResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetFeedRequest request = new GetFeedRequest { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; gagvr::Feed expectedResponse = new gagvr::Feed { - ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), - Id = -6774108720365892680L, - FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER]", "[FEED]"), + ResourceNameAsFeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), Attributes = { new gagvr::FeedAttribute(), @@ -224,6 +222,8 @@ public void GetFeedResourceNames() { new gagvr::FeedAttributeOperation(), }, + Id = -6774108720365892680L, + FeedName = gagvr::FeedName.FromCustomerFeed("[CUSTOMER_ID]", "[FEED_ID]"), }; mockGrpcClient.Setup(x => x.GetFeedAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); FeedServiceClient client = new FeedServiceClientImpl(mockGrpcClient.Object, null); @@ -247,6 +247,7 @@ public void MutateFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateFeedsResponse expectedResponse = new MutateFeedsResponse { @@ -276,6 +277,7 @@ public void MutateFeedsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateFeedsResponse expectedResponse = new MutateFeedsResponse { diff --git a/tests/V2/Services/GenderViewServiceClientTest.g.cs b/tests/V6/Services/GenderViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/GenderViewServiceClientTest.g.cs rename to tests/V6/Services/GenderViewServiceClientTest.g.cs index cd4d518cf..b234a97ab 100644 --- a/tests/V2/Services/GenderViewServiceClientTest.g.cs +++ b/tests/V6/Services/GenderViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedGenderViewServiceClientTest @@ -34,11 +34,11 @@ public void GetGenderViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGenderViewRequest request = new GetGenderViewRequest { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::GenderView expectedResponse = new gagvr::GenderView { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetGenderView(request, moq::It.IsAny())).Returns(expectedResponse); GenderViewServiceClient client = new GenderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetGenderViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGenderViewRequest request = new GetGenderViewRequest { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::GenderView expectedResponse = new gagvr::GenderView { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetGenderViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); GenderViewServiceClient client = new GenderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetGenderView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGenderViewRequest request = new GetGenderViewRequest { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::GenderView expectedResponse = new gagvr::GenderView { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetGenderView(request, moq::It.IsAny())).Returns(expectedResponse); GenderViewServiceClient client = new GenderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetGenderView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGenderViewRequest request = new GetGenderViewRequest { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::GenderView expectedResponse = new gagvr::GenderView { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetGenderViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); GenderViewServiceClient client = new GenderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetGenderViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGenderViewRequest request = new GetGenderViewRequest { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::GenderView expectedResponse = new gagvr::GenderView { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetGenderView(request, moq::It.IsAny())).Returns(expectedResponse); GenderViewServiceClient client = new GenderViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetGenderViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGenderViewRequest request = new GetGenderViewRequest { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::GenderView expectedResponse = new gagvr::GenderView { - ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerGenderView("[CUSTOMER]", "[GENDER_VIEW]"), + ResourceNameAsGenderViewName = gagvr::GenderViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetGenderViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); GenderViewServiceClient client = new GenderViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/GeoTargetConstantServiceClientTest.g.cs b/tests/V6/Services/GeoTargetConstantServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/GeoTargetConstantServiceClientTest.g.cs rename to tests/V6/Services/GeoTargetConstantServiceClientTest.g.cs index 778139033..b11b9caff 100644 --- a/tests/V2/Services/GeoTargetConstantServiceClientTest.g.cs +++ b/tests/V6/Services/GeoTargetConstantServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedGeoTargetConstantServiceClientTest @@ -35,16 +35,17 @@ public void GetGeoTargetConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeoTargetConstantRequest request = new GetGeoTargetConstantRequest { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::GeoTargetConstant expectedResponse = new gagvr::GeoTargetConstant { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, + ParentGeoTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - GeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + GeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", TargetType = "target_type1235462e", - Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, CanonicalName = "canonical_name5e3d81e6", }; mockGrpcClient.Setup(x => x.GetGeoTargetConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -60,16 +61,17 @@ public void GetGeoTargetConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeoTargetConstantRequest request = new GetGeoTargetConstantRequest { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::GeoTargetConstant expectedResponse = new gagvr::GeoTargetConstant { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, + ParentGeoTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - GeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + GeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", TargetType = "target_type1235462e", - Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, CanonicalName = "canonical_name5e3d81e6", }; mockGrpcClient.Setup(x => x.GetGeoTargetConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -87,16 +89,17 @@ public void GetGeoTargetConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeoTargetConstantRequest request = new GetGeoTargetConstantRequest { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::GeoTargetConstant expectedResponse = new gagvr::GeoTargetConstant { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, + ParentGeoTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - GeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + GeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", TargetType = "target_type1235462e", - Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, CanonicalName = "canonical_name5e3d81e6", }; mockGrpcClient.Setup(x => x.GetGeoTargetConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -112,16 +115,17 @@ public void GetGeoTargetConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeoTargetConstantRequest request = new GetGeoTargetConstantRequest { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::GeoTargetConstant expectedResponse = new gagvr::GeoTargetConstant { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, + ParentGeoTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - GeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + GeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", TargetType = "target_type1235462e", - Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, CanonicalName = "canonical_name5e3d81e6", }; mockGrpcClient.Setup(x => x.GetGeoTargetConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -139,16 +143,17 @@ public void GetGeoTargetConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeoTargetConstantRequest request = new GetGeoTargetConstantRequest { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::GeoTargetConstant expectedResponse = new gagvr::GeoTargetConstant { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, + ParentGeoTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - GeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + GeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", TargetType = "target_type1235462e", - Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, CanonicalName = "canonical_name5e3d81e6", }; mockGrpcClient.Setup(x => x.GetGeoTargetConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -164,16 +169,17 @@ public void GetGeoTargetConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeoTargetConstantRequest request = new GetGeoTargetConstantRequest { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::GeoTargetConstant expectedResponse = new gagvr::GeoTargetConstant { - ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + ResourceNameAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), + Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, + ParentGeoTargetAsGeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, - GeoTargetConstantName = gagvr::GeoTargetConstantName.FromGeoTargetConstant("[GEO_TARGET_CONSTANT]"), + GeoTargetConstantName = gagvr::GeoTargetConstantName.FromCriterion("[CRITERION_ID]"), CountryCode = "country_code8debec55", TargetType = "target_type1235462e", - Status = gagve::GeoTargetConstantStatusEnum.Types.GeoTargetConstantStatus.Enabled, CanonicalName = "canonical_name5e3d81e6", }; mockGrpcClient.Setup(x => x.GetGeoTargetConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/GeographicViewServiceClientTest.g.cs b/tests/V6/Services/GeographicViewServiceClientTest.g.cs similarity index 85% rename from tests/V2/Services/GeographicViewServiceClientTest.g.cs rename to tests/V6/Services/GeographicViewServiceClientTest.g.cs index 91125791e..8436a33ca 100644 --- a/tests/V2/Services/GeographicViewServiceClientTest.g.cs +++ b/tests/V6/Services/GeographicViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedGeographicViewServiceClientTest @@ -35,11 +35,11 @@ public void GetGeographicViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; gagvr::GeographicView expectedResponse = new gagvr::GeographicView { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), LocationType = gagve::GeoTargetingTypeEnum.Types.GeoTargetingType.LocationOfPresence, CountryCriterionId = 7801114990940938649L, }; @@ -56,11 +56,11 @@ public void GetGeographicViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; gagvr::GeographicView expectedResponse = new gagvr::GeographicView { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), LocationType = gagve::GeoTargetingTypeEnum.Types.GeoTargetingType.LocationOfPresence, CountryCriterionId = 7801114990940938649L, }; @@ -79,11 +79,11 @@ public void GetGeographicView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; gagvr::GeographicView expectedResponse = new gagvr::GeographicView { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), LocationType = gagve::GeoTargetingTypeEnum.Types.GeoTargetingType.LocationOfPresence, CountryCriterionId = 7801114990940938649L, }; @@ -100,11 +100,11 @@ public void GetGeographicView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; gagvr::GeographicView expectedResponse = new gagvr::GeographicView { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), LocationType = gagve::GeoTargetingTypeEnum.Types.GeoTargetingType.LocationOfPresence, CountryCriterionId = 7801114990940938649L, }; @@ -123,11 +123,11 @@ public void GetGeographicViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; gagvr::GeographicView expectedResponse = new gagvr::GeographicView { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), LocationType = gagve::GeoTargetingTypeEnum.Types.GeoTargetingType.LocationOfPresence, CountryCriterionId = 7801114990940938649L, }; @@ -144,11 +144,11 @@ public void GetGeographicViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; gagvr::GeographicView expectedResponse = new gagvr::GeographicView { - ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), + ResourceNameAsGeographicViewName = gagvr::GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), LocationType = gagve::GeoTargetingTypeEnum.Types.GeoTargetingType.LocationOfPresence, CountryCriterionId = 7801114990940938649L, }; diff --git a/tests/V2/Services/GoogleAdsFieldServiceClientTest.g.cs b/tests/V6/Services/GoogleAdsFieldServiceClientTest.g.cs similarity index 98% rename from tests/V2/Services/GoogleAdsFieldServiceClientTest.g.cs rename to tests/V6/Services/GoogleAdsFieldServiceClientTest.g.cs index bace054da..1c83bd6dd 100644 --- a/tests/V2/Services/GoogleAdsFieldServiceClientTest.g.cs +++ b/tests/V6/Services/GoogleAdsFieldServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedGoogleAdsFieldServiceClientTest @@ -40,8 +40,9 @@ public void GetGoogleAdsFieldRequestObject() gagvr::GoogleAdsField expectedResponse = new gagvr::GoogleAdsField { ResourceNameAsGoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), - GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Category = gagve::GoogleAdsFieldCategoryEnum.Types.GoogleAdsFieldCategory.Segment, + DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, + GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Selectable = true, Filterable = true, Sortable = true, @@ -62,7 +63,6 @@ public void GetGoogleAdsFieldRequestObject() { "enum_values30797dbe", }, - DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, TypeUrl = "type_urlfde5623b", IsRepeated = false, }; @@ -84,8 +84,9 @@ public void GetGoogleAdsFieldRequestObject() gagvr::GoogleAdsField expectedResponse = new gagvr::GoogleAdsField { ResourceNameAsGoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), - GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Category = gagve::GoogleAdsFieldCategoryEnum.Types.GoogleAdsFieldCategory.Segment, + DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, + GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Selectable = true, Filterable = true, Sortable = true, @@ -106,7 +107,6 @@ public void GetGoogleAdsFieldRequestObject() { "enum_values30797dbe", }, - DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, TypeUrl = "type_urlfde5623b", IsRepeated = false, }; @@ -130,8 +130,9 @@ public void GetGoogleAdsField() gagvr::GoogleAdsField expectedResponse = new gagvr::GoogleAdsField { ResourceNameAsGoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), - GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Category = gagve::GoogleAdsFieldCategoryEnum.Types.GoogleAdsFieldCategory.Segment, + DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, + GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Selectable = true, Filterable = true, Sortable = true, @@ -152,7 +153,6 @@ public void GetGoogleAdsField() { "enum_values30797dbe", }, - DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, TypeUrl = "type_urlfde5623b", IsRepeated = false, }; @@ -174,8 +174,9 @@ public void GetGoogleAdsField() gagvr::GoogleAdsField expectedResponse = new gagvr::GoogleAdsField { ResourceNameAsGoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), - GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Category = gagve::GoogleAdsFieldCategoryEnum.Types.GoogleAdsFieldCategory.Segment, + DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, + GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Selectable = true, Filterable = true, Sortable = true, @@ -196,7 +197,6 @@ public void GetGoogleAdsField() { "enum_values30797dbe", }, - DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, TypeUrl = "type_urlfde5623b", IsRepeated = false, }; @@ -220,8 +220,9 @@ public void GetGoogleAdsFieldResourceNames() gagvr::GoogleAdsField expectedResponse = new gagvr::GoogleAdsField { ResourceNameAsGoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), - GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Category = gagve::GoogleAdsFieldCategoryEnum.Types.GoogleAdsFieldCategory.Segment, + DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, + GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Selectable = true, Filterable = true, Sortable = true, @@ -242,7 +243,6 @@ public void GetGoogleAdsFieldResourceNames() { "enum_values30797dbe", }, - DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, TypeUrl = "type_urlfde5623b", IsRepeated = false, }; @@ -264,8 +264,9 @@ public void GetGoogleAdsFieldResourceNames() gagvr::GoogleAdsField expectedResponse = new gagvr::GoogleAdsField { ResourceNameAsGoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), - GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Category = gagve::GoogleAdsFieldCategoryEnum.Types.GoogleAdsFieldCategory.Segment, + DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, + GoogleAdsFieldName = gagvr::GoogleAdsFieldName.FromGoogleAdsField("[GOOGLE_ADS_FIELD]"), Selectable = true, Filterable = true, Sortable = true, @@ -286,7 +287,6 @@ public void GetGoogleAdsFieldResourceNames() { "enum_values30797dbe", }, - DataType = gagve::GoogleAdsFieldDataTypeEnum.Types.GoogleAdsFieldDataType.Message, TypeUrl = "type_urlfde5623b", IsRepeated = false, }; diff --git a/tests/V2/Services/GoogleAdsServiceClientTest.g.cs b/tests/V6/Services/GoogleAdsServiceClientTest.g.cs similarity index 95% rename from tests/V2/Services/GoogleAdsServiceClientTest.g.cs rename to tests/V6/Services/GoogleAdsServiceClientTest.g.cs index bc5e47938..7e567e5d4 100644 --- a/tests/V2/Services/GoogleAdsServiceClientTest.g.cs +++ b/tests/V6/Services/GoogleAdsServiceClientTest.g.cs @@ -14,6 +14,7 @@ // Generated code. DO NOT EDIT! +using gagve = Google.Ads.GoogleAds.V6.Enums; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -21,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedGoogleAdsServiceClientTest @@ -41,6 +42,7 @@ public void MutateRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateGoogleAdsResponse expectedResponse = new MutateGoogleAdsResponse { @@ -70,6 +72,7 @@ public void MutateRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateGoogleAdsResponse expectedResponse = new MutateGoogleAdsResponse { diff --git a/tests/V2/Services/GroupPlacementViewServiceClientTest.g.cs b/tests/V6/Services/GroupPlacementViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/GroupPlacementViewServiceClientTest.g.cs rename to tests/V6/Services/GroupPlacementViewServiceClientTest.g.cs index 086606fee..0959f5d0d 100644 --- a/tests/V2/Services/GroupPlacementViewServiceClientTest.g.cs +++ b/tests/V6/Services/GroupPlacementViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedGroupPlacementViewServiceClientTest @@ -35,15 +35,15 @@ public void GetGroupPlacementViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGroupPlacementViewRequest request = new GetGroupPlacementViewRequest { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::GroupPlacementView expectedResponse = new gagvr::GroupPlacementView { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetGroupPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); GroupPlacementViewServiceClient client = new GroupPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -58,15 +58,15 @@ public void GetGroupPlacementViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGroupPlacementViewRequest request = new GetGroupPlacementViewRequest { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::GroupPlacementView expectedResponse = new gagvr::GroupPlacementView { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetGroupPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); GroupPlacementViewServiceClient client = new GroupPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -83,15 +83,15 @@ public void GetGroupPlacementView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGroupPlacementViewRequest request = new GetGroupPlacementViewRequest { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::GroupPlacementView expectedResponse = new gagvr::GroupPlacementView { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetGroupPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); GroupPlacementViewServiceClient client = new GroupPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -106,15 +106,15 @@ public void GetGroupPlacementView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGroupPlacementViewRequest request = new GetGroupPlacementViewRequest { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::GroupPlacementView expectedResponse = new gagvr::GroupPlacementView { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetGroupPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); GroupPlacementViewServiceClient client = new GroupPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -131,15 +131,15 @@ public void GetGroupPlacementViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGroupPlacementViewRequest request = new GetGroupPlacementViewRequest { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::GroupPlacementView expectedResponse = new gagvr::GroupPlacementView { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetGroupPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); GroupPlacementViewServiceClient client = new GroupPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -154,15 +154,15 @@ public void GetGroupPlacementViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetGroupPlacementViewRequest request = new GetGroupPlacementViewRequest { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), }; gagvr::GroupPlacementView expectedResponse = new gagvr::GroupPlacementView { - ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerGroupPlacementView("[CUSTOMER]", "[GROUP_PLACEMENT_VIEW]"), + ResourceNameAsGroupPlacementViewName = gagvr::GroupPlacementViewName.FromCustomerAdGroupBase64Placement("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[BASE64_PLACEMENT]"), + PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, Placement = "placementb440552a", DisplayName = "display_name137f65c2", TargetUrl = "target_url95bdaf9b", - PlacementType = gagve::PlacementTypeEnum.Types.PlacementType.Website, }; mockGrpcClient.Setup(x => x.GetGroupPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); GroupPlacementViewServiceClient client = new GroupPlacementViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/HotelGroupViewServiceClientTest.g.cs b/tests/V6/Services/HotelGroupViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/HotelGroupViewServiceClientTest.g.cs rename to tests/V6/Services/HotelGroupViewServiceClientTest.g.cs index 651c1a392..e4a96baf7 100644 --- a/tests/V2/Services/HotelGroupViewServiceClientTest.g.cs +++ b/tests/V6/Services/HotelGroupViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedHotelGroupViewServiceClientTest @@ -34,11 +34,11 @@ public void GetHotelGroupViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelGroupViewRequest request = new GetHotelGroupViewRequest { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::HotelGroupView expectedResponse = new gagvr::HotelGroupView { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelGroupView(request, moq::It.IsAny())).Returns(expectedResponse); HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetHotelGroupViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelGroupViewRequest request = new GetHotelGroupViewRequest { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::HotelGroupView expectedResponse = new gagvr::HotelGroupView { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelGroupViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetHotelGroupView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelGroupViewRequest request = new GetHotelGroupViewRequest { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::HotelGroupView expectedResponse = new gagvr::HotelGroupView { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelGroupView(request, moq::It.IsAny())).Returns(expectedResponse); HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetHotelGroupView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelGroupViewRequest request = new GetHotelGroupViewRequest { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::HotelGroupView expectedResponse = new gagvr::HotelGroupView { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelGroupViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetHotelGroupViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelGroupViewRequest request = new GetHotelGroupViewRequest { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::HotelGroupView expectedResponse = new gagvr::HotelGroupView { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelGroupView(request, moq::It.IsAny())).Returns(expectedResponse); HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetHotelGroupViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelGroupViewRequest request = new GetHotelGroupViewRequest { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::HotelGroupView expectedResponse = new gagvr::HotelGroupView { - ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerHotelGroupView("[CUSTOMER]", "[HOTEL_GROUP_VIEW]"), + ResourceNameAsHotelGroupViewName = gagvr::HotelGroupViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelGroupViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); HotelGroupViewServiceClient client = new HotelGroupViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/HotelPerformanceViewServiceClientTest.g.cs b/tests/V6/Services/HotelPerformanceViewServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/HotelPerformanceViewServiceClientTest.g.cs rename to tests/V6/Services/HotelPerformanceViewServiceClientTest.g.cs index 4e54c1628..9bc9a1a9b 100644 --- a/tests/V2/Services/HotelPerformanceViewServiceClientTest.g.cs +++ b/tests/V6/Services/HotelPerformanceViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedHotelPerformanceViewServiceClientTest @@ -34,11 +34,11 @@ public void GetHotelPerformanceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelPerformanceViewRequest request = new GetHotelPerformanceViewRequest { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::HotelPerformanceView expectedResponse = new gagvr::HotelPerformanceView { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelPerformanceView(request, moq::It.IsAny())).Returns(expectedResponse); HotelPerformanceViewServiceClient client = new HotelPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetHotelPerformanceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelPerformanceViewRequest request = new GetHotelPerformanceViewRequest { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::HotelPerformanceView expectedResponse = new gagvr::HotelPerformanceView { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelPerformanceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); HotelPerformanceViewServiceClient client = new HotelPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetHotelPerformanceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelPerformanceViewRequest request = new GetHotelPerformanceViewRequest { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::HotelPerformanceView expectedResponse = new gagvr::HotelPerformanceView { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelPerformanceView(request, moq::It.IsAny())).Returns(expectedResponse); HotelPerformanceViewServiceClient client = new HotelPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetHotelPerformanceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelPerformanceViewRequest request = new GetHotelPerformanceViewRequest { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::HotelPerformanceView expectedResponse = new gagvr::HotelPerformanceView { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelPerformanceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); HotelPerformanceViewServiceClient client = new HotelPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetHotelPerformanceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelPerformanceViewRequest request = new GetHotelPerformanceViewRequest { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::HotelPerformanceView expectedResponse = new gagvr::HotelPerformanceView { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelPerformanceView(request, moq::It.IsAny())).Returns(expectedResponse); HotelPerformanceViewServiceClient client = new HotelPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetHotelPerformanceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetHotelPerformanceViewRequest request = new GetHotelPerformanceViewRequest { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::HotelPerformanceView expectedResponse = new gagvr::HotelPerformanceView { - ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsHotelPerformanceViewName = gagvr::HotelPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetHotelPerformanceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); HotelPerformanceViewServiceClient client = new HotelPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/IncomeRangeViewServiceClientTest.g.cs b/tests/V6/Services/IncomeRangeViewServiceClientTest.g.cs new file mode 100644 index 000000000..027bb462d --- /dev/null +++ b/tests/V6/Services/IncomeRangeViewServiceClientTest.g.cs @@ -0,0 +1,151 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedIncomeRangeViewServiceClientTest + { + [Category("Smoke")][Test] + public void GetIncomeRangeViewRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetIncomeRangeViewRequest request = new GetIncomeRangeViewRequest + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + gagvr::IncomeRangeView expectedResponse = new gagvr::IncomeRangeView + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + mockGrpcClient.Setup(x => x.GetIncomeRangeView(request, moq::It.IsAny())).Returns(expectedResponse); + IncomeRangeViewServiceClient client = new IncomeRangeViewServiceClientImpl(mockGrpcClient.Object, null); + gagvr::IncomeRangeView response = client.GetIncomeRangeView(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetIncomeRangeViewRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetIncomeRangeViewRequest request = new GetIncomeRangeViewRequest + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + gagvr::IncomeRangeView expectedResponse = new gagvr::IncomeRangeView + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + mockGrpcClient.Setup(x => x.GetIncomeRangeViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + IncomeRangeViewServiceClient client = new IncomeRangeViewServiceClientImpl(mockGrpcClient.Object, null); + gagvr::IncomeRangeView responseCallSettings = await client.GetIncomeRangeViewAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::IncomeRangeView responseCancellationToken = await client.GetIncomeRangeViewAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetIncomeRangeView() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetIncomeRangeViewRequest request = new GetIncomeRangeViewRequest + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + gagvr::IncomeRangeView expectedResponse = new gagvr::IncomeRangeView + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + mockGrpcClient.Setup(x => x.GetIncomeRangeView(request, moq::It.IsAny())).Returns(expectedResponse); + IncomeRangeViewServiceClient client = new IncomeRangeViewServiceClientImpl(mockGrpcClient.Object, null); + gagvr::IncomeRangeView response = client.GetIncomeRangeView(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetIncomeRangeViewAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetIncomeRangeViewRequest request = new GetIncomeRangeViewRequest + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + gagvr::IncomeRangeView expectedResponse = new gagvr::IncomeRangeView + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + mockGrpcClient.Setup(x => x.GetIncomeRangeViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + IncomeRangeViewServiceClient client = new IncomeRangeViewServiceClientImpl(mockGrpcClient.Object, null); + gagvr::IncomeRangeView responseCallSettings = await client.GetIncomeRangeViewAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::IncomeRangeView responseCancellationToken = await client.GetIncomeRangeViewAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetIncomeRangeViewResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetIncomeRangeViewRequest request = new GetIncomeRangeViewRequest + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + gagvr::IncomeRangeView expectedResponse = new gagvr::IncomeRangeView + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + mockGrpcClient.Setup(x => x.GetIncomeRangeView(request, moq::It.IsAny())).Returns(expectedResponse); + IncomeRangeViewServiceClient client = new IncomeRangeViewServiceClientImpl(mockGrpcClient.Object, null); + gagvr::IncomeRangeView response = client.GetIncomeRangeView(request.ResourceNameAsIncomeRangeViewName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetIncomeRangeViewResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetIncomeRangeViewRequest request = new GetIncomeRangeViewRequest + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + gagvr::IncomeRangeView expectedResponse = new gagvr::IncomeRangeView + { + ResourceNameAsIncomeRangeViewName = gagvr::IncomeRangeViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), + }; + mockGrpcClient.Setup(x => x.GetIncomeRangeViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + IncomeRangeViewServiceClient client = new IncomeRangeViewServiceClientImpl(mockGrpcClient.Object, null); + gagvr::IncomeRangeView responseCallSettings = await client.GetIncomeRangeViewAsync(request.ResourceNameAsIncomeRangeViewName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::IncomeRangeView responseCancellationToken = await client.GetIncomeRangeViewAsync(request.ResourceNameAsIncomeRangeViewName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/InvoiceServiceClientTest.g.cs b/tests/V6/Services/InvoiceServiceClientTest.g.cs similarity index 97% rename from tests/V2/Services/InvoiceServiceClientTest.g.cs rename to tests/V6/Services/InvoiceServiceClientTest.g.cs index ade81fb0b..530220441 100644 --- a/tests/V2/Services/InvoiceServiceClientTest.g.cs +++ b/tests/V6/Services/InvoiceServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedInvoiceServiceClientTest diff --git a/tests/V6/Services/KeywordPlanAdGroupKeywordServiceClientTest.g.cs b/tests/V6/Services/KeywordPlanAdGroupKeywordServiceClientTest.g.cs new file mode 100644 index 000000000..a9b7a27a6 --- /dev/null +++ b/tests/V6/Services/KeywordPlanAdGroupKeywordServiceClientTest.g.cs @@ -0,0 +1,305 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using gr = Google.Rpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedKeywordPlanAdGroupKeywordServiceClientTest + { + [Category("Smoke")][Test] + public void GetKeywordPlanAdGroupKeywordRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanAdGroupKeywordRequest request = new GetKeywordPlanAdGroupKeywordRequest + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + }; + gagvr::KeywordPlanAdGroupKeyword expectedResponse = new gagvr::KeywordPlanAdGroupKeyword + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + CpcBidMicros = 7321761304249472746L, + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupKeyword(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanAdGroupKeyword response = client.GetKeywordPlanAdGroupKeyword(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetKeywordPlanAdGroupKeywordRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanAdGroupKeywordRequest request = new GetKeywordPlanAdGroupKeywordRequest + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + }; + gagvr::KeywordPlanAdGroupKeyword expectedResponse = new gagvr::KeywordPlanAdGroupKeyword + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + CpcBidMicros = 7321761304249472746L, + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanAdGroupKeyword responseCallSettings = await client.GetKeywordPlanAdGroupKeywordAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::KeywordPlanAdGroupKeyword responseCancellationToken = await client.GetKeywordPlanAdGroupKeywordAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetKeywordPlanAdGroupKeyword() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanAdGroupKeywordRequest request = new GetKeywordPlanAdGroupKeywordRequest + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + }; + gagvr::KeywordPlanAdGroupKeyword expectedResponse = new gagvr::KeywordPlanAdGroupKeyword + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + CpcBidMicros = 7321761304249472746L, + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupKeyword(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanAdGroupKeyword response = client.GetKeywordPlanAdGroupKeyword(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetKeywordPlanAdGroupKeywordAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanAdGroupKeywordRequest request = new GetKeywordPlanAdGroupKeywordRequest + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + }; + gagvr::KeywordPlanAdGroupKeyword expectedResponse = new gagvr::KeywordPlanAdGroupKeyword + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + CpcBidMicros = 7321761304249472746L, + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanAdGroupKeyword responseCallSettings = await client.GetKeywordPlanAdGroupKeywordAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::KeywordPlanAdGroupKeyword responseCancellationToken = await client.GetKeywordPlanAdGroupKeywordAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetKeywordPlanAdGroupKeywordResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanAdGroupKeywordRequest request = new GetKeywordPlanAdGroupKeywordRequest + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + }; + gagvr::KeywordPlanAdGroupKeyword expectedResponse = new gagvr::KeywordPlanAdGroupKeyword + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + CpcBidMicros = 7321761304249472746L, + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupKeyword(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanAdGroupKeyword response = client.GetKeywordPlanAdGroupKeyword(request.ResourceNameAsKeywordPlanAdGroupKeywordName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetKeywordPlanAdGroupKeywordResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanAdGroupKeywordRequest request = new GetKeywordPlanAdGroupKeywordRequest + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + }; + gagvr::KeywordPlanAdGroupKeyword expectedResponse = new gagvr::KeywordPlanAdGroupKeyword + { + ResourceNameAsKeywordPlanAdGroupKeywordName = gagvr::KeywordPlanAdGroupKeywordName.FromCustomerKeywordPlanAdGroupKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanAdGroupAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + CpcBidMicros = 7321761304249472746L, + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanAdGroupKeyword responseCallSettings = await client.GetKeywordPlanAdGroupKeywordAsync(request.ResourceNameAsKeywordPlanAdGroupKeywordName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::KeywordPlanAdGroupKeyword responseCancellationToken = await client.GetKeywordPlanAdGroupKeywordAsync(request.ResourceNameAsKeywordPlanAdGroupKeywordName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateKeywordPlanAdGroupKeywordsRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanAdGroupKeywordsRequest request = new MutateKeywordPlanAdGroupKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanAdGroupKeywordOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateKeywordPlanAdGroupKeywordsResponse expectedResponse = new MutateKeywordPlanAdGroupKeywordsResponse + { + Results = + { + new MutateKeywordPlanAdGroupKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanAdGroupKeywords(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanAdGroupKeywordsResponse response = client.MutateKeywordPlanAdGroupKeywords(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateKeywordPlanAdGroupKeywordsRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanAdGroupKeywordsRequest request = new MutateKeywordPlanAdGroupKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanAdGroupKeywordOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateKeywordPlanAdGroupKeywordsResponse expectedResponse = new MutateKeywordPlanAdGroupKeywordsResponse + { + Results = + { + new MutateKeywordPlanAdGroupKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanAdGroupKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanAdGroupKeywordsResponse responseCallSettings = await client.MutateKeywordPlanAdGroupKeywordsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateKeywordPlanAdGroupKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanAdGroupKeywordsAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateKeywordPlanAdGroupKeywords() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanAdGroupKeywordsRequest request = new MutateKeywordPlanAdGroupKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanAdGroupKeywordOperation(), + }, + }; + MutateKeywordPlanAdGroupKeywordsResponse expectedResponse = new MutateKeywordPlanAdGroupKeywordsResponse + { + Results = + { + new MutateKeywordPlanAdGroupKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanAdGroupKeywords(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanAdGroupKeywordsResponse response = client.MutateKeywordPlanAdGroupKeywords(request.CustomerId, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateKeywordPlanAdGroupKeywordsAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanAdGroupKeywordsRequest request = new MutateKeywordPlanAdGroupKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanAdGroupKeywordOperation(), + }, + }; + MutateKeywordPlanAdGroupKeywordsResponse expectedResponse = new MutateKeywordPlanAdGroupKeywordsResponse + { + Results = + { + new MutateKeywordPlanAdGroupKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanAdGroupKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanAdGroupKeywordServiceClient client = new KeywordPlanAdGroupKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanAdGroupKeywordsResponse responseCallSettings = await client.MutateKeywordPlanAdGroupKeywordsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateKeywordPlanAdGroupKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanAdGroupKeywordsAsync(request.CustomerId, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/KeywordPlanAdGroupServiceClientTest.g.cs b/tests/V6/Services/KeywordPlanAdGroupServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/KeywordPlanAdGroupServiceClientTest.g.cs rename to tests/V6/Services/KeywordPlanAdGroupServiceClientTest.g.cs index 7544f4052..11346bb3f 100644 --- a/tests/V2/Services/KeywordPlanAdGroupServiceClientTest.g.cs +++ b/tests/V6/Services/KeywordPlanAdGroupServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedKeywordPlanAdGroupServiceClientTest @@ -35,14 +35,14 @@ public void GetKeywordPlanAdGroupRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanAdGroupRequest request = new GetKeywordPlanAdGroupRequest { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), }; gagvr::KeywordPlanAdGroup expectedResponse = new gagvr::KeywordPlanAdGroup { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), Id = -6774108720365892680L, - KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroup(request, moq::It.IsAny())).Returns(expectedResponse); @@ -58,14 +58,14 @@ public void GetKeywordPlanAdGroupRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanAdGroupRequest request = new GetKeywordPlanAdGroupRequest { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), }; gagvr::KeywordPlanAdGroup expectedResponse = new gagvr::KeywordPlanAdGroup { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), Id = -6774108720365892680L, - KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -83,14 +83,14 @@ public void GetKeywordPlanAdGroup() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanAdGroupRequest request = new GetKeywordPlanAdGroupRequest { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), }; gagvr::KeywordPlanAdGroup expectedResponse = new gagvr::KeywordPlanAdGroup { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), Id = -6774108720365892680L, - KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroup(request, moq::It.IsAny())).Returns(expectedResponse); @@ -106,14 +106,14 @@ public void GetKeywordPlanAdGroup() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanAdGroupRequest request = new GetKeywordPlanAdGroupRequest { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), }; gagvr::KeywordPlanAdGroup expectedResponse = new gagvr::KeywordPlanAdGroup { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), Id = -6774108720365892680L, - KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -131,14 +131,14 @@ public void GetKeywordPlanAdGroupResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanAdGroupRequest request = new GetKeywordPlanAdGroupRequest { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), }; gagvr::KeywordPlanAdGroup expectedResponse = new gagvr::KeywordPlanAdGroup { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), Id = -6774108720365892680L, - KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroup(request, moq::It.IsAny())).Returns(expectedResponse); @@ -154,14 +154,14 @@ public void GetKeywordPlanAdGroupResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanAdGroupRequest request = new GetKeywordPlanAdGroupRequest { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), }; gagvr::KeywordPlanAdGroup expectedResponse = new gagvr::KeywordPlanAdGroup { - ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), - KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), Id = -6774108720365892680L, - KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER]", "[KEYWORD_PLAN_AD_GROUP]"), + KeywordPlanAdGroupName = gagvr::KeywordPlanAdGroupName.FromCustomerKeywordPlanAdGroup("[CUSTOMER_ID]", "[KEYWORD_PLAN_AD_GROUP_ID]"), CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanAdGroupAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V6/Services/KeywordPlanCampaignKeywordServiceClientTest.g.cs b/tests/V6/Services/KeywordPlanCampaignKeywordServiceClientTest.g.cs new file mode 100644 index 000000000..285655a35 --- /dev/null +++ b/tests/V6/Services/KeywordPlanCampaignKeywordServiceClientTest.g.cs @@ -0,0 +1,299 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using gr = Google.Rpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedKeywordPlanCampaignKeywordServiceClientTest + { + [Category("Smoke")][Test] + public void GetKeywordPlanCampaignKeywordRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanCampaignKeywordRequest request = new GetKeywordPlanCampaignKeywordRequest + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + }; + gagvr::KeywordPlanCampaignKeyword expectedResponse = new gagvr::KeywordPlanCampaignKeyword + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignKeyword(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanCampaignKeyword response = client.GetKeywordPlanCampaignKeyword(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetKeywordPlanCampaignKeywordRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanCampaignKeywordRequest request = new GetKeywordPlanCampaignKeywordRequest + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + }; + gagvr::KeywordPlanCampaignKeyword expectedResponse = new gagvr::KeywordPlanCampaignKeyword + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanCampaignKeyword responseCallSettings = await client.GetKeywordPlanCampaignKeywordAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::KeywordPlanCampaignKeyword responseCancellationToken = await client.GetKeywordPlanCampaignKeywordAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetKeywordPlanCampaignKeyword() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanCampaignKeywordRequest request = new GetKeywordPlanCampaignKeywordRequest + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + }; + gagvr::KeywordPlanCampaignKeyword expectedResponse = new gagvr::KeywordPlanCampaignKeyword + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignKeyword(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanCampaignKeyword response = client.GetKeywordPlanCampaignKeyword(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetKeywordPlanCampaignKeywordAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanCampaignKeywordRequest request = new GetKeywordPlanCampaignKeywordRequest + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + }; + gagvr::KeywordPlanCampaignKeyword expectedResponse = new gagvr::KeywordPlanCampaignKeyword + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanCampaignKeyword responseCallSettings = await client.GetKeywordPlanCampaignKeywordAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::KeywordPlanCampaignKeyword responseCancellationToken = await client.GetKeywordPlanCampaignKeywordAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetKeywordPlanCampaignKeywordResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanCampaignKeywordRequest request = new GetKeywordPlanCampaignKeywordRequest + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + }; + gagvr::KeywordPlanCampaignKeyword expectedResponse = new gagvr::KeywordPlanCampaignKeyword + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignKeyword(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanCampaignKeyword response = client.GetKeywordPlanCampaignKeyword(request.ResourceNameAsKeywordPlanCampaignKeywordName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetKeywordPlanCampaignKeywordResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetKeywordPlanCampaignKeywordRequest request = new GetKeywordPlanCampaignKeywordRequest + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + }; + gagvr::KeywordPlanCampaignKeyword expectedResponse = new gagvr::KeywordPlanCampaignKeyword + { + ResourceNameAsKeywordPlanCampaignKeywordName = gagvr::KeywordPlanCampaignKeywordName.FromCustomerKeywordPlanCampaignKeyword("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_KEYWORD_ID]"), + MatchType = gagve::KeywordMatchTypeEnum.Types.KeywordMatchType.Unspecified, + KeywordPlanCampaignAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + Id = -6774108720365892680L, + Text = "textec51b21c", + Negative = false, + }; + mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignKeywordAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + gagvr::KeywordPlanCampaignKeyword responseCallSettings = await client.GetKeywordPlanCampaignKeywordAsync(request.ResourceNameAsKeywordPlanCampaignKeywordName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::KeywordPlanCampaignKeyword responseCancellationToken = await client.GetKeywordPlanCampaignKeywordAsync(request.ResourceNameAsKeywordPlanCampaignKeywordName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateKeywordPlanCampaignKeywordsRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanCampaignKeywordsRequest request = new MutateKeywordPlanCampaignKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanCampaignKeywordOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateKeywordPlanCampaignKeywordsResponse expectedResponse = new MutateKeywordPlanCampaignKeywordsResponse + { + Results = + { + new MutateKeywordPlanCampaignKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanCampaignKeywords(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanCampaignKeywordsResponse response = client.MutateKeywordPlanCampaignKeywords(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateKeywordPlanCampaignKeywordsRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanCampaignKeywordsRequest request = new MutateKeywordPlanCampaignKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanCampaignKeywordOperation(), + }, + PartialFailure = false, + ValidateOnly = true, + }; + MutateKeywordPlanCampaignKeywordsResponse expectedResponse = new MutateKeywordPlanCampaignKeywordsResponse + { + Results = + { + new MutateKeywordPlanCampaignKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanCampaignKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanCampaignKeywordsResponse responseCallSettings = await client.MutateKeywordPlanCampaignKeywordsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateKeywordPlanCampaignKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanCampaignKeywordsAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void MutateKeywordPlanCampaignKeywords() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanCampaignKeywordsRequest request = new MutateKeywordPlanCampaignKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanCampaignKeywordOperation(), + }, + }; + MutateKeywordPlanCampaignKeywordsResponse expectedResponse = new MutateKeywordPlanCampaignKeywordsResponse + { + Results = + { + new MutateKeywordPlanCampaignKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanCampaignKeywords(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanCampaignKeywordsResponse response = client.MutateKeywordPlanCampaignKeywords(request.CustomerId, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task MutateKeywordPlanCampaignKeywordsAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + MutateKeywordPlanCampaignKeywordsRequest request = new MutateKeywordPlanCampaignKeywordsRequest + { + CustomerId = "customer_id3b3724cb", + Operations = + { + new KeywordPlanCampaignKeywordOperation(), + }, + }; + MutateKeywordPlanCampaignKeywordsResponse expectedResponse = new MutateKeywordPlanCampaignKeywordsResponse + { + Results = + { + new MutateKeywordPlanCampaignKeywordResult(), + }, + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.MutateKeywordPlanCampaignKeywordsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanCampaignKeywordServiceClient client = new KeywordPlanCampaignKeywordServiceClientImpl(mockGrpcClient.Object, null); + MutateKeywordPlanCampaignKeywordsResponse responseCallSettings = await client.MutateKeywordPlanCampaignKeywordsAsync(request.CustomerId, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + MutateKeywordPlanCampaignKeywordsResponse responseCancellationToken = await client.MutateKeywordPlanCampaignKeywordsAsync(request.CustomerId, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/KeywordPlanCampaignServiceClientTest.g.cs b/tests/V6/Services/KeywordPlanCampaignServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/KeywordPlanCampaignServiceClientTest.g.cs rename to tests/V6/Services/KeywordPlanCampaignServiceClientTest.g.cs index df1b9a70e..e55f66f62 100644 --- a/tests/V2/Services/KeywordPlanCampaignServiceClientTest.g.cs +++ b/tests/V6/Services/KeywordPlanCampaignServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedKeywordPlanCampaignServiceClientTest @@ -36,24 +36,24 @@ public void GetKeywordPlanCampaignRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanCampaignRequest request = new GetKeywordPlanCampaignRequest { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), }; gagvr::KeywordPlanCampaign expectedResponse = new gagvr::KeywordPlanCampaign { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - LanguageConstantsAsLanguageConstantNames = - { - gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), - }, + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - CpcBidMicros = 7321761304249472746L, GeoTargets = { new gagvr::KeywordPlanGeoTarget(), }, + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + Id = -6774108720365892680L, + KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + LanguageConstantsAsLanguageConstantNames = + { + gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), + }, + CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanCampaign(request, moq::It.IsAny())).Returns(expectedResponse); KeywordPlanCampaignServiceClient client = new KeywordPlanCampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -68,24 +68,24 @@ public void GetKeywordPlanCampaignRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanCampaignRequest request = new GetKeywordPlanCampaignRequest { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), }; gagvr::KeywordPlanCampaign expectedResponse = new gagvr::KeywordPlanCampaign { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - LanguageConstantsAsLanguageConstantNames = - { - gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), - }, + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - CpcBidMicros = 7321761304249472746L, GeoTargets = { new gagvr::KeywordPlanGeoTarget(), }, + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + Id = -6774108720365892680L, + KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + LanguageConstantsAsLanguageConstantNames = + { + gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), + }, + CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordPlanCampaignServiceClient client = new KeywordPlanCampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -102,24 +102,24 @@ public void GetKeywordPlanCampaign() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanCampaignRequest request = new GetKeywordPlanCampaignRequest { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), }; gagvr::KeywordPlanCampaign expectedResponse = new gagvr::KeywordPlanCampaign { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - LanguageConstantsAsLanguageConstantNames = - { - gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), - }, + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - CpcBidMicros = 7321761304249472746L, GeoTargets = { new gagvr::KeywordPlanGeoTarget(), }, + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + Id = -6774108720365892680L, + KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + LanguageConstantsAsLanguageConstantNames = + { + gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), + }, + CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanCampaign(request, moq::It.IsAny())).Returns(expectedResponse); KeywordPlanCampaignServiceClient client = new KeywordPlanCampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -134,24 +134,24 @@ public void GetKeywordPlanCampaign() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanCampaignRequest request = new GetKeywordPlanCampaignRequest { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), }; gagvr::KeywordPlanCampaign expectedResponse = new gagvr::KeywordPlanCampaign { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - LanguageConstantsAsLanguageConstantNames = - { - gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), - }, + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - CpcBidMicros = 7321761304249472746L, GeoTargets = { new gagvr::KeywordPlanGeoTarget(), }, + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + Id = -6774108720365892680L, + KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + LanguageConstantsAsLanguageConstantNames = + { + gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), + }, + CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordPlanCampaignServiceClient client = new KeywordPlanCampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -168,24 +168,24 @@ public void GetKeywordPlanCampaignResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanCampaignRequest request = new GetKeywordPlanCampaignRequest { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), }; gagvr::KeywordPlanCampaign expectedResponse = new gagvr::KeywordPlanCampaign { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - LanguageConstantsAsLanguageConstantNames = - { - gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), - }, + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - CpcBidMicros = 7321761304249472746L, GeoTargets = { new gagvr::KeywordPlanGeoTarget(), }, + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + Id = -6774108720365892680L, + KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + LanguageConstantsAsLanguageConstantNames = + { + gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), + }, + CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanCampaign(request, moq::It.IsAny())).Returns(expectedResponse); KeywordPlanCampaignServiceClient client = new KeywordPlanCampaignServiceClientImpl(mockGrpcClient.Object, null); @@ -200,24 +200,24 @@ public void GetKeywordPlanCampaignResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanCampaignRequest request = new GetKeywordPlanCampaignRequest { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), }; gagvr::KeywordPlanCampaign expectedResponse = new gagvr::KeywordPlanCampaign { - ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER]", "[KEYWORD_PLAN_CAMPAIGN]"), - LanguageConstantsAsLanguageConstantNames = - { - gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), - }, + ResourceNameAsKeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), KeywordPlanNetwork = gagve::KeywordPlanNetworkEnum.Types.KeywordPlanNetwork.Unspecified, - CpcBidMicros = 7321761304249472746L, GeoTargets = { new gagvr::KeywordPlanGeoTarget(), }, + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + Id = -6774108720365892680L, + KeywordPlanCampaignName = gagvr::KeywordPlanCampaignName.FromCustomerKeywordPlanCampaign("[CUSTOMER_ID]", "[KEYWORD_PLAN_CAMPAIGN_ID]"), + LanguageConstantsAsLanguageConstantNames = + { + gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), + }, + CpcBidMicros = 7321761304249472746L, }; mockGrpcClient.Setup(x => x.GetKeywordPlanCampaignAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordPlanCampaignServiceClient client = new KeywordPlanCampaignServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/KeywordPlanIdeaServiceClientTest.g.cs b/tests/V6/Services/KeywordPlanIdeaServiceClientTest.g.cs new file mode 100644 index 000000000..22edb0626 --- /dev/null +++ b/tests/V6/Services/KeywordPlanIdeaServiceClientTest.g.cs @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedKeywordPlanIdeaServiceClientTest + { + } +} diff --git a/tests/V2/Services/KeywordPlanServiceClientTest.g.cs b/tests/V6/Services/KeywordPlanServiceClientTest.g.cs similarity index 50% rename from tests/V2/Services/KeywordPlanServiceClientTest.g.cs rename to tests/V6/Services/KeywordPlanServiceClientTest.g.cs index 765fdd066..da55a493b 100644 --- a/tests/V2/Services/KeywordPlanServiceClientTest.g.cs +++ b/tests/V6/Services/KeywordPlanServiceClientTest.g.cs @@ -14,7 +14,7 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -22,9 +22,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedKeywordPlanServiceClientTest @@ -35,14 +35,14 @@ public void GetKeywordPlanRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanRequest request = new GetKeywordPlanRequest { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; gagvr::KeywordPlan expectedResponse = new gagvr::KeywordPlan { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), ForecastPeriod = new gagvr::KeywordPlanForecastPeriod(), + Id = -6774108720365892680L, + KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordPlan(request, moq::It.IsAny())).Returns(expectedResponse); KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); @@ -57,14 +57,14 @@ public void GetKeywordPlanRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanRequest request = new GetKeywordPlanRequest { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; gagvr::KeywordPlan expectedResponse = new gagvr::KeywordPlan { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), ForecastPeriod = new gagvr::KeywordPlanForecastPeriod(), + Id = -6774108720365892680L, + KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordPlanAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); @@ -81,14 +81,14 @@ public void GetKeywordPlan() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanRequest request = new GetKeywordPlanRequest { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; gagvr::KeywordPlan expectedResponse = new gagvr::KeywordPlan { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), ForecastPeriod = new gagvr::KeywordPlanForecastPeriod(), + Id = -6774108720365892680L, + KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordPlan(request, moq::It.IsAny())).Returns(expectedResponse); KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); @@ -103,14 +103,14 @@ public void GetKeywordPlan() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanRequest request = new GetKeywordPlanRequest { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; gagvr::KeywordPlan expectedResponse = new gagvr::KeywordPlan { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), ForecastPeriod = new gagvr::KeywordPlanForecastPeriod(), + Id = -6774108720365892680L, + KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordPlanAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); @@ -127,14 +127,14 @@ public void GetKeywordPlanResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanRequest request = new GetKeywordPlanRequest { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; gagvr::KeywordPlan expectedResponse = new gagvr::KeywordPlan { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), ForecastPeriod = new gagvr::KeywordPlanForecastPeriod(), + Id = -6774108720365892680L, + KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordPlan(request, moq::It.IsAny())).Returns(expectedResponse); KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); @@ -149,14 +149,14 @@ public void GetKeywordPlanResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordPlanRequest request = new GetKeywordPlanRequest { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; gagvr::KeywordPlan expectedResponse = new gagvr::KeywordPlan { - ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), - Id = -6774108720365892680L, - KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER]", "[KEYWORD_PLAN]"), + ResourceNameAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), ForecastPeriod = new gagvr::KeywordPlanForecastPeriod(), + Id = -6774108720365892680L, + KeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordPlanAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); @@ -283,13 +283,289 @@ public void MutateKeywordPlans() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastCurveRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurve(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse response = client.GenerateForecastCurve(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastCurveRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurveAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse responseCallSettings = await client.GenerateForecastCurveAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastCurveResponse responseCancellationToken = await client.GenerateForecastCurveAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GenerateForecastCurve() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurve(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse response = client.GenerateForecastCurve(request.KeywordPlan); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastCurveAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurveAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse responseCallSettings = await client.GenerateForecastCurveAsync(request.KeywordPlan, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastCurveResponse responseCancellationToken = await client.GenerateForecastCurveAsync(request.KeywordPlan, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GenerateForecastCurveResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurve(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse response = client.GenerateForecastCurve(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastCurveResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastCurveRequest request = new GenerateForecastCurveRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastCurveResponse expectedResponse = new GenerateForecastCurveResponse + { + CampaignForecastCurves = + { + new KeywordPlanCampaignForecastCurve(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastCurveAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastCurveResponse responseCallSettings = await client.GenerateForecastCurveAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastCurveResponse responseCancellationToken = await client.GenerateForecastCurveAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GenerateForecastTimeSeriesRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeries(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse response = client.GenerateForecastTimeSeries(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastTimeSeriesRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeriesAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse responseCallSettings = await client.GenerateForecastTimeSeriesAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastTimeSeriesResponse responseCancellationToken = await client.GenerateForecastTimeSeriesAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GenerateForecastTimeSeries() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeries(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse response = client.GenerateForecastTimeSeries(request.KeywordPlan); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastTimeSeriesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeriesAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse responseCallSettings = await client.GenerateForecastTimeSeriesAsync(request.KeywordPlan, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastTimeSeriesResponse responseCancellationToken = await client.GenerateForecastTimeSeriesAsync(request.KeywordPlan, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GenerateForecastTimeSeriesResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeries(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse response = client.GenerateForecastTimeSeries(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastTimeSeriesResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastTimeSeriesRequest request = new GenerateForecastTimeSeriesRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastTimeSeriesResponse expectedResponse = new GenerateForecastTimeSeriesResponse + { + WeeklyTimeSeriesForecasts = + { + new KeywordPlanWeeklyTimeSeriesForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastTimeSeriesAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastTimeSeriesResponse responseCallSettings = await client.GenerateForecastTimeSeriesAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastTimeSeriesResponse responseCancellationToken = await client.GenerateForecastTimeSeriesAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateForecastMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -319,7 +595,7 @@ public void GenerateForecastMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -351,7 +627,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -381,7 +657,7 @@ public void GenerateForecastMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse { @@ -407,13 +683,75 @@ public void GenerateForecastMetrics() mockGrpcClient.VerifyAll(); } + [Category("Smoke")][Test] + public void GenerateForecastMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse response = client.GenerateForecastMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateForecastMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateForecastMetricsRequest request = new GenerateForecastMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateForecastMetricsResponse expectedResponse = new GenerateForecastMetricsResponse + { + CampaignForecasts = + { + new KeywordPlanCampaignForecast(), + }, + AdGroupForecasts = + { + new KeywordPlanAdGroupForecast(), + }, + KeywordForecasts = + { + new KeywordPlanKeywordForecast(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateForecastMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateForecastMetricsResponse responseCallSettings = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateForecastMetricsResponse responseCancellationToken = await client.GenerateForecastMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + [Category("Smoke")][Test] public void GenerateHistoricalMetricsRequestObject() { moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -435,7 +773,7 @@ public void GenerateHistoricalMetricsRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -459,7 +797,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -481,7 +819,7 @@ public void GenerateHistoricalMetrics() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest { - KeywordPlan = "keyword_plan348c505a", + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), }; GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse { @@ -498,5 +836,51 @@ public void GenerateHistoricalMetrics() Assert.AreEqual(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); } + + [Category("Smoke")][Test] + public void GenerateHistoricalMetricsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetrics(request, moq::It.IsAny())).Returns(expectedResponse); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse response = client.GenerateHistoricalMetrics(request.KeywordPlanAsKeywordPlanName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GenerateHistoricalMetricsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GenerateHistoricalMetricsRequest request = new GenerateHistoricalMetricsRequest + { + KeywordPlanAsKeywordPlanName = gagvr::KeywordPlanName.FromCustomerKeywordPlan("[CUSTOMER_ID]", "[KEYWORD_PLAN_ID]"), + }; + GenerateHistoricalMetricsResponse expectedResponse = new GenerateHistoricalMetricsResponse + { + Metrics = + { + new KeywordPlanKeywordHistoricalMetrics(), + }, + }; + mockGrpcClient.Setup(x => x.GenerateHistoricalMetricsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + KeywordPlanServiceClient client = new KeywordPlanServiceClientImpl(mockGrpcClient.Object, null); + GenerateHistoricalMetricsResponse responseCallSettings = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + GenerateHistoricalMetricsResponse responseCancellationToken = await client.GenerateHistoricalMetricsAsync(request.KeywordPlanAsKeywordPlanName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } } } diff --git a/tests/V2/Services/KeywordViewServiceClientTest.g.cs b/tests/V6/Services/KeywordViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/KeywordViewServiceClientTest.g.cs rename to tests/V6/Services/KeywordViewServiceClientTest.g.cs index 21d8adec6..b2491db0a 100644 --- a/tests/V2/Services/KeywordViewServiceClientTest.g.cs +++ b/tests/V6/Services/KeywordViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedKeywordViewServiceClientTest @@ -34,11 +34,11 @@ public void GetKeywordViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordViewRequest request = new GetKeywordViewRequest { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::KeywordView expectedResponse = new gagvr::KeywordView { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordView(request, moq::It.IsAny())).Returns(expectedResponse); KeywordViewServiceClient client = new KeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetKeywordViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordViewRequest request = new GetKeywordViewRequest { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::KeywordView expectedResponse = new gagvr::KeywordView { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordViewServiceClient client = new KeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetKeywordView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordViewRequest request = new GetKeywordViewRequest { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::KeywordView expectedResponse = new gagvr::KeywordView { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordView(request, moq::It.IsAny())).Returns(expectedResponse); KeywordViewServiceClient client = new KeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetKeywordView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordViewRequest request = new GetKeywordViewRequest { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::KeywordView expectedResponse = new gagvr::KeywordView { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordViewServiceClient client = new KeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetKeywordViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordViewRequest request = new GetKeywordViewRequest { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::KeywordView expectedResponse = new gagvr::KeywordView { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordView(request, moq::It.IsAny())).Returns(expectedResponse); KeywordViewServiceClient client = new KeywordViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetKeywordViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetKeywordViewRequest request = new GetKeywordViewRequest { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::KeywordView expectedResponse = new gagvr::KeywordView { - ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerKeywordView("[CUSTOMER]", "[KEYWORD_VIEW]"), + ResourceNameAsKeywordViewName = gagvr::KeywordViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetKeywordViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); KeywordViewServiceClient client = new KeywordViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/LabelServiceClientTest.g.cs b/tests/V6/Services/LabelServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/LabelServiceClientTest.g.cs rename to tests/V6/Services/LabelServiceClientTest.g.cs index ff008e2a5..b150b79ad 100644 --- a/tests/V2/Services/LabelServiceClientTest.g.cs +++ b/tests/V6/Services/LabelServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedLabelServiceClientTest @@ -37,15 +37,15 @@ public void GetLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLabelRequest request = new GetLabelRequest { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::Label expectedResponse = new gagvr::Label { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), - Id = -6774108720365892680L, - LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Status = gagve::LabelStatusEnum.Types.LabelStatus.Enabled, TextLabel = new gagvc::TextLabel(), + Id = -6774108720365892680L, + LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetLabel(request, moq::It.IsAny())).Returns(expectedResponse); LabelServiceClient client = new LabelServiceClientImpl(mockGrpcClient.Object, null); @@ -60,15 +60,15 @@ public void GetLabelRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLabelRequest request = new GetLabelRequest { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::Label expectedResponse = new gagvr::Label { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), - Id = -6774108720365892680L, - LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Status = gagve::LabelStatusEnum.Types.LabelStatus.Enabled, TextLabel = new gagvc::TextLabel(), + Id = -6774108720365892680L, + LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); LabelServiceClient client = new LabelServiceClientImpl(mockGrpcClient.Object, null); @@ -85,15 +85,15 @@ public void GetLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLabelRequest request = new GetLabelRequest { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::Label expectedResponse = new gagvr::Label { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), - Id = -6774108720365892680L, - LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Status = gagve::LabelStatusEnum.Types.LabelStatus.Enabled, TextLabel = new gagvc::TextLabel(), + Id = -6774108720365892680L, + LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetLabel(request, moq::It.IsAny())).Returns(expectedResponse); LabelServiceClient client = new LabelServiceClientImpl(mockGrpcClient.Object, null); @@ -108,15 +108,15 @@ public void GetLabel() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLabelRequest request = new GetLabelRequest { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::Label expectedResponse = new gagvr::Label { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), - Id = -6774108720365892680L, - LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Status = gagve::LabelStatusEnum.Types.LabelStatus.Enabled, TextLabel = new gagvc::TextLabel(), + Id = -6774108720365892680L, + LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); LabelServiceClient client = new LabelServiceClientImpl(mockGrpcClient.Object, null); @@ -133,15 +133,15 @@ public void GetLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLabelRequest request = new GetLabelRequest { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::Label expectedResponse = new gagvr::Label { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), - Id = -6774108720365892680L, - LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Status = gagve::LabelStatusEnum.Types.LabelStatus.Enabled, TextLabel = new gagvc::TextLabel(), + Id = -6774108720365892680L, + LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetLabel(request, moq::It.IsAny())).Returns(expectedResponse); LabelServiceClient client = new LabelServiceClientImpl(mockGrpcClient.Object, null); @@ -156,15 +156,15 @@ public void GetLabelResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLabelRequest request = new GetLabelRequest { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; gagvr::Label expectedResponse = new gagvr::Label { - ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), - Id = -6774108720365892680L, - LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER]", "[LABEL]"), + ResourceNameAsLabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), Status = gagve::LabelStatusEnum.Types.LabelStatus.Enabled, TextLabel = new gagvc::TextLabel(), + Id = -6774108720365892680L, + LabelName = gagvr::LabelName.FromCustomerLabel("[CUSTOMER_ID]", "[LABEL_ID]"), }; mockGrpcClient.Setup(x => x.GetLabelAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); LabelServiceClient client = new LabelServiceClientImpl(mockGrpcClient.Object, null); @@ -188,6 +188,7 @@ public void MutateLabelsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateLabelsResponse expectedResponse = new MutateLabelsResponse { @@ -217,6 +218,7 @@ public void MutateLabelsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateLabelsResponse expectedResponse = new MutateLabelsResponse { diff --git a/tests/V2/Services/LandingPageViewServiceClientTest.g.cs b/tests/V6/Services/LandingPageViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/LandingPageViewServiceClientTest.g.cs rename to tests/V6/Services/LandingPageViewServiceClientTest.g.cs index 226420ae0..361a2c880 100644 --- a/tests/V2/Services/LandingPageViewServiceClientTest.g.cs +++ b/tests/V6/Services/LandingPageViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedLandingPageViewServiceClientTest @@ -34,11 +34,11 @@ public void GetLandingPageViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLandingPageViewRequest request = new GetLandingPageViewRequest { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::LandingPageView expectedResponse = new gagvr::LandingPageView { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), UnexpandedFinalUrl = "unexpanded_final_url7d6e0a3e", }; mockGrpcClient.Setup(x => x.GetLandingPageView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -54,11 +54,11 @@ public void GetLandingPageViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLandingPageViewRequest request = new GetLandingPageViewRequest { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::LandingPageView expectedResponse = new gagvr::LandingPageView { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), UnexpandedFinalUrl = "unexpanded_final_url7d6e0a3e", }; mockGrpcClient.Setup(x => x.GetLandingPageViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -76,11 +76,11 @@ public void GetLandingPageView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLandingPageViewRequest request = new GetLandingPageViewRequest { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::LandingPageView expectedResponse = new gagvr::LandingPageView { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), UnexpandedFinalUrl = "unexpanded_final_url7d6e0a3e", }; mockGrpcClient.Setup(x => x.GetLandingPageView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -96,11 +96,11 @@ public void GetLandingPageView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLandingPageViewRequest request = new GetLandingPageViewRequest { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::LandingPageView expectedResponse = new gagvr::LandingPageView { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), UnexpandedFinalUrl = "unexpanded_final_url7d6e0a3e", }; mockGrpcClient.Setup(x => x.GetLandingPageViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -118,11 +118,11 @@ public void GetLandingPageViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLandingPageViewRequest request = new GetLandingPageViewRequest { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::LandingPageView expectedResponse = new gagvr::LandingPageView { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), UnexpandedFinalUrl = "unexpanded_final_url7d6e0a3e", }; mockGrpcClient.Setup(x => x.GetLandingPageView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -138,11 +138,11 @@ public void GetLandingPageViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLandingPageViewRequest request = new GetLandingPageViewRequest { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), }; gagvr::LandingPageView expectedResponse = new gagvr::LandingPageView { - ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerLandingPageView("[CUSTOMER]", "[LANDING_PAGE_VIEW]"), + ResourceNameAsLandingPageViewName = gagvr::LandingPageViewName.FromCustomerUnexpandedFinalUrlFingerprint("[CUSTOMER_ID]", "[UNEXPANDED_FINAL_URL_FINGERPRINT]"), UnexpandedFinalUrl = "unexpanded_final_url7d6e0a3e", }; mockGrpcClient.Setup(x => x.GetLandingPageViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/LanguageConstantServiceClientTest.g.cs b/tests/V6/Services/LanguageConstantServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/LanguageConstantServiceClientTest.g.cs rename to tests/V6/Services/LanguageConstantServiceClientTest.g.cs index 1e41ab8d5..0765e328f 100644 --- a/tests/V2/Services/LanguageConstantServiceClientTest.g.cs +++ b/tests/V6/Services/LanguageConstantServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedLanguageConstantServiceClientTest @@ -34,14 +34,14 @@ public void GetLanguageConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLanguageConstantRequest request = new GetLanguageConstantRequest { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::LanguageConstant expectedResponse = new gagvr::LanguageConstant { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, Code = "code946733c1", - LanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + LanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Targetable = true, }; mockGrpcClient.Setup(x => x.GetLanguageConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -57,14 +57,14 @@ public void GetLanguageConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLanguageConstantRequest request = new GetLanguageConstantRequest { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::LanguageConstant expectedResponse = new gagvr::LanguageConstant { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, Code = "code946733c1", - LanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + LanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Targetable = true, }; mockGrpcClient.Setup(x => x.GetLanguageConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -82,14 +82,14 @@ public void GetLanguageConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLanguageConstantRequest request = new GetLanguageConstantRequest { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::LanguageConstant expectedResponse = new gagvr::LanguageConstant { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, Code = "code946733c1", - LanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + LanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Targetable = true, }; mockGrpcClient.Setup(x => x.GetLanguageConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -105,14 +105,14 @@ public void GetLanguageConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLanguageConstantRequest request = new GetLanguageConstantRequest { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::LanguageConstant expectedResponse = new gagvr::LanguageConstant { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, Code = "code946733c1", - LanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + LanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Targetable = true, }; mockGrpcClient.Setup(x => x.GetLanguageConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -130,14 +130,14 @@ public void GetLanguageConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLanguageConstantRequest request = new GetLanguageConstantRequest { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::LanguageConstant expectedResponse = new gagvr::LanguageConstant { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, Code = "code946733c1", - LanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + LanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Targetable = true, }; mockGrpcClient.Setup(x => x.GetLanguageConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -153,14 +153,14 @@ public void GetLanguageConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLanguageConstantRequest request = new GetLanguageConstantRequest { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::LanguageConstant expectedResponse = new gagvr::LanguageConstant { - ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + ResourceNameAsLanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Id = -6774108720365892680L, Code = "code946733c1", - LanguageConstantName = gagvr::LanguageConstantName.FromLanguageConstant("[LANGUAGE_CONSTANT]"), + LanguageConstantName = gagvr::LanguageConstantName.FromCriterion("[CRITERION_ID]"), Targetable = true, }; mockGrpcClient.Setup(x => x.GetLanguageConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/LocationViewServiceClientTest.g.cs b/tests/V6/Services/LocationViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/LocationViewServiceClientTest.g.cs rename to tests/V6/Services/LocationViewServiceClientTest.g.cs index b4223b60b..cbbf674a8 100644 --- a/tests/V2/Services/LocationViewServiceClientTest.g.cs +++ b/tests/V6/Services/LocationViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedLocationViewServiceClientTest @@ -34,11 +34,11 @@ public void GetLocationViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLocationViewRequest request = new GetLocationViewRequest { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::LocationView expectedResponse = new gagvr::LocationView { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetLocationView(request, moq::It.IsAny())).Returns(expectedResponse); LocationViewServiceClient client = new LocationViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetLocationViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLocationViewRequest request = new GetLocationViewRequest { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::LocationView expectedResponse = new gagvr::LocationView { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetLocationViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); LocationViewServiceClient client = new LocationViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetLocationView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLocationViewRequest request = new GetLocationViewRequest { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::LocationView expectedResponse = new gagvr::LocationView { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetLocationView(request, moq::It.IsAny())).Returns(expectedResponse); LocationViewServiceClient client = new LocationViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetLocationView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLocationViewRequest request = new GetLocationViewRequest { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::LocationView expectedResponse = new gagvr::LocationView { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetLocationViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); LocationViewServiceClient client = new LocationViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetLocationViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLocationViewRequest request = new GetLocationViewRequest { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::LocationView expectedResponse = new gagvr::LocationView { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetLocationView(request, moq::It.IsAny())).Returns(expectedResponse); LocationViewServiceClient client = new LocationViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetLocationViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetLocationViewRequest request = new GetLocationViewRequest { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; gagvr::LocationView expectedResponse = new gagvr::LocationView { - ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerLocationView("[CUSTOMER]", "[LOCATION_VIEW]"), + ResourceNameAsLocationViewName = gagvr::LocationViewName.FromCustomerCampaignCriterion("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetLocationViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); LocationViewServiceClient client = new LocationViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/ManagedPlacementViewServiceClientTest.g.cs b/tests/V6/Services/ManagedPlacementViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/ManagedPlacementViewServiceClientTest.g.cs rename to tests/V6/Services/ManagedPlacementViewServiceClientTest.g.cs index 358b3a159..e8b008531 100644 --- a/tests/V2/Services/ManagedPlacementViewServiceClientTest.g.cs +++ b/tests/V6/Services/ManagedPlacementViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedManagedPlacementViewServiceClientTest @@ -34,11 +34,11 @@ public void GetManagedPlacementViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ManagedPlacementView expectedResponse = new gagvr::ManagedPlacementView { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetManagedPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetManagedPlacementViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ManagedPlacementView expectedResponse = new gagvr::ManagedPlacementView { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetManagedPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetManagedPlacementView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ManagedPlacementView expectedResponse = new gagvr::ManagedPlacementView { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetManagedPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetManagedPlacementView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ManagedPlacementView expectedResponse = new gagvr::ManagedPlacementView { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetManagedPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetManagedPlacementViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ManagedPlacementView expectedResponse = new gagvr::ManagedPlacementView { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetManagedPlacementView(request, moq::It.IsAny())).Returns(expectedResponse); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetManagedPlacementViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetManagedPlacementViewRequest request = new GetManagedPlacementViewRequest { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ManagedPlacementView expectedResponse = new gagvr::ManagedPlacementView { - ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerManagedPlacementView("[CUSTOMER]", "[MANAGED_PLACEMENT_VIEW]"), + ResourceNameAsManagedPlacementViewName = gagvr::ManagedPlacementViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetManagedPlacementViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ManagedPlacementViewServiceClient client = new ManagedPlacementViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/MediaFileServiceClientTest.g.cs b/tests/V6/Services/MediaFileServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/MediaFileServiceClientTest.g.cs rename to tests/V6/Services/MediaFileServiceClientTest.g.cs index 948ff8d33..4872127c1 100644 --- a/tests/V2/Services/MediaFileServiceClientTest.g.cs +++ b/tests/V6/Services/MediaFileServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedMediaFileServiceClientTest @@ -36,21 +36,21 @@ public void GetMediaFileRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMediaFileRequest request = new GetMediaFileRequest { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), }; gagvr::MediaFile expectedResponse = new gagvr::MediaFile { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - Id = -6774108720365892680L, + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), Image = new gagvr::MediaImage(), MediaBundle = new gagvr::MediaBundle(), Type = gagve::MediaTypeEnum.Types.MediaType.DynamicImage, MimeType = gagve::MimeTypeEnum.Types.MimeType.ImagePng, - SourceUrl = "source_url5da5c845", - MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - FileSize = 2493931593823374883L, Audio = new gagvr::MediaAudio(), Video = new gagvr::MediaVideo(), + Id = -6774108720365892680L, + SourceUrl = "source_url5da5c845", + MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), + FileSize = 2493931593823374883L, }; mockGrpcClient.Setup(x => x.GetMediaFile(request, moq::It.IsAny())).Returns(expectedResponse); MediaFileServiceClient client = new MediaFileServiceClientImpl(mockGrpcClient.Object, null); @@ -65,21 +65,21 @@ public void GetMediaFileRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMediaFileRequest request = new GetMediaFileRequest { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), }; gagvr::MediaFile expectedResponse = new gagvr::MediaFile { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - Id = -6774108720365892680L, + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), Image = new gagvr::MediaImage(), MediaBundle = new gagvr::MediaBundle(), Type = gagve::MediaTypeEnum.Types.MediaType.DynamicImage, MimeType = gagve::MimeTypeEnum.Types.MimeType.ImagePng, - SourceUrl = "source_url5da5c845", - MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - FileSize = 2493931593823374883L, Audio = new gagvr::MediaAudio(), Video = new gagvr::MediaVideo(), + Id = -6774108720365892680L, + SourceUrl = "source_url5da5c845", + MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), + FileSize = 2493931593823374883L, }; mockGrpcClient.Setup(x => x.GetMediaFileAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MediaFileServiceClient client = new MediaFileServiceClientImpl(mockGrpcClient.Object, null); @@ -96,21 +96,21 @@ public void GetMediaFile() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMediaFileRequest request = new GetMediaFileRequest { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), }; gagvr::MediaFile expectedResponse = new gagvr::MediaFile { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - Id = -6774108720365892680L, + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), Image = new gagvr::MediaImage(), MediaBundle = new gagvr::MediaBundle(), Type = gagve::MediaTypeEnum.Types.MediaType.DynamicImage, MimeType = gagve::MimeTypeEnum.Types.MimeType.ImagePng, - SourceUrl = "source_url5da5c845", - MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - FileSize = 2493931593823374883L, Audio = new gagvr::MediaAudio(), Video = new gagvr::MediaVideo(), + Id = -6774108720365892680L, + SourceUrl = "source_url5da5c845", + MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), + FileSize = 2493931593823374883L, }; mockGrpcClient.Setup(x => x.GetMediaFile(request, moq::It.IsAny())).Returns(expectedResponse); MediaFileServiceClient client = new MediaFileServiceClientImpl(mockGrpcClient.Object, null); @@ -125,21 +125,21 @@ public void GetMediaFile() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMediaFileRequest request = new GetMediaFileRequest { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), }; gagvr::MediaFile expectedResponse = new gagvr::MediaFile { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - Id = -6774108720365892680L, + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), Image = new gagvr::MediaImage(), MediaBundle = new gagvr::MediaBundle(), Type = gagve::MediaTypeEnum.Types.MediaType.DynamicImage, MimeType = gagve::MimeTypeEnum.Types.MimeType.ImagePng, - SourceUrl = "source_url5da5c845", - MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - FileSize = 2493931593823374883L, Audio = new gagvr::MediaAudio(), Video = new gagvr::MediaVideo(), + Id = -6774108720365892680L, + SourceUrl = "source_url5da5c845", + MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), + FileSize = 2493931593823374883L, }; mockGrpcClient.Setup(x => x.GetMediaFileAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MediaFileServiceClient client = new MediaFileServiceClientImpl(mockGrpcClient.Object, null); @@ -156,21 +156,21 @@ public void GetMediaFileResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMediaFileRequest request = new GetMediaFileRequest { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), }; gagvr::MediaFile expectedResponse = new gagvr::MediaFile { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - Id = -6774108720365892680L, + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), Image = new gagvr::MediaImage(), MediaBundle = new gagvr::MediaBundle(), Type = gagve::MediaTypeEnum.Types.MediaType.DynamicImage, MimeType = gagve::MimeTypeEnum.Types.MimeType.ImagePng, - SourceUrl = "source_url5da5c845", - MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - FileSize = 2493931593823374883L, Audio = new gagvr::MediaAudio(), Video = new gagvr::MediaVideo(), + Id = -6774108720365892680L, + SourceUrl = "source_url5da5c845", + MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), + FileSize = 2493931593823374883L, }; mockGrpcClient.Setup(x => x.GetMediaFile(request, moq::It.IsAny())).Returns(expectedResponse); MediaFileServiceClient client = new MediaFileServiceClientImpl(mockGrpcClient.Object, null); @@ -185,21 +185,21 @@ public void GetMediaFileResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMediaFileRequest request = new GetMediaFileRequest { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), }; gagvr::MediaFile expectedResponse = new gagvr::MediaFile { - ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - Id = -6774108720365892680L, + ResourceNameAsMediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), Image = new gagvr::MediaImage(), MediaBundle = new gagvr::MediaBundle(), Type = gagve::MediaTypeEnum.Types.MediaType.DynamicImage, MimeType = gagve::MimeTypeEnum.Types.MimeType.ImagePng, - SourceUrl = "source_url5da5c845", - MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER]", "[MEDIA_FILE]"), - FileSize = 2493931593823374883L, Audio = new gagvr::MediaAudio(), Video = new gagvr::MediaVideo(), + Id = -6774108720365892680L, + SourceUrl = "source_url5da5c845", + MediaFileName = gagvr::MediaFileName.FromCustomerMediaFile("[CUSTOMER_ID]", "[MEDIA_FILE_ID]"), + FileSize = 2493931593823374883L, }; mockGrpcClient.Setup(x => x.GetMediaFileAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MediaFileServiceClient client = new MediaFileServiceClientImpl(mockGrpcClient.Object, null); @@ -223,6 +223,7 @@ public void MutateMediaFilesRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateMediaFilesResponse expectedResponse = new MutateMediaFilesResponse { @@ -252,6 +253,7 @@ public void MutateMediaFilesRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateMediaFilesResponse expectedResponse = new MutateMediaFilesResponse { diff --git a/tests/V2/Services/MerchantCenterLinkServiceClientTest.g.cs b/tests/V6/Services/MerchantCenterLinkServiceClientTest.g.cs similarity index 94% rename from tests/V2/Services/MerchantCenterLinkServiceClientTest.g.cs rename to tests/V6/Services/MerchantCenterLinkServiceClientTest.g.cs index 3b104f2d6..563721461 100644 --- a/tests/V2/Services/MerchantCenterLinkServiceClientTest.g.cs +++ b/tests/V6/Services/MerchantCenterLinkServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedMerchantCenterLinkServiceClientTest @@ -127,14 +127,14 @@ public void GetMerchantCenterLinkRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMerchantCenterLinkRequest request = new GetMerchantCenterLinkRequest { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), }; gagvr::MerchantCenterLink expectedResponse = new gagvr::MerchantCenterLink { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), + Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, Id = -6774108720365892680L, MerchantCenterAccountName = "merchant_center_account_name94680907", - Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, }; mockGrpcClient.Setup(x => x.GetMerchantCenterLink(request, moq::It.IsAny())).Returns(expectedResponse); MerchantCenterLinkServiceClient client = new MerchantCenterLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -149,14 +149,14 @@ public void GetMerchantCenterLinkRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMerchantCenterLinkRequest request = new GetMerchantCenterLinkRequest { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), }; gagvr::MerchantCenterLink expectedResponse = new gagvr::MerchantCenterLink { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), + Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, Id = -6774108720365892680L, MerchantCenterAccountName = "merchant_center_account_name94680907", - Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, }; mockGrpcClient.Setup(x => x.GetMerchantCenterLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MerchantCenterLinkServiceClient client = new MerchantCenterLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -173,14 +173,14 @@ public void GetMerchantCenterLink() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMerchantCenterLinkRequest request = new GetMerchantCenterLinkRequest { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), }; gagvr::MerchantCenterLink expectedResponse = new gagvr::MerchantCenterLink { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), + Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, Id = -6774108720365892680L, MerchantCenterAccountName = "merchant_center_account_name94680907", - Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, }; mockGrpcClient.Setup(x => x.GetMerchantCenterLink(request, moq::It.IsAny())).Returns(expectedResponse); MerchantCenterLinkServiceClient client = new MerchantCenterLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -195,14 +195,14 @@ public void GetMerchantCenterLink() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMerchantCenterLinkRequest request = new GetMerchantCenterLinkRequest { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), }; gagvr::MerchantCenterLink expectedResponse = new gagvr::MerchantCenterLink { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), + Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, Id = -6774108720365892680L, MerchantCenterAccountName = "merchant_center_account_name94680907", - Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, }; mockGrpcClient.Setup(x => x.GetMerchantCenterLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MerchantCenterLinkServiceClient client = new MerchantCenterLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -219,14 +219,14 @@ public void GetMerchantCenterLinkResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMerchantCenterLinkRequest request = new GetMerchantCenterLinkRequest { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), }; gagvr::MerchantCenterLink expectedResponse = new gagvr::MerchantCenterLink { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), + Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, Id = -6774108720365892680L, MerchantCenterAccountName = "merchant_center_account_name94680907", - Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, }; mockGrpcClient.Setup(x => x.GetMerchantCenterLink(request, moq::It.IsAny())).Returns(expectedResponse); MerchantCenterLinkServiceClient client = new MerchantCenterLinkServiceClientImpl(mockGrpcClient.Object, null); @@ -241,14 +241,14 @@ public void GetMerchantCenterLinkResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMerchantCenterLinkRequest request = new GetMerchantCenterLinkRequest { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), }; gagvr::MerchantCenterLink expectedResponse = new gagvr::MerchantCenterLink { - ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenterLink("[CUSTOMER]", "[MERCHANT_CENTER_LINK]"), + ResourceNameAsMerchantCenterLinkName = gagvr::MerchantCenterLinkName.FromCustomerMerchantCenter("[CUSTOMER_ID]", "[MERCHANT_CENTER_ID]"), + Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, Id = -6774108720365892680L, MerchantCenterAccountName = "merchant_center_account_name94680907", - Status = gagve::MerchantCenterLinkStatusEnum.Types.MerchantCenterLinkStatus.Enabled, }; mockGrpcClient.Setup(x => x.GetMerchantCenterLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MerchantCenterLinkServiceClient client = new MerchantCenterLinkServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/MobileAppCategoryConstantServiceClientTest.g.cs b/tests/V6/Services/MobileAppCategoryConstantServiceClientTest.g.cs similarity index 84% rename from tests/V2/Services/MobileAppCategoryConstantServiceClientTest.g.cs rename to tests/V6/Services/MobileAppCategoryConstantServiceClientTest.g.cs index 9de26525d..47c71afb5 100644 --- a/tests/V2/Services/MobileAppCategoryConstantServiceClientTest.g.cs +++ b/tests/V6/Services/MobileAppCategoryConstantServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedMobileAppCategoryConstantServiceClientTest @@ -34,13 +34,13 @@ public void GetMobileAppCategoryConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), Id = 1958153144, - MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstant(request, moq::It.IsAny())).Returns(expectedResponse); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -55,13 +55,13 @@ public void GetMobileAppCategoryConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), Id = 1958153144, - MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -78,13 +78,13 @@ public void GetMobileAppCategoryConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), Id = 1958153144, - MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstant(request, moq::It.IsAny())).Returns(expectedResponse); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -99,13 +99,13 @@ public void GetMobileAppCategoryConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), Id = 1958153144, - MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -122,13 +122,13 @@ public void GetMobileAppCategoryConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), Id = 1958153144, - MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstant(request, moq::It.IsAny())).Returns(expectedResponse); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -143,13 +143,13 @@ public void GetMobileAppCategoryConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { - ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), Id = 1958153144, - MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), + MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategory("[MOBILE_APP_CATEGORY_ID]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/MobileDeviceConstantServiceClientTest.g.cs b/tests/V6/Services/MobileDeviceConstantServiceClientTest.g.cs similarity index 88% rename from tests/V2/Services/MobileDeviceConstantServiceClientTest.g.cs rename to tests/V6/Services/MobileDeviceConstantServiceClientTest.g.cs index b08d32114..c22c2fbc2 100644 --- a/tests/V2/Services/MobileDeviceConstantServiceClientTest.g.cs +++ b/tests/V6/Services/MobileDeviceConstantServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedMobileDeviceConstantServiceClientTest @@ -35,16 +35,16 @@ public void GetMobileDeviceConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileDeviceConstantRequest request = new GetMobileDeviceConstantRequest { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::MobileDeviceConstant expectedResponse = new gagvr::MobileDeviceConstant { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), + Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, Id = -6774108720365892680L, - MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), ManufacturerName = "manufacturer_name23641b86", OperatingSystemName = "operating_system_namea90f0a1e", - Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, }; mockGrpcClient.Setup(x => x.GetMobileDeviceConstant(request, moq::It.IsAny())).Returns(expectedResponse); MobileDeviceConstantServiceClient client = new MobileDeviceConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -59,16 +59,16 @@ public void GetMobileDeviceConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileDeviceConstantRequest request = new GetMobileDeviceConstantRequest { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::MobileDeviceConstant expectedResponse = new gagvr::MobileDeviceConstant { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), + Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, Id = -6774108720365892680L, - MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), ManufacturerName = "manufacturer_name23641b86", OperatingSystemName = "operating_system_namea90f0a1e", - Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, }; mockGrpcClient.Setup(x => x.GetMobileDeviceConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MobileDeviceConstantServiceClient client = new MobileDeviceConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -85,16 +85,16 @@ public void GetMobileDeviceConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileDeviceConstantRequest request = new GetMobileDeviceConstantRequest { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::MobileDeviceConstant expectedResponse = new gagvr::MobileDeviceConstant { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), + Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, Id = -6774108720365892680L, - MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), ManufacturerName = "manufacturer_name23641b86", OperatingSystemName = "operating_system_namea90f0a1e", - Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, }; mockGrpcClient.Setup(x => x.GetMobileDeviceConstant(request, moq::It.IsAny())).Returns(expectedResponse); MobileDeviceConstantServiceClient client = new MobileDeviceConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -109,16 +109,16 @@ public void GetMobileDeviceConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileDeviceConstantRequest request = new GetMobileDeviceConstantRequest { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::MobileDeviceConstant expectedResponse = new gagvr::MobileDeviceConstant { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), + Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, Id = -6774108720365892680L, - MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), ManufacturerName = "manufacturer_name23641b86", OperatingSystemName = "operating_system_namea90f0a1e", - Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, }; mockGrpcClient.Setup(x => x.GetMobileDeviceConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MobileDeviceConstantServiceClient client = new MobileDeviceConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -135,16 +135,16 @@ public void GetMobileDeviceConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileDeviceConstantRequest request = new GetMobileDeviceConstantRequest { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::MobileDeviceConstant expectedResponse = new gagvr::MobileDeviceConstant { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), + Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, Id = -6774108720365892680L, - MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), ManufacturerName = "manufacturer_name23641b86", OperatingSystemName = "operating_system_namea90f0a1e", - Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, }; mockGrpcClient.Setup(x => x.GetMobileDeviceConstant(request, moq::It.IsAny())).Returns(expectedResponse); MobileDeviceConstantServiceClient client = new MobileDeviceConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -159,16 +159,16 @@ public void GetMobileDeviceConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetMobileDeviceConstantRequest request = new GetMobileDeviceConstantRequest { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::MobileDeviceConstant expectedResponse = new gagvr::MobileDeviceConstant { - ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + ResourceNameAsMobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), + Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, Id = -6774108720365892680L, - MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromMobileDeviceConstant("[MOBILE_DEVICE_CONSTANT]"), + MobileDeviceConstantName = gagvr::MobileDeviceConstantName.FromCriterion("[CRITERION_ID]"), ManufacturerName = "manufacturer_name23641b86", OperatingSystemName = "operating_system_namea90f0a1e", - Type = gagve::MobileDeviceTypeEnum.Types.MobileDeviceType.Tablet, }; mockGrpcClient.Setup(x => x.GetMobileDeviceConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); MobileDeviceConstantServiceClient client = new MobileDeviceConstantServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/OfflineUserDataJobServiceClientTest.g.cs b/tests/V6/Services/OfflineUserDataJobServiceClientTest.g.cs new file mode 100644 index 000000000..d1d5557e1 --- /dev/null +++ b/tests/V6/Services/OfflineUserDataJobServiceClientTest.g.cs @@ -0,0 +1,443 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using lro = Google.LongRunning; +using gr = Google.Rpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedOfflineUserDataJobServiceClientTest + { + [Category("Smoke")][Test] + public void CreateOfflineUserDataJobRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + CreateOfflineUserDataJobRequest request = new CreateOfflineUserDataJobRequest + { + CustomerId = "customer_id3b3724cb", + Job = new gagvr::OfflineUserDataJob(), + }; + CreateOfflineUserDataJobResponse expectedResponse = new CreateOfflineUserDataJobResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateOfflineUserDataJob(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + CreateOfflineUserDataJobResponse response = client.CreateOfflineUserDataJob(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task CreateOfflineUserDataJobRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + CreateOfflineUserDataJobRequest request = new CreateOfflineUserDataJobRequest + { + CustomerId = "customer_id3b3724cb", + Job = new gagvr::OfflineUserDataJob(), + }; + CreateOfflineUserDataJobResponse expectedResponse = new CreateOfflineUserDataJobResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateOfflineUserDataJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + CreateOfflineUserDataJobResponse responseCallSettings = await client.CreateOfflineUserDataJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + CreateOfflineUserDataJobResponse responseCancellationToken = await client.CreateOfflineUserDataJobAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void CreateOfflineUserDataJob() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + CreateOfflineUserDataJobRequest request = new CreateOfflineUserDataJobRequest + { + CustomerId = "customer_id3b3724cb", + Job = new gagvr::OfflineUserDataJob(), + }; + CreateOfflineUserDataJobResponse expectedResponse = new CreateOfflineUserDataJobResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateOfflineUserDataJob(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + CreateOfflineUserDataJobResponse response = client.CreateOfflineUserDataJob(request.CustomerId, request.Job); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task CreateOfflineUserDataJobAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + CreateOfflineUserDataJobRequest request = new CreateOfflineUserDataJobRequest + { + CustomerId = "customer_id3b3724cb", + Job = new gagvr::OfflineUserDataJob(), + }; + CreateOfflineUserDataJobResponse expectedResponse = new CreateOfflineUserDataJobResponse + { + ResourceName = "resource_name8cc2e687", + }; + mockGrpcClient.Setup(x => x.CreateOfflineUserDataJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + CreateOfflineUserDataJobResponse responseCallSettings = await client.CreateOfflineUserDataJobAsync(request.CustomerId, request.Job, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + CreateOfflineUserDataJobResponse responseCancellationToken = await client.CreateOfflineUserDataJobAsync(request.CustomerId, request.Job, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetOfflineUserDataJobRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetOfflineUserDataJobRequest request = new GetOfflineUserDataJobRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + }; + gagvr::OfflineUserDataJob expectedResponse = new gagvr::OfflineUserDataJob + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Type = gagve::OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.StoreSalesUploadThirdParty, + Status = gagve::OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Pending, + FailureReason = gagve::OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified, + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + StoreSalesMetadata = new gagvc::StoreSalesMetadata(), + Id = -6774108720365892680L, + ExternalId = -7826829054039660530L, + }; + mockGrpcClient.Setup(x => x.GetOfflineUserDataJob(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::OfflineUserDataJob response = client.GetOfflineUserDataJob(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetOfflineUserDataJobRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetOfflineUserDataJobRequest request = new GetOfflineUserDataJobRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + }; + gagvr::OfflineUserDataJob expectedResponse = new gagvr::OfflineUserDataJob + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Type = gagve::OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.StoreSalesUploadThirdParty, + Status = gagve::OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Pending, + FailureReason = gagve::OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified, + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + StoreSalesMetadata = new gagvc::StoreSalesMetadata(), + Id = -6774108720365892680L, + ExternalId = -7826829054039660530L, + }; + mockGrpcClient.Setup(x => x.GetOfflineUserDataJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::OfflineUserDataJob responseCallSettings = await client.GetOfflineUserDataJobAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::OfflineUserDataJob responseCancellationToken = await client.GetOfflineUserDataJobAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetOfflineUserDataJob() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetOfflineUserDataJobRequest request = new GetOfflineUserDataJobRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + }; + gagvr::OfflineUserDataJob expectedResponse = new gagvr::OfflineUserDataJob + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Type = gagve::OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.StoreSalesUploadThirdParty, + Status = gagve::OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Pending, + FailureReason = gagve::OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified, + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + StoreSalesMetadata = new gagvc::StoreSalesMetadata(), + Id = -6774108720365892680L, + ExternalId = -7826829054039660530L, + }; + mockGrpcClient.Setup(x => x.GetOfflineUserDataJob(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::OfflineUserDataJob response = client.GetOfflineUserDataJob(request.ResourceName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetOfflineUserDataJobAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetOfflineUserDataJobRequest request = new GetOfflineUserDataJobRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + }; + gagvr::OfflineUserDataJob expectedResponse = new gagvr::OfflineUserDataJob + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Type = gagve::OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.StoreSalesUploadThirdParty, + Status = gagve::OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Pending, + FailureReason = gagve::OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified, + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + StoreSalesMetadata = new gagvc::StoreSalesMetadata(), + Id = -6774108720365892680L, + ExternalId = -7826829054039660530L, + }; + mockGrpcClient.Setup(x => x.GetOfflineUserDataJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::OfflineUserDataJob responseCallSettings = await client.GetOfflineUserDataJobAsync(request.ResourceName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::OfflineUserDataJob responseCancellationToken = await client.GetOfflineUserDataJobAsync(request.ResourceName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void GetOfflineUserDataJobResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetOfflineUserDataJobRequest request = new GetOfflineUserDataJobRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + }; + gagvr::OfflineUserDataJob expectedResponse = new gagvr::OfflineUserDataJob + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Type = gagve::OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.StoreSalesUploadThirdParty, + Status = gagve::OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Pending, + FailureReason = gagve::OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified, + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + StoreSalesMetadata = new gagvc::StoreSalesMetadata(), + Id = -6774108720365892680L, + ExternalId = -7826829054039660530L, + }; + mockGrpcClient.Setup(x => x.GetOfflineUserDataJob(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::OfflineUserDataJob response = client.GetOfflineUserDataJob(request.ResourceNameAsOfflineUserDataJobName); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetOfflineUserDataJobResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + GetOfflineUserDataJobRequest request = new GetOfflineUserDataJobRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + }; + gagvr::OfflineUserDataJob expectedResponse = new gagvr::OfflineUserDataJob + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Type = gagve::OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.StoreSalesUploadThirdParty, + Status = gagve::OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Pending, + FailureReason = gagve::OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified, + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + StoreSalesMetadata = new gagvc::StoreSalesMetadata(), + Id = -6774108720365892680L, + ExternalId = -7826829054039660530L, + }; + mockGrpcClient.Setup(x => x.GetOfflineUserDataJobAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + gagvr::OfflineUserDataJob responseCallSettings = await client.GetOfflineUserDataJobAsync(request.ResourceNameAsOfflineUserDataJobName, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::OfflineUserDataJob responseCancellationToken = await client.GetOfflineUserDataJobAsync(request.ResourceNameAsOfflineUserDataJobName, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddOfflineUserDataJobOperationsRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddOfflineUserDataJobOperationsRequest request = new AddOfflineUserDataJobOperationsRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Operations = + { + new OfflineUserDataJobOperation(), + }, + EnablePartialFailure = true, + }; + AddOfflineUserDataJobOperationsResponse expectedResponse = new AddOfflineUserDataJobOperationsResponse + { + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.AddOfflineUserDataJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + AddOfflineUserDataJobOperationsResponse response = client.AddOfflineUserDataJobOperations(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddOfflineUserDataJobOperationsRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddOfflineUserDataJobOperationsRequest request = new AddOfflineUserDataJobOperationsRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Operations = + { + new OfflineUserDataJobOperation(), + }, + EnablePartialFailure = true, + }; + AddOfflineUserDataJobOperationsResponse expectedResponse = new AddOfflineUserDataJobOperationsResponse + { + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.AddOfflineUserDataJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + AddOfflineUserDataJobOperationsResponse responseCallSettings = await client.AddOfflineUserDataJobOperationsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddOfflineUserDataJobOperationsResponse responseCancellationToken = await client.AddOfflineUserDataJobOperationsAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddOfflineUserDataJobOperations() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddOfflineUserDataJobOperationsRequest request = new AddOfflineUserDataJobOperationsRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Operations = + { + new OfflineUserDataJobOperation(), + }, + }; + AddOfflineUserDataJobOperationsResponse expectedResponse = new AddOfflineUserDataJobOperationsResponse + { + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.AddOfflineUserDataJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + AddOfflineUserDataJobOperationsResponse response = client.AddOfflineUserDataJobOperations(request.ResourceName, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddOfflineUserDataJobOperationsAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddOfflineUserDataJobOperationsRequest request = new AddOfflineUserDataJobOperationsRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Operations = + { + new OfflineUserDataJobOperation(), + }, + }; + AddOfflineUserDataJobOperationsResponse expectedResponse = new AddOfflineUserDataJobOperationsResponse + { + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.AddOfflineUserDataJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + AddOfflineUserDataJobOperationsResponse responseCallSettings = await client.AddOfflineUserDataJobOperationsAsync(request.ResourceName, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddOfflineUserDataJobOperationsResponse responseCancellationToken = await client.AddOfflineUserDataJobOperationsAsync(request.ResourceName, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void AddOfflineUserDataJobOperationsResourceNames() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddOfflineUserDataJobOperationsRequest request = new AddOfflineUserDataJobOperationsRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Operations = + { + new OfflineUserDataJobOperation(), + }, + }; + AddOfflineUserDataJobOperationsResponse expectedResponse = new AddOfflineUserDataJobOperationsResponse + { + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.AddOfflineUserDataJobOperations(request, moq::It.IsAny())).Returns(expectedResponse); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + AddOfflineUserDataJobOperationsResponse response = client.AddOfflineUserDataJobOperations(request.ResourceNameAsOfflineUserDataJobName, request.Operations); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task AddOfflineUserDataJobOperationsResourceNamesAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + mockGrpcClient.Setup(x => x.CreateOperationsClient()).Returns(new moq::Mock().Object); + AddOfflineUserDataJobOperationsRequest request = new AddOfflineUserDataJobOperationsRequest + { + ResourceNameAsOfflineUserDataJobName = gagvr::OfflineUserDataJobName.FromCustomerOfflineUserDataUpdate("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"), + Operations = + { + new OfflineUserDataJobOperation(), + }, + }; + AddOfflineUserDataJobOperationsResponse expectedResponse = new AddOfflineUserDataJobOperationsResponse + { + PartialFailureError = new gr::Status(), + }; + mockGrpcClient.Setup(x => x.AddOfflineUserDataJobOperationsAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + OfflineUserDataJobServiceClient client = new OfflineUserDataJobServiceClientImpl(mockGrpcClient.Object, null); + AddOfflineUserDataJobOperationsResponse responseCallSettings = await client.AddOfflineUserDataJobOperationsAsync(request.ResourceNameAsOfflineUserDataJobName, request.Operations, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + AddOfflineUserDataJobOperationsResponse responseCancellationToken = await client.AddOfflineUserDataJobOperationsAsync(request.ResourceNameAsOfflineUserDataJobName, request.Operations, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/OperatingSystemVersionConstantServiceClientTest.g.cs b/tests/V6/Services/OperatingSystemVersionConstantServiceClientTest.g.cs similarity index 84% rename from tests/V2/Services/OperatingSystemVersionConstantServiceClientTest.g.cs rename to tests/V6/Services/OperatingSystemVersionConstantServiceClientTest.g.cs index 52774b5c5..c671282b7 100644 --- a/tests/V2/Services/OperatingSystemVersionConstantServiceClientTest.g.cs +++ b/tests/V6/Services/OperatingSystemVersionConstantServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedOperatingSystemVersionConstantServiceClientTest @@ -35,16 +35,16 @@ public void GetOperatingSystemVersionConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetOperatingSystemVersionConstantRequest request = new GetOperatingSystemVersionConstantRequest { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::OperatingSystemVersionConstant expectedResponse = new gagvr::OperatingSystemVersionConstant { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), + OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, Id = -6774108720365892680L, - OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), OsMajorVersion = -1997824152, OsMinorVersion = -1302821028, - OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, }; mockGrpcClient.Setup(x => x.GetOperatingSystemVersionConstant(request, moq::It.IsAny())).Returns(expectedResponse); OperatingSystemVersionConstantServiceClient client = new OperatingSystemVersionConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -59,16 +59,16 @@ public void GetOperatingSystemVersionConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetOperatingSystemVersionConstantRequest request = new GetOperatingSystemVersionConstantRequest { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::OperatingSystemVersionConstant expectedResponse = new gagvr::OperatingSystemVersionConstant { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), + OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, Id = -6774108720365892680L, - OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), OsMajorVersion = -1997824152, OsMinorVersion = -1302821028, - OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, }; mockGrpcClient.Setup(x => x.GetOperatingSystemVersionConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); OperatingSystemVersionConstantServiceClient client = new OperatingSystemVersionConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -85,16 +85,16 @@ public void GetOperatingSystemVersionConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetOperatingSystemVersionConstantRequest request = new GetOperatingSystemVersionConstantRequest { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::OperatingSystemVersionConstant expectedResponse = new gagvr::OperatingSystemVersionConstant { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), + OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, Id = -6774108720365892680L, - OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), OsMajorVersion = -1997824152, OsMinorVersion = -1302821028, - OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, }; mockGrpcClient.Setup(x => x.GetOperatingSystemVersionConstant(request, moq::It.IsAny())).Returns(expectedResponse); OperatingSystemVersionConstantServiceClient client = new OperatingSystemVersionConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -109,16 +109,16 @@ public void GetOperatingSystemVersionConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetOperatingSystemVersionConstantRequest request = new GetOperatingSystemVersionConstantRequest { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::OperatingSystemVersionConstant expectedResponse = new gagvr::OperatingSystemVersionConstant { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), + OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, Id = -6774108720365892680L, - OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), OsMajorVersion = -1997824152, OsMinorVersion = -1302821028, - OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, }; mockGrpcClient.Setup(x => x.GetOperatingSystemVersionConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); OperatingSystemVersionConstantServiceClient client = new OperatingSystemVersionConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -135,16 +135,16 @@ public void GetOperatingSystemVersionConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetOperatingSystemVersionConstantRequest request = new GetOperatingSystemVersionConstantRequest { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::OperatingSystemVersionConstant expectedResponse = new gagvr::OperatingSystemVersionConstant { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), + OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, Id = -6774108720365892680L, - OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), OsMajorVersion = -1997824152, OsMinorVersion = -1302821028, - OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, }; mockGrpcClient.Setup(x => x.GetOperatingSystemVersionConstant(request, moq::It.IsAny())).Returns(expectedResponse); OperatingSystemVersionConstantServiceClient client = new OperatingSystemVersionConstantServiceClientImpl(mockGrpcClient.Object, null); @@ -159,16 +159,16 @@ public void GetOperatingSystemVersionConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetOperatingSystemVersionConstantRequest request = new GetOperatingSystemVersionConstantRequest { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), }; gagvr::OperatingSystemVersionConstant expectedResponse = new gagvr::OperatingSystemVersionConstant { - ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + ResourceNameAsOperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), + OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, Id = -6774108720365892680L, - OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromOperatingSystemVersionConstant("[OPERATING_SYSTEM_VERSION_CONSTANT]"), + OperatingSystemVersionConstantName = gagvr::OperatingSystemVersionConstantName.FromCriterion("[CRITERION_ID]"), OsMajorVersion = -1997824152, OsMinorVersion = -1302821028, - OperatorType = gagve::OperatingSystemVersionOperatorTypeEnum.Types.OperatingSystemVersionOperatorType.EqualsTo, }; mockGrpcClient.Setup(x => x.GetOperatingSystemVersionConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); OperatingSystemVersionConstantServiceClient client = new OperatingSystemVersionConstantServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs b/tests/V6/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs similarity index 83% rename from tests/V2/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs rename to tests/V6/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs index 1064f0e77..4a0fa8731 100644 --- a/tests/V2/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs +++ b/tests/V6/Services/PaidOrganicSearchTermViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedPaidOrganicSearchTermViewServiceClientTest @@ -34,11 +34,11 @@ public void GetPaidOrganicSearchTermViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetPaidOrganicSearchTermViewRequest request = new GetPaidOrganicSearchTermViewRequest { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), }; gagvr::PaidOrganicSearchTermView expectedResponse = new gagvr::PaidOrganicSearchTermView { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), SearchTerm = "search_term6c01a1df", }; mockGrpcClient.Setup(x => x.GetPaidOrganicSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -54,11 +54,11 @@ public void GetPaidOrganicSearchTermViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetPaidOrganicSearchTermViewRequest request = new GetPaidOrganicSearchTermViewRequest { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), }; gagvr::PaidOrganicSearchTermView expectedResponse = new gagvr::PaidOrganicSearchTermView { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), SearchTerm = "search_term6c01a1df", }; mockGrpcClient.Setup(x => x.GetPaidOrganicSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -76,11 +76,11 @@ public void GetPaidOrganicSearchTermView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetPaidOrganicSearchTermViewRequest request = new GetPaidOrganicSearchTermViewRequest { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), }; gagvr::PaidOrganicSearchTermView expectedResponse = new gagvr::PaidOrganicSearchTermView { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), SearchTerm = "search_term6c01a1df", }; mockGrpcClient.Setup(x => x.GetPaidOrganicSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -96,11 +96,11 @@ public void GetPaidOrganicSearchTermView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetPaidOrganicSearchTermViewRequest request = new GetPaidOrganicSearchTermViewRequest { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), }; gagvr::PaidOrganicSearchTermView expectedResponse = new gagvr::PaidOrganicSearchTermView { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), SearchTerm = "search_term6c01a1df", }; mockGrpcClient.Setup(x => x.GetPaidOrganicSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -118,11 +118,11 @@ public void GetPaidOrganicSearchTermViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetPaidOrganicSearchTermViewRequest request = new GetPaidOrganicSearchTermViewRequest { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), }; gagvr::PaidOrganicSearchTermView expectedResponse = new gagvr::PaidOrganicSearchTermView { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), SearchTerm = "search_term6c01a1df", }; mockGrpcClient.Setup(x => x.GetPaidOrganicSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); @@ -138,11 +138,11 @@ public void GetPaidOrganicSearchTermViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetPaidOrganicSearchTermViewRequest request = new GetPaidOrganicSearchTermViewRequest { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), }; gagvr::PaidOrganicSearchTermView expectedResponse = new gagvr::PaidOrganicSearchTermView { - ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerPaidOrganicSearchTermView("[CUSTOMER]", "[PAID_ORGANIC_SEARCH_TERM_VIEW]"), + ResourceNameAsPaidOrganicSearchTermViewName = gagvr::PaidOrganicSearchTermViewName.FromCustomerCampaignAdGroupBase64SearchTerm("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[BASE64_SEARCH_TERM]"), SearchTerm = "search_term6c01a1df", }; mockGrpcClient.Setup(x => x.GetPaidOrganicSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/ParentalStatusViewServiceClientTest.g.cs b/tests/V6/Services/ParentalStatusViewServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/ParentalStatusViewServiceClientTest.g.cs rename to tests/V6/Services/ParentalStatusViewServiceClientTest.g.cs index df0dd94fd..d1d07d9d0 100644 --- a/tests/V2/Services/ParentalStatusViewServiceClientTest.g.cs +++ b/tests/V6/Services/ParentalStatusViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedParentalStatusViewServiceClientTest @@ -34,11 +34,11 @@ public void GetParentalStatusViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetParentalStatusViewRequest request = new GetParentalStatusViewRequest { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ParentalStatusView expectedResponse = new gagvr::ParentalStatusView { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetParentalStatusView(request, moq::It.IsAny())).Returns(expectedResponse); ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetParentalStatusViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetParentalStatusViewRequest request = new GetParentalStatusViewRequest { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ParentalStatusView expectedResponse = new gagvr::ParentalStatusView { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetParentalStatusViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetParentalStatusView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetParentalStatusViewRequest request = new GetParentalStatusViewRequest { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ParentalStatusView expectedResponse = new gagvr::ParentalStatusView { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetParentalStatusView(request, moq::It.IsAny())).Returns(expectedResponse); ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetParentalStatusView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetParentalStatusViewRequest request = new GetParentalStatusViewRequest { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ParentalStatusView expectedResponse = new gagvr::ParentalStatusView { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetParentalStatusViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetParentalStatusViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetParentalStatusViewRequest request = new GetParentalStatusViewRequest { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ParentalStatusView expectedResponse = new gagvr::ParentalStatusView { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetParentalStatusView(request, moq::It.IsAny())).Returns(expectedResponse); ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetParentalStatusViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetParentalStatusViewRequest request = new GetParentalStatusViewRequest { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::ParentalStatusView expectedResponse = new gagvr::ParentalStatusView { - ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerParentalStatusView("[CUSTOMER]", "[PARENTAL_STATUS_VIEW]"), + ResourceNameAsParentalStatusViewName = gagvr::ParentalStatusViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetParentalStatusViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ParentalStatusViewServiceClient client = new ParentalStatusViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/PaymentsAccountServiceClientTest.g.cs b/tests/V6/Services/PaymentsAccountServiceClientTest.g.cs similarity index 97% rename from tests/V2/Services/PaymentsAccountServiceClientTest.g.cs rename to tests/V6/Services/PaymentsAccountServiceClientTest.g.cs index 2b8a7c9ab..bc488c2ae 100644 --- a/tests/V2/Services/PaymentsAccountServiceClientTest.g.cs +++ b/tests/V6/Services/PaymentsAccountServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedPaymentsAccountServiceClientTest diff --git a/tests/V2/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs b/tests/V6/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs similarity index 86% rename from tests/V2/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs rename to tests/V6/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs index 21d008b1a..edf3e993a 100644 --- a/tests/V2/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs +++ b/tests/V6/Services/ProductBiddingCategoryConstantServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedProductBiddingCategoryConstantServiceClientTest @@ -35,16 +35,16 @@ public void GetProductBiddingCategoryConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductBiddingCategoryConstantRequest request = new GetProductBiddingCategoryConstantRequest { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), }; gagvr::ProductBiddingCategoryConstant expectedResponse = new gagvr::ProductBiddingCategoryConstant { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), - Id = -6774108720365892680L, - CountryCode = "country_code8debec55", - ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), Level = gagve::ProductBiddingCategoryLevelEnum.Types.ProductBiddingCategoryLevel.Unknown, Status = gagve::ProductBiddingCategoryStatusEnum.Types.ProductBiddingCategoryStatus.Active, + Id = -6774108720365892680L, + CountryCode = "country_code8debec55", + ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), LanguageCode = "language_code2f6c7160", LocalizedName = "localized_namefc402dfa", }; @@ -61,16 +61,16 @@ public void GetProductBiddingCategoryConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductBiddingCategoryConstantRequest request = new GetProductBiddingCategoryConstantRequest { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), }; gagvr::ProductBiddingCategoryConstant expectedResponse = new gagvr::ProductBiddingCategoryConstant { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), - Id = -6774108720365892680L, - CountryCode = "country_code8debec55", - ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), Level = gagve::ProductBiddingCategoryLevelEnum.Types.ProductBiddingCategoryLevel.Unknown, Status = gagve::ProductBiddingCategoryStatusEnum.Types.ProductBiddingCategoryStatus.Active, + Id = -6774108720365892680L, + CountryCode = "country_code8debec55", + ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), LanguageCode = "language_code2f6c7160", LocalizedName = "localized_namefc402dfa", }; @@ -89,16 +89,16 @@ public void GetProductBiddingCategoryConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductBiddingCategoryConstantRequest request = new GetProductBiddingCategoryConstantRequest { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), }; gagvr::ProductBiddingCategoryConstant expectedResponse = new gagvr::ProductBiddingCategoryConstant { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), - Id = -6774108720365892680L, - CountryCode = "country_code8debec55", - ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), Level = gagve::ProductBiddingCategoryLevelEnum.Types.ProductBiddingCategoryLevel.Unknown, Status = gagve::ProductBiddingCategoryStatusEnum.Types.ProductBiddingCategoryStatus.Active, + Id = -6774108720365892680L, + CountryCode = "country_code8debec55", + ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), LanguageCode = "language_code2f6c7160", LocalizedName = "localized_namefc402dfa", }; @@ -115,16 +115,16 @@ public void GetProductBiddingCategoryConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductBiddingCategoryConstantRequest request = new GetProductBiddingCategoryConstantRequest { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), }; gagvr::ProductBiddingCategoryConstant expectedResponse = new gagvr::ProductBiddingCategoryConstant { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), - Id = -6774108720365892680L, - CountryCode = "country_code8debec55", - ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), Level = gagve::ProductBiddingCategoryLevelEnum.Types.ProductBiddingCategoryLevel.Unknown, Status = gagve::ProductBiddingCategoryStatusEnum.Types.ProductBiddingCategoryStatus.Active, + Id = -6774108720365892680L, + CountryCode = "country_code8debec55", + ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), LanguageCode = "language_code2f6c7160", LocalizedName = "localized_namefc402dfa", }; @@ -143,16 +143,16 @@ public void GetProductBiddingCategoryConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductBiddingCategoryConstantRequest request = new GetProductBiddingCategoryConstantRequest { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), }; gagvr::ProductBiddingCategoryConstant expectedResponse = new gagvr::ProductBiddingCategoryConstant { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), - Id = -6774108720365892680L, - CountryCode = "country_code8debec55", - ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), Level = gagve::ProductBiddingCategoryLevelEnum.Types.ProductBiddingCategoryLevel.Unknown, Status = gagve::ProductBiddingCategoryStatusEnum.Types.ProductBiddingCategoryStatus.Active, + Id = -6774108720365892680L, + CountryCode = "country_code8debec55", + ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), LanguageCode = "language_code2f6c7160", LocalizedName = "localized_namefc402dfa", }; @@ -169,16 +169,16 @@ public void GetProductBiddingCategoryConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductBiddingCategoryConstantRequest request = new GetProductBiddingCategoryConstantRequest { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), }; gagvr::ProductBiddingCategoryConstant expectedResponse = new gagvr::ProductBiddingCategoryConstant { - ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), - Id = -6774108720365892680L, - CountryCode = "country_code8debec55", - ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromProductBiddingCategoryConstant("[PRODUCT_BIDDING_CATEGORY_CONSTANT]"), + ResourceNameAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), Level = gagve::ProductBiddingCategoryLevelEnum.Types.ProductBiddingCategoryLevel.Unknown, Status = gagve::ProductBiddingCategoryStatusEnum.Types.ProductBiddingCategoryStatus.Active, + Id = -6774108720365892680L, + CountryCode = "country_code8debec55", + ProductBiddingCategoryConstantParentAsProductBiddingCategoryConstantName = gagvr::ProductBiddingCategoryConstantName.FromCountryCodeLevelId("[COUNTRY_CODE]", "[LEVEL]", "[ID]"), LanguageCode = "language_code2f6c7160", LocalizedName = "localized_namefc402dfa", }; diff --git a/tests/V2/Services/ProductGroupViewServiceClientTest.g.cs b/tests/V6/Services/ProductGroupViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/ProductGroupViewServiceClientTest.g.cs rename to tests/V6/Services/ProductGroupViewServiceClientTest.g.cs index aedb169a3..380d29381 100644 --- a/tests/V2/Services/ProductGroupViewServiceClientTest.g.cs +++ b/tests/V6/Services/ProductGroupViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedProductGroupViewServiceClientTest @@ -34,11 +34,11 @@ public void GetProductGroupViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductGroupViewRequest request = new GetProductGroupViewRequest { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; gagvr::ProductGroupView expectedResponse = new gagvr::ProductGroupView { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetProductGroupView(request, moq::It.IsAny())).Returns(expectedResponse); ProductGroupViewServiceClient client = new ProductGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetProductGroupViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductGroupViewRequest request = new GetProductGroupViewRequest { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; gagvr::ProductGroupView expectedResponse = new gagvr::ProductGroupView { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetProductGroupViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ProductGroupViewServiceClient client = new ProductGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetProductGroupView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductGroupViewRequest request = new GetProductGroupViewRequest { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; gagvr::ProductGroupView expectedResponse = new gagvr::ProductGroupView { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetProductGroupView(request, moq::It.IsAny())).Returns(expectedResponse); ProductGroupViewServiceClient client = new ProductGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetProductGroupView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductGroupViewRequest request = new GetProductGroupViewRequest { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; gagvr::ProductGroupView expectedResponse = new gagvr::ProductGroupView { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetProductGroupViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ProductGroupViewServiceClient client = new ProductGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetProductGroupViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductGroupViewRequest request = new GetProductGroupViewRequest { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; gagvr::ProductGroupView expectedResponse = new gagvr::ProductGroupView { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetProductGroupView(request, moq::It.IsAny())).Returns(expectedResponse); ProductGroupViewServiceClient client = new ProductGroupViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetProductGroupViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetProductGroupViewRequest request = new GetProductGroupViewRequest { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; gagvr::ProductGroupView expectedResponse = new gagvr::ProductGroupView { - ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerProductGroupView("[CUSTOMER]", "[PRODUCT_GROUP_VIEW]"), + ResourceNameAsProductGroupViewName = gagvr::ProductGroupViewName.FromCustomerAdgroupCriterion("[CUSTOMER_ID]", "[ADGROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetProductGroupViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ProductGroupViewServiceClient client = new ProductGroupViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/ReachPlanServiceClientTest.g.cs b/tests/V6/Services/ReachPlanServiceClientTest.g.cs similarity index 99% rename from tests/V2/Services/ReachPlanServiceClientTest.g.cs rename to tests/V6/Services/ReachPlanServiceClientTest.g.cs index 75b24a116..7b5dd1dca 100644 --- a/tests/V2/Services/ReachPlanServiceClientTest.g.cs +++ b/tests/V6/Services/ReachPlanServiceClientTest.g.cs @@ -20,9 +20,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedReachPlanServiceClientTest @@ -166,10 +166,10 @@ public void GenerateProductMixIdeasRequestObject() GenerateProductMixIdeasRequest request = new GenerateProductMixIdeasRequest { CustomerId = "customer_id3b3724cb", + Preferences = new Preferences(), PlannableLocationId = "plannable_location_idbae428fa", CurrencyCode = "currency_code7f81e352", BudgetMicros = 6302061979031921068L, - Preferences = new Preferences(), }; GenerateProductMixIdeasResponse expectedResponse = new GenerateProductMixIdeasResponse { @@ -192,10 +192,10 @@ public void GenerateProductMixIdeasRequestObject() GenerateProductMixIdeasRequest request = new GenerateProductMixIdeasRequest { CustomerId = "customer_id3b3724cb", + Preferences = new Preferences(), PlannableLocationId = "plannable_location_idbae428fa", CurrencyCode = "currency_code7f81e352", BudgetMicros = 6302061979031921068L, - Preferences = new Preferences(), }; GenerateProductMixIdeasResponse expectedResponse = new GenerateProductMixIdeasResponse { @@ -272,15 +272,16 @@ public void GenerateReachForecastRequestObject() GenerateReachForecastRequest request = new GenerateReachForecastRequest { CustomerId = "customer_id3b3724cb", - CurrencyCode = "currency_code7f81e352", CampaignDuration = new CampaignDuration(), - CookieFrequencyCap = 1624044206, - MinEffectiveFrequency = -519821093, Targeting = new Targeting(), PlannedProducts = { new PlannedProduct(), }, + CookieFrequencyCapSetting = new FrequencyCap(), + CurrencyCode = "currency_code7f81e352", + CookieFrequencyCap = 1624044206, + MinEffectiveFrequency = -519821093, }; GenerateReachForecastResponse expectedResponse = new GenerateReachForecastResponse { @@ -301,15 +302,16 @@ public void GenerateReachForecastRequestObject() GenerateReachForecastRequest request = new GenerateReachForecastRequest { CustomerId = "customer_id3b3724cb", - CurrencyCode = "currency_code7f81e352", CampaignDuration = new CampaignDuration(), - CookieFrequencyCap = 1624044206, - MinEffectiveFrequency = -519821093, Targeting = new Targeting(), PlannedProducts = { new PlannedProduct(), }, + CookieFrequencyCapSetting = new FrequencyCap(), + CurrencyCode = "currency_code7f81e352", + CookieFrequencyCap = 1624044206, + MinEffectiveFrequency = -519821093, }; GenerateReachForecastResponse expectedResponse = new GenerateReachForecastResponse { diff --git a/tests/V2/Services/RecommendationServiceClientTest.g.cs b/tests/V6/Services/RecommendationServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/RecommendationServiceClientTest.g.cs rename to tests/V6/Services/RecommendationServiceClientTest.g.cs index e8a352007..5e221424f 100644 --- a/tests/V2/Services/RecommendationServiceClientTest.g.cs +++ b/tests/V6/Services/RecommendationServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedRecommendationServiceClientTest @@ -36,23 +36,19 @@ public void GetRecommendationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRecommendationRequest request = new GetRecommendationRequest { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), }; gagvr::Recommendation expectedResponse = new gagvr::Recommendation { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), - Type = gagve::RecommendationTypeEnum.Types.RecommendationType.EnhancedCpcOptIn, + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), + Type = gagve::RecommendationTypeEnum.Types.RecommendationType.MaximizeClicksOptIn, Impact = new gagvr::Recommendation.Types.RecommendationImpact(), CampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), KeywordRecommendation = new gagvr::Recommendation.Types.KeywordRecommendation(), TextAdRecommendation = new gagvr::Recommendation.Types.TextAdRecommendation(), TargetCpaOptInRecommendation = new gagvr::Recommendation.Types.TargetCpaOptInRecommendation(), MaximizeConversionsOptInRecommendation = new gagvr::Recommendation.Types.MaximizeConversionsOptInRecommendation(), EnhancedCpcOptInRecommendation = new gagvr::Recommendation.Types.EnhancedCpcOptInRecommendation(), - Dismissed = true, SearchPartnersOptInRecommendation = new gagvr::Recommendation.Types.SearchPartnersOptInRecommendation(), MaximizeClicksOptInRecommendation = new gagvr::Recommendation.Types.MaximizeClicksOptInRecommendation(), OptimizeAdRotationRecommendation = new gagvr::Recommendation.Types.OptimizeAdRotationRecommendation(), @@ -61,6 +57,12 @@ public void GetRecommendationRequestObject() CallExtensionRecommendation = new gagvr::Recommendation.Types.CallExtensionRecommendation(), KeywordMatchTypeRecommendation = new gagvr::Recommendation.Types.KeywordMatchTypeRecommendation(), MoveUnusedBudgetRecommendation = new gagvr::Recommendation.Types.MoveUnusedBudgetRecommendation(), + ForecastingCampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), + TargetRoasOptInRecommendation = new gagvr::Recommendation.Types.TargetRoasOptInRecommendation(), + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Dismissed = true, }; mockGrpcClient.Setup(x => x.GetRecommendation(request, moq::It.IsAny())).Returns(expectedResponse); RecommendationServiceClient client = new RecommendationServiceClientImpl(mockGrpcClient.Object, null); @@ -75,23 +77,19 @@ public void GetRecommendationRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRecommendationRequest request = new GetRecommendationRequest { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), }; gagvr::Recommendation expectedResponse = new gagvr::Recommendation { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), - Type = gagve::RecommendationTypeEnum.Types.RecommendationType.EnhancedCpcOptIn, + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), + Type = gagve::RecommendationTypeEnum.Types.RecommendationType.MaximizeClicksOptIn, Impact = new gagvr::Recommendation.Types.RecommendationImpact(), CampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), KeywordRecommendation = new gagvr::Recommendation.Types.KeywordRecommendation(), TextAdRecommendation = new gagvr::Recommendation.Types.TextAdRecommendation(), TargetCpaOptInRecommendation = new gagvr::Recommendation.Types.TargetCpaOptInRecommendation(), MaximizeConversionsOptInRecommendation = new gagvr::Recommendation.Types.MaximizeConversionsOptInRecommendation(), EnhancedCpcOptInRecommendation = new gagvr::Recommendation.Types.EnhancedCpcOptInRecommendation(), - Dismissed = true, SearchPartnersOptInRecommendation = new gagvr::Recommendation.Types.SearchPartnersOptInRecommendation(), MaximizeClicksOptInRecommendation = new gagvr::Recommendation.Types.MaximizeClicksOptInRecommendation(), OptimizeAdRotationRecommendation = new gagvr::Recommendation.Types.OptimizeAdRotationRecommendation(), @@ -100,6 +98,12 @@ public void GetRecommendationRequestObject() CallExtensionRecommendation = new gagvr::Recommendation.Types.CallExtensionRecommendation(), KeywordMatchTypeRecommendation = new gagvr::Recommendation.Types.KeywordMatchTypeRecommendation(), MoveUnusedBudgetRecommendation = new gagvr::Recommendation.Types.MoveUnusedBudgetRecommendation(), + ForecastingCampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), + TargetRoasOptInRecommendation = new gagvr::Recommendation.Types.TargetRoasOptInRecommendation(), + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Dismissed = true, }; mockGrpcClient.Setup(x => x.GetRecommendationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); RecommendationServiceClient client = new RecommendationServiceClientImpl(mockGrpcClient.Object, null); @@ -116,23 +120,19 @@ public void GetRecommendation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRecommendationRequest request = new GetRecommendationRequest { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), }; gagvr::Recommendation expectedResponse = new gagvr::Recommendation { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), - Type = gagve::RecommendationTypeEnum.Types.RecommendationType.EnhancedCpcOptIn, + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), + Type = gagve::RecommendationTypeEnum.Types.RecommendationType.MaximizeClicksOptIn, Impact = new gagvr::Recommendation.Types.RecommendationImpact(), CampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), KeywordRecommendation = new gagvr::Recommendation.Types.KeywordRecommendation(), TextAdRecommendation = new gagvr::Recommendation.Types.TextAdRecommendation(), TargetCpaOptInRecommendation = new gagvr::Recommendation.Types.TargetCpaOptInRecommendation(), MaximizeConversionsOptInRecommendation = new gagvr::Recommendation.Types.MaximizeConversionsOptInRecommendation(), EnhancedCpcOptInRecommendation = new gagvr::Recommendation.Types.EnhancedCpcOptInRecommendation(), - Dismissed = true, SearchPartnersOptInRecommendation = new gagvr::Recommendation.Types.SearchPartnersOptInRecommendation(), MaximizeClicksOptInRecommendation = new gagvr::Recommendation.Types.MaximizeClicksOptInRecommendation(), OptimizeAdRotationRecommendation = new gagvr::Recommendation.Types.OptimizeAdRotationRecommendation(), @@ -141,6 +141,12 @@ public void GetRecommendation() CallExtensionRecommendation = new gagvr::Recommendation.Types.CallExtensionRecommendation(), KeywordMatchTypeRecommendation = new gagvr::Recommendation.Types.KeywordMatchTypeRecommendation(), MoveUnusedBudgetRecommendation = new gagvr::Recommendation.Types.MoveUnusedBudgetRecommendation(), + ForecastingCampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), + TargetRoasOptInRecommendation = new gagvr::Recommendation.Types.TargetRoasOptInRecommendation(), + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Dismissed = true, }; mockGrpcClient.Setup(x => x.GetRecommendation(request, moq::It.IsAny())).Returns(expectedResponse); RecommendationServiceClient client = new RecommendationServiceClientImpl(mockGrpcClient.Object, null); @@ -155,23 +161,19 @@ public void GetRecommendation() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRecommendationRequest request = new GetRecommendationRequest { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), }; gagvr::Recommendation expectedResponse = new gagvr::Recommendation { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), - Type = gagve::RecommendationTypeEnum.Types.RecommendationType.EnhancedCpcOptIn, + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), + Type = gagve::RecommendationTypeEnum.Types.RecommendationType.MaximizeClicksOptIn, Impact = new gagvr::Recommendation.Types.RecommendationImpact(), CampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), KeywordRecommendation = new gagvr::Recommendation.Types.KeywordRecommendation(), TextAdRecommendation = new gagvr::Recommendation.Types.TextAdRecommendation(), TargetCpaOptInRecommendation = new gagvr::Recommendation.Types.TargetCpaOptInRecommendation(), MaximizeConversionsOptInRecommendation = new gagvr::Recommendation.Types.MaximizeConversionsOptInRecommendation(), EnhancedCpcOptInRecommendation = new gagvr::Recommendation.Types.EnhancedCpcOptInRecommendation(), - Dismissed = true, SearchPartnersOptInRecommendation = new gagvr::Recommendation.Types.SearchPartnersOptInRecommendation(), MaximizeClicksOptInRecommendation = new gagvr::Recommendation.Types.MaximizeClicksOptInRecommendation(), OptimizeAdRotationRecommendation = new gagvr::Recommendation.Types.OptimizeAdRotationRecommendation(), @@ -180,6 +182,12 @@ public void GetRecommendation() CallExtensionRecommendation = new gagvr::Recommendation.Types.CallExtensionRecommendation(), KeywordMatchTypeRecommendation = new gagvr::Recommendation.Types.KeywordMatchTypeRecommendation(), MoveUnusedBudgetRecommendation = new gagvr::Recommendation.Types.MoveUnusedBudgetRecommendation(), + ForecastingCampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), + TargetRoasOptInRecommendation = new gagvr::Recommendation.Types.TargetRoasOptInRecommendation(), + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Dismissed = true, }; mockGrpcClient.Setup(x => x.GetRecommendationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); RecommendationServiceClient client = new RecommendationServiceClientImpl(mockGrpcClient.Object, null); @@ -196,23 +204,19 @@ public void GetRecommendationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRecommendationRequest request = new GetRecommendationRequest { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), }; gagvr::Recommendation expectedResponse = new gagvr::Recommendation { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), - Type = gagve::RecommendationTypeEnum.Types.RecommendationType.EnhancedCpcOptIn, + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), + Type = gagve::RecommendationTypeEnum.Types.RecommendationType.MaximizeClicksOptIn, Impact = new gagvr::Recommendation.Types.RecommendationImpact(), CampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), KeywordRecommendation = new gagvr::Recommendation.Types.KeywordRecommendation(), TextAdRecommendation = new gagvr::Recommendation.Types.TextAdRecommendation(), TargetCpaOptInRecommendation = new gagvr::Recommendation.Types.TargetCpaOptInRecommendation(), MaximizeConversionsOptInRecommendation = new gagvr::Recommendation.Types.MaximizeConversionsOptInRecommendation(), EnhancedCpcOptInRecommendation = new gagvr::Recommendation.Types.EnhancedCpcOptInRecommendation(), - Dismissed = true, SearchPartnersOptInRecommendation = new gagvr::Recommendation.Types.SearchPartnersOptInRecommendation(), MaximizeClicksOptInRecommendation = new gagvr::Recommendation.Types.MaximizeClicksOptInRecommendation(), OptimizeAdRotationRecommendation = new gagvr::Recommendation.Types.OptimizeAdRotationRecommendation(), @@ -221,6 +225,12 @@ public void GetRecommendationResourceNames() CallExtensionRecommendation = new gagvr::Recommendation.Types.CallExtensionRecommendation(), KeywordMatchTypeRecommendation = new gagvr::Recommendation.Types.KeywordMatchTypeRecommendation(), MoveUnusedBudgetRecommendation = new gagvr::Recommendation.Types.MoveUnusedBudgetRecommendation(), + ForecastingCampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), + TargetRoasOptInRecommendation = new gagvr::Recommendation.Types.TargetRoasOptInRecommendation(), + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Dismissed = true, }; mockGrpcClient.Setup(x => x.GetRecommendation(request, moq::It.IsAny())).Returns(expectedResponse); RecommendationServiceClient client = new RecommendationServiceClientImpl(mockGrpcClient.Object, null); @@ -235,23 +245,19 @@ public void GetRecommendationResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRecommendationRequest request = new GetRecommendationRequest { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), }; gagvr::Recommendation expectedResponse = new gagvr::Recommendation { - ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER]", "[RECOMMENDATION]"), - Type = gagve::RecommendationTypeEnum.Types.RecommendationType.EnhancedCpcOptIn, + ResourceNameAsRecommendationName = gagvr::RecommendationName.FromCustomerRecommendation("[CUSTOMER_ID]", "[RECOMMENDATION_ID]"), + Type = gagve::RecommendationTypeEnum.Types.RecommendationType.MaximizeClicksOptIn, Impact = new gagvr::Recommendation.Types.RecommendationImpact(), CampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), - CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER]", "[CAMPAIGN_BUDGET]"), - CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER]", "[CAMPAIGN]"), - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), KeywordRecommendation = new gagvr::Recommendation.Types.KeywordRecommendation(), TextAdRecommendation = new gagvr::Recommendation.Types.TextAdRecommendation(), TargetCpaOptInRecommendation = new gagvr::Recommendation.Types.TargetCpaOptInRecommendation(), MaximizeConversionsOptInRecommendation = new gagvr::Recommendation.Types.MaximizeConversionsOptInRecommendation(), EnhancedCpcOptInRecommendation = new gagvr::Recommendation.Types.EnhancedCpcOptInRecommendation(), - Dismissed = true, SearchPartnersOptInRecommendation = new gagvr::Recommendation.Types.SearchPartnersOptInRecommendation(), MaximizeClicksOptInRecommendation = new gagvr::Recommendation.Types.MaximizeClicksOptInRecommendation(), OptimizeAdRotationRecommendation = new gagvr::Recommendation.Types.OptimizeAdRotationRecommendation(), @@ -260,6 +266,12 @@ public void GetRecommendationResourceNames() CallExtensionRecommendation = new gagvr::Recommendation.Types.CallExtensionRecommendation(), KeywordMatchTypeRecommendation = new gagvr::Recommendation.Types.KeywordMatchTypeRecommendation(), MoveUnusedBudgetRecommendation = new gagvr::Recommendation.Types.MoveUnusedBudgetRecommendation(), + ForecastingCampaignBudgetRecommendation = new gagvr::Recommendation.Types.CampaignBudgetRecommendation(), + TargetRoasOptInRecommendation = new gagvr::Recommendation.Types.TargetRoasOptInRecommendation(), + CampaignBudgetAsCampaignBudgetName = gagvr::CampaignBudgetName.FromCustomerCampaignBudget("[CUSTOMER_ID]", "[CAMPAIGN_BUDGET_ID]"), + CampaignAsCampaignName = gagvr::CampaignName.FromCustomerCampaign("[CUSTOMER_ID]", "[CAMPAIGN_ID]"), + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), + Dismissed = true, }; mockGrpcClient.Setup(x => x.GetRecommendationAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); RecommendationServiceClient client = new RecommendationServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/RemarketingActionServiceClientTest.g.cs b/tests/V6/Services/RemarketingActionServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/RemarketingActionServiceClientTest.g.cs rename to tests/V6/Services/RemarketingActionServiceClientTest.g.cs index 4c7f94f57..f34d8904b 100644 --- a/tests/V2/Services/RemarketingActionServiceClientTest.g.cs +++ b/tests/V6/Services/RemarketingActionServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedRemarketingActionServiceClientTest @@ -36,17 +36,17 @@ public void GetRemarketingActionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRemarketingActionRequest request = new GetRemarketingActionRequest { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; gagvr::RemarketingAction expectedResponse = new gagvr::RemarketingAction { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), - Id = -6774108720365892680L, - RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), TagSnippets = { new gagvc::TagSnippet(), }, + Id = -6774108720365892680L, + RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; mockGrpcClient.Setup(x => x.GetRemarketingAction(request, moq::It.IsAny())).Returns(expectedResponse); RemarketingActionServiceClient client = new RemarketingActionServiceClientImpl(mockGrpcClient.Object, null); @@ -61,17 +61,17 @@ public void GetRemarketingActionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRemarketingActionRequest request = new GetRemarketingActionRequest { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; gagvr::RemarketingAction expectedResponse = new gagvr::RemarketingAction { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), - Id = -6774108720365892680L, - RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), TagSnippets = { new gagvc::TagSnippet(), }, + Id = -6774108720365892680L, + RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; mockGrpcClient.Setup(x => x.GetRemarketingActionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); RemarketingActionServiceClient client = new RemarketingActionServiceClientImpl(mockGrpcClient.Object, null); @@ -88,17 +88,17 @@ public void GetRemarketingAction() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRemarketingActionRequest request = new GetRemarketingActionRequest { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; gagvr::RemarketingAction expectedResponse = new gagvr::RemarketingAction { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), - Id = -6774108720365892680L, - RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), TagSnippets = { new gagvc::TagSnippet(), }, + Id = -6774108720365892680L, + RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; mockGrpcClient.Setup(x => x.GetRemarketingAction(request, moq::It.IsAny())).Returns(expectedResponse); RemarketingActionServiceClient client = new RemarketingActionServiceClientImpl(mockGrpcClient.Object, null); @@ -113,17 +113,17 @@ public void GetRemarketingAction() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRemarketingActionRequest request = new GetRemarketingActionRequest { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; gagvr::RemarketingAction expectedResponse = new gagvr::RemarketingAction { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), - Id = -6774108720365892680L, - RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), TagSnippets = { new gagvc::TagSnippet(), }, + Id = -6774108720365892680L, + RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; mockGrpcClient.Setup(x => x.GetRemarketingActionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); RemarketingActionServiceClient client = new RemarketingActionServiceClientImpl(mockGrpcClient.Object, null); @@ -140,17 +140,17 @@ public void GetRemarketingActionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRemarketingActionRequest request = new GetRemarketingActionRequest { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; gagvr::RemarketingAction expectedResponse = new gagvr::RemarketingAction { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), - Id = -6774108720365892680L, - RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), TagSnippets = { new gagvc::TagSnippet(), }, + Id = -6774108720365892680L, + RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; mockGrpcClient.Setup(x => x.GetRemarketingAction(request, moq::It.IsAny())).Returns(expectedResponse); RemarketingActionServiceClient client = new RemarketingActionServiceClientImpl(mockGrpcClient.Object, null); @@ -165,17 +165,17 @@ public void GetRemarketingActionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetRemarketingActionRequest request = new GetRemarketingActionRequest { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; gagvr::RemarketingAction expectedResponse = new gagvr::RemarketingAction { - ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), - Id = -6774108720365892680L, - RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER]", "[REMARKETING_ACTION]"), + ResourceNameAsRemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), TagSnippets = { new gagvc::TagSnippet(), }, + Id = -6774108720365892680L, + RemarketingActionName = gagvr::RemarketingActionName.FromCustomerRemarketingAction("[CUSTOMER_ID]", "[REMARKETING_ACTION_ID]"), }; mockGrpcClient.Setup(x => x.GetRemarketingActionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); RemarketingActionServiceClient client = new RemarketingActionServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/SearchTermViewServiceClientTest.g.cs b/tests/V6/Services/SearchTermViewServiceClientTest.g.cs similarity index 84% rename from tests/V2/Services/SearchTermViewServiceClientTest.g.cs rename to tests/V6/Services/SearchTermViewServiceClientTest.g.cs index 1acbe970b..cf4bae670 100644 --- a/tests/V2/Services/SearchTermViewServiceClientTest.g.cs +++ b/tests/V6/Services/SearchTermViewServiceClientTest.g.cs @@ -14,17 +14,17 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedSearchTermViewServiceClientTest @@ -35,14 +35,14 @@ public void GetSearchTermViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSearchTermViewRequest request = new GetSearchTermViewRequest { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), }; gagvr::SearchTermView expectedResponse = new gagvr::SearchTermView { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), - SearchTerm = "search_term6c01a1df", - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), Status = gagve::SearchTermTargetingStatusEnum.Types.SearchTermTargetingStatus.Added, + SearchTerm = "search_term6c01a1df", + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); SearchTermViewServiceClient client = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -57,14 +57,14 @@ public void GetSearchTermViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSearchTermViewRequest request = new GetSearchTermViewRequest { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), }; gagvr::SearchTermView expectedResponse = new gagvr::SearchTermView { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), - SearchTerm = "search_term6c01a1df", - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), Status = gagve::SearchTermTargetingStatusEnum.Types.SearchTermTargetingStatus.Added, + SearchTerm = "search_term6c01a1df", + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); SearchTermViewServiceClient client = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -81,14 +81,14 @@ public void GetSearchTermView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSearchTermViewRequest request = new GetSearchTermViewRequest { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), }; gagvr::SearchTermView expectedResponse = new gagvr::SearchTermView { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), - SearchTerm = "search_term6c01a1df", - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), Status = gagve::SearchTermTargetingStatusEnum.Types.SearchTermTargetingStatus.Added, + SearchTerm = "search_term6c01a1df", + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); SearchTermViewServiceClient client = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -103,14 +103,14 @@ public void GetSearchTermView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSearchTermViewRequest request = new GetSearchTermViewRequest { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), }; gagvr::SearchTermView expectedResponse = new gagvr::SearchTermView { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), - SearchTerm = "search_term6c01a1df", - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), Status = gagve::SearchTermTargetingStatusEnum.Types.SearchTermTargetingStatus.Added, + SearchTerm = "search_term6c01a1df", + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); SearchTermViewServiceClient client = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -127,14 +127,14 @@ public void GetSearchTermViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSearchTermViewRequest request = new GetSearchTermViewRequest { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), }; gagvr::SearchTermView expectedResponse = new gagvr::SearchTermView { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), - SearchTerm = "search_term6c01a1df", - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), Status = gagve::SearchTermTargetingStatusEnum.Types.SearchTermTargetingStatus.Added, + SearchTerm = "search_term6c01a1df", + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetSearchTermView(request, moq::It.IsAny())).Returns(expectedResponse); SearchTermViewServiceClient client = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null); @@ -149,14 +149,14 @@ public void GetSearchTermViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSearchTermViewRequest request = new GetSearchTermViewRequest { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), }; gagvr::SearchTermView expectedResponse = new gagvr::SearchTermView { - ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerSearchTermView("[CUSTOMER]", "[SEARCH_TERM_VIEW]"), - SearchTerm = "search_term6c01a1df", - AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER]", "[AD_GROUP]"), + ResourceNameAsSearchTermViewName = gagvr::SearchTermViewName.FromCustomerCampaignAdGroupQuery("[CUSTOMER_ID]", "[CAMPAIGN_ID]", "[AD_GROUP_ID]", "[QUERY]"), Status = gagve::SearchTermTargetingStatusEnum.Types.SearchTermTargetingStatus.Added, + SearchTerm = "search_term6c01a1df", + AdGroupAsAdGroupName = gagvr::AdGroupName.FromCustomerAdGroup("[CUSTOMER_ID]", "[AD_GROUP_ID]"), }; mockGrpcClient.Setup(x => x.GetSearchTermViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); SearchTermViewServiceClient client = new SearchTermViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/SharedCriterionServiceClientTest.g.cs b/tests/V6/Services/SharedCriterionServiceClientTest.g.cs similarity index 90% rename from tests/V2/Services/SharedCriterionServiceClientTest.g.cs rename to tests/V6/Services/SharedCriterionServiceClientTest.g.cs index 6cd43e31c..21a5bd430 100644 --- a/tests/V2/Services/SharedCriterionServiceClientTest.g.cs +++ b/tests/V6/Services/SharedCriterionServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedSharedCriterionServiceClientTest @@ -37,19 +37,19 @@ public void GetSharedCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedCriterionRequest request = new GetSharedCriterionRequest { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), }; gagvr::SharedCriterion expectedResponse = new gagvr::SharedCriterion { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), Keyword = new gagvc::KeywordInfo(), - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), CriterionId = 8584655242409302840L, }; mockGrpcClient.Setup(x => x.GetSharedCriterion(request, moq::It.IsAny())).Returns(expectedResponse); @@ -65,19 +65,19 @@ public void GetSharedCriterionRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedCriterionRequest request = new GetSharedCriterionRequest { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), }; gagvr::SharedCriterion expectedResponse = new gagvr::SharedCriterion { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), Keyword = new gagvc::KeywordInfo(), - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), CriterionId = 8584655242409302840L, }; mockGrpcClient.Setup(x => x.GetSharedCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -95,19 +95,19 @@ public void GetSharedCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedCriterionRequest request = new GetSharedCriterionRequest { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), }; gagvr::SharedCriterion expectedResponse = new gagvr::SharedCriterion { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), Keyword = new gagvc::KeywordInfo(), - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), CriterionId = 8584655242409302840L, }; mockGrpcClient.Setup(x => x.GetSharedCriterion(request, moq::It.IsAny())).Returns(expectedResponse); @@ -123,19 +123,19 @@ public void GetSharedCriterion() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedCriterionRequest request = new GetSharedCriterionRequest { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), }; gagvr::SharedCriterion expectedResponse = new gagvr::SharedCriterion { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), Keyword = new gagvc::KeywordInfo(), - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), CriterionId = 8584655242409302840L, }; mockGrpcClient.Setup(x => x.GetSharedCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -153,19 +153,19 @@ public void GetSharedCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedCriterionRequest request = new GetSharedCriterionRequest { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), }; gagvr::SharedCriterion expectedResponse = new gagvr::SharedCriterion { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), Keyword = new gagvc::KeywordInfo(), - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), CriterionId = 8584655242409302840L, }; mockGrpcClient.Setup(x => x.GetSharedCriterion(request, moq::It.IsAny())).Returns(expectedResponse); @@ -181,19 +181,19 @@ public void GetSharedCriterionResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedCriterionRequest request = new GetSharedCriterionRequest { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), }; gagvr::SharedCriterion expectedResponse = new gagvr::SharedCriterion { - ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedCriterion("[CUSTOMER]", "[SHARED_CRITERION]"), - SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedCriterionName = gagvr::SharedCriterionName.FromCustomerSharedSetCriterion("[CUSTOMER_ID]", "[SHARED_SET_ID]", "[CRITERION_ID]"), Keyword = new gagvc::KeywordInfo(), - Type = gagve::CriterionTypeEnum.Types.CriterionType.Location, + Type = gagve::CriterionTypeEnum.Types.CriterionType.AdSchedule, YoutubeVideo = new gagvc::YouTubeVideoInfo(), YoutubeChannel = new gagvc::YouTubeChannelInfo(), Placement = new gagvc::PlacementInfo(), MobileAppCategory = new gagvc::MobileAppCategoryInfo(), MobileApplication = new gagvc::MobileApplicationInfo(), + SharedSetAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), CriterionId = 8584655242409302840L, }; mockGrpcClient.Setup(x => x.GetSharedCriterionAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/SharedSetServiceClientTest.g.cs b/tests/V6/Services/SharedSetServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/SharedSetServiceClientTest.g.cs rename to tests/V6/Services/SharedSetServiceClientTest.g.cs index 7bdfebe69..a39aee511 100644 --- a/tests/V2/Services/SharedSetServiceClientTest.g.cs +++ b/tests/V6/Services/SharedSetServiceClientTest.g.cs @@ -14,8 +14,8 @@ // Generated code. DO NOT EDIT! -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -23,9 +23,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedSharedSetServiceClientTest @@ -36,15 +36,15 @@ public void GetSharedSetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedSetRequest request = new GetSharedSetRequest { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; gagvr::SharedSet expectedResponse = new gagvr::SharedSet { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), - Id = -6774108720365892680L, + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), Type = gagve::SharedSetTypeEnum.Types.SharedSetType.NegativePlacements, - SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), Status = gagve::SharedSetStatusEnum.Types.SharedSetStatus.Enabled, + Id = -6774108720365892680L, + SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), MemberCount = -5151590354343439845L, ReferenceCount = -8440758895662409664L, }; @@ -61,15 +61,15 @@ public void GetSharedSetRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedSetRequest request = new GetSharedSetRequest { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; gagvr::SharedSet expectedResponse = new gagvr::SharedSet { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), - Id = -6774108720365892680L, + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), Type = gagve::SharedSetTypeEnum.Types.SharedSetType.NegativePlacements, - SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), Status = gagve::SharedSetStatusEnum.Types.SharedSetStatus.Enabled, + Id = -6774108720365892680L, + SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), MemberCount = -5151590354343439845L, ReferenceCount = -8440758895662409664L, }; @@ -88,15 +88,15 @@ public void GetSharedSet() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedSetRequest request = new GetSharedSetRequest { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; gagvr::SharedSet expectedResponse = new gagvr::SharedSet { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), - Id = -6774108720365892680L, + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), Type = gagve::SharedSetTypeEnum.Types.SharedSetType.NegativePlacements, - SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), Status = gagve::SharedSetStatusEnum.Types.SharedSetStatus.Enabled, + Id = -6774108720365892680L, + SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), MemberCount = -5151590354343439845L, ReferenceCount = -8440758895662409664L, }; @@ -113,15 +113,15 @@ public void GetSharedSet() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedSetRequest request = new GetSharedSetRequest { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; gagvr::SharedSet expectedResponse = new gagvr::SharedSet { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), - Id = -6774108720365892680L, + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), Type = gagve::SharedSetTypeEnum.Types.SharedSetType.NegativePlacements, - SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), Status = gagve::SharedSetStatusEnum.Types.SharedSetStatus.Enabled, + Id = -6774108720365892680L, + SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), MemberCount = -5151590354343439845L, ReferenceCount = -8440758895662409664L, }; @@ -140,15 +140,15 @@ public void GetSharedSetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedSetRequest request = new GetSharedSetRequest { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; gagvr::SharedSet expectedResponse = new gagvr::SharedSet { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), - Id = -6774108720365892680L, + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), Type = gagve::SharedSetTypeEnum.Types.SharedSetType.NegativePlacements, - SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), Status = gagve::SharedSetStatusEnum.Types.SharedSetStatus.Enabled, + Id = -6774108720365892680L, + SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), MemberCount = -5151590354343439845L, ReferenceCount = -8440758895662409664L, }; @@ -165,15 +165,15 @@ public void GetSharedSetResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetSharedSetRequest request = new GetSharedSetRequest { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), }; gagvr::SharedSet expectedResponse = new gagvr::SharedSet { - ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), - Id = -6774108720365892680L, + ResourceNameAsSharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), Type = gagve::SharedSetTypeEnum.Types.SharedSetType.NegativePlacements, - SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER]", "[SHARED_SET]"), Status = gagve::SharedSetStatusEnum.Types.SharedSetStatus.Enabled, + Id = -6774108720365892680L, + SharedSetName = gagvr::SharedSetName.FromCustomerSharedSet("[CUSTOMER_ID]", "[SHARED_SET_ID]"), MemberCount = -5151590354343439845L, ReferenceCount = -8440758895662409664L, }; @@ -199,6 +199,7 @@ public void MutateSharedSetsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateSharedSetsResponse expectedResponse = new MutateSharedSetsResponse { @@ -228,6 +229,7 @@ public void MutateSharedSetsRequestObject() }, PartialFailure = false, ValidateOnly = true, + ResponseContentType = gagve::ResponseContentTypeEnum.Types.ResponseContentType.ResourceNameOnly, }; MutateSharedSetsResponse expectedResponse = new MutateSharedSetsResponse { diff --git a/tests/V2/Services/ShoppingPerformanceViewServiceClientTest.g.cs b/tests/V6/Services/ShoppingPerformanceViewServiceClientTest.g.cs similarity index 91% rename from tests/V2/Services/ShoppingPerformanceViewServiceClientTest.g.cs rename to tests/V6/Services/ShoppingPerformanceViewServiceClientTest.g.cs index 7170faad3..efeca8047 100644 --- a/tests/V2/Services/ShoppingPerformanceViewServiceClientTest.g.cs +++ b/tests/V6/Services/ShoppingPerformanceViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedShoppingPerformanceViewServiceClientTest @@ -34,11 +34,11 @@ public void GetShoppingPerformanceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetShoppingPerformanceViewRequest request = new GetShoppingPerformanceViewRequest { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::ShoppingPerformanceView expectedResponse = new gagvr::ShoppingPerformanceView { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetShoppingPerformanceView(request, moq::It.IsAny())).Returns(expectedResponse); ShoppingPerformanceViewServiceClient client = new ShoppingPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetShoppingPerformanceViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetShoppingPerformanceViewRequest request = new GetShoppingPerformanceViewRequest { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::ShoppingPerformanceView expectedResponse = new gagvr::ShoppingPerformanceView { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetShoppingPerformanceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ShoppingPerformanceViewServiceClient client = new ShoppingPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetShoppingPerformanceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetShoppingPerformanceViewRequest request = new GetShoppingPerformanceViewRequest { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::ShoppingPerformanceView expectedResponse = new gagvr::ShoppingPerformanceView { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetShoppingPerformanceView(request, moq::It.IsAny())).Returns(expectedResponse); ShoppingPerformanceViewServiceClient client = new ShoppingPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetShoppingPerformanceView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetShoppingPerformanceViewRequest request = new GetShoppingPerformanceViewRequest { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::ShoppingPerformanceView expectedResponse = new gagvr::ShoppingPerformanceView { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetShoppingPerformanceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ShoppingPerformanceViewServiceClient client = new ShoppingPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetShoppingPerformanceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetShoppingPerformanceViewRequest request = new GetShoppingPerformanceViewRequest { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::ShoppingPerformanceView expectedResponse = new gagvr::ShoppingPerformanceView { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetShoppingPerformanceView(request, moq::It.IsAny())).Returns(expectedResponse); ShoppingPerformanceViewServiceClient client = new ShoppingPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetShoppingPerformanceViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetShoppingPerformanceViewRequest request = new GetShoppingPerformanceViewRequest { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; gagvr::ShoppingPerformanceView expectedResponse = new gagvr::ShoppingPerformanceView { - ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER]"), + ResourceNameAsShoppingPerformanceViewName = gagvr::ShoppingPerformanceViewName.FromCustomer("[CUSTOMER_ID]"), }; mockGrpcClient.Setup(x => x.GetShoppingPerformanceViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); ShoppingPerformanceViewServiceClient client = new ShoppingPerformanceViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/ThirdPartyAppAnalyticsLinkServiceClientTest.g.cs b/tests/V6/Services/ThirdPartyAppAnalyticsLinkServiceClientTest.g.cs new file mode 100644 index 000000000..013e74bf8 --- /dev/null +++ b/tests/V6/Services/ThirdPartyAppAnalyticsLinkServiceClientTest.g.cs @@ -0,0 +1,107 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvr = Google.Ads.GoogleAds.V6.Resources; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedThirdPartyAppAnalyticsLinkServiceClientTest + { + [Category("Smoke")][Test] + public void GetThirdPartyAppAnalyticsLinkRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetThirdPartyAppAnalyticsLinkRequest request = new GetThirdPartyAppAnalyticsLinkRequest + { + ResourceNameAsThirdPartyAppAnalyticsLinkName = gagvr::ThirdPartyAppAnalyticsLinkName.FromCustomerCustomerLink("[CUSTOMER_ID]", "[CUSTOMER_LINK_ID]"), + }; + gagvr::ThirdPartyAppAnalyticsLink expectedResponse = new gagvr::ThirdPartyAppAnalyticsLink + { + ResourceNameAsThirdPartyAppAnalyticsLinkName = gagvr::ThirdPartyAppAnalyticsLinkName.FromCustomerCustomerLink("[CUSTOMER_ID]", "[CUSTOMER_LINK_ID]"), + ShareableLinkId = "shareable_link_id5121ee42", + }; + mockGrpcClient.Setup(x => x.GetThirdPartyAppAnalyticsLink(request, moq::It.IsAny())).Returns(expectedResponse); + ThirdPartyAppAnalyticsLinkServiceClient client = new ThirdPartyAppAnalyticsLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::ThirdPartyAppAnalyticsLink response = client.GetThirdPartyAppAnalyticsLink(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task GetThirdPartyAppAnalyticsLinkRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + GetThirdPartyAppAnalyticsLinkRequest request = new GetThirdPartyAppAnalyticsLinkRequest + { + ResourceNameAsThirdPartyAppAnalyticsLinkName = gagvr::ThirdPartyAppAnalyticsLinkName.FromCustomerCustomerLink("[CUSTOMER_ID]", "[CUSTOMER_LINK_ID]"), + }; + gagvr::ThirdPartyAppAnalyticsLink expectedResponse = new gagvr::ThirdPartyAppAnalyticsLink + { + ResourceNameAsThirdPartyAppAnalyticsLinkName = gagvr::ThirdPartyAppAnalyticsLinkName.FromCustomerCustomerLink("[CUSTOMER_ID]", "[CUSTOMER_LINK_ID]"), + ShareableLinkId = "shareable_link_id5121ee42", + }; + mockGrpcClient.Setup(x => x.GetThirdPartyAppAnalyticsLinkAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + ThirdPartyAppAnalyticsLinkServiceClient client = new ThirdPartyAppAnalyticsLinkServiceClientImpl(mockGrpcClient.Object, null); + gagvr::ThirdPartyAppAnalyticsLink responseCallSettings = await client.GetThirdPartyAppAnalyticsLinkAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + gagvr::ThirdPartyAppAnalyticsLink responseCancellationToken = await client.GetThirdPartyAppAnalyticsLinkAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public void RegenerateShareableLinkIdRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + RegenerateShareableLinkIdRequest request = new RegenerateShareableLinkIdRequest + { + ResourceNameAsThirdPartyAppAnalyticsLinkName = gagvr::ThirdPartyAppAnalyticsLinkName.FromCustomerCustomerLink("[CUSTOMER_ID]", "[CUSTOMER_LINK_ID]"), + }; + RegenerateShareableLinkIdResponse expectedResponse = new RegenerateShareableLinkIdResponse { }; + mockGrpcClient.Setup(x => x.RegenerateShareableLinkId(request, moq::It.IsAny())).Returns(expectedResponse); + ThirdPartyAppAnalyticsLinkServiceClient client = new ThirdPartyAppAnalyticsLinkServiceClientImpl(mockGrpcClient.Object, null); + RegenerateShareableLinkIdResponse response = client.RegenerateShareableLinkId(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task RegenerateShareableLinkIdRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + RegenerateShareableLinkIdRequest request = new RegenerateShareableLinkIdRequest + { + ResourceNameAsThirdPartyAppAnalyticsLinkName = gagvr::ThirdPartyAppAnalyticsLinkName.FromCustomerCustomerLink("[CUSTOMER_ID]", "[CUSTOMER_LINK_ID]"), + }; + RegenerateShareableLinkIdResponse expectedResponse = new RegenerateShareableLinkIdResponse { }; + mockGrpcClient.Setup(x => x.RegenerateShareableLinkIdAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + ThirdPartyAppAnalyticsLinkServiceClient client = new ThirdPartyAppAnalyticsLinkServiceClientImpl(mockGrpcClient.Object, null); + RegenerateShareableLinkIdResponse responseCallSettings = await client.RegenerateShareableLinkIdAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + RegenerateShareableLinkIdResponse responseCancellationToken = await client.RegenerateShareableLinkIdAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/TopicConstantServiceClientTest.g.cs b/tests/V6/Services/TopicConstantServiceClientTest.g.cs similarity index 89% rename from tests/V2/Services/TopicConstantServiceClientTest.g.cs rename to tests/V6/Services/TopicConstantServiceClientTest.g.cs index 1bcd948b0..33204410e 100644 --- a/tests/V2/Services/TopicConstantServiceClientTest.g.cs +++ b/tests/V6/Services/TopicConstantServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedTopicConstantServiceClientTest @@ -34,13 +34,13 @@ public void GetTopicConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicConstantRequest request = new GetTopicConstantRequest { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), }; gagvr::TopicConstant expectedResponse = new gagvr::TopicConstant { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Id = -6774108720365892680L, - TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Path = { "path0b1dfed6", }, }; mockGrpcClient.Setup(x => x.GetTopicConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -56,13 +56,13 @@ public void GetTopicConstantRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicConstantRequest request = new GetTopicConstantRequest { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), }; gagvr::TopicConstant expectedResponse = new gagvr::TopicConstant { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Id = -6774108720365892680L, - TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Path = { "path0b1dfed6", }, }; mockGrpcClient.Setup(x => x.GetTopicConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -80,13 +80,13 @@ public void GetTopicConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicConstantRequest request = new GetTopicConstantRequest { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), }; gagvr::TopicConstant expectedResponse = new gagvr::TopicConstant { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Id = -6774108720365892680L, - TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Path = { "path0b1dfed6", }, }; mockGrpcClient.Setup(x => x.GetTopicConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -102,13 +102,13 @@ public void GetTopicConstant() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicConstantRequest request = new GetTopicConstantRequest { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), }; gagvr::TopicConstant expectedResponse = new gagvr::TopicConstant { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Id = -6774108720365892680L, - TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Path = { "path0b1dfed6", }, }; mockGrpcClient.Setup(x => x.GetTopicConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); @@ -126,13 +126,13 @@ public void GetTopicConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicConstantRequest request = new GetTopicConstantRequest { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), }; gagvr::TopicConstant expectedResponse = new gagvr::TopicConstant { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Id = -6774108720365892680L, - TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Path = { "path0b1dfed6", }, }; mockGrpcClient.Setup(x => x.GetTopicConstant(request, moq::It.IsAny())).Returns(expectedResponse); @@ -148,13 +148,13 @@ public void GetTopicConstantResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicConstantRequest request = new GetTopicConstantRequest { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), }; gagvr::TopicConstant expectedResponse = new gagvr::TopicConstant { - ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + ResourceNameAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Id = -6774108720365892680L, - TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopicConstant("[TOPIC_CONSTANT]"), + TopicConstantParentAsTopicConstantName = gagvr::TopicConstantName.FromTopic("[TOPIC_ID]"), Path = { "path0b1dfed6", }, }; mockGrpcClient.Setup(x => x.GetTopicConstantAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); diff --git a/tests/V2/Services/TopicViewServiceClientTest.g.cs b/tests/V6/Services/TopicViewServiceClientTest.g.cs similarity index 87% rename from tests/V2/Services/TopicViewServiceClientTest.g.cs rename to tests/V6/Services/TopicViewServiceClientTest.g.cs index d28920ae3..68752c6f3 100644 --- a/tests/V2/Services/TopicViewServiceClientTest.g.cs +++ b/tests/V6/Services/TopicViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedTopicViewServiceClientTest @@ -34,11 +34,11 @@ public void GetTopicViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicViewRequest request = new GetTopicViewRequest { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::TopicView expectedResponse = new gagvr::TopicView { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetTopicView(request, moq::It.IsAny())).Returns(expectedResponse); TopicViewServiceClient client = new TopicViewServiceClientImpl(mockGrpcClient.Object, null); @@ -53,11 +53,11 @@ public void GetTopicViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicViewRequest request = new GetTopicViewRequest { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::TopicView expectedResponse = new gagvr::TopicView { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetTopicViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); TopicViewServiceClient client = new TopicViewServiceClientImpl(mockGrpcClient.Object, null); @@ -74,11 +74,11 @@ public void GetTopicView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicViewRequest request = new GetTopicViewRequest { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::TopicView expectedResponse = new gagvr::TopicView { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetTopicView(request, moq::It.IsAny())).Returns(expectedResponse); TopicViewServiceClient client = new TopicViewServiceClientImpl(mockGrpcClient.Object, null); @@ -93,11 +93,11 @@ public void GetTopicView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicViewRequest request = new GetTopicViewRequest { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::TopicView expectedResponse = new gagvr::TopicView { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetTopicViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); TopicViewServiceClient client = new TopicViewServiceClientImpl(mockGrpcClient.Object, null); @@ -114,11 +114,11 @@ public void GetTopicViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicViewRequest request = new GetTopicViewRequest { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::TopicView expectedResponse = new gagvr::TopicView { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetTopicView(request, moq::It.IsAny())).Returns(expectedResponse); TopicViewServiceClient client = new TopicViewServiceClientImpl(mockGrpcClient.Object, null); @@ -133,11 +133,11 @@ public void GetTopicViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetTopicViewRequest request = new GetTopicViewRequest { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; gagvr::TopicView expectedResponse = new gagvr::TopicView { - ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerTopicView("[CUSTOMER]", "[TOPIC_VIEW]"), + ResourceNameAsTopicViewName = gagvr::TopicViewName.FromCustomerAdGroupCriterion("[CUSTOMER_ID]", "[AD_GROUP_ID]", "[CRITERION_ID]"), }; mockGrpcClient.Setup(x => x.GetTopicViewAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); TopicViewServiceClient client = new TopicViewServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V6/Services/UserDataServiceClientTest.g.cs b/tests/V6/Services/UserDataServiceClientTest.g.cs new file mode 100644 index 000000000..5a3472060 --- /dev/null +++ b/tests/V6/Services/UserDataServiceClientTest.g.cs @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated code. DO NOT EDIT! + +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using moq = Moq; +using st = System.Threading; +using stt = System.Threading.Tasks; +using NUnit.Framework; +using Google.Ads.GoogleAds.V6.Services; + +namespace Google.Ads.GoogleAds.Tests.V6.Services +{ + /// Generated unit tests. + public sealed class GeneratedUserDataServiceClientTest + { + [Category("Smoke")][Test] + public void UploadUserDataRequestObject() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + UploadUserDataRequest request = new UploadUserDataRequest + { + CustomerId = "customer_id3b3724cb", + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + Operations = + { + new UserDataOperation(), + }, + }; + UploadUserDataResponse expectedResponse = new UploadUserDataResponse + { + UploadDateTime = "upload_date_time763e3ebd", + ReceivedOperationsCount = -816258212, + }; + mockGrpcClient.Setup(x => x.UploadUserData(request, moq::It.IsAny())).Returns(expectedResponse); + UserDataServiceClient client = new UserDataServiceClientImpl(mockGrpcClient.Object, null); + UploadUserDataResponse response = client.UploadUserData(request); + Assert.AreEqual(expectedResponse, response); + mockGrpcClient.VerifyAll(); + } + + [Category("Smoke")][Test] + public async stt::Task UploadUserDataRequestObjectAsync() + { + moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); + UploadUserDataRequest request = new UploadUserDataRequest + { + CustomerId = "customer_id3b3724cb", + CustomerMatchUserListMetadata = new gagvc::CustomerMatchUserListMetadata(), + Operations = + { + new UserDataOperation(), + }, + }; + UploadUserDataResponse expectedResponse = new UploadUserDataResponse + { + UploadDateTime = "upload_date_time763e3ebd", + ReceivedOperationsCount = -816258212, + }; + mockGrpcClient.Setup(x => x.UploadUserDataAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); + UserDataServiceClient client = new UserDataServiceClientImpl(mockGrpcClient.Object, null); + UploadUserDataResponse responseCallSettings = await client.UploadUserDataAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); + Assert.AreEqual(expectedResponse, responseCallSettings); + UploadUserDataResponse responseCancellationToken = await client.UploadUserDataAsync(request, st::CancellationToken.None); + Assert.AreEqual(expectedResponse, responseCancellationToken); + mockGrpcClient.VerifyAll(); + } + } +} diff --git a/tests/V2/Services/UserInterestServiceClientTest.g.cs b/tests/V6/Services/UserInterestServiceClientTest.g.cs similarity index 85% rename from tests/V2/Services/UserInterestServiceClientTest.g.cs rename to tests/V6/Services/UserInterestServiceClientTest.g.cs index c00c3269f..c60537e9e 100644 --- a/tests/V2/Services/UserInterestServiceClientTest.g.cs +++ b/tests/V6/Services/UserInterestServiceClientTest.g.cs @@ -14,18 +14,18 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedUserInterestServiceClientTest @@ -36,20 +36,20 @@ public void GetUserInterestRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserInterestRequest request = new GetUserInterestRequest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), }; gagvr::UserInterest expectedResponse = new gagvr::UserInterest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), TaxonomyType = gagve::UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unknown, - UserInterestId = 3507346946980618534L, - UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - LaunchedToAll = true, Availabilities = { new gagvc::CriterionCategoryAvailability(), }, + UserInterestId = 3507346946980618534L, + UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + LaunchedToAll = true, }; mockGrpcClient.Setup(x => x.GetUserInterest(request, moq::It.IsAny())).Returns(expectedResponse); UserInterestServiceClient client = new UserInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -64,20 +64,20 @@ public void GetUserInterestRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserInterestRequest request = new GetUserInterestRequest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), }; gagvr::UserInterest expectedResponse = new gagvr::UserInterest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), TaxonomyType = gagve::UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unknown, - UserInterestId = 3507346946980618534L, - UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - LaunchedToAll = true, Availabilities = { new gagvc::CriterionCategoryAvailability(), }, + UserInterestId = 3507346946980618534L, + UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + LaunchedToAll = true, }; mockGrpcClient.Setup(x => x.GetUserInterestAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); UserInterestServiceClient client = new UserInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -94,20 +94,20 @@ public void GetUserInterest() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserInterestRequest request = new GetUserInterestRequest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), }; gagvr::UserInterest expectedResponse = new gagvr::UserInterest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), TaxonomyType = gagve::UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unknown, - UserInterestId = 3507346946980618534L, - UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - LaunchedToAll = true, Availabilities = { new gagvc::CriterionCategoryAvailability(), }, + UserInterestId = 3507346946980618534L, + UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + LaunchedToAll = true, }; mockGrpcClient.Setup(x => x.GetUserInterest(request, moq::It.IsAny())).Returns(expectedResponse); UserInterestServiceClient client = new UserInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -122,20 +122,20 @@ public void GetUserInterest() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserInterestRequest request = new GetUserInterestRequest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), }; gagvr::UserInterest expectedResponse = new gagvr::UserInterest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), TaxonomyType = gagve::UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unknown, - UserInterestId = 3507346946980618534L, - UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - LaunchedToAll = true, Availabilities = { new gagvc::CriterionCategoryAvailability(), }, + UserInterestId = 3507346946980618534L, + UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + LaunchedToAll = true, }; mockGrpcClient.Setup(x => x.GetUserInterestAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); UserInterestServiceClient client = new UserInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -152,20 +152,20 @@ public void GetUserInterestResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserInterestRequest request = new GetUserInterestRequest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), }; gagvr::UserInterest expectedResponse = new gagvr::UserInterest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), TaxonomyType = gagve::UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unknown, - UserInterestId = 3507346946980618534L, - UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - LaunchedToAll = true, Availabilities = { new gagvc::CriterionCategoryAvailability(), }, + UserInterestId = 3507346946980618534L, + UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + LaunchedToAll = true, }; mockGrpcClient.Setup(x => x.GetUserInterest(request, moq::It.IsAny())).Returns(expectedResponse); UserInterestServiceClient client = new UserInterestServiceClientImpl(mockGrpcClient.Object, null); @@ -180,20 +180,20 @@ public void GetUserInterestResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserInterestRequest request = new GetUserInterestRequest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), }; gagvr::UserInterest expectedResponse = new gagvr::UserInterest { - ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), + ResourceNameAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), TaxonomyType = gagve::UserInterestTaxonomyTypeEnum.Types.UserInterestTaxonomyType.Unknown, - UserInterestId = 3507346946980618534L, - UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER]", "[USER_INTEREST]"), - LaunchedToAll = true, Availabilities = { new gagvc::CriterionCategoryAvailability(), }, + UserInterestId = 3507346946980618534L, + UserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + UserInterestParentAsUserInterestName = gagvr::UserInterestName.FromCustomerUserInterest("[CUSTOMER_ID]", "[USER_INTEREST_ID]"), + LaunchedToAll = true, }; mockGrpcClient.Setup(x => x.GetUserInterestAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); UserInterestServiceClient client = new UserInterestServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/UserListServiceClientTest.g.cs b/tests/V6/Services/UserListServiceClientTest.g.cs similarity index 94% rename from tests/V2/Services/UserListServiceClientTest.g.cs rename to tests/V6/Services/UserListServiceClientTest.g.cs index 304ed57e1..f530e0a81 100644 --- a/tests/V2/Services/UserListServiceClientTest.g.cs +++ b/tests/V6/Services/UserListServiceClientTest.g.cs @@ -14,9 +14,9 @@ // Generated code. DO NOT EDIT! -using gagvc = Google.Ads.GoogleAds.V2.Common; -using gagve = Google.Ads.GoogleAds.V2.Enums; -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvc = Google.Ads.GoogleAds.V6.Common; +using gagve = Google.Ads.GoogleAds.V6.Enums; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using gr = Google.Rpc; using grpccore = Grpc.Core; @@ -24,9 +24,9 @@ using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedUserListServiceClientTest @@ -37,33 +37,34 @@ public void GetUserListRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserListRequest request = new GetUserListRequest { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; gagvr::UserList expectedResponse = new gagvr::UserList { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Id = -6774108720365892680L, - ReadOnly = false, - UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Description = "description2cf9da67", + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), MembershipStatus = gagve::UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open, - IntegrationCode = "integration_codeb56c28f6", - MembershipLifeSpan = 8593891943371112615L, - SizeForDisplay = -3774093290138442712L, SizeRangeForDisplay = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.Unknown, - SizeForSearch = 7931927642168968409L, SizeRangeForSearch = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.OneHundredThousandToThreeHundredThousand, Type = gagve::UserListTypeEnum.Types.UserListType.CrmBased, ClosingReason = gagve::UserListClosingReasonEnum.Types.UserListClosingReason.Unused, AccessReason = gagve::AccessReasonEnum.Types.AccessReason.Affiliated, AccountUserListStatus = gagve::UserListAccessStatusEnum.Types.UserListAccessStatus.Disabled, - EligibleForSearch = false, - EligibleForDisplay = true, CrmBasedUserList = new gagvc::CrmBasedUserListInfo(), SimilarUserList = new gagvc::SimilarUserListInfo(), RuleBasedUserList = new gagvc::RuleBasedUserListInfo(), LogicalUserList = new gagvc::LogicalUserListInfo(), BasicUserList = new gagvc::BasicUserListInfo(), + MatchRatePercentage = 696939998, + Id = -6774108720365892680L, + ReadOnly = false, + UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), + Description = "description2cf9da67", + IntegrationCode = "integration_codeb56c28f6", + MembershipLifeSpan = 8593891943371112615L, + SizeForDisplay = -3774093290138442712L, + SizeForSearch = 7931927642168968409L, + EligibleForSearch = false, + EligibleForDisplay = true, }; mockGrpcClient.Setup(x => x.GetUserList(request, moq::It.IsAny())).Returns(expectedResponse); UserListServiceClient client = new UserListServiceClientImpl(mockGrpcClient.Object, null); @@ -78,33 +79,34 @@ public void GetUserListRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserListRequest request = new GetUserListRequest { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; gagvr::UserList expectedResponse = new gagvr::UserList { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Id = -6774108720365892680L, - ReadOnly = false, - UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Description = "description2cf9da67", + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), MembershipStatus = gagve::UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open, - IntegrationCode = "integration_codeb56c28f6", - MembershipLifeSpan = 8593891943371112615L, - SizeForDisplay = -3774093290138442712L, SizeRangeForDisplay = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.Unknown, - SizeForSearch = 7931927642168968409L, SizeRangeForSearch = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.OneHundredThousandToThreeHundredThousand, Type = gagve::UserListTypeEnum.Types.UserListType.CrmBased, ClosingReason = gagve::UserListClosingReasonEnum.Types.UserListClosingReason.Unused, AccessReason = gagve::AccessReasonEnum.Types.AccessReason.Affiliated, AccountUserListStatus = gagve::UserListAccessStatusEnum.Types.UserListAccessStatus.Disabled, - EligibleForSearch = false, - EligibleForDisplay = true, CrmBasedUserList = new gagvc::CrmBasedUserListInfo(), SimilarUserList = new gagvc::SimilarUserListInfo(), RuleBasedUserList = new gagvc::RuleBasedUserListInfo(), LogicalUserList = new gagvc::LogicalUserListInfo(), BasicUserList = new gagvc::BasicUserListInfo(), + MatchRatePercentage = 696939998, + Id = -6774108720365892680L, + ReadOnly = false, + UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), + Description = "description2cf9da67", + IntegrationCode = "integration_codeb56c28f6", + MembershipLifeSpan = 8593891943371112615L, + SizeForDisplay = -3774093290138442712L, + SizeForSearch = 7931927642168968409L, + EligibleForSearch = false, + EligibleForDisplay = true, }; mockGrpcClient.Setup(x => x.GetUserListAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); UserListServiceClient client = new UserListServiceClientImpl(mockGrpcClient.Object, null); @@ -121,33 +123,34 @@ public void GetUserList() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserListRequest request = new GetUserListRequest { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; gagvr::UserList expectedResponse = new gagvr::UserList { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Id = -6774108720365892680L, - ReadOnly = false, - UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Description = "description2cf9da67", + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), MembershipStatus = gagve::UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open, - IntegrationCode = "integration_codeb56c28f6", - MembershipLifeSpan = 8593891943371112615L, - SizeForDisplay = -3774093290138442712L, SizeRangeForDisplay = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.Unknown, - SizeForSearch = 7931927642168968409L, SizeRangeForSearch = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.OneHundredThousandToThreeHundredThousand, Type = gagve::UserListTypeEnum.Types.UserListType.CrmBased, ClosingReason = gagve::UserListClosingReasonEnum.Types.UserListClosingReason.Unused, AccessReason = gagve::AccessReasonEnum.Types.AccessReason.Affiliated, AccountUserListStatus = gagve::UserListAccessStatusEnum.Types.UserListAccessStatus.Disabled, - EligibleForSearch = false, - EligibleForDisplay = true, CrmBasedUserList = new gagvc::CrmBasedUserListInfo(), SimilarUserList = new gagvc::SimilarUserListInfo(), RuleBasedUserList = new gagvc::RuleBasedUserListInfo(), LogicalUserList = new gagvc::LogicalUserListInfo(), BasicUserList = new gagvc::BasicUserListInfo(), + MatchRatePercentage = 696939998, + Id = -6774108720365892680L, + ReadOnly = false, + UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), + Description = "description2cf9da67", + IntegrationCode = "integration_codeb56c28f6", + MembershipLifeSpan = 8593891943371112615L, + SizeForDisplay = -3774093290138442712L, + SizeForSearch = 7931927642168968409L, + EligibleForSearch = false, + EligibleForDisplay = true, }; mockGrpcClient.Setup(x => x.GetUserList(request, moq::It.IsAny())).Returns(expectedResponse); UserListServiceClient client = new UserListServiceClientImpl(mockGrpcClient.Object, null); @@ -162,33 +165,34 @@ public void GetUserList() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserListRequest request = new GetUserListRequest { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; gagvr::UserList expectedResponse = new gagvr::UserList { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Id = -6774108720365892680L, - ReadOnly = false, - UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Description = "description2cf9da67", + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), MembershipStatus = gagve::UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open, - IntegrationCode = "integration_codeb56c28f6", - MembershipLifeSpan = 8593891943371112615L, - SizeForDisplay = -3774093290138442712L, SizeRangeForDisplay = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.Unknown, - SizeForSearch = 7931927642168968409L, SizeRangeForSearch = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.OneHundredThousandToThreeHundredThousand, Type = gagve::UserListTypeEnum.Types.UserListType.CrmBased, ClosingReason = gagve::UserListClosingReasonEnum.Types.UserListClosingReason.Unused, AccessReason = gagve::AccessReasonEnum.Types.AccessReason.Affiliated, AccountUserListStatus = gagve::UserListAccessStatusEnum.Types.UserListAccessStatus.Disabled, - EligibleForSearch = false, - EligibleForDisplay = true, CrmBasedUserList = new gagvc::CrmBasedUserListInfo(), SimilarUserList = new gagvc::SimilarUserListInfo(), RuleBasedUserList = new gagvc::RuleBasedUserListInfo(), LogicalUserList = new gagvc::LogicalUserListInfo(), BasicUserList = new gagvc::BasicUserListInfo(), + MatchRatePercentage = 696939998, + Id = -6774108720365892680L, + ReadOnly = false, + UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), + Description = "description2cf9da67", + IntegrationCode = "integration_codeb56c28f6", + MembershipLifeSpan = 8593891943371112615L, + SizeForDisplay = -3774093290138442712L, + SizeForSearch = 7931927642168968409L, + EligibleForSearch = false, + EligibleForDisplay = true, }; mockGrpcClient.Setup(x => x.GetUserListAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); UserListServiceClient client = new UserListServiceClientImpl(mockGrpcClient.Object, null); @@ -205,33 +209,34 @@ public void GetUserListResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserListRequest request = new GetUserListRequest { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; gagvr::UserList expectedResponse = new gagvr::UserList { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Id = -6774108720365892680L, - ReadOnly = false, - UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Description = "description2cf9da67", + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), MembershipStatus = gagve::UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open, - IntegrationCode = "integration_codeb56c28f6", - MembershipLifeSpan = 8593891943371112615L, - SizeForDisplay = -3774093290138442712L, SizeRangeForDisplay = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.Unknown, - SizeForSearch = 7931927642168968409L, SizeRangeForSearch = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.OneHundredThousandToThreeHundredThousand, Type = gagve::UserListTypeEnum.Types.UserListType.CrmBased, ClosingReason = gagve::UserListClosingReasonEnum.Types.UserListClosingReason.Unused, AccessReason = gagve::AccessReasonEnum.Types.AccessReason.Affiliated, AccountUserListStatus = gagve::UserListAccessStatusEnum.Types.UserListAccessStatus.Disabled, - EligibleForSearch = false, - EligibleForDisplay = true, CrmBasedUserList = new gagvc::CrmBasedUserListInfo(), SimilarUserList = new gagvc::SimilarUserListInfo(), RuleBasedUserList = new gagvc::RuleBasedUserListInfo(), LogicalUserList = new gagvc::LogicalUserListInfo(), BasicUserList = new gagvc::BasicUserListInfo(), + MatchRatePercentage = 696939998, + Id = -6774108720365892680L, + ReadOnly = false, + UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), + Description = "description2cf9da67", + IntegrationCode = "integration_codeb56c28f6", + MembershipLifeSpan = 8593891943371112615L, + SizeForDisplay = -3774093290138442712L, + SizeForSearch = 7931927642168968409L, + EligibleForSearch = false, + EligibleForDisplay = true, }; mockGrpcClient.Setup(x => x.GetUserList(request, moq::It.IsAny())).Returns(expectedResponse); UserListServiceClient client = new UserListServiceClientImpl(mockGrpcClient.Object, null); @@ -246,33 +251,34 @@ public void GetUserListResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserListRequest request = new GetUserListRequest { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), }; gagvr::UserList expectedResponse = new gagvr::UserList { - ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Id = -6774108720365892680L, - ReadOnly = false, - UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER]", "[USER_LIST]"), - Description = "description2cf9da67", + ResourceNameAsUserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), MembershipStatus = gagve::UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open, - IntegrationCode = "integration_codeb56c28f6", - MembershipLifeSpan = 8593891943371112615L, - SizeForDisplay = -3774093290138442712L, SizeRangeForDisplay = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.Unknown, - SizeForSearch = 7931927642168968409L, SizeRangeForSearch = gagve::UserListSizeRangeEnum.Types.UserListSizeRange.OneHundredThousandToThreeHundredThousand, Type = gagve::UserListTypeEnum.Types.UserListType.CrmBased, ClosingReason = gagve::UserListClosingReasonEnum.Types.UserListClosingReason.Unused, AccessReason = gagve::AccessReasonEnum.Types.AccessReason.Affiliated, AccountUserListStatus = gagve::UserListAccessStatusEnum.Types.UserListAccessStatus.Disabled, - EligibleForSearch = false, - EligibleForDisplay = true, CrmBasedUserList = new gagvc::CrmBasedUserListInfo(), SimilarUserList = new gagvc::SimilarUserListInfo(), RuleBasedUserList = new gagvc::RuleBasedUserListInfo(), LogicalUserList = new gagvc::LogicalUserListInfo(), BasicUserList = new gagvc::BasicUserListInfo(), + MatchRatePercentage = 696939998, + Id = -6774108720365892680L, + ReadOnly = false, + UserListName = gagvr::UserListName.FromCustomerUserList("[CUSTOMER_ID]", "[USER_LIST_ID]"), + Description = "description2cf9da67", + IntegrationCode = "integration_codeb56c28f6", + MembershipLifeSpan = 8593891943371112615L, + SizeForDisplay = -3774093290138442712L, + SizeForSearch = 7931927642168968409L, + EligibleForSearch = false, + EligibleForDisplay = true, }; mockGrpcClient.Setup(x => x.GetUserListAsync(request, moq::It.IsAny())).Returns(new grpccore::AsyncUnaryCall(stt::Task.FromResult(expectedResponse), null, null, null, null)); UserListServiceClient client = new UserListServiceClientImpl(mockGrpcClient.Object, null); diff --git a/tests/V2/Services/UserLocationViewServiceClientTest.g.cs b/tests/V6/Services/UserLocationViewServiceClientTest.g.cs similarity index 84% rename from tests/V2/Services/UserLocationViewServiceClientTest.g.cs rename to tests/V6/Services/UserLocationViewServiceClientTest.g.cs index 2a67e1b91..e4f772ccd 100644 --- a/tests/V2/Services/UserLocationViewServiceClientTest.g.cs +++ b/tests/V6/Services/UserLocationViewServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedUserLocationViewServiceClientTest @@ -34,11 +34,11 @@ public void GetUserLocationViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserLocationViewRequest request = new GetUserLocationViewRequest { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), }; gagvr::UserLocationView expectedResponse = new gagvr::UserLocationView { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), CountryCriterionId = 7801114990940938649L, TargetingLocation = false, }; @@ -55,11 +55,11 @@ public void GetUserLocationViewRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserLocationViewRequest request = new GetUserLocationViewRequest { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), }; gagvr::UserLocationView expectedResponse = new gagvr::UserLocationView { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), CountryCriterionId = 7801114990940938649L, TargetingLocation = false, }; @@ -78,11 +78,11 @@ public void GetUserLocationView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserLocationViewRequest request = new GetUserLocationViewRequest { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), }; gagvr::UserLocationView expectedResponse = new gagvr::UserLocationView { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), CountryCriterionId = 7801114990940938649L, TargetingLocation = false, }; @@ -99,11 +99,11 @@ public void GetUserLocationView() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserLocationViewRequest request = new GetUserLocationViewRequest { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), }; gagvr::UserLocationView expectedResponse = new gagvr::UserLocationView { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), CountryCriterionId = 7801114990940938649L, TargetingLocation = false, }; @@ -122,11 +122,11 @@ public void GetUserLocationViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserLocationViewRequest request = new GetUserLocationViewRequest { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), }; gagvr::UserLocationView expectedResponse = new gagvr::UserLocationView { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), CountryCriterionId = 7801114990940938649L, TargetingLocation = false, }; @@ -143,11 +143,11 @@ public void GetUserLocationViewResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetUserLocationViewRequest request = new GetUserLocationViewRequest { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), }; gagvr::UserLocationView expectedResponse = new gagvr::UserLocationView { - ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerUserLocationView("[CUSTOMER]", "[USER_LOCATION_VIEW]"), + ResourceNameAsUserLocationViewName = gagvr::UserLocationViewName.FromCustomerCountryCriterionIsTargetingLocation("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[IS_TARGETING_LOCATION]"), CountryCriterionId = 7801114990940938649L, TargetingLocation = false, }; diff --git a/tests/V2/Services/VideoServiceClientTest.g.cs b/tests/V6/Services/VideoServiceClientTest.g.cs similarity index 92% rename from tests/V2/Services/VideoServiceClientTest.g.cs rename to tests/V6/Services/VideoServiceClientTest.g.cs index e8abc4212..18a7f5a2d 100644 --- a/tests/V2/Services/VideoServiceClientTest.g.cs +++ b/tests/V6/Services/VideoServiceClientTest.g.cs @@ -14,16 +14,16 @@ // Generated code. DO NOT EDIT! -using gagvr = Google.Ads.GoogleAds.V2.Resources; +using gagvr = Google.Ads.GoogleAds.V6.Resources; using gaxgrpc = Google.Api.Gax.Grpc; using grpccore = Grpc.Core; using moq = Moq; using st = System.Threading; using stt = System.Threading.Tasks; using NUnit.Framework; -using Google.Ads.GoogleAds.V2.Services; +using Google.Ads.GoogleAds.V6.Services; -namespace Google.Ads.GoogleAds.Tests.V2.Services +namespace Google.Ads.GoogleAds.Tests.V6.Services { /// Generated unit tests. public sealed class GeneratedVideoServiceClientTest @@ -34,11 +34,11 @@ public void GetVideoRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetVideoRequest request = new GetVideoRequest { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), }; gagvr::Video expectedResponse = new gagvr::Video { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), Id = "id74b70bb8", ChannelId = "channel_id856ceb72", DurationMillis = 4964327688054496886L, @@ -57,11 +57,11 @@ public void GetVideoRequestObject() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetVideoRequest request = new GetVideoRequest { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), }; gagvr::Video expectedResponse = new gagvr::Video { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), Id = "id74b70bb8", ChannelId = "channel_id856ceb72", DurationMillis = 4964327688054496886L, @@ -82,11 +82,11 @@ public void GetVideo() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetVideoRequest request = new GetVideoRequest { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), }; gagvr::Video expectedResponse = new gagvr::Video { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), Id = "id74b70bb8", ChannelId = "channel_id856ceb72", DurationMillis = 4964327688054496886L, @@ -105,11 +105,11 @@ public void GetVideo() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetVideoRequest request = new GetVideoRequest { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), }; gagvr::Video expectedResponse = new gagvr::Video { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), Id = "id74b70bb8", ChannelId = "channel_id856ceb72", DurationMillis = 4964327688054496886L, @@ -130,11 +130,11 @@ public void GetVideoResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetVideoRequest request = new GetVideoRequest { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), }; gagvr::Video expectedResponse = new gagvr::Video { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), Id = "id74b70bb8", ChannelId = "channel_id856ceb72", DurationMillis = 4964327688054496886L, @@ -153,11 +153,11 @@ public void GetVideoResourceNames() moq::Mock mockGrpcClient = new moq::Mock(moq::MockBehavior.Strict); GetVideoRequest request = new GetVideoRequest { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), }; gagvr::Video expectedResponse = new gagvr::Video { - ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER]", "[VIDEO]"), + ResourceNameAsVideoName = gagvr::VideoName.FromCustomerVideo("[CUSTOMER_ID]", "[VIDEO_ID]"), Id = "id74b70bb8", ChannelId = "channel_id856ceb72", DurationMillis = 4964327688054496886L, diff --git a/tests/V2/TestUtils.cs b/tests/V6/TestUtils.cs similarity index 95% rename from tests/V2/TestUtils.cs rename to tests/V6/TestUtils.cs index fddc4b236..32934f682 100644 --- a/tests/V2/TestUtils.cs +++ b/tests/V6/TestUtils.cs @@ -13,13 +13,13 @@ // limitations under the License. using Google.Ads.GoogleAds.Lib; -using Google.Ads.GoogleAds.V2.Common; -using Google.Ads.GoogleAds.V2.Errors; +using Google.Ads.GoogleAds.V6.Common; +using Google.Ads.GoogleAds.V6.Errors; using Google.Protobuf; using Grpc.Core; using System.IO; -namespace Google.Ads.GoogleAds.Tests.V2 +namespace Google.Ads.GoogleAds.Tests.V6 { internal class TestUtils {