From f959a2f6a7f1fe79815771a04425f1b63ddf6c7f Mon Sep 17 00:00:00 2001 From: Chris Seeley Date: Tue, 16 Apr 2019 10:35:49 -0400 Subject: [PATCH] Commit v24.6.0 to github --- ChangeLog | 12 + .../CSharp/AdManager.Examples.CSharp.csproj | 2 +- examples/AdManager/CSharp/App.config | 6 +- .../AdManager.Examples.CSharp.OAuth.csproj | 2 +- .../CSharp/AdWords.Examples.CSharp.csproj | 2 +- examples/AdWords/CSharp/App.config | 6 +- .../AdWords.Examples.CSharp.OAuth.csproj | 2 +- .../AccountManagement/AcceptServiceLink.cs | 110 - .../AccountManagement/CreateAccount.cs | 114 - .../AccountManagement/GetAccountChanges.cs | 209 - .../AccountManagement/GetAccountHierarchy.cs | 235 - .../AdvancedOperations/AddAdCustomizers.cs | 344 - .../AddAdGroupBidModifier.cs | 129 - .../AddClickToDownloadAd.cs | 205 - .../AdvancedOperations/AddDynamicPageFeed.cs | 509 - .../AddDynamicSearchAdsCampaign.cs | 434 - .../AddExpandedTextAdWithUpgradedUrls.cs | 196 - .../v201806/AdvancedOperations/AddGmailAd.cs | 177 - .../v201806/AdvancedOperations/AddHtml5Ad.cs | 177 - .../AddMultiAssetResponsiveDisplayAd.cs | 271 - .../AddResponsiveDisplayAd.cs | 217 - .../AddShoppingDynamicRemarketingCampaign.cs | 388 - .../AddUniversalAppCampaign.cs | 331 - .../CreateAndAttachSharedKeywordSet.cs | 220 - .../FindAndRemoveCriteriaFromSharedSet.cs | 291 - .../GetAdGroupBidModifiers.cs | 132 - .../UsePortfolioBiddingStrategy.cs | 255 - .../AddAdGroupDemographicCriteria.cs | 153 - .../v201806/BasicOperations/AddAdGroups.cs | 187 - .../v201806/BasicOperations/AddCampaigns.cs | 218 - .../BasicOperations/AddExpandedTextAds.cs | 145 - .../v201806/BasicOperations/AddKeywords.cs | 161 - .../BasicOperations/AddResponsiveSearchAd.cs | 192 - .../v201806/BasicOperations/GetAdGroups.cs | 124 - .../v201806/BasicOperations/GetCampaigns.cs | 116 - .../BasicOperations/GetCampaignsWithAwql.cs | 114 - .../BasicOperations/GetExpandedTextAds.cs | 147 - .../v201806/BasicOperations/GetKeywords.cs | 138 - .../BasicOperations/GetResponsiveSearchAds.cs | 160 - .../CSharp/v201806/BasicOperations/PauseAd.cs | 120 - .../v201806/BasicOperations/RemoveAd.cs | 121 - .../v201806/BasicOperations/RemoveAdGroup.cs | 113 - .../v201806/BasicOperations/RemoveCampaign.cs | 112 - .../v201806/BasicOperations/RemoveKeyword.cs | 123 - .../v201806/BasicOperations/UpdateAdGroup.cs | 164 - .../v201806/BasicOperations/UpdateCampaign.cs | 111 - .../BasicOperations/UpdateExpandedTextAd.cs | 120 - .../v201806/BasicOperations/UpdateKeyword.cs | 152 - .../AddCampaignGroupsAndPerformanceTargets.cs | 267 - .../CampaignManagement/AddCampaignLabels.cs | 123 - .../AddCompleteCampaignsUsingBatchJob.cs | 420 - ...CompleteCampaignsUsingStreamingBatchJob.cs | 440 - .../v201806/CampaignManagement/AddDraft.cs | 143 - .../AddKeywordsUsingIncrementalBatchJob.cs | 275 - .../v201806/CampaignManagement/AddTrial.cs | 216 - .../GetAllDisapprovedAds.cs | 152 - .../GetAllDisapprovedAdsWithAwql.cs | 150 - .../CampaignManagement/GetCampaignsByLabel.cs | 137 - .../CampaignManagement/GraduateTrial.cs | 148 - .../CampaignManagement/SetAdParameters.cs | 179 - .../CampaignManagement/SetBidModifier.cs | 134 - .../CampaignManagement/ValidateTextAd.cs | 132 - .../ErrorHandling/HandlePartialFailures.cs | 170 - .../HandlePolicyViolationError.cs | 221 - .../ErrorHandling/HandleRateExceededError.cs | 245 - .../AddGoogleMyBusinessLocationExtensions.cs | 308 - .../CSharp/v201806/Extensions/AddPrices.cs | 230 - .../CSharp/v201806/Extensions/AddSitelinks.cs | 281 - .../Extensions/AddSitelinksUsingFeeds.cs | 525 - .../Migration/MigrateToExtensionSettings.cs | 634 - .../Miscellaneous/GetAllImageAssets.cs | 126 - .../Miscellaneous/GetAllVideosAndImages.cs | 139 - .../v201806/Miscellaneous/UploadImage.cs | 106 - .../v201806/Miscellaneous/UploadImageAsset.cs | 115 - .../Miscellaneous/UploadMediaBundle.cs | 107 - .../Optimization/EstimateKeywordTraffic.cs | 291 - .../Optimization/GetAdGroupBidSimulations.cs | 130 - ...CampaignCriterionBidModifierSimulations.cs | 160 - .../Optimization/GetKeywordBidSimulations.cs | 145 - .../v201806/Optimization/GetKeywordIdeas.cs | 212 - .../CSharp/v201806/Remarketing/AddAudience.cs | 155 - .../Remarketing/AddConversionTrackers.cs | 169 - .../Remarketing/AddCrmBasedUserList.cs | 224 - .../AddRuleBasedRemarketingList.cs | 329 - .../UploadOfflineCallConversions.cs | 140 - .../UploadOfflineConversionAdjustments.cs | 131 - .../Remarketing/UploadOfflineConversions.cs | 140 - .../v201806/Remarketing/UploadOfflineData.cs | 361 - .../DownloadCriteriaReportWithAwql.cs | 103 - .../DownloadCriteriaReportWithSelector.cs | 132 - .../v201806/Reporting/GetReportFields.cs | 106 - .../Reporting/ParallelReportDownload.cs | 433 - .../Reporting/StreamCriteriaReportResults.cs | 163 - .../Reporting/StreamCriteriaReportToPoco.cs | 158 - .../StreamReportToPredefinedReportRowType.cs | 111 - .../AddProductPartitionTree.cs | 161 - .../ShoppingCampaigns/AddProductScope.cs | 160 - .../ShoppingCampaigns/AddShoppingCampaign.cs | 288 - .../AddShoppingCampaignForShowcaseAds.cs | 364 - .../GetProductCategoryTaxonomy.cs | 193 - .../Targeting/AddCampaignTargetingCriteria.cs | 210 - .../Targeting/AddCustomerNegativeCriteria.cs | 132 - .../Targeting/GetCampaignTargetingCriteria.cs | 131 - .../GetTargetableLanguagesAndCarriers.cs | 114 - .../v201806/Targeting/LookupLocation.cs | 144 - .../AdWords/Vb/AdWords.Examples.VB.vbproj | 2 +- examples/AdWords/Vb/App.config | 6 +- .../AccountManagement/AcceptServiceLink.vb | 93 - .../AccountManagement/CreateAccount.vb | 96 - .../AccountManagement/GetAccountChanges.vb | 183 - .../AccountManagement/GetAccountHierarchy.vb | 218 - .../AdvancedOperations/AddAdCustomizers.vb | 312 - .../AddAdGroupBidModifier.vb | 108 - .../AdvancedOperations/AddDynamicPageFeed.vb | 444 - .../AddDynamicSearchAdsCampaign.vb | 356 - .../AddExpandedTextAdWithUpgradedUrls.vb | 168 - .../v201806/AdvancedOperations/AddGmailAd.vb | 145 - .../v201806/AdvancedOperations/AddHtml5Ad.vb | 146 - .../AddMultiAssetResponsiveDisplayAd.vb | 218 - .../AddResponsiveDisplayAd.vb | 195 - .../AddShoppingDynamicRemarketingCampaign.vb | 330 - .../AddUniversalAppCampaign.vb | 278 - .../CreateAndAttachSharedKeywordSet.vb | 187 - .../FindAndRemoveCriteriaFromSharedSet.vb | 259 - .../GetAdGroupBidModifiers.vb | 127 - .../UsePortfolioBiddingStrategy.vb | 233 - .../AddAdGroupDemographicCriteria.vb | 122 - .../Vb/v201806/BasicOperations/AddAdGroups.vb | 149 - .../v201806/BasicOperations/AddCampaigns.vb | 181 - .../BasicOperations/AddExpandedTextAds.vb | 121 - .../Vb/v201806/BasicOperations/AddKeywords.vb | 131 - .../BasicOperations/AddResponsiveSearchAd.vb | 147 - .../Vb/v201806/BasicOperations/GetAdGroups.vb | 105 - .../v201806/BasicOperations/GetCampaigns.vb | 98 - .../BasicOperations/GetCampaignsWithAwql.vb | 102 - .../BasicOperations/GetExpandedTextAds.vb | 131 - .../Vb/v201806/BasicOperations/GetKeywords.vb | 126 - .../BasicOperations/GetResponsiveSearchAds.vb | 144 - .../Vb/v201806/BasicOperations/PauseAd.vb | 99 - .../Vb/v201806/BasicOperations/RemoveAd.vb | 101 - .../v201806/BasicOperations/RemoveAdGroup.vb | 95 - .../v201806/BasicOperations/RemoveCampaign.vb | 95 - .../v201806/BasicOperations/RemoveKeyword.vb | 102 - .../v201806/BasicOperations/UpdateAdGroup.vb | 136 - .../v201806/BasicOperations/UpdateCampaign.vb | 93 - .../BasicOperations/UpdateExpandedTextAd.vb | 100 - .../v201806/BasicOperations/UpdateKeyword.vb | 120 - .../AddCampaignGroupsAndPerformanceTargets.vb | 228 - .../CampaignManagement/AddCampaignLabels.vb | 103 - .../AddCompleteCampaignsUsingBatchJob.vb | 459 - ...CompleteCampaignsUsingStreamingBatchJob.vb | 469 - .../Vb/v201806/CampaignManagement/AddDraft.vb | 115 - .../AddKeywordsUsingIncrementalBatchJob.vb | 341 - .../Vb/v201806/CampaignManagement/AddTrial.vb | 196 - .../GetAllDisapprovedAds.vb | 134 - .../GetAllDisapprovedAdsWithAwql.vb | 134 - .../CampaignManagement/GetCampaignsByLabel.vb | 117 - .../CampaignManagement/GraduateTrial.vb | 124 - .../CampaignManagement/SetAdParameters.vb | 150 - .../CampaignManagement/SetBidModifier.vb | 112 - .../CampaignManagement/ValidateTextAd.vb | 108 - .../ErrorHandling/HandlePartialFailures.vb | 151 - .../HandlePolicyViolationError.vb | 182 - .../ErrorHandling/HandleRateExceededError.vb | 216 - .../AddGoogleMyBusinessLocationExtensions.vb | 262 - .../Vb/v201806/Extensions/AddPrices.vb | 209 - .../Vb/v201806/Extensions/AddSitelinks.vb | 215 - .../Extensions/AddSitelinksUsingFeeds.vb | 506 - .../Migration/MigrateToExtensionSettings.vb | 693 - .../Miscellaneous/GetAllImageAssets.vb | 109 - .../Miscellaneous/GetAllVideosAndImages.vb | 125 - .../Vb/v201806/Miscellaneous/UploadImage.vb | 95 - .../v201806/Miscellaneous/UploadImageAsset.vb | 99 - .../Miscellaneous/UploadMediaBundle.vb | 100 - .../Optimization/EstimateKeywordTraffic.vb | 238 - .../Optimization/GetAdGroupBidSimulations.vb | 123 - ...CampaignCriterionBidModifierSimulations.vb | 153 - .../Optimization/GetKeywordBidSimulations.vb | 139 - .../v201806/Optimization/GetKeywordIdeas.vb | 201 - .../Vb/v201806/Remarketing/AddAudience.vb | 136 - .../Remarketing/AddConversionTrackers.vb | 159 - .../Remarketing/AddCrmBasedUserList.vb | 189 - .../AddRuleBasedRemarketingList.vb | 248 - .../UploadOfflineCallConversions.vb | 122 - .../UploadOfflineConversionAdjustments.vb | 117 - .../Remarketing/UploadOfflineConversions.vb | 128 - .../v201806/Remarketing/UploadOfflineData.vb | 323 - .../DownloadCriteriaReportWithAwql.vb | 90 - .../DownloadCriteriaReportWithSelector.vb | 108 - .../Vb/v201806/Reporting/GetReportFields.vb | 98 - .../Reporting/StreamCriteriaReportResults.vb | 134 - .../Reporting/StreamCriteriaReportToPoco.vb | 145 - .../StreamReportToPredefinedReportRowType.vb | 95 - .../AddProductPartitionTree.vb | 151 - .../ShoppingCampaigns/AddProductScope.vb | 129 - .../ShoppingCampaigns/AddShoppingCampaign.vb | 253 - .../AddShoppingCampaignForShowcaseAds.vb | 321 - .../GetProductCategoryTaxonomy.vb | 181 - .../Targeting/AddCampaignTargetingCriteria.vb | 170 - .../Targeting/AddCustomerNegativeCriteria.vb | 110 - .../Targeting/GetCampaignTargetingCriteria.vb | 125 - .../GetTargetableLanguagesAndCarriers.vb | 98 - .../Vb/v201806/Targeting/LookupLocation.vb | 121 - src/AdManager/AdManager.csproj | 2 +- src/AdManager/app.config.transform | 161 - src/AdManager/web.config.transform | 161 - src/AdWords/AdWords.csproj | 2 +- src/AdWords/App.config | 6 +- .../BatchJob/v201806/BatchJobUtilities.cs | 352 - .../Parser/v201806/PredefinedReportTypes.cs | 14412 -- .../QueryBuilder/v201806/ReportQuery.cs | 67 - .../v201806/ReportQueryBuilder.cs | 217 - .../QueryBuilder/v201806/SelectQuery.cs | 193 - .../v201806/SelectQueryBuilder.cs | 233 - .../QueryBuilder/v201806/WhereBuilder.cs | 609 - .../Util/Shopping/v201806/OperationPair.cs | 53 - .../ProductDimensionEqualityComparer.cs | 398 - .../Shopping/v201806/ProductDimensions.cs | 236 - .../Shopping/v201806/ProductPartitionNode.cs | 511 - .../v201806/ProductPartitionNodeAdapter.cs | 111 - .../Shopping/v201806/ProductPartitionTree.cs | 707 - .../v201806/AdWordsApi.ProductDimension.cs | 131 - src/AdWords/v201806/AdWordsApi.cs | 109647 --------------- src/AdWords/v201806/AdWordsServiceV201806.cs | 550 - src/AdWords/v201806/ApiError.cs | 81 - src/AdWords/v201806/ApiException.cs | 53 - src/AdWords/v201806/BatchJobApi.cs | 95 - src/AdWords/v201806/FeedValidationErrors.cs | 97 - src/AdWords/v201806/MapEntries.cs | 106 - src/AdWords/v201806/OrderBy.cs | 103 - src/AdWords/v201806/Paging.cs | 96 - src/AdWords/v201806/Predicate.cs | 462 - src/AdWords/v201806/ReportDefinition.cs | 254 - src/AdWords/v201806/Selector.cs | 124 - tests/AdManager/AdManager.Tests.csproj | 1 + tests/AdWords/AdWords.Tests.csproj | 1 + .../AdWords/Lib/AdWordsServiceFactoryTests.cs | 2 +- .../AdWords/SoapMessages.v201806.Designer.cs | 75 - tests/AdWords/SoapMessages.v201806.resx | 130 - .../BatchJob/v201806/BatchJobUtilitiesTest.cs | 526 - .../v201806/ReportQueryBuilderTest.cs | 341 - .../v201806/SelectQueryBuilderTest.cs | 208 - .../QueryBuilder/v201806/SelectQueryTest.cs | 323 - .../QueryBuilder/v201806/WhereBuilderTest.cs | 218 - .../ProductDimensionEqualityComparerTest.cs | 630 - .../Shopping/v201806/ProductDimensionsTest.cs | 219 - .../v201806/ProductPartitionNodeTest.cs | 285 - .../ProductPartitionTreeIntegrationTests.cs | 567 - .../v201806/ProductPartitionTreeTest.cs | 332 - .../AdWords/v201806/AccountManagementTest.cs | 45 - .../AdWords/v201806/AdvancedOperationsTest.cs | 468 - tests/AdWords/v201806/BasicOperationsTest.cs | 402 - .../AdWords/v201806/CampaignManagementTest.cs | 373 - tests/AdWords/v201806/ErrorHandlingTest.cs | 87 - tests/AdWords/v201806/ExtensionsTest.cs | 159 - tests/AdWords/v201806/MigrationTest.cs | 62 - tests/AdWords/v201806/MiscellaneousTest.cs | 125 - tests/AdWords/v201806/OptimizationTest.cs | 136 - tests/AdWords/v201806/RemarketingTest.cs | 108 - tests/AdWords/v201806/ReportingTest.cs | 186 - .../AdWords/v201806/ShoppingCampaignsTest.cs | 159 - tests/AdWords/v201806/ShoppingTestUtils.cs | 241 - tests/AdWords/v201806/TargetingTest.cs | 150 - tests/AdWords/v201806/TestUtils.cs | 982 - .../v201806/VersionedExampleTestsBase.cs | 34 - tests/Common/Common.Tests.csproj | 1 + 266 files changed, 27 insertions(+), 174518 deletions(-) delete mode 100755 examples/AdWords/CSharp/v201806/AccountManagement/AcceptServiceLink.cs delete mode 100755 examples/AdWords/CSharp/v201806/AccountManagement/CreateAccount.cs delete mode 100755 examples/AdWords/CSharp/v201806/AccountManagement/GetAccountChanges.cs delete mode 100755 examples/AdWords/CSharp/v201806/AccountManagement/GetAccountHierarchy.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdCustomizers.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdGroupBidModifier.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddClickToDownloadAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicPageFeed.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddGmailAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddHtml5Ad.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddResponsiveDisplayAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/AddUniversalAppCampaign.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/GetAdGroupBidModifiers.cs delete mode 100755 examples/AdWords/CSharp/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroupDemographicCriteria.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroups.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/AddCampaigns.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/AddExpandedTextAds.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/AddKeywords.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/AddResponsiveSearchAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/GetAdGroups.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/GetCampaigns.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/GetCampaignsWithAwql.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/GetExpandedTextAds.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/GetKeywords.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/GetResponsiveSearchAds.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/PauseAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/RemoveAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/RemoveAdGroup.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/RemoveCampaign.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/RemoveKeyword.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/UpdateAdGroup.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/UpdateCampaign.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/UpdateExpandedTextAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/BasicOperations/UpdateKeyword.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignLabels.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddDraft.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/AddTrial.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAds.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/GetCampaignsByLabel.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/GraduateTrial.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/SetAdParameters.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/SetBidModifier.cs delete mode 100755 examples/AdWords/CSharp/v201806/CampaignManagement/ValidateTextAd.cs delete mode 100755 examples/AdWords/CSharp/v201806/ErrorHandling/HandlePartialFailures.cs delete mode 100755 examples/AdWords/CSharp/v201806/ErrorHandling/HandlePolicyViolationError.cs delete mode 100755 examples/AdWords/CSharp/v201806/ErrorHandling/HandleRateExceededError.cs delete mode 100755 examples/AdWords/CSharp/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.cs delete mode 100755 examples/AdWords/CSharp/v201806/Extensions/AddPrices.cs delete mode 100755 examples/AdWords/CSharp/v201806/Extensions/AddSitelinks.cs delete mode 100755 examples/AdWords/CSharp/v201806/Extensions/AddSitelinksUsingFeeds.cs delete mode 100755 examples/AdWords/CSharp/v201806/Migration/MigrateToExtensionSettings.cs delete mode 100755 examples/AdWords/CSharp/v201806/Miscellaneous/GetAllImageAssets.cs delete mode 100755 examples/AdWords/CSharp/v201806/Miscellaneous/GetAllVideosAndImages.cs delete mode 100755 examples/AdWords/CSharp/v201806/Miscellaneous/UploadImage.cs delete mode 100755 examples/AdWords/CSharp/v201806/Miscellaneous/UploadImageAsset.cs delete mode 100755 examples/AdWords/CSharp/v201806/Miscellaneous/UploadMediaBundle.cs delete mode 100755 examples/AdWords/CSharp/v201806/Optimization/EstimateKeywordTraffic.cs delete mode 100755 examples/AdWords/CSharp/v201806/Optimization/GetAdGroupBidSimulations.cs delete mode 100755 examples/AdWords/CSharp/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.cs delete mode 100755 examples/AdWords/CSharp/v201806/Optimization/GetKeywordBidSimulations.cs delete mode 100755 examples/AdWords/CSharp/v201806/Optimization/GetKeywordIdeas.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/AddAudience.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/AddConversionTrackers.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/AddCrmBasedUserList.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/AddRuleBasedRemarketingList.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineCallConversions.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversionAdjustments.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversions.cs delete mode 100755 examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineData.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithAwql.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithSelector.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/GetReportFields.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/ParallelReportDownload.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportResults.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportToPoco.cs delete mode 100755 examples/AdWords/CSharp/v201806/Reporting/StreamReportToPredefinedReportRowType.cs delete mode 100755 examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductPartitionTree.cs delete mode 100755 examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductScope.cs delete mode 100755 examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaign.cs delete mode 100755 examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.cs delete mode 100755 examples/AdWords/CSharp/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.cs delete mode 100755 examples/AdWords/CSharp/v201806/Targeting/AddCampaignTargetingCriteria.cs delete mode 100755 examples/AdWords/CSharp/v201806/Targeting/AddCustomerNegativeCriteria.cs delete mode 100755 examples/AdWords/CSharp/v201806/Targeting/GetCampaignTargetingCriteria.cs delete mode 100755 examples/AdWords/CSharp/v201806/Targeting/GetTargetableLanguagesAndCarriers.cs delete mode 100755 examples/AdWords/CSharp/v201806/Targeting/LookupLocation.cs delete mode 100755 examples/AdWords/Vb/v201806/AccountManagement/AcceptServiceLink.vb delete mode 100755 examples/AdWords/Vb/v201806/AccountManagement/CreateAccount.vb delete mode 100755 examples/AdWords/Vb/v201806/AccountManagement/GetAccountChanges.vb delete mode 100755 examples/AdWords/Vb/v201806/AccountManagement/GetAccountHierarchy.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddAdCustomizers.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddAdGroupBidModifier.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicPageFeed.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddGmailAd.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddHtml5Ad.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddResponsiveDisplayAd.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/AddUniversalAppCampaign.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/GetAdGroupBidModifiers.vb delete mode 100755 examples/AdWords/Vb/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/AddAdGroupDemographicCriteria.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/AddAdGroups.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/AddCampaigns.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/AddExpandedTextAds.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/AddKeywords.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/AddResponsiveSearchAd.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/GetAdGroups.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/GetCampaigns.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/GetCampaignsWithAwql.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/GetExpandedTextAds.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/GetKeywords.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/GetResponsiveSearchAds.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/PauseAd.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/RemoveAd.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/RemoveAdGroup.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/RemoveCampaign.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/RemoveKeyword.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/UpdateAdGroup.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/UpdateCampaign.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/UpdateExpandedTextAd.vb delete mode 100755 examples/AdWords/Vb/v201806/BasicOperations/UpdateKeyword.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignLabels.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddDraft.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/AddTrial.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAds.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/GetCampaignsByLabel.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/GraduateTrial.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/SetAdParameters.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/SetBidModifier.vb delete mode 100755 examples/AdWords/Vb/v201806/CampaignManagement/ValidateTextAd.vb delete mode 100755 examples/AdWords/Vb/v201806/ErrorHandling/HandlePartialFailures.vb delete mode 100755 examples/AdWords/Vb/v201806/ErrorHandling/HandlePolicyViolationError.vb delete mode 100755 examples/AdWords/Vb/v201806/ErrorHandling/HandleRateExceededError.vb delete mode 100755 examples/AdWords/Vb/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.vb delete mode 100755 examples/AdWords/Vb/v201806/Extensions/AddPrices.vb delete mode 100755 examples/AdWords/Vb/v201806/Extensions/AddSitelinks.vb delete mode 100755 examples/AdWords/Vb/v201806/Extensions/AddSitelinksUsingFeeds.vb delete mode 100755 examples/AdWords/Vb/v201806/Migration/MigrateToExtensionSettings.vb delete mode 100755 examples/AdWords/Vb/v201806/Miscellaneous/GetAllImageAssets.vb delete mode 100755 examples/AdWords/Vb/v201806/Miscellaneous/GetAllVideosAndImages.vb delete mode 100755 examples/AdWords/Vb/v201806/Miscellaneous/UploadImage.vb delete mode 100755 examples/AdWords/Vb/v201806/Miscellaneous/UploadImageAsset.vb delete mode 100755 examples/AdWords/Vb/v201806/Miscellaneous/UploadMediaBundle.vb delete mode 100755 examples/AdWords/Vb/v201806/Optimization/EstimateKeywordTraffic.vb delete mode 100755 examples/AdWords/Vb/v201806/Optimization/GetAdGroupBidSimulations.vb delete mode 100755 examples/AdWords/Vb/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.vb delete mode 100755 examples/AdWords/Vb/v201806/Optimization/GetKeywordBidSimulations.vb delete mode 100755 examples/AdWords/Vb/v201806/Optimization/GetKeywordIdeas.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/AddAudience.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/AddConversionTrackers.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/AddCrmBasedUserList.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/AddRuleBasedRemarketingList.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/UploadOfflineCallConversions.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversionAdjustments.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversions.vb delete mode 100755 examples/AdWords/Vb/v201806/Remarketing/UploadOfflineData.vb delete mode 100755 examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithAwql.vb delete mode 100755 examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithSelector.vb delete mode 100755 examples/AdWords/Vb/v201806/Reporting/GetReportFields.vb delete mode 100755 examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportResults.vb delete mode 100755 examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportToPoco.vb delete mode 100755 examples/AdWords/Vb/v201806/Reporting/StreamReportToPredefinedReportRowType.vb delete mode 100755 examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductPartitionTree.vb delete mode 100755 examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductScope.vb delete mode 100755 examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaign.vb delete mode 100755 examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.vb delete mode 100755 examples/AdWords/Vb/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.vb delete mode 100755 examples/AdWords/Vb/v201806/Targeting/AddCampaignTargetingCriteria.vb delete mode 100755 examples/AdWords/Vb/v201806/Targeting/AddCustomerNegativeCriteria.vb delete mode 100755 examples/AdWords/Vb/v201806/Targeting/GetCampaignTargetingCriteria.vb delete mode 100755 examples/AdWords/Vb/v201806/Targeting/GetTargetableLanguagesAndCarriers.vb delete mode 100755 examples/AdWords/Vb/v201806/Targeting/LookupLocation.vb delete mode 100755 src/AdManager/app.config.transform delete mode 100755 src/AdManager/web.config.transform delete mode 100755 src/AdWords/Util/BatchJob/v201806/BatchJobUtilities.cs delete mode 100755 src/AdWords/Util/Reports/Parser/v201806/PredefinedReportTypes.cs delete mode 100755 src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQuery.cs delete mode 100755 src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilder.cs delete mode 100755 src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQuery.cs delete mode 100755 src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilder.cs delete mode 100755 src/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilder.cs delete mode 100755 src/AdWords/Util/Shopping/v201806/OperationPair.cs delete mode 100755 src/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparer.cs delete mode 100755 src/AdWords/Util/Shopping/v201806/ProductDimensions.cs delete mode 100755 src/AdWords/Util/Shopping/v201806/ProductPartitionNode.cs delete mode 100755 src/AdWords/Util/Shopping/v201806/ProductPartitionNodeAdapter.cs delete mode 100755 src/AdWords/Util/Shopping/v201806/ProductPartitionTree.cs delete mode 100755 src/AdWords/v201806/AdWordsApi.ProductDimension.cs delete mode 100755 src/AdWords/v201806/AdWordsApi.cs delete mode 100755 src/AdWords/v201806/AdWordsServiceV201806.cs delete mode 100755 src/AdWords/v201806/ApiError.cs delete mode 100755 src/AdWords/v201806/ApiException.cs delete mode 100755 src/AdWords/v201806/BatchJobApi.cs delete mode 100755 src/AdWords/v201806/FeedValidationErrors.cs delete mode 100755 src/AdWords/v201806/MapEntries.cs delete mode 100755 src/AdWords/v201806/OrderBy.cs delete mode 100755 src/AdWords/v201806/Paging.cs delete mode 100755 src/AdWords/v201806/Predicate.cs delete mode 100755 src/AdWords/v201806/ReportDefinition.cs delete mode 100755 src/AdWords/v201806/Selector.cs delete mode 100755 tests/AdWords/SoapMessages.v201806.Designer.cs delete mode 100755 tests/AdWords/SoapMessages.v201806.resx delete mode 100755 tests/AdWords/Util/BatchJob/v201806/BatchJobUtilitiesTest.cs delete mode 100755 tests/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilderTest.cs delete mode 100755 tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilderTest.cs delete mode 100755 tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryTest.cs delete mode 100755 tests/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilderTest.cs delete mode 100755 tests/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparerTest.cs delete mode 100755 tests/AdWords/Util/Shopping/v201806/ProductDimensionsTest.cs delete mode 100755 tests/AdWords/Util/Shopping/v201806/ProductPartitionNodeTest.cs delete mode 100755 tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeIntegrationTests.cs delete mode 100755 tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeTest.cs delete mode 100755 tests/AdWords/v201806/AccountManagementTest.cs delete mode 100755 tests/AdWords/v201806/AdvancedOperationsTest.cs delete mode 100755 tests/AdWords/v201806/BasicOperationsTest.cs delete mode 100755 tests/AdWords/v201806/CampaignManagementTest.cs delete mode 100755 tests/AdWords/v201806/ErrorHandlingTest.cs delete mode 100755 tests/AdWords/v201806/ExtensionsTest.cs delete mode 100755 tests/AdWords/v201806/MigrationTest.cs delete mode 100755 tests/AdWords/v201806/MiscellaneousTest.cs delete mode 100755 tests/AdWords/v201806/OptimizationTest.cs delete mode 100755 tests/AdWords/v201806/RemarketingTest.cs delete mode 100755 tests/AdWords/v201806/ReportingTest.cs delete mode 100755 tests/AdWords/v201806/ShoppingCampaignsTest.cs delete mode 100755 tests/AdWords/v201806/ShoppingTestUtils.cs delete mode 100755 tests/AdWords/v201806/TargetingTest.cs delete mode 100755 tests/AdWords/v201806/TestUtils.cs delete mode 100755 tests/AdWords/v201806/VersionedExampleTestsBase.cs diff --git a/ChangeLog b/ChangeLog index c62bf8d1a14..1b965dc1c62 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +24.6.0 +====== + + AdWords: + - Removed support for v201806. + + Ad Manager: + - + + Common: + - + 24.5.0 ===== AdWords: diff --git a/examples/AdManager/CSharp/AdManager.Examples.CSharp.csproj b/examples/AdManager/CSharp/AdManager.Examples.CSharp.csproj index 9bb3dde2ec2..b4a424f530a 100755 --- a/examples/AdManager/CSharp/AdManager.Examples.CSharp.csproj +++ b/examples/AdManager/CSharp/AdManager.Examples.CSharp.csproj @@ -16,7 +16,7 @@ - + diff --git a/examples/AdManager/CSharp/App.config b/examples/AdManager/CSharp/App.config index ffd753e184e..333d0b028b3 100755 --- a/examples/AdManager/CSharp/App.config +++ b/examples/AdManager/CSharp/App.config @@ -2,6 +2,7 @@
+
- - - - - - + diff --git a/examples/AdWords/CSharp/AdWords.Examples.CSharp.csproj b/examples/AdWords/CSharp/AdWords.Examples.CSharp.csproj index b413211c52f..240c071d2aa 100755 --- a/examples/AdWords/CSharp/AdWords.Examples.CSharp.csproj +++ b/examples/AdWords/CSharp/AdWords.Examples.CSharp.csproj @@ -16,7 +16,7 @@ - + diff --git a/examples/AdWords/CSharp/App.config b/examples/AdWords/CSharp/App.config index a105b874bbc..87d0ce37f55 100755 --- a/examples/AdWords/CSharp/App.config +++ b/examples/AdWords/CSharp/App.config @@ -2,6 +2,7 @@
+
- - - - - - + 14.0 diff --git a/examples/AdWords/CSharp/v201806/AccountManagement/AcceptServiceLink.cs b/examples/AdWords/CSharp/v201806/AccountManagement/AcceptServiceLink.cs deleted file mode 100755 index ed0efb30f3d..00000000000 --- a/examples/AdWords/CSharp/v201806/AccountManagement/AcceptServiceLink.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example accepts a pending invitation to link your AdWords - /// account to a Google Merchant Center account. - /// - public class AcceptServiceLink : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AcceptServiceLink codeExample = new AcceptServiceLink(); - Console.WriteLine(codeExample.Description); - try - { - long serviceLinkId = long.Parse("INSERT_SERVICE_LINK_ID_HERE"); - codeExample.Run(new AdWordsUser(), serviceLinkId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example accepts a pending invitation to link your AdWords account " + - "to a Google Merchant Center account."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The service link ID to accept. - public void Run(AdWordsUser user, long serviceLinkId) - { - using (CustomerService customerService = - (CustomerService) user.GetService(AdWordsService.v201806.CustomerService)) - { - // Create the operation to set the status to ACTIVE. - ServiceLinkOperation op = new ServiceLinkOperation - { - @operator = Operator.SET - }; - ServiceLink serviceLink = new ServiceLink - { - serviceLinkId = serviceLinkId, - serviceType = ServiceType.MERCHANT_CENTER, - linkStatus = ServiceLinkLinkStatus.ACTIVE - }; - op.operand = serviceLink; - - try - { - // Update the service link. - ServiceLink[] mutatedServiceLinks = customerService.mutateServiceLinks( - new ServiceLinkOperation[] - { - op - }); - - // Display the results. - foreach (ServiceLink mutatedServiceLink in mutatedServiceLinks) - { - Console.WriteLine( - "Service link with service link ID {0}, type '{1}' updated to " + - "status: {2}.", mutatedServiceLink.serviceLinkId, - mutatedServiceLink.serviceType, mutatedServiceLink.linkStatus); - } - - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to update service link.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AccountManagement/CreateAccount.cs b/examples/AdWords/CSharp/v201806/AccountManagement/CreateAccount.cs deleted file mode 100755 index 59d2aac63ce..00000000000 --- a/examples/AdWords/CSharp/v201806/AccountManagement/CreateAccount.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to create an account. Note by default, - /// this account will only be accessible via its parent AdWords manager - /// account. - /// - public class CreateAccount : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - CreateAccount codeExample = new CreateAccount(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to create an account. Note by default " + - "this account will only be accessible via its parent AdWords manager account."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (ManagedCustomerService managedCustomerService = - (ManagedCustomerService) user.GetService(AdWordsService.v201806 - .ManagedCustomerService)) - { - // Create account. - ManagedCustomer customer = new ManagedCustomer - { - name = "Customer created with ManagedCustomerService on " + - new DateTime().ToString(), - currencyCode = "EUR", - dateTimeZone = "Europe/London" - }; - - // Create operations. - ManagedCustomerOperation operation = new ManagedCustomerOperation - { - operand = customer, - @operator = Operator.ADD - }; - - try - { - ManagedCustomerOperation[] operations = new ManagedCustomerOperation[] - { - operation - }; - // Add account. - ManagedCustomerReturnValue result = managedCustomerService.mutate(operations); - - // Display accounts. - if (result.value != null && result.value.Length > 0) - { - ManagedCustomer customerResult = result.value[0]; - Console.WriteLine("Account with customer ID \"{0}\" was created.", - customerResult.customerId); - } - else - { - Console.WriteLine("No accounts were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create accounts.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AccountManagement/GetAccountChanges.cs b/examples/AdWords/CSharp/v201806/AccountManagement/GetAccountChanges.cs deleted file mode 100755 index b05dc2236d7..00000000000 --- a/examples/AdWords/CSharp/v201806/AccountManagement/GetAccountChanges.cs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets the changes in the account during the last 24 - /// hours. - /// - public class GetAccountChanges : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAccountChanges codeExample = new GetAccountChanges(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example gets the changes in the account during the last 24 hours."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (CustomerSyncService customerSyncService = - (CustomerSyncService) user.GetService(AdWordsService.v201806.CustomerSyncService)) - { - // The date time string should be of the form yyyyMMdd HHmmss zzz - string minDateTime = - DateTime.Now.AddDays(-1).ToUniversalTime().ToString("yyyyMMdd HHmmss") + " UTC"; - string maxDateTime = DateTime.Now.ToUniversalTime().ToString("yyyyMMdd HHmmss") + - " UTC"; - - // Create date time range. - DateTimeRange dateTimeRange = new DateTimeRange - { - min = minDateTime, - max = maxDateTime - }; - - try - { - // Create the selector. - CustomerSyncSelector selector = new CustomerSyncSelector - { - dateTimeRange = dateTimeRange, - campaignIds = GetAllCampaignIds(user) - }; - - // Get all account changes for campaign. - CustomerChangeData accountChanges = customerSyncService.get(selector); - - // Display the changes. - if (accountChanges != null && accountChanges.changedCampaigns != null) - { - Console.WriteLine("Displaying changes up to: {0}", - accountChanges.lastChangeTimestamp); - foreach (CampaignChangeData campaignChanges in accountChanges - .changedCampaigns) - { - Console.WriteLine("Campaign with id \"{0}\" was changed:", - campaignChanges.campaignId); - Console.WriteLine(" Campaign changed status: {0}", - campaignChanges.campaignChangeStatus); - if (campaignChanges.campaignChangeStatus != ChangeStatus.NEW) - { - Console.WriteLine(" Added campaign criteria: {0}", - GetFormattedList(campaignChanges.addedCampaignCriteria)); - Console.WriteLine(" Removed campaign criteria: {0}", - GetFormattedList(campaignChanges.removedCampaignCriteria)); - - if (campaignChanges.changedAdGroups != null) - { - foreach (AdGroupChangeData adGroupChanges in campaignChanges - .changedAdGroups) - { - Console.WriteLine(" Ad group with id \"{0}\" was changed:", - adGroupChanges.adGroupId); - Console.WriteLine(" Ad group changed status: {0}", - adGroupChanges.adGroupChangeStatus); - if (adGroupChanges.adGroupChangeStatus != ChangeStatus.NEW) - { - Console.WriteLine(" Ads changed: {0}", - GetFormattedList(adGroupChanges.changedAds)); - Console.WriteLine(" Criteria changed: {0}", - GetFormattedList(adGroupChanges.changedCriteria)); - Console.WriteLine(" Criteria removed: {0}", - GetFormattedList(adGroupChanges.removedCriteria)); - } - } - } - } - - Console.WriteLine(); - } - } - else - { - Console.WriteLine("No account changes were found."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get account changes.", e); - } - } - } - - /// - /// Formats a list of ids as a comma separated string. - /// - /// The list of ids. - /// The comma separed formatted string, enclosed in square braces. - /// - private string GetFormattedList(long[] ids) - { - StringBuilder builder = new StringBuilder(); - if (ids != null) - { - foreach (long id in ids) - { - builder.AppendFormat("{0}, ", id); - } - } - - return "[" + builder.ToString().TrimEnd(',', ' ') + "]"; - } - - /// - /// Gets all campaign ids in the account. - /// - /// The user for which campaigns are retrieved. - /// The list of campaign ids. - private long[] GetAllCampaignIds(AdWordsUser user) - { - // Get the CampaignService. - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - List allCampaigns = new List(); - - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - Campaign.Fields.Id - } - }; - - // Get all campaigns. - CampaignPage page = campaignService.get(selector); - - // Return the results. - if (page != null && page.entries != null) - { - foreach (Campaign campaign in page.entries) - { - allCampaigns.Add(campaign.id); - } - } - - return allCampaigns.ToArray(); - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AccountManagement/GetAccountHierarchy.cs b/examples/AdWords/CSharp/v201806/AccountManagement/GetAccountHierarchy.cs deleted file mode 100755 index 1148c9d836b..00000000000 --- a/examples/AdWords/CSharp/v201806/AccountManagement/GetAccountHierarchy.cs +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to retrieve the account hierarchy under - /// an account. This code example won't work with Test Accounts. See - /// https://developers.google.com/adwords/api/docs/test-accounts - /// - public class GetAccountHierarchy : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAccountHierarchy codeExample = new GetAccountHierarchy(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to retrieve the account hierarchy under" + - " an account. This code example won't work with Test Accounts. See " + - "https://developers.google.com/adwords/api/docs/test-accounts"; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (ManagedCustomerService managedCustomerService = - (ManagedCustomerService) user.GetService(AdWordsService.v201806 - .ManagedCustomerService)) - { - // Create selector. - Selector selector = new Selector - { - fields = new string[] - { - ManagedCustomer.Fields.CustomerId, - ManagedCustomer.Fields.Name - }, - paging = Paging.Default - }; - - // Map from customerId to customer node. - Dictionary customerIdToCustomerNode = - new Dictionary(); - - // Temporary cache to save links. - List allLinks = new List(); - - ManagedCustomerPage page = null; - try - { - do - { - page = managedCustomerService.get(selector); - - if (page.entries != null) - { - // Create account tree nodes for each customer. - foreach (ManagedCustomer customer in page.entries) - { - ManagedCustomerTreeNode node = new ManagedCustomerTreeNode - { - Account = customer - }; - customerIdToCustomerNode.Add(customer.customerId, node); - } - - if (page.links != null) - { - allLinks.AddRange(page.links); - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - // For each link, connect nodes in tree. - foreach (ManagedCustomerLink link in allLinks) - { - ManagedCustomerTreeNode managerNode = - customerIdToCustomerNode[link.managerCustomerId]; - ManagedCustomerTreeNode childNode = - customerIdToCustomerNode[link.clientCustomerId]; - childNode.ParentNode = managerNode; - if (managerNode != null) - { - managerNode.ChildAccounts.Add(childNode); - } - } - - // Find the root account node in the tree. - ManagedCustomerTreeNode rootNode = null; - foreach (ManagedCustomerTreeNode node in customerIdToCustomerNode.Values) - { - if (node.ParentNode == null) - { - rootNode = node; - break; - } - } - - // Display account tree. - Console.WriteLine("CustomerId, Name"); - Console.WriteLine(rootNode.ToTreeString(0, new StringBuilder())); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create ad groups.", e); - } - } - } - - /// - /// Example implementation of a node that would exist in an account tree. - /// - private class ManagedCustomerTreeNode - { - /// - /// The parent node. - /// - private ManagedCustomerTreeNode parentNode; - - /// - /// The account associated with this node. - /// - private ManagedCustomer account; - - /// - /// The list of child accounts. - /// - private List childAccounts = - new List(); - - /// - /// Gets or sets the parent node. - /// - public ManagedCustomerTreeNode ParentNode - { - get { return parentNode; } - set { parentNode = value; } - } - - /// - /// Gets or sets the account. - /// - public ManagedCustomer Account - { - get { return account; } - set { account = value; } - } - - /// - /// Gets the child accounts. - /// - public List ChildAccounts - { - get { return childAccounts; } - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("{0}, {1}", account.customerId, account.name); - } - - /// - /// Returns a string representation of the current level of the tree and - /// recursively returns the string representation of the levels below it. - /// - /// The depth of the node. - /// The String Builder containing the tree - /// representation. - /// The tree string representation. - public StringBuilder ToTreeString(int depth, StringBuilder sb) - { - sb.Append('-', depth * 2); - sb.Append(this); - sb.AppendLine(); - foreach (ManagedCustomerTreeNode childAccount in childAccounts) - { - childAccount.ToTreeString(depth + 1, sb); - } - - return sb; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdCustomizers.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdCustomizers.cs deleted file mode 100755 index f3a5b33e67b..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdCustomizers.cs +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds an ad customizer feed. Then it adds an ad in two - /// different ad groups that uses the feed to populate dynamic data. - /// - public class AddAdCustomizers : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddAdCustomizers codeExample = new AddAdCustomizers(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId1 = long.Parse("INSERT_ADGROUP_ID_HERE"); - long adGroupId2 = long.Parse("INSERT_ADGROUP_ID_HERE"); - string feedName = "INSERT_FEED_NAME_HERE"; - codeExample.Run(new AdWordsUser(), adGroupId1, adGroupId2, feedName); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds an ad customizer feed. Then it adds an ad in two " + - "different ad groups that uses the feed to populate dynamic data."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the first adgroup to which ads with ad - /// customizers are added. - /// Id of the second adgroup to which ads with ad - /// customizers are added. - /// Name of the feed to be created. - public void Run(AdWordsUser user, long adGroupId1, long adGroupId2, string feedName) - { - try - { - // Create a customizer feed. One feed per account can be used for all ads. - AdCustomizerFeed adCustomizerFeed = CreateCustomizerFeed(user, feedName); - - // Add feed items containing the values we'd like to place in ads. - CreateCustomizerFeedItems(user, new long[] - { - adGroupId1, - adGroupId2 - }, adCustomizerFeed); - - // All set! We can now create ads with customizations. - CreateAdsWithCustomizations(user, new long[] - { - adGroupId1, - adGroupId2 - }, feedName); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add ad customizers.", e); - } - } - - /// - /// Creates a new Feed for ad customizers. - /// - /// The AdWords user. - /// Name of the feed to be created. - /// A new Ad customizer feed. - private static AdCustomizerFeed CreateCustomizerFeed(AdWordsUser user, string feedName) - { - using (AdCustomizerFeedService adCustomizerFeedService = - (AdCustomizerFeedService) user.GetService(AdWordsService.v201806 - .AdCustomizerFeedService)) - { - AdCustomizerFeed feed = new AdCustomizerFeed() - { - feedName = feedName, - feedAttributes = new AdCustomizerFeedAttribute[] - { - new AdCustomizerFeedAttribute() - { - name = "Name", - type = AdCustomizerFeedAttributeType.STRING - }, - new AdCustomizerFeedAttribute() - { - name = "Price", - type = AdCustomizerFeedAttributeType.PRICE - }, - new AdCustomizerFeedAttribute() - { - name = "Date", - type = AdCustomizerFeedAttributeType.DATE_TIME - }, - } - }; - - AdCustomizerFeedOperation feedOperation = new AdCustomizerFeedOperation() - { - operand = feed, - @operator = (Operator.ADD) - }; - - AdCustomizerFeed addedFeed = adCustomizerFeedService.mutate( - new AdCustomizerFeedOperation[] - { - feedOperation - }).value[0]; - - Console.WriteLine( - "Created ad customizer feed with ID = {0} and name = '{1}' and " + - "attributes: ", addedFeed.feedId, addedFeed.feedName); - - foreach (AdCustomizerFeedAttribute feedAttribute in addedFeed.feedAttributes) - { - Console.WriteLine(" ID: {0}, name: '{1}', type: {2}", feedAttribute.id, - feedAttribute.name, feedAttribute.type); - } - - return addedFeed; - } - } - - /// - /// Restricts the feed item to an ad group. - /// - /// The user. - /// The feed item. - /// The ad group ID. - private static void RestrictFeedItemToAdGroup(AdWordsUser user, FeedItem feedItem, - long? adGroupId) - { - FeedItemAdGroupTarget adGroupTarget = new FeedItemAdGroupTarget() - { - feedId = feedItem.feedId, - feedItemId = feedItem.feedItemId, - adGroupId = adGroupId.Value - }; - - using (FeedItemTargetService feedItemTargetService = - (FeedItemTargetService) user.GetService( - AdWordsService.v201806.FeedItemTargetService)) - { - FeedItemTargetOperation operation = new FeedItemTargetOperation() - { - @operator = Operator.ADD, - operand = adGroupTarget - }; - - FeedItemTargetReturnValue retval = feedItemTargetService.mutate( - new FeedItemTargetOperation[] - { - operation - }); - FeedItemAdGroupTarget newAdGroupTarget = (FeedItemAdGroupTarget) retval.value[0]; - Console.WriteLine( - "Feed item target for feed ID {0} and feed item ID {1}" + - " was created to restrict serving to ad group ID {2}", newAdGroupTarget.feedId, - newAdGroupTarget.feedItemId, newAdGroupTarget.adGroupId); - } - } - - /// - /// Creates feed items with the values to use in ad customizations for each - /// ad group in adGroupIds. - /// - /// The AdWords user. - /// IDs of adgroups to which ad customizations are - /// made. - /// The ad customizer feed. - private static void CreateCustomizerFeedItems(AdWordsUser user, long[] adGroupIds, - AdCustomizerFeed adCustomizerFeed) - { - using (FeedItemService feedItemService = - (FeedItemService) user.GetService(AdWordsService.v201806.FeedItemService)) - { - List feedItemOperations = new List(); - - DateTime marsDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); - feedItemOperations.Add(CreateFeedItemAddOperation(adCustomizerFeed, "Mars", - "$1234.56", marsDate.ToString("yyyyMMdd HHmmss"))); - - DateTime venusDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 15); - feedItemOperations.Add(CreateFeedItemAddOperation(adCustomizerFeed, "Venus", - "$1450.00", venusDate.ToString("yyyyMMdd HHmmss"))); - - FeedItemReturnValue feedItemReturnValue = - feedItemService.mutate(feedItemOperations.ToArray()); - - foreach (FeedItem addedFeedItem in feedItemReturnValue.value) - { - Console.WriteLine("Added feed item with ID {0}", addedFeedItem.feedItemId); - } - - // Add feed item targeting to restrict the feed item to specific ad groups. - RestrictFeedItemToAdGroup(user, feedItemReturnValue.value[0], adGroupIds[0]); - RestrictFeedItemToAdGroup(user, feedItemReturnValue.value[1], adGroupIds[1]); - } - } - - /// - /// Creates a FeedItemOperation that will create a FeedItem with the - /// specified values when sent to FeedItemService.mutate. - /// - /// The ad customizer feed. - /// The value for the name attribute of the FeedItem. - /// - /// The value for the price attribute of the FeedItem. - /// - /// The value for the date attribute of the FeedItem. - /// - /// A new FeedItemOperation for adding a FeedItem. - private static FeedItemOperation CreateFeedItemAddOperation( - AdCustomizerFeed adCustomizerFeed, string name, string price, string date) - { - FeedItem feedItem = new FeedItem() - { - feedId = adCustomizerFeed.feedId, - - // FeedAttributes appear in the same order as they were created - // - Name, Price, Date. See CreateCustomizerFeed method for details. - attributeValues = new FeedItemAttributeValue[] - { - new FeedItemAttributeValue() - { - feedAttributeId = adCustomizerFeed.feedAttributes[0].id, - stringValue = name - }, - - new FeedItemAttributeValue() - { - feedAttributeId = adCustomizerFeed.feedAttributes[1].id, - stringValue = price - }, - - new FeedItemAttributeValue() - { - feedAttributeId = adCustomizerFeed.feedAttributes[2].id, - stringValue = date - } - }, - }; - - return new FeedItemOperation() - { - operand = feedItem, - @operator = Operator.ADD - }; - } - - /// - /// Creates text ads that use ad customizations for the specified ad group - /// IDs. - /// - /// The AdWords user. - /// IDs of the ad groups to which customized ads - /// are added. - /// Name of the feed to be used. - private static void CreateAdsWithCustomizations(AdWordsUser user, long[] adGroupIds, - string feedName) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - ExpandedTextAd expandedTextAd = new ExpandedTextAd() - { - headlinePart1 = string.Format("Luxury Cruise to {{={0}.Name}}", feedName), - headlinePart2 = string.Format("Only {{={0}.Price}}", feedName), - description = - string.Format("Offer ends in {{=countdown({0}.Date)}}!", feedName), - finalUrls = new string[] - { - "http://www.example.com" - } - }; - - // We add the same ad to both ad groups. When they serve, they will show - // different values, since they match different feed items. - List adGroupAdOperations = new List(); - foreach (long adGroupId in adGroupIds) - { - AdGroupAd adGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = expandedTextAd - }; - - AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation() - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - adGroupAdOperations.Add(adGroupAdOperation); - } - - AdGroupAdReturnValue adGroupAdReturnValue = - adGroupAdService.mutate(adGroupAdOperations.ToArray()); - - foreach (AdGroupAd addedAd in adGroupAdReturnValue.value) - { - Console.WriteLine("Created an ad with ID {0}, type '{1}' and status '{2}'.", - addedAd.ad.id, addedAd.ad.AdType, addedAd.status); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdGroupBidModifier.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdGroupBidModifier.cs deleted file mode 100755 index 90f3ca2263c..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddAdGroupBidModifier.cs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to add ad group level mobile bid - /// modifier override. - /// - public class AddAdGroupBidModifier : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddAdGroupBidModifier codeExample = new AddAdGroupBidModifier(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - double bidModifier = double.Parse("INSERT_ADGROUP_BID_MODIFIER_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, bidModifier); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example illustrates how to add ad group level mobile bid modifier " + - "override."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the adgroup for which bid modifier is - /// set. - /// The mobile bid modifier for adgroup - public void Run(AdWordsUser user, long adGroupId, double bidModifier) - { - using (AdGroupBidModifierService adGroupBidModifierService = - (AdGroupBidModifierService) user.GetService(AdWordsService.v201806 - .AdGroupBidModifierService)) - { - // Mobile criterion ID. - long criterionId = 30001; - - // Create the adgroup bid modifier. - AdGroupBidModifier adGroupBidModifier = new AdGroupBidModifier - { - bidModifier = bidModifier, - adGroupId = adGroupId - }; - - Platform platform = new Platform - { - id = criterionId - }; - - adGroupBidModifier.criterion = platform; - - AdGroupBidModifierOperation operation = new AdGroupBidModifierOperation - { - @operator = Operator.ADD, - operand = adGroupBidModifier - }; - - try - { - // Add ad group level mobile bid modifier. - AdGroupBidModifierReturnValue retval = adGroupBidModifierService.mutate( - new AdGroupBidModifierOperation[] - { - operation - }); - - // Display the results. - if (retval != null && retval.value != null && retval.value.Length > 0) - { - AdGroupBidModifier newBidModifier = retval.value[0]; - Console.WriteLine( - "AdGroup ID {0}, Criterion ID {1} was updated with ad group level " + - "modifier: {2}", newBidModifier.adGroupId, newBidModifier.criterion.id, - newBidModifier.bidModifier); - } - else - { - Console.WriteLine("No bid modifiers were added to the adgroup."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add bid modifiers to adgroup.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddClickToDownloadAd.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddClickToDownloadAd.cs deleted file mode 100755 index 33b7430b0b0..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddClickToDownloadAd.cs +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example creates a click-to-download ad, also known as an - /// app promotion ad to a given ad group. To list ad groups, run - /// GetAdGroups.cs. - /// - public class AddClickToDownloadAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddClickToDownloadAd codeExample = new AddClickToDownloadAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example creates a click-to-download ad, also known as an app " + - "promotion ad to a given ad group. To list ad groups, run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which ads are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create the template ad. - TemplateAd clickToDownloadAppAd = new TemplateAd - { - name = "Ad for demo game", - templateId = 353, - finalUrls = new string[] - { - "http://play.google.com/store/apps/details?id=com.example.demogame" - }, - displayUrl = "play.google.com" - }; - - // Create the template elements for the ad. You can refer to - // https://developers.google.com/adwords/api/docs/appendix/templateads - // for the list of avaliable template fields. - TemplateElementField headline = new TemplateElementField - { - name = "headline", - fieldText = "Enjoy your drive in Mars", - type = TemplateElementFieldType.TEXT - }; - - TemplateElementField description1 = new TemplateElementField - { - name = "description1", - fieldText = "Realistic physics simulation", - type = TemplateElementFieldType.TEXT - }; - - TemplateElementField description2 = new TemplateElementField - { - name = "description2", - fieldText = "Race against players online", - type = TemplateElementFieldType.TEXT - }; - - TemplateElementField appId = new TemplateElementField - { - name = "appId", - fieldText = "com.example.demogame", - type = TemplateElementFieldType.TEXT - }; - - TemplateElementField appStore = new TemplateElementField - { - name = "appStore", - fieldText = "2", - type = TemplateElementFieldType.ENUM - }; - - // Optionally specify a landscape image. The image needs to be in a BASE64 - // encoded form. Here we download a demo image and encode it for this ad. - byte[] imageData = - MediaUtilities.GetAssetDataFromUrl("https://goo.gl/9JmyKk", user.Config); - Image image = new Image - { - data = imageData - }; - TemplateElementField landscapeImage = new TemplateElementField - { - name = "landscapeImage", - fieldMedia = image, - type = TemplateElementFieldType.IMAGE - }; - - TemplateElement adData = new TemplateElement - { - uniqueName = "adData", - fields = new TemplateElementField[] - { - headline, - description1, - description2, - appId, - appStore, - landscapeImage - } - }; - - clickToDownloadAppAd.templateElements = new TemplateElement[] - { - adData - }; - - // Create the adgroupad. - AdGroupAd clickToDownloadAppAdGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = clickToDownloadAppAd, - - // Optional: Set the status. - status = AdGroupAdStatus.PAUSED - }; - - // Create the operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - @operator = Operator.ADD, - operand = clickToDownloadAppAdGroupAd - }; - - try - { - // Create the ads. - AdGroupAdReturnValue retval = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - // Display the results. - if (retval != null && retval.value != null) - { - foreach (AdGroupAd adGroupAd in retval.value) - { - Console.WriteLine( - "New click-to-download ad with id = \"{0}\" and url = \"{1}\" " + - "was created.", adGroupAd.ad.id, adGroupAd.ad.finalUrls[0]); - } - } - else - { - Console.WriteLine("No click-to-download ads were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create click-to-download ad.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicPageFeed.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicPageFeed.cs deleted file mode 100755 index db7c091c919..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicPageFeed.cs +++ /dev/null @@ -1,509 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a page feed to specify precisely which URLs to use with your - /// Dynamic Search Ads campaign. To create a Dynamic Search Ads campaign, run - /// AddDynamicSearchAdsCampaign.cs. To get campaigns, run GetCampaigns.cs. - /// - public class AddDynamicPageFeed : ExampleBase - { - /// - /// The criterion type to be used for DSA page feeds. - /// - /// DSA page feeds use criterionType field instead of the placeholderType field - /// unlike most other feed types. - private const int DSA_PAGE_FEED_CRITERION_TYPE = 61; - - /// - /// ID that corresponds to the page URLs. - /// - private const int DSA_PAGE_URLS_FIELD_ID = 1; - - /// - /// ID that corresponds to the labels. - /// - private const int DSA_LABEL_FIELD_ID = 2; - - /// - /// Class to keep track of DSA page feed details. - /// - private class DSAFeedDetails - { - public long feedId { get; set; } - public long urlAttributeId { get; set; } - public long labelAttributeId { get; set; } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddDynamicPageFeed codeExample = new AddDynamicPageFeed(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId, adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a page feed to specify precisely which URLs to " + - "use with your Dynamic Search Ads campaign. To create a Dynamic Search Ads " + - "campaign, run AddDynamicSearchAdsCampaign.cs. To get campaigns, " + - "run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The DSA campaign ID. - /// The DSA ad group ID. - public void Run(AdWordsUser user, long campaignId, long adGroupId) - { - string dsaPageUrlLabel = "discounts"; - - // Get the page feed details. This code example creates a new feed, but you can - // fetch and re-use an existing feed. - DSAFeedDetails feedDetails = CreateFeed(user); - CreateFeedMapping(user, feedDetails); - CreateFeedItems(user, feedDetails, dsaPageUrlLabel); - - // Associate the page feed with the campaign. - UpdateCampaignDsaSetting(user, campaignId, feedDetails.feedId); - - // Optional: Target web pages matching the feed's label in the ad group. - AddDsaTargeting(user, adGroupId, dsaPageUrlLabel); - - Console.WriteLine("Dynamic page feed setup is complete for campaign ID '{0}'.", - campaignId); - } - - /// - /// Creates the feed for DSA page URLs. - /// - /// The AdWords User. - /// The feed details. - private static DSAFeedDetails CreateFeed(AdWordsUser user) - { - using (FeedService feedService = - (FeedService) user.GetService(AdWordsService.v201806.FeedService)) - { - // Create attributes. - FeedAttribute urlAttribute = new FeedAttribute - { - type = FeedAttributeType.URL_LIST, - name = "Page URL" - }; - - FeedAttribute labelAttribute = new FeedAttribute - { - type = FeedAttributeType.STRING_LIST, - name = "Label" - }; - - // Create the feed. - Feed sitelinksFeed = new Feed - { - name = "DSA Feed " + ExampleUtilities.GetRandomString(), - attributes = new FeedAttribute[] - { - urlAttribute, - labelAttribute - }, - origin = FeedOrigin.USER - }; - - // Create operation. - FeedOperation operation = new FeedOperation - { - operand = sitelinksFeed, - @operator = Operator.ADD - }; - - try - { - // Add the feed. - FeedReturnValue result = feedService.mutate(new FeedOperation[] - { - operation - }); - - Feed savedFeed = result.value[0]; - return new DSAFeedDetails - { - feedId = savedFeed.id, - urlAttributeId = savedFeed.attributes[0].id, - labelAttributeId = savedFeed.attributes[1].id, - }; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create DSA feed.", e); - } - } - } - - /// - /// Creates the feed mapping for DSA page feeds. - /// - /// The AdWords user. - /// The feed details. - private static void CreateFeedMapping(AdWordsUser user, DSAFeedDetails feedDetails) - { - using (FeedMappingService feedMappingService = - (FeedMappingService) user.GetService(AdWordsService.v201806.FeedMappingService)) - { - // Map the FeedAttributeIds to the fieldId constants. - AttributeFieldMapping urlFieldMapping = new AttributeFieldMapping - { - feedAttributeId = feedDetails.urlAttributeId, - fieldId = DSA_PAGE_URLS_FIELD_ID - }; - - AttributeFieldMapping labelFieldMapping = new AttributeFieldMapping - { - feedAttributeId = feedDetails.labelAttributeId, - fieldId = DSA_LABEL_FIELD_ID - }; - - // Create the FieldMapping and operation. - FeedMapping feedMapping = new FeedMapping - { - criterionType = DSA_PAGE_FEED_CRITERION_TYPE, - feedId = feedDetails.feedId, - attributeFieldMappings = new AttributeFieldMapping[] - { - urlFieldMapping, - labelFieldMapping - } - }; - - FeedMappingOperation operation = new FeedMappingOperation - { - operand = feedMapping, - @operator = Operator.ADD - }; - - try - { - // Add the field mapping. - feedMappingService.mutate(new FeedMappingOperation[] - { - operation - }); - return; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create feed mapping.", e); - } - } - } - - /// - /// Creates the page URLs in the DSA page feed. - /// - /// The AdWords user. - /// The feed details. - /// The pagefeed url label. - private static void CreateFeedItems(AdWordsUser user, DSAFeedDetails feedDetails, - string labelName) - { - using (FeedItemService feedItemService = - (FeedItemService) user.GetService(AdWordsService.v201806.FeedItemService)) - { - FeedItemOperation[] operations = new FeedItemOperation[] - { - CreateDsaUrlAddOperation(feedDetails, - "http://www.example.com/discounts/rental-cars", labelName), - CreateDsaUrlAddOperation(feedDetails, - "http://www.example.com/discounts/hotel-deals", labelName), - CreateDsaUrlAddOperation(feedDetails, - "http://www.example.com/discounts/flight-deals", labelName), - }; - feedItemService.mutate(operations); - } - } - - /// - /// Creates the DSA URL add operation. - /// - /// The page feed details. - /// The DSA page feed URL. - /// DSA page feed label. - /// The DSA URL add operation. - private static FeedItemOperation CreateDsaUrlAddOperation(DSAFeedDetails details, - string url, string label) - { - // Create the FeedItemAttributeValues for our text values. - FeedItemAttributeValue urlAttributeValue = new FeedItemAttributeValue - { - feedAttributeId = details.urlAttributeId, - - // See https://support.google.com/adwords/answer/7166527 for page feed URL - // recommendations and rules. - stringValues = new string[] - { - url - } - }; - - FeedItemAttributeValue labelAttributeValue = new FeedItemAttributeValue - { - feedAttributeId = details.labelAttributeId, - stringValues = new string[] - { - label - } - }; - - // Create the feed item and operation. - FeedItem item = new FeedItem - { - feedId = details.feedId, - - attributeValues = new FeedItemAttributeValue[] - { - urlAttributeValue, - labelAttributeValue - } - }; - - FeedItemOperation operation = new FeedItemOperation - { - operand = item, - @operator = Operator.ADD - }; - - return operation; - } - - /// - /// Updates the campaign DSA setting to add DSA pagefeeds. - /// - /// The AdWords user. - /// The Campaign ID. - /// The page feed ID. - private static void UpdateCampaignDsaSetting(AdWordsUser user, long campaignId, long feedId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - Selector selector = new Selector() - { - fields = new string[] - { - Campaign.Fields.Id, - Campaign.Fields.Settings - }, - predicates = new Predicate[] - { - Predicate.Equals(Campaign.Fields.Id, campaignId) - }, - paging = Paging.Default - }; - - CampaignPage page = campaignService.get(selector); - - if (page == null || page.entries == null || page.entries.Length == 0) - { - throw new System.ApplicationException( - string.Format("Failed to retrieve campaign with ID = {0}.", campaignId)); - } - - Campaign campaign = page.entries[0]; - - if (campaign.settings == null) - { - throw new System.ApplicationException("This is not a DSA campaign."); - } - - DynamicSearchAdsSetting dsaSetting = null; - Setting[] campaignSettings = campaign.settings; - - for (int i = 0; i < campaign.settings.Length; i++) - { - Setting setting = campaignSettings[i]; - if (setting is DynamicSearchAdsSetting) - { - dsaSetting = (DynamicSearchAdsSetting) setting; - break; - } - } - - if (dsaSetting == null) - { - throw new System.ApplicationException("This is not a DSA campaign."); - } - - // Use a page feed to specify precisely which URLs to use with your - // Dynamic Search Ads. - dsaSetting.pageFeed = new PageFeed() - { - feedIds = new long[] - { - feedId - }, - }; - - // Optional: Specify whether only the supplied URLs should be used with your - // Dynamic Search Ads. - dsaSetting.useSuppliedUrlsOnly = true; - - Campaign campaignToUpdate = new Campaign - { - id = campaignId, - settings = campaignSettings - }; - - CampaignOperation operation = new CampaignOperation - { - operand = campaignToUpdate, - @operator = Operator.SET - }; - - try - { - CampaignReturnValue retval = campaignService.mutate(new CampaignOperation[] - { - operation - }); - Campaign updatedCampaign = retval.value[0]; - Console.WriteLine( - "DSA page feed for campaign ID '{0}' was updated with feed ID '{1}'.", - updatedCampaign.id, feedId); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to set page feed for campaign.", - e); - } - } - - } - - /// - /// Set custom targeting for the page feed URLs based on a list of labels. - /// - /// The AdWords user. - /// Ad group ID. - /// The label name. - /// The newly created webpage criterion. - private static BiddableAdGroupCriterion AddDsaTargeting(AdWordsUser user, long adGroupId, - string labelName) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Create a webpage criterion. - Webpage webpage = new Webpage(); - - WebpageParameter parameter = new WebpageParameter - { - criterionName = "Test criterion" - }; - webpage.parameter = parameter; - - // Add a condition for label=specified_label_name. - WebpageCondition condition = new WebpageCondition - { - operand = WebpageConditionOperand.CUSTOM_LABEL, - argument = labelName - }; - parameter.conditions = new WebpageCondition[] - { - condition - }; - - BiddableAdGroupCriterion criterion = new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = webpage - }; - - // Set a custom bid for this criterion. - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration - { - bids = new Bids[] - { - new CpcBid() - { - bid = new Money() - { - microAmount = 1500000 - } - } - } - }; - - criterion.biddingStrategyConfiguration = biddingStrategyConfiguration; - - AdGroupCriterionOperation operation = new AdGroupCriterionOperation - { - operand = criterion, - @operator = Operator.ADD - }; - - try - { - AdGroupCriterionReturnValue retval = adGroupCriterionService.mutate( - new AdGroupCriterionOperation[] - { - operation - }); - BiddableAdGroupCriterion newCriterion = - (BiddableAdGroupCriterion) retval.value[0]; - - Console.WriteLine( - "Web page criterion with ID = {0} and status = {1} was created.", - newCriterion.criterion.id, newCriterion.userStatus); - return newCriterion; - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create webpage criterion for " + "custom page feed label.", e); - } - } - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.cs deleted file mode 100755 index 2b4ad0cee84..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.cs +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a Dynamic Search Ads campaign. To get campaigns, run GetCampaigns.cs. - /// - public class AddDynamicSearchAdsCampaign : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddDynamicSearchAdsCampaign codeExample = new AddDynamicSearchAdsCampaign(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a Dynamic Search Ads campaign. To get campaigns, " + - "run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - Budget budget = CreateBudget(user); - Campaign campaign = CreateCampaign(user, budget); - AdGroup adGroup = CreateAdGroup(user, campaign.id); - CreateExpandedDSA(user, adGroup.id); - AddWebPageCriteria(user, adGroup.id); - Console.WriteLine("Dynamic Search Ads campaign setup is complete."); - } - - /// - /// Creates the budget. - /// - /// The AdWords user. - /// The newly created budget. - private static Budget CreateBudget(AdWordsUser user) - { - using (BudgetService budgetService = - (BudgetService) user.GetService(AdWordsService.v201806.BudgetService)) - { - // Create the campaign budget. - Budget budget = new Budget - { - name = "Interplanetary Cruise Budget #" + ExampleUtilities.GetRandomString(), - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD, - amount = new Money - { - microAmount = 500000 - } - }; - - BudgetOperation budgetOperation = new BudgetOperation - { - @operator = Operator.ADD, - operand = budget - }; - - try - { - BudgetReturnValue budgetRetval = budgetService.mutate(new BudgetOperation[] - { - budgetOperation - }); - Budget newBudget = budgetRetval.value[0]; - Console.WriteLine("Budget with ID = '{0}' and name = '{1}' was created.", - newBudget.budgetId, newBudget.name); - budgetService.Close(); - return newBudget; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add budget.", e); - } - } - } - - - /// - /// Creates the campaign. - /// - /// The AdWords user. - /// The campaign budget. - /// The newly created campaign. - private static Campaign CreateCampaign(AdWordsUser user, Budget budget) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create a Dynamic Search Ads campaign. - Campaign campaign = new Campaign - { - name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(), - advertisingChannelType = AdvertisingChannelType.SEARCH, - - // 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 - }; - - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration - { - biddingStrategyType = BiddingStrategyType.MANUAL_CPC - }; - campaign.biddingStrategyConfiguration = biddingConfig; - - campaign.budget = new Budget - { - budgetId = budget.budgetId - }; - - // Required: Set the campaign's Dynamic Search Ads settings. - DynamicSearchAdsSetting dynamicSearchAdsSetting = new DynamicSearchAdsSetting - { - // Required: Set the domain name and language. - domainName = "example.com", - languageCode = "en" - }; - - // Set the campaign settings. - campaign.settings = new Setting[] - { - dynamicSearchAdsSetting - }; - - // Optional: Set the start date. - campaign.startDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd"); - - // Optional: Set the end date. - campaign.endDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd"); - - // Create the operation. - CampaignOperation operation = new CampaignOperation - { - @operator = Operator.ADD, - operand = campaign - }; - - try - { - // Add the campaign. - CampaignReturnValue retVal = campaignService.mutate(new CampaignOperation[] - { - operation - }); - - // Display the results. - Campaign newCampaign = retVal.value[0]; - Console.WriteLine("Campaign with id = '{0}' and name = '{1}' was added.", - newCampaign.id, newCampaign.name); - return newCampaign; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add campaigns.", e); - } - } - } - - - /// - /// Creates an ad group. - /// - /// The AdWords user. - /// The campaign ID. - /// the newly created ad group. - private static AdGroup CreateAdGroup(AdWordsUser user, long campaignId) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - // Create the ad group. - AdGroup adGroup = new AdGroup - { - // Required: Set the ad group's type to Dynamic Search Ads. - adGroupType = AdGroupType.SEARCH_DYNAMIC_ADS, - - name = string.Format("Earth to Mars Cruises #{0}", - ExampleUtilities.GetRandomString()), - campaignId = campaignId, - status = AdGroupStatus.PAUSED, - - // Recommended: Set a tracking URL template for your ad group if you want to use - // URL tracking software. - trackingUrlTemplate = "http://tracker.example.com/traveltracker/{escapedlpurl}" - }; - - // Set the ad group bids. - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration(); - - CpcBid cpcBid = new CpcBid - { - bid = new Money - { - microAmount = 3000000 - } - }; - - biddingConfig.bids = new Bids[] - { - cpcBid - }; - - adGroup.biddingStrategyConfiguration = biddingConfig; - - // Create the operation. - AdGroupOperation operation = new AdGroupOperation - { - @operator = Operator.ADD, - operand = adGroup - }; - - try - { - // Create the ad group. - AdGroupReturnValue retVal = adGroupService.mutate(new AdGroupOperation[] - { - operation - }); - - // Display the results. - AdGroup newAdGroup = retVal.value[0]; - Console.WriteLine("Ad group with id = '{0}' and name = '{1}' was created.", - newAdGroup.id, newAdGroup.name); - return newAdGroup; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create ad group.", e); - } - } - } - - - /// - /// Creates an expanded Dynamic Search Ad. - /// - /// The AdWords user. - /// ID of the ad group in which ad is created. - /// The newly created ad. - private static ExpandedDynamicSearchAd CreateExpandedDSA(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create an Expanded Dynamic Search Ad. This ad will have its headline, display URL - // and final URL auto-generated at serving time according to domain name specific - // information provided by DynamicSearchAdsSetting at the campaign level. - ExpandedDynamicSearchAd expandedDSA = new ExpandedDynamicSearchAd - { - // Set the ad description. - description = "Buy your tickets now!" - }; - - // Create the ad group ad. - AdGroupAd adGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = expandedDSA, - - // Optional: Set the status. - status = AdGroupAdStatus.PAUSED - }; - - // Create the operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - @operator = Operator.ADD, - operand = adGroupAd - }; - - try - { - // Create the ad. - AdGroupAdReturnValue retval = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - // Display the results. - AdGroupAd newAdGroupAd = retval.value[0]; - ExpandedDynamicSearchAd newAd = newAdGroupAd.ad as ExpandedDynamicSearchAd; - Console.WriteLine( - "Expanded Dynamic Search Ad with ID '{0}' and description '{1}' " + - "was added.", newAd.id, newAd.description); - return newAd; - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create Expanded Dynamic Search Ad.", e); - } - } - } - - - /// - /// Adds a web page criterion to target Dynamic Search Ads. - /// - /// The AdWords user. - /// The ad group ID. - /// The newly created web page criterion. - private static BiddableAdGroupCriterion AddWebPageCriteria(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Create a webpage criterion for special offers for mars cruise. - WebpageParameter param = new WebpageParameter - { - criterionName = "Special offers for mars" - }; - - WebpageCondition urlCondition = new WebpageCondition - { - operand = WebpageConditionOperand.URL, - argument = "/marscruise/special" - }; - - WebpageCondition titleCondition = new WebpageCondition - { - operand = WebpageConditionOperand.PAGE_TITLE, - argument = "Special Offer" - }; - - param.conditions = new WebpageCondition[] - { - urlCondition, - titleCondition - }; - - Webpage webpage = new Webpage - { - parameter = param - }; - - // Create biddable ad group criterion. - BiddableAdGroupCriterion biddableAdGroupCriterion = new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = webpage, - userStatus = UserStatus.PAUSED - }; - - // Optional: set a custom bid. - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration(); - CpcBid bid = new CpcBid() - { - bid = new Money() - { - microAmount = 10000000L - } - }; - biddingStrategyConfiguration.bids = new Bids[] - { - bid - }; - biddableAdGroupCriterion.biddingStrategyConfiguration = - biddingStrategyConfiguration; - - // Create the operation. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation - { - @operator = Operator.ADD, - operand = biddableAdGroupCriterion - }; - - try - { - AdGroupCriterionReturnValue result = adGroupCriterionService.mutate( - new AdGroupCriterionOperation[] - { - operation - }); - - BiddableAdGroupCriterion newCriterion = - (BiddableAdGroupCriterion) result.value[0]; - Console.WriteLine( - "Webpage criterion with ID = '{0}' was added to ad group ID '{1}'.", - newCriterion.criterion.id, newCriterion.adGroupId); - return newCriterion; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create webpage criterion.", e); - } - } - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs deleted file mode 100755 index 7d60864b90d..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.cs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds an expanded text ad that uses advanced features - /// of upgraded URLs. - /// - public class AddExpandedTextAdWithUpgradedUrls : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddExpandedTextAdWithUpgradedUrls codeExample = new AddExpandedTextAdWithUpgradedUrls(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example adds an expanded text ad that uses advanced features of " + - "upgraded URLs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// ID of the ad group to which ad is added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create the expanded text ad. - ExpandedTextAd expandedTextAd = new ExpandedTextAd() - { - headlinePart1 = "Luxury Cruise to Mars", - headlinePart2 = "Visit the Red Planet in style.", - description = "Low-gravity fun for everyone!", - }; - - // Specify a tracking URL for 3rd party tracking provider. You may - // specify one at customer, campaign, ad group, ad, criterion or - // feed item levels. - expandedTextAd.trackingUrlTemplate = - "http://tracker.example.com/?season={_season}&promocode={_promocode}&u={lpurl}"; - - // Since your tracking URL has two custom parameters, provide their - // values too. This can be provided at campaign, ad group, ad, criterion - // or feed item levels. - CustomParameter seasonParameter = new CustomParameter - { - key = "season", - value = "christmas" - }; - - CustomParameter promoCodeParameter = new CustomParameter - { - key = "promocode", - value = "NYC123" - }; - - expandedTextAd.urlCustomParameters = new CustomParameters - { - parameters = new CustomParameter[] - { - seasonParameter, - promoCodeParameter - } - }; - - // Specify a list of final URLs. This field cannot be set if URL field is - // set. This may be specified at ad, criterion and feed item levels. - expandedTextAd.finalUrls = new string[] - { - "http://www.example.com/cruise/space/", - "http://www.example.com/locations/mars/" - }; - - // Specify a list of final mobile URLs. This field cannot be set if URL - // field is set, or finalUrls is unset. This may be specified at ad, - // criterion and feed item levels. - expandedTextAd.finalMobileUrls = new string[] - { - "http://mobile.example.com/cruise/space/", - "http://mobile.example.com/locations/mars/" - }; - - AdGroupAd adGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = expandedTextAd, - - // Optional: Set the status. - status = AdGroupAdStatus.PAUSED - }; - - // Create the operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - @operator = Operator.ADD, - operand = adGroupAd - }; - - AdGroupAdReturnValue retVal = null; - - try - { - // Create the ads. - retVal = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null) - { - ExpandedTextAd newExpandedTextAd = retVal.value[0].ad as ExpandedTextAd; - - Console.WriteLine( - "Expanded text ad with ID '{0}' and headline '{1} - {2}' was added.", - newExpandedTextAd.id, newExpandedTextAd.headlinePart1, - newExpandedTextAd.headlinePart2); - - Console.WriteLine("Upgraded URL properties:"); - - Console.WriteLine(" Final URLs: {0}", - string.Join(", ", newExpandedTextAd.finalUrls)); - Console.WriteLine(" Final Mobile URLs: {0}", - string.Join(", ", newExpandedTextAd.finalMobileUrls)); - Console.WriteLine(" Tracking URL template: {0}", - newExpandedTextAd.trackingUrlTemplate); - - List parameters = new List(); - foreach (CustomParameter customParam in newExpandedTextAd - .urlCustomParameters.parameters) - { - parameters.Add(string.Format("{0}={1}", customParam.key, - customParam.value)); - } - - Console.WriteLine(" Custom parameters: {0}", - string.Join(", ", parameters.ToArray())); - } - else - { - Console.WriteLine("No expanded text ads were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create expanded text ad.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddGmailAd.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddGmailAd.cs deleted file mode 100755 index e769939d3e4..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddGmailAd.cs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a Gmail ad to a given ad group. The ad group's - /// campaign needs to have an AdvertisingChannelType of DISPLAY and - /// AdvertisingChannelSubType of DISPLAY_GMAIL_AD. - /// To get ad groups, run GetAdGroups.cs. - /// - public class AddGmailAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddGmailAd codeExample = new AddGmailAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a Gmail ad to a given ad group. The ad group's " + - "campaign needs to have an AdvertisingChannelType of DISPLAY and " + - "AdvertisingChannelSubType of DISPLAY_GMAIL_AD. To get ad groups, " + - "run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the adgroup to which ads are added. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // This ad format does not allow the creation of an image using the - // Image.data field. An image must first be created using the - // MediaService, and Image.mediaId must be populated when creating the - // ad. - Image logoImage = new Image - { - mediaId = UploadImage(user, "https://goo.gl/mtt54n").mediaId - }; - - Image marketingImage = new Image - { - mediaId = UploadImage(user, "https://goo.gl/3b9Wfh").mediaId - }; - - GmailTeaser teaser = new GmailTeaser - { - headline = "Dream", - description = "Create your own adventure", - businessName = "Interplanetary Ships", - logoImage = logoImage - }; - - // Creates a Gmail ad. - GmailAd gmailAd = new GmailAd - { - teaser = teaser, - marketingImage = marketingImage, - marketingImageHeadline = "Travel", - marketingImageDescription = "Take to the skies!", - finalUrls = new string[] - { - "http://www.example.com/" - } - }; - - // Creates ad group ad for the Gmail ad. - AdGroupAd adGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = gmailAd, - // Optional: Set additional settings. - status = AdGroupAdStatus.PAUSED - }; - - // Creates ad group ad operation and add it to the list. - AdGroupAdOperation operation = new AdGroupAdOperation - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - try - { - // Adds a responsive display ad on the server. - AdGroupAdReturnValue result = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - if (result == null || result.value == null || result.value.Length == 0) - { - Console.WriteLine("No Gmail ads were added."); - return; - } - - // Prints out some information for each created Gmail ad. - foreach (AdGroupAd newAdGroupAd in result.value) - { - Console.WriteLine("A Gmail ad with ID {0} and headline '{1}' was added.", - newAdGroupAd.ad.id, (newAdGroupAd.ad as GmailAd).teaser.headline); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add Gmail ads.", e); - } - } - } - - /// - /// Uploads an image to the server. - /// - /// The AdWords user. - /// The URL of image to upload. - /// The created image. - private static Media UploadImage(AdWordsUser user, string url) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - Image image = new Image - { - data = MediaUtilities.GetAssetDataFromUrl(url, user.Config), - type = MediaMediaType.IMAGE - }; - return mediaService.upload(new Media[] - { - image - })[0]; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddHtml5Ad.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddHtml5Ad.cs deleted file mode 100755 index e09623d151e..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddHtml5Ad.cs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds an HTML5 ad to a given ad group. To get ad groups, - /// run GetAdGroups.cs. - /// - public class AddHtml5Ad : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddHtml5Ad codeExample = new AddHtml5Ad(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds an HTML5 ad to a given ad group. To get ad groups," + - " run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the first adgroup to which ad is added. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create the HTML5 template ad. See - // https://developers.google.com/adwords/api/docs/guides/template-ads#html5_ads - // for more details. - TemplateAd html5Ad = new TemplateAd() - { - name = "Ad for HTML5", - templateId = 419, - finalUrls = new string[] - { - "http://example.com/html5" - }, - displayUrl = "www.example.com/html5", - dimensions = new Dimensions() - { - width = 300, - height = 250 - } - }; - - // 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 - // Designer (https://www.google.com/webdesigner/). - byte[] html5Zip = - MediaUtilities.GetAssetDataFromUrl("https://goo.gl/9Y7qI2", user.Config); - - // Create a media bundle containing the zip file with all the HTML5 components. - MediaBundle mediaBundle = new MediaBundle() - { - // You may also upload an HTML5 zip using MediaService.upload() method - // set the mediaId field. See UploadMediaBundle.cs for an example on - // how to upload HTML5 zip files. - data = html5Zip, - entryPoint = "carousel/index.html", - type = MediaMediaType.MEDIA_BUNDLE - }; - - // Create the template elements for the ad. You can refer to - // https://developers.google.com/adwords/api/docs/appendix/templateads - // for the list of available template fields. - html5Ad.templateElements = new TemplateElement[] - { - new TemplateElement() - { - uniqueName = "adData", - fields = new TemplateElementField[] - { - new TemplateElementField() - { - name = "Custom_layout", - fieldMedia = mediaBundle, - type = TemplateElementFieldType.MEDIA_BUNDLE - }, - new TemplateElementField() - { - name = "layout", - fieldText = "Custom", - type = TemplateElementFieldType.ENUM - }, - }, - } - }; - - // Create the AdGroupAd. - AdGroupAd html5AdGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = html5Ad, - // Additional properties (non-required). - status = AdGroupAdStatus.PAUSED - }; - AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation() - { - @operator = Operator.ADD, - operand = html5AdGroupAd - }; - - try - { - // Add HTML5 ad. - AdGroupAdReturnValue result = adGroupAdService.mutate(new AdGroupAdOperation[] - { - adGroupAdOperation - }); - - // Display results. - if (result != null && result.value != null && result.value.Length > 0) - { - foreach (AdGroupAd adGroupAd in result.value) - { - Console.WriteLine( - "New HTML5 ad with id \"{0}\" and display url \"{1}\" was added.", - adGroupAd.ad.id, adGroupAd.ad.displayUrl); - } - } - else - { - Console.WriteLine("No HTML5 ads were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create HTML5 ad.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.cs deleted file mode 100755 index 639812fab26..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a responsive display ad (MultiAssetResponsiveDisplayAd) - /// to an ad group. Image assets are uploaded using AssetService. To get ad groups, - /// run GetAdGroups.cs. - /// - public class AddMultiAssetResponsiveDisplayAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddMultiAssetResponsiveDisplayAd codeExample = new AddMultiAssetResponsiveDisplayAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a responsive display ad " + - "(MultiAssetResponsiveDisplayAd) to an ad group. Image assets are uploaded " + - "using AssetService. To get ad groups, run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which ads are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - try - { - // Create the ad. - MultiAssetResponsiveDisplayAd ad = new MultiAssetResponsiveDisplayAd() - { - headlines = new AssetLink[] - { - new AssetLink() - { - // Text assets can be specified directly in the asset field when - // creating the ad. - asset = new TextAsset() - { - assetText = "Travel to Mars", - }, - }, - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Travel to Jupiter", - }, - }, - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Travel to Pluto", - }, - }, - }, - descriptions = new AssetLink[] - { - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Visit the planet in a luxury spaceship.", - }, - }, - new AssetLink() - { - asset = new TextAsset() - { - assetText = "See the planet in style.", - }, - }, - }, - businessName = "Galactic Luxury Cruises", - longHeadline = new AssetLink() - { - asset = new TextAsset() - { - assetText = "Visit the planet in a luxury spaceship.", - }, - }, - - // This ad format does not allow the creation of an image asset by setting - // the asset.imageData field. An image asset must first be created using the - // AssetService, and asset.assetId must be populated when creating the ad. - marketingImages = new AssetLink[] - { - new AssetLink() - { - asset = new ImageAsset() - { - assetId = UploadImageAsset(user, "https://goo.gl/3b9Wfh") - }, - } - }, - squareMarketingImages = new AssetLink[] - { - new AssetLink() - { - asset = new ImageAsset() - { - assetId = UploadImageAsset(user, "https://goo.gl/mtt54n") - }, - } - }, - finalUrls = new string[] - { - "http://www.example.com" - }, - - // Optional: set call to action text. - callToActionText = "Shop Now", - - // Set color settings using hexadecimal values. Set allowFlexibleColor to - // false if you want your ads to render by always using your colors - // strictly. - mainColor = "#0000ff", - accentColor = "#ffff00", - allowFlexibleColor = false, - - // Set the format setting that the ad will be served in. - formatSetting = DisplayAdFormatSetting.NON_NATIVE, - - // Optional: Set dynamic display ad settings, composed of landscape logo - // image, promotion text, and price prefix. - dynamicSettingsPricePrefix = "as low as", - dynamicSettingsPromoText = "Free shipping!", - logoImages = new AssetLink[] - { - new AssetLink() - { - asset = new ImageAsset() - { - assetId = UploadImageAsset(user, "https://goo.gl/mtt54n") - }, - } - } - }; - - // Create the ad group ad. - AdGroupAd adGroupAd = new AdGroupAd() - { - ad = ad, - adGroupId = adGroupId - }; - - // Create the operation. - AdGroupAdOperation operation = new AdGroupAdOperation() - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - // Make the mutate request. - AdGroupAdReturnValue result = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - // Display results. - if (result != null && result.value != null) - { - foreach (AdGroupAd newAdGroupAd in result.value) - { - MultiAssetResponsiveDisplayAd newAd = - newAdGroupAd.ad as MultiAssetResponsiveDisplayAd; - Console.WriteLine( - "Responsive display ad with ID '{0}' and long headline '{1}'" + - " was added.", newAd.id, - (newAd.longHeadline.asset as TextAsset).assetText); - } - } - else - { - Console.WriteLine("No responsive display ads were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create responsive display ad.", - e); - } - } - } - - /// - /// Uploads the image from the specified . - /// - /// The AdWords user. - /// The image URL. - /// ID of the uploaded image. - private static long UploadImageAsset(AdWordsUser user, string url) - { - using (AssetService assetService = - (AssetService) user.GetService(AdWordsService.v201806.AssetService)) - { - // Create the image asset. - ImageAsset imageAsset = new ImageAsset() - { - // Optional: Provide a unique friendly name to identify your asset. If you - // specify the assetName field, then both the asset name and the image being - // uploaded should be unique, and should not match another ACTIVE asset in this - // customer account. - // assetName = "Image asset " + ExampleUtilities.GetRandomString(), - imageData = MediaUtilities.GetAssetDataFromUrl(url, user.Config), - }; - - // Create the operation. - AssetOperation operation = new AssetOperation() - { - @operator = Operator.ADD, - operand = imageAsset - }; - - // Create the asset and return the ID. - return assetService.mutate(new AssetOperation[] - { - operation - }).value[0].assetId; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddResponsiveDisplayAd.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddResponsiveDisplayAd.cs deleted file mode 100755 index 630748586bd..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddResponsiveDisplayAd.cs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds an image representing the ad using the MediaService - /// and then adds a responsive display ad to an ad group. To get ad groups, - /// run GetAdGroups.cs. - /// - public class AddResponsiveDisplayAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddResponsiveDisplayAd codeExample = new AddResponsiveDisplayAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example adds an image representing the ad using the MediaService " + - "and then adds a responsive display ad to an ad group. To get ad groups, " + - "run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which ads are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - try - { - // Create a responsive display ad. - ResponsiveDisplayAd responsiveDisplayAd = new ResponsiveDisplayAd - { - // This ad format does not allow the creation of an image using the - // Image.data field. An image must first be created using the MediaService, - // and Image.mediaId must be populated when creating the ad. - marketingImage = new Image() - { - mediaId = UploadImage(user, "https://goo.gl/3b9Wfh") - }, - shortHeadline = "Travel", - longHeadline = "Travel the World", - description = "Take to the air!", - businessName = "Google", - finalUrls = new string[] - { - "http://www.example.com" - }, - - // Optional: Create a square marketing image using MediaService, and set it - // to the ad. - squareMarketingImage = new Image() - { - mediaId = UploadImage(user, "https://goo.gl/mtt54n"), - }, - - // Optional: set call to action text. - callToActionText = "Shop Now", - - // Optional: Set dynamic display ad settings, composed of landscape logo - // image, promotion text, and price prefix. - dynamicDisplayAdSettings = CreateDynamicDisplayAdSettings(user) - }; - - // Whitelisted accounts only: Set color settings using hexadecimal values. - // Set allowFlexibleColor to false if you want your ads to render by always - // using your colors strictly. - - // responsiveDisplayAd.mainColor = "#0000ff"; - // responsiveDisplayAd.accentColor = "#ffff00"; - // responsiveDisplayAd.allowFlexibleColor = false; - - // Whitelisted accounts only: Set the format setting that the ad will be - // served in. - - // responsiveDisplayAd.formatSetting = DisplayAdFormatSetting.NON_NATIVE; - - // Create ad group ad. - AdGroupAd adGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = responsiveDisplayAd, - status = AdGroupAdStatus.PAUSED - }; - - // Create operation. - AdGroupAdOperation operation = new AdGroupAdOperation() - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - // Make the mutate request. - AdGroupAdReturnValue result = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - // Display results. - if (result != null && result.value != null) - { - foreach (AdGroupAd newAdGroupAd in result.value) - { - ResponsiveDisplayAd newAd = newAdGroupAd.ad as ResponsiveDisplayAd; - Console.WriteLine( - "Responsive display ad with ID '{0}' and short headline '{1}'" + - " was added.", newAd.id, newAd.shortHeadline); - } - } - else - { - Console.WriteLine("No responsive display ads were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create responsive display ad.", - e); - } - } - - } - - /// - /// Creates the dynamic display ad settings. - /// - /// The AdWords user. - /// - private static DynamicSettings CreateDynamicDisplayAdSettings(AdWordsUser user) - { - long logoImageMediaId = UploadImage(user, "https://goo.gl/dEvQeF"); - Image logo = new Image() - { - mediaId = logoImageMediaId - }; - - return new DynamicSettings() - { - landscapeLogoImage = logo, - pricePrefix = "as low as", - promoText = "Free shipping!" - }; - } - - /// - /// Uploads the image from the specified . - /// - /// The AdWords user. - /// The image URL. - /// ID of the uploaded image. - private static long UploadImage(AdWordsUser user, string url) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - // Create the image. - Image image = new Image() - { - data = MediaUtilities.GetAssetDataFromUrl(url, user.Config), - type = MediaMediaType.IMAGE - }; - - // Upload the image and return the ID. - return mediaService.upload(new Media[] - { - image - })[0].mediaId; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.cs deleted file mode 100755 index 28fd8ccebe7..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.cs +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a Shopping dynamic remarketing campaign for the Display Network - /// via the following steps: - /// - /// - /// Creates a new Display Network campaign. - /// - /// - /// Links the campaign with Merchant Center. - /// - /// - /// Links the user list to the ad group. - /// - /// - /// Creates a responsive display ad to render the dynamic text. - /// - /// - /// - public class AddShoppingDynamicRemarketingCampaign : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddShoppingDynamicRemarketingCampaign codeExample = - new AddShoppingDynamicRemarketingCampaign(); - Console.WriteLine(codeExample.Description); - try - { - // The ID of the merchant center account from which to source product feed data. - long merchantId = long.Parse("INSERT_MERCHANT_CENTER_ID_HERE"); - - // The ID of a shared budget to associate with the campaign. - long budgetId = long.Parse("INSERT_BUDGET_ID_HERE"); - - // The ID of a user list to target. - long userListId = long.Parse("INSERT_USER_LIST_ID_HERE"); - codeExample.Run(new AdWordsUser(), merchantId, budgetId, userListId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a Shopping dynamic remarketing campaign for the " + - "Display Network via the following steps:\n" + - "* Creates a new Display Network campaign.\n" + - "* Links the campaign with Merchant Center.\n" + - "* Links the user list to the ad group.\n" + - "* Creates a responsive display ad to render the dynamic text."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The ID of the merchant center account from which to source - /// product feed data. - /// The ID of a shared budget to associate with the campaign. - /// The ID of a user list to target. - public void Run(AdWordsUser user, long merchantId, long budgetId, long userListId) - { - try - { - Campaign campaign = CreateCampaign(user, merchantId, budgetId); - Console.WriteLine("Campaign with name '{0}' and ID {1} was added.", campaign.name, - campaign.id); - - AdGroup adGroup = CreateAdGroup(user, campaign); - Console.WriteLine("Ad group with name '{0}' and ID {1} was added.", adGroup.name, - adGroup.id); - - AdGroupAd adGroupAd = CreateAd(user, adGroup); - Console.WriteLine("Responsive display ad with ID {0} was added.", adGroupAd.ad.id); - - AttachUserList(user, adGroup, userListId); - Console.WriteLine("User list with ID {0} was attached to ad group with ID {1}.", - userListId, adGroup.id); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create Shopping dynamic remarketing " + - "campaign for the Display Network.", e); - } - } - - /// - /// Creates a Shopping dynamic remarketing campaign object (not including ad group level and - /// below). This creates a Display campaign with the merchant center feed attached. - /// Merchant Center is used for the product information in combination with a user list - /// which contains hits with ecomm_prodid specified. See - /// - /// the guide for more detail. - /// - /// The AdWords user. - /// The ID of the Merchant Center account. - /// The ID of the budget to use for the campaign. - /// The campaign that was created. - private static Campaign CreateCampaign(AdWordsUser user, long merchantId, long budgetId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - Campaign campaign = new Campaign - { - name = "Shopping campaign #" + ExampleUtilities.GetRandomString(), - // Dynamic remarketing campaigns are only available on the Google Display - // Network. - advertisingChannelType = AdvertisingChannelType.DISPLAY, - status = CampaignStatus.PAUSED - }; - - Budget budget = new Budget - { - budgetId = budgetId - }; - campaign.budget = budget; - - // This example uses a Manual CPC bidding strategy, but you should select the - // strategy that best aligns with your sales goals. More details here: - // https://support.google.com/adwords/answer/2472725 - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration - { - biddingStrategyType = BiddingStrategyType.MANUAL_CPC - }; - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration; - - ShoppingSetting setting = new ShoppingSetting - { - // Campaigns with numerically higher priorities take precedence over those with - // lower priorities. - campaignPriority = 0, - - // Set the Merchant Center account ID from which to source products. - merchantId = merchantId, - - // Display Network campaigns do not support partition by country. The only - // supported value is "ZZ". This signals that products from all countries are - // available in the campaign. The actual products which serve are based on the - // products tagged in the user list entry. - salesCountry = "ZZ", - - // Optional: Enable local inventory ads (items for sale in physical stores.) - enableLocal = true - }; - - campaign.settings = new Setting[] - { - setting - }; - - CampaignOperation op = new CampaignOperation - { - operand = campaign, - @operator = Operator.ADD - }; - - CampaignReturnValue result = campaignService.mutate(new CampaignOperation[] - { - op - }); - return result.value[0]; - } - } - - /// - /// Creates an ad group in the specified campaign. - /// - /// The AdWords user. - /// The campaign to which the ad group should be attached. - /// The ad group that was created. - private static AdGroup CreateAdGroup(AdWordsUser user, Campaign campaign) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - AdGroup group = new AdGroup - { - name = "Dynamic remarketing ad group", - campaignId = campaign.id, - status = AdGroupStatus.ENABLED - }; - - AdGroupOperation op = new AdGroupOperation - { - operand = group, - @operator = Operator.ADD - }; - AdGroupReturnValue result = adGroupService.mutate(new AdGroupOperation[] - { - op - }); - return result.value[0]; - } - } - - /// - /// Attach a user list to an ad group. The user list provides positive targeting and feed - /// information to drive the dynamic content of the ad. - /// - /// The user. - /// The ad group which will have the user list attached. - /// The user list to use for targeting and dynamic content. - /// User lists must be attached at the ad group level for positive targeting in - /// Shopping dynamic remarketing campaigns. - private static void AttachUserList(AdWordsUser user, AdGroup adGroup, long userListId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - CriterionUserList userList = new CriterionUserList - { - userListId = userListId - }; - BiddableAdGroupCriterion adGroupCriterion = new BiddableAdGroupCriterion - { - criterion = userList, - adGroupId = adGroup.id - }; - - AdGroupCriterionOperation op = new AdGroupCriterionOperation - { - operand = adGroupCriterion, - @operator = Operator.ADD - }; - - adGroupCriterionService.mutate(new AdGroupCriterionOperation[] - { - op - }); - } - } - - /// - /// Creates an ad for serving dynamic content in a remarketing campaign. - /// - /// The AdWords user. - /// The ad group under which to create the ad. - /// The ad that was created. - private static AdGroupAd CreateAd(AdWordsUser user, AdGroup adGroup) - { - using (AdGroupAdService adService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - ResponsiveDisplayAd ad = new ResponsiveDisplayAd - { - // This ad format does not allow the creation of an image using the - // Image.data field. An image must first be created using the MediaService, - // and Image.mediaId must be populated when creating the ad. - marketingImage = UploadImage(user, "https://goo.gl/3b9Wfh"), - - shortHeadline = "Travel", - longHeadline = "Travel the World", - description = "Take to the air!", - businessName = "Interplanetary Cruises", - finalUrls = new string[] - { - "http://www.example.com/" - }, - - // Optional: Call to action text. - // Valid texts: https://support.google.com/adwords/answer/7005917 - callToActionText = "Apply Now", - - // Optional: Set dynamic display ad settings, composed of landscape logo - // image, promotion text, and price prefix. - dynamicDisplayAdSettings = CreateDynamicDisplayAdSettings(user), - - // Optional: Create a logo image and set it to the ad. - logoImage = UploadImage(user, "https://goo.gl/mtt54n"), - - // Optional: Create a square marketing image and set it to the ad. - squareMarketingImage = UploadImage(user, "https://goo.gl/mtt54n") - }; - - // Whitelisted accounts only: Set color settings using hexadecimal values. - // Set allowFlexibleColor to false if you want your ads to render by always - // using your colors strictly. - // ad.mainColor = "#0000ff"; - // ad.accentColor = "#ffff00"; - // ad.allowFlexibleColor = false; - - // Whitelisted accounts only: Set the format setting that the ad will be - // served in. - // ad.formatSetting = DisplayAdFormatSetting.NON_NATIVE; - - AdGroupAd adGroupAd = new AdGroupAd - { - ad = ad, - adGroupId = adGroup.id - }; - - AdGroupAdOperation op = new AdGroupAdOperation - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - AdGroupAdReturnValue result = adService.mutate(new AdGroupAdOperation[] - { - op - }); - return result.value[0]; - } - } - - /// - /// Creates the additional content (images, promo text, etc.) supported by dynamic ads. - /// - /// The AdWords user. - /// The DynamicSettings object to be used. - private static DynamicSettings CreateDynamicDisplayAdSettings(AdWordsUser user) - { - Image logo = UploadImage(user, "https://goo.gl/dEvQeF"); - - DynamicSettings dynamicSettings = new DynamicSettings - { - landscapeLogoImage = logo, - pricePrefix = "as low as", - promoText = "Free shipping!" - }; - return dynamicSettings; - } - - /// - /// Uploads the image from the specified . - /// - /// The AdWords user. - /// The image URL. - /// ID of the uploaded image. - private static Image UploadImage(AdWordsUser user, string url) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - // Create the image. - Image image = new Image() - { - data = MediaUtilities.GetAssetDataFromUrl(url, user.Config), - type = MediaMediaType.IMAGE - }; - - // Upload the image and return the ID. - return (Image) mediaService.upload(new Media[] - { - image - })[0]; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddUniversalAppCampaign.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/AddUniversalAppCampaign.cs deleted file mode 100755 index 9ea25b8e619..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/AddUniversalAppCampaign.cs +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a universal app campaign. To get campaigns, run GetCampaigns.cs. - /// To upload image assets for this campaign, use UploadImage.cs. - /// - public class AddUniversalAppCampaign : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddUniversalAppCampaign codeExample = new AddUniversalAppCampaign(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a universal app campaign. To get campaigns, " + - "run GetCampaigns.cs. To upload image assets for this campaign, " + - "use UploadImage.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create the campaign. - Campaign campaign = new Campaign - { - name = "Interplanetary Cruise App #" + ExampleUtilities.GetRandomString(), - - // 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, - - // Set the advertising channel and subchannel types for universal app campaigns. - advertisingChannelType = AdvertisingChannelType.MULTI_CHANNEL, - advertisingChannelSubType = AdvertisingChannelSubType.UNIVERSAL_APP_CAMPAIGN - }; - - // Set the campaign's bidding strategy. Universal app campaigns - // only support TARGET_CPA bidding strategy. - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration - { - biddingStrategyType = BiddingStrategyType.TARGET_CPA - }; - - // Set the target CPA to $1 / app install. - TargetCpaBiddingScheme biddingScheme = new TargetCpaBiddingScheme - { - targetCpa = new Money - { - microAmount = 1000000 - } - }; - - biddingConfig.biddingScheme = biddingScheme; - campaign.biddingStrategyConfiguration = biddingConfig; - - // Set the campaign's budget. - campaign.budget = new Budget - { - budgetId = CreateBudget(user).budgetId - }; - - // Optional: Set the start date. - campaign.startDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd"); - - // Optional: Set the end date. - campaign.endDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd"); - - // Set the campaign's assets and ad text ideas. These values will be used to - // generate ads. - UniversalAppCampaignSetting universalAppSetting = new UniversalAppCampaignSetting - { - appId = "com.labpixies.colordrips", - appVendor = MobileApplicationVendor.VENDOR_GOOGLE_MARKET, - description1 = "A cool puzzle game", - description2 = "Remove connected blocks", - description3 = "3 difficulty levels", - description4 = "4 colorful fun skins", - - // Optional: You can set up to 20 image assets for your campaign. - // See UploadImage.cs for an example on how to upload images. - // - // universalAppSetting.imageMediaIds = - // new long[] { INSERT_IMAGE_MEDIA_ID_HERE }; - - // Optimize this campaign for getting new users for your app. - universalAppBiddingStrategyGoalType = UniversalAppBiddingStrategyGoalType - .OPTIMIZE_FOR_INSTALL_CONVERSION_VOLUME - }; - - // Optional: If you select the OPTIMIZE_FOR_IN_APP_CONVERSION_VOLUME goal - // type, then also specify your in-app conversion types so AdWords can - // focus your campaign on people who are most likely to complete the - // corresponding in-app actions. - // Conversion type IDs can be retrieved using ConversionTrackerService.get. - // - // campaign.selectiveOptimization = new SelectiveOptimization(); - // campaign.selectiveOptimization.conversionTypeIds = new long[] - // { - // INSERT_CONVERSION_TYPE_ID_1_HERE, - // INSERT_CONVERSION_TYPE_ID_2_HERE - // }; - - // Optional: Set the campaign settings for Advanced location options. - GeoTargetTypeSetting geoSetting = new GeoTargetTypeSetting - { - positiveGeoTargetType = - GeoTargetTypeSettingPositiveGeoTargetType.LOCATION_OF_PRESENCE, - negativeGeoTargetType = GeoTargetTypeSettingNegativeGeoTargetType.DONT_CARE - }; - - campaign.settings = new Setting[] - { - universalAppSetting, - geoSetting - }; - - // Create the operation. - CampaignOperation operation = new CampaignOperation - { - @operator = Operator.ADD, - operand = campaign - }; - - try - { - // Add the campaign. - CampaignReturnValue retVal = campaignService.mutate(new CampaignOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - foreach (Campaign newCampaign in retVal.value) - { - Console.WriteLine( - "Universal app campaign with name = '{0}' and id = '{1}' " + - "was added.", newCampaign.name, newCampaign.id); - - // Optional: Set the campaign's location and language targeting. - // No other targeting criteria can be used for universal app campaigns. - SetCampaignTargetingCriteria(user, newCampaign); - } - } - else - { - Console.WriteLine("No universal app campaigns were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add universal app campaigns.", - e); - } - } - - } - - /// - /// Creates the budget for the campaign. - /// - /// The AdWords user. - /// The budget. - private Budget CreateBudget(AdWordsUser user) - { - // Get the BudgetService. - using (BudgetService budgetService = - (BudgetService) user.GetService(AdWordsService.v201806.BudgetService)) - { - // Create the campaign budget. - Budget budget = new Budget - { - name = - "Interplanetary Cruise App Budget #" + ExampleUtilities.GetRandomString(), - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD, - amount = new Money - { - microAmount = 5000000 - }, - - // Universal app campaigns don't support shared budgets. - isExplicitlyShared = false - }; - - BudgetOperation budgetOperation = new BudgetOperation - { - @operator = Operator.ADD, - operand = budget - }; - - BudgetReturnValue budgetRetval = budgetService.mutate(new BudgetOperation[] - { - budgetOperation - }); - Budget newBudget = budgetRetval.value[0]; - - Console.WriteLine("Budget with ID = '{0}' and name = '{1}' was created.", - newBudget.budgetId, newBudget.name); - return newBudget; - } - } - - /// - /// Sets the campaign's targeting criteria. - /// - /// The AdWords user. - /// The campaign for which targeting criteria is - /// created. - private void SetCampaignTargetingCriteria(AdWordsUser user, Campaign campaign) - { - using (CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService)) - { - // Create locations. The IDs can be found in the documentation or - // retrieved with the LocationCriterionService. - Location california = new Location() - { - id = 21137L - }; - - Location mexico = new Location() - { - id = 2484L - }; - - // Create languages. The IDs can be found in the documentation or - // retrieved with the ConstantDataService. - Language english = new Language() - { - id = 1000L - }; - - Language spanish = new Language() - { - id = 1003L - }; - - List criteria = new List() - { - california, - mexico, - english, - spanish - }; - - // Create operations to add each of the criteria above. - List - operations = new List(); - foreach (Criterion criterion in criteria) - { - CampaignCriterionOperation operation = new CampaignCriterionOperation() - { - operand = new CampaignCriterion() - { - campaignId = campaign.id, - criterion = criterion - }, - @operator = Operator.ADD - }; - - operations.Add(operation); - } - - // Set the campaign targets. - CampaignCriterionReturnValue retVal = - campaignCriterionService.mutate(operations.ToArray()); - - if (retVal != null && retVal.value != null) - { - // Display the added campaign targets. - foreach (CampaignCriterion criterion in retVal.value) - { - Console.WriteLine("Campaign criteria of type '{0}' and id '{1}' was added.", - criterion.criterion.CriterionType, criterion.criterion.id); - } - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs deleted file mode 100755 index 5febde62e34..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.cs +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example creates a shared keyword list, adds keywords to the list - /// and attaches it to an existing campaign. To get the list of campaigns, - /// run GetCampaigns.cs. - /// - public class CreateAndAttachSharedKeywordSet : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - CreateAndAttachSharedKeywordSet codeExample = new CreateAndAttachSharedKeywordSet(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example creates a shared keyword list, adds keywords to the list " + - "and attaches it to an existing campaign. To get the list of campaigns, run " + - "GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to which keywords are added. - public void Run(AdWordsUser user, long campaignId) - { - try - { - // Create a shared set. - SharedSet sharedSet = CreateSharedKeywordSet(user); - - Console.WriteLine( - "Shared set with id = {0}, name = {1}, type = {2}, status = {3} " + - "was created.", sharedSet.sharedSetId, sharedSet.name, sharedSet.type, - sharedSet.status); - - // Add new keywords to the shared set. - string[] keywordTexts = new string[] - { - "mars cruise", - "mars hotels" - }; - SharedCriterion[] sharedCriteria = - AddKeywordsToSharedSet(user, sharedSet.sharedSetId, keywordTexts); - foreach (SharedCriterion sharedCriterion in sharedCriteria) - { - Keyword keyword = sharedCriterion.criterion as Keyword; - Console.WriteLine( - "Added keyword with id = {0}, text = {1}, matchtype = {2} to " + - "shared set with id = {3}.", keyword.id, keyword.text, keyword.matchType, - sharedSet.sharedSetId); - } - - // Attach the shared set to the campaign. - CampaignSharedSet attachedSharedSet = - AttachSharedSetToCampaign(user, campaignId, sharedSet.sharedSetId); - - Console.WriteLine("Attached shared set with id = {0} to campaign id {1}.", - attachedSharedSet.sharedSetId, attachedSharedSet.campaignId); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create shared keyword set and attach " + "it to a campaign.", e); - } - } - - /// - /// Create a shared keyword set. - /// - /// The AdWords user. - /// The shared set. - public SharedSet CreateSharedKeywordSet(AdWordsUser user) - { - using (SharedSetService sharedSetService = - (SharedSetService) user.GetService(AdWordsService.v201806.SharedSetService)) - { - SharedSetOperation operation = new SharedSetOperation - { - @operator = Operator.ADD - }; - SharedSet sharedSet = new SharedSet - { - name = "API Negative keyword list - " + ExampleUtilities.GetRandomString(), - type = SharedSetType.NEGATIVE_KEYWORDS - }; - operation.operand = sharedSet; - - SharedSetReturnValue retval = sharedSetService.mutate(new SharedSetOperation[] - { - operation - }); - return retval.value[0]; - } - } - - /// - /// Adds a set of keywords to a shared set. - /// - /// The AdWords user. - /// The shared set id. - /// The keywords to be added to the shared set. - /// The newly added set of shared criteria. - public SharedCriterion[] AddKeywordsToSharedSet(AdWordsUser user, long sharedSetId, - string[] keywordTexts) - { - using (SharedCriterionService sharedCriterionService = - (SharedCriterionService) user.GetService(AdWordsService.v201806 - .SharedCriterionService)) - { - List operations = new List(); - foreach (string keywordText in keywordTexts) - { - Keyword keyword = new Keyword - { - text = keywordText, - matchType = KeywordMatchType.BROAD - }; - - SharedCriterion sharedCriterion = new SharedCriterion - { - criterion = keyword, - negative = true, - sharedSetId = sharedSetId - }; - SharedCriterionOperation operation = new SharedCriterionOperation - { - @operator = Operator.ADD, - operand = sharedCriterion - }; - operations.Add(operation); - } - - SharedCriterionReturnValue retval = - sharedCriterionService.mutate(operations.ToArray()); - return retval.value; - } - } - - /// - /// Attaches a shared set to a campaign. - /// - /// The AdWords user. - /// The campaign id. - /// The shared set id. - /// A CampaignSharedSet object that represents a binding between - /// the specified campaign and the shared set. - public CampaignSharedSet AttachSharedSetToCampaign(AdWordsUser user, long campaignId, - long sharedSetId) - { - using (CampaignSharedSetService campaignSharedSetService = - (CampaignSharedSetService) user.GetService(AdWordsService.v201806 - .CampaignSharedSetService)) - { - CampaignSharedSet campaignSharedSet = new CampaignSharedSet - { - campaignId = campaignId, - sharedSetId = sharedSetId - }; - - CampaignSharedSetOperation operation = new CampaignSharedSetOperation - { - @operator = Operator.ADD, - operand = campaignSharedSet - }; - - CampaignSharedSetReturnValue retval = campaignSharedSetService.mutate( - new CampaignSharedSetOperation[] - { - operation - }); - return retval.value[0]; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs deleted file mode 100755 index e59207104e8..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.cs +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example demonstrates how to find and remove shared sets and - /// shared set criteria. - /// - public class FindAndRemoveCriteriaFromSharedSet : ExampleBase - { - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example demonstrates how to find and remove shared sets and " + - "shared set criteria."; - } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - FindAndRemoveCriteriaFromSharedSet codeExample = - new FindAndRemoveCriteriaFromSharedSet(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign from which items shared - /// criteria are removed. - public void Run(AdWordsUser user, long campaignId) - { - // Get the list of shared sets that are attached to the campaign. - List sharedSetIds = GetSharedSetIds(user, campaignId); - - // Get the shared criteria in those shared sets. - List sharedCriteria = GetSharedCriteria(user, sharedSetIds); - - // Remove the shared criteria from the shared sets. - RemoveSharedCriteria(user, sharedCriteria); - } - - /// - /// Gets the shared set IDs associated with a campaign. - /// - /// The user that owns the campaign. - /// The campaign identifier. - /// The list of shared set IDs associated with the campaign. - private List GetSharedSetIds(AdWordsUser user, long campaignId) - { - using (CampaignSharedSetService campaignSharedSetService = - (CampaignSharedSetService) user.GetService(AdWordsService.v201806 - .CampaignSharedSetService)) - { - Selector selector = new Selector() - { - fields = new string[] - { - CampaignSharedSet.Fields.SharedSetId, - CampaignSharedSet.Fields.CampaignId, - CampaignSharedSet.Fields.SharedSetName, - CampaignSharedSet.Fields.SharedSetType - }, - predicates = new Predicate[] - { - Predicate.Equals(CampaignSharedSet.Fields.CampaignId, campaignId), - Predicate.In(CampaignSharedSet.Fields.SharedSetType, new string[] - { - SharedSetType.NEGATIVE_KEYWORDS.ToString() - }), - }, - paging = Paging.Default, - }; - - List sharedSetIds = new List(); - CampaignSharedSetPage page = new CampaignSharedSetPage(); - - try - { - do - { - // Get the campaigns. - page = campaignSharedSetService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (CampaignSharedSet campaignSharedSet in page.entries) - { - sharedSetIds.Add(campaignSharedSet.sharedSetId.ToString()); - Console.WriteLine( - "{0}) Campaign shared set ID {1} and name '{2}' found for " + - "campaign ID {3}.\n", i + 1, campaignSharedSet.sharedSetId, - campaignSharedSet.sharedSetName, campaignSharedSet.campaignId); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - return sharedSetIds; - } - catch (Exception e) - { - throw new Exception("Failed to get shared set ids for campaign.", e); - } - } - } - - /// - /// Gets the shared criteria in a shared set. - /// - /// The user that owns the shared set. - /// The shared criteria IDs. - /// The list of shared criteria. - private List GetSharedCriteria(AdWordsUser user, List sharedSetIds) - { - using (SharedCriterionService sharedCriterionService = - (SharedCriterionService) user.GetService(AdWordsService.v201806 - .SharedCriterionService)) - { - Selector selector = new Selector() - { - fields = new string[] - { - SharedSet.Fields.SharedSetId, - Criterion.Fields.Id, - Keyword.Fields.KeywordText, - Keyword.Fields.KeywordMatchType, - Placement.Fields.PlacementUrl - }, - predicates = new Predicate[] - { - Predicate.In(SharedSet.Fields.SharedSetId, sharedSetIds) - }, - paging = Paging.Default - }; - - List sharedCriteria = new List(); - SharedCriterionPage page = new SharedCriterionPage(); - - try - { - do - { - // Get the campaigns. - page = sharedCriterionService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (SharedCriterion sharedCriterion in page.entries) - { - switch (sharedCriterion.criterion.type) - { - case CriterionType.KEYWORD: - Keyword keyword = (Keyword) sharedCriterion.criterion; - Console.WriteLine( - "{0}) Shared negative keyword with ID {1} and " + - "text '{2}' was found.", i + 1, keyword.id, - keyword.text); - break; - - case CriterionType.PLACEMENT: - Placement placement = (Placement) sharedCriterion.criterion; - Console.WriteLine( - "{0}) Shared negative placement with ID {1} and " + - "URL '{2}' was found.", i + 1, placement.id, - placement.url); - break; - - default: - Console.WriteLine( - "{0}) Shared criteria with ID {1} was found.", i + 1, - sharedCriterion.criterion.id); - break; - } - - i++; - sharedCriteria.Add(sharedCriterion); - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - return sharedCriteria; - } - catch (Exception e) - { - throw new Exception("Failed to get shared criteria.", e); - } - } - } - - /// - /// Removes a list of shared criteria. - /// - /// The user that owns the shared criteria. - /// The list shared criteria to be removed. - private void RemoveSharedCriteria(AdWordsUser user, List sharedCriteria) - { - if (sharedCriteria.Count == 0) - { - Console.WriteLine("No shared criteria to remove."); - return; - } - - using (SharedCriterionService sharedCriterionService = - (SharedCriterionService) user.GetService(AdWordsService.v201806 - .SharedCriterionService)) - { - List operations = new List(); - - foreach (SharedCriterion sharedCriterion in sharedCriteria) - { - operations.Add(new SharedCriterionOperation() - { - @operator = Operator.REMOVE, - operand = new SharedCriterion() - { - sharedSetId = sharedCriterion.sharedSetId, - criterion = new Criterion() - { - id = sharedCriterion.criterion.id - } - } - }); - } - - try - { - SharedCriterionReturnValue sharedCriterionReturnValue = - sharedCriterionService.mutate(operations.ToArray()); - - foreach (SharedCriterion removedCriterion in sharedCriterionReturnValue.value) - { - Console.WriteLine( - "Shared criterion ID {0} was successfully removed from shared " + - "set ID {1}.", removedCriterion.criterion.id, - removedCriterion.sharedSetId); - } - } - catch (Exception e) - { - throw new Exception("Failed to remove shared criteria.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/GetAdGroupBidModifiers.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/GetAdGroupBidModifiers.cs deleted file mode 100755 index 688695f19ff..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/GetAdGroupBidModifiers.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to retrieve ad group level mobile bid - /// modifiers for a campaign. - /// - public class GetAdGroupBidModifiers : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAdGroupBidModifiers codeExample = new GetAdGroupBidModifiers(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to retrieve ad group level mobile bid " + - "modifiers for a campaign."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign. - public void Run(AdWordsUser user, long campaignId) - { - using (AdGroupBidModifierService adGroupBidModifierService = - (AdGroupBidModifierService) user.GetService(AdWordsService.v201806 - .AdGroupBidModifierService)) - { - // Get all ad group bid modifiers for the campaign. - Selector selector = new Selector() - { - fields = new string[] - { - AdGroupBidModifier.Fields.CampaignId, - AdGroupBidModifier.Fields.AdGroupId, - AdGroupBidModifier.Fields.BidModifier, - AdGroupBidModifier.Fields.BidModifierSource, - Criterion.Fields.CriteriaType, - Criterion.Fields.Id - }, - predicates = new Predicate[] - { - Predicate.Equals(AdGroupBidModifier.Fields.CampaignId, campaignId) - }, - paging = Paging.Default - }; - - AdGroupBidModifierPage page = new AdGroupBidModifierPage(); - - try - { - do - { - // Get the campaigns. - page = adGroupBidModifierService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (AdGroupBidModifier adGroupBidModifier in page.entries) - { - string bidModifier = (adGroupBidModifier.bidModifierSpecified) - ? adGroupBidModifier.bidModifier.ToString() - : "UNSET"; - Console.WriteLine( - "{0}) Campaign ID {1}, AdGroup ID {2}, Criterion ID {3} has " + - "ad group level modifier: {4} and source = {5}.", i + 1, - adGroupBidModifier.campaignId, adGroupBidModifier.adGroupId, - adGroupBidModifier.criterion.id, bidModifier, - adGroupBidModifier.bidModifierSource); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of adgroup bid modifiers found: {0}", - page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to retrieve adgroup bid modifiers.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.cs b/examples/AdWords/CSharp/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.cs deleted file mode 100755 index 5f127eb5259..00000000000 --- a/examples/AdWords/CSharp/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.cs +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a portfolio bidding strategy and uses it to - /// construct a campaign. - /// - public class UsePortfolioBiddingStrategy : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UsePortfolioBiddingStrategy codeExample = new UsePortfolioBiddingStrategy(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a portfolio bidding strategy and uses it to " + - "construct a campaign."; - } - } - - /// - /// Runs the specified code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - string BIDDINGSTRATEGY_NAME = "Maximize Clicks " + ExampleUtilities.GetRandomString(); - const long BID_CEILING = 2000000; - const long SPEND_TARGET = 20000000; - - string BUDGET_NAME = - "Shared Interplanetary Budget #" + ExampleUtilities.GetRandomString(); - const long BUDGET_AMOUNT = 30000000; - - string CAMPAIGN_NAME = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(); - - try - { - SharedBiddingStrategy portfolioBiddingStrategy = - CreateBiddingStrategy(user, BIDDINGSTRATEGY_NAME, BID_CEILING, SPEND_TARGET); - Console.WriteLine( - "Portfolio bidding strategy with name '{0}' and ID {1} of type " + - "{2} was created.", portfolioBiddingStrategy.name, portfolioBiddingStrategy.id, - portfolioBiddingStrategy.biddingScheme.BiddingSchemeType); - - Budget sharedBudget = CreateSharedBudget(user, BUDGET_NAME, BUDGET_AMOUNT); - - Campaign newCampaign = CreateCampaignWithBiddingStrategy(user, CAMPAIGN_NAME, - portfolioBiddingStrategy.id, sharedBudget.budgetId); - - Console.WriteLine( - "Campaign with name '{0}', ID {1} and bidding scheme ID {2} was " + "created.", - newCampaign.name, newCampaign.id, - newCampaign.biddingStrategyConfiguration.biddingStrategyId); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create campaign that uses portfolio " + "bidding strategy.", e); - } - } - - /// - /// Creates the portfolio bidding strategy. - /// - /// The AdWords user. - /// The bidding strategy name. - /// The bid ceiling. - /// The spend target. - /// The bidding strategy object. - private SharedBiddingStrategy CreateBiddingStrategy(AdWordsUser user, string name, - long bidCeiling, long spendTarget) - { - using (BiddingStrategyService biddingStrategyService = - (BiddingStrategyService) user.GetService(AdWordsService.v201806 - .BiddingStrategyService)) - { - // Create a portfolio bidding strategy. - SharedBiddingStrategy portfolioBiddingStrategy = new SharedBiddingStrategy - { - name = name - }; - - TargetSpendBiddingScheme biddingScheme = new TargetSpendBiddingScheme - { - // Optionally set additional bidding scheme parameters. - bidCeiling = new Money - { - microAmount = bidCeiling - }, - - spendTarget = new Money - { - microAmount = spendTarget - } - }; - - portfolioBiddingStrategy.biddingScheme = biddingScheme; - - // Create operation. - BiddingStrategyOperation operation = new BiddingStrategyOperation - { - @operator = Operator.ADD, - operand = portfolioBiddingStrategy - }; - - return biddingStrategyService.mutate(new BiddingStrategyOperation[] - { - operation - }).value[0]; - } - } - - /// - /// Creates an explicit budget to be used only to create the Campaign. - /// - /// The AdWords user. - /// The budget name. - /// The budget amount. - /// The budget object. - private Budget CreateSharedBudget(AdWordsUser user, string name, long amount) - { - using (BudgetService budgetService = - (BudgetService) user.GetService(AdWordsService.v201806.BudgetService)) - { - // Create a shared budget - Budget budget = new Budget - { - name = name, - amount = new Money - { - microAmount = amount - }, - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD, - isExplicitlyShared = true - }; - - // Create operation. - BudgetOperation operation = new BudgetOperation - { - operand = budget, - @operator = Operator.ADD - }; - - // Make the mutate request. - return budgetService.mutate(new BudgetOperation[] - { - operation - }).value[0]; - } - } - - /// - /// Creates the campaign with a portfolio bidding strategy. - /// - /// The AdWords user. - /// The campaign name. - /// The bidding strategy id. - /// The shared budget id. - /// The campaign object. - private Campaign CreateCampaignWithBiddingStrategy(AdWordsUser user, string name, - long biddingStrategyId, long sharedBudgetId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create campaign. - Campaign campaign = new Campaign - { - name = name, - advertisingChannelType = AdvertisingChannelType.SEARCH, - - // 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, - - // Set the budget. - budget = new Budget - { - budgetId = sharedBudgetId - } - }; - - // Set bidding strategy (required). - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration - { - biddingStrategyId = biddingStrategyId - }; - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration; - - // Set network targeting (recommended). - NetworkSetting networkSetting = new NetworkSetting - { - targetGoogleSearch = true, - targetSearchNetwork = true, - targetContentNetwork = true - }; - campaign.networkSetting = networkSetting; - - // Create operation. - CampaignOperation operation = new CampaignOperation - { - operand = campaign, - @operator = Operator.ADD - }; - - return campaignService.mutate(new CampaignOperation[] - { - operation - }).value[0]; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroupDemographicCriteria.cs b/examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroupDemographicCriteria.cs deleted file mode 100755 index 7b2d40c0bb7..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroupDemographicCriteria.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds demographic target criteria to an ad group. To get - /// ad groups, run AddAdGroup.cs. - /// - public class AddAdGroupDemographicCriteria : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddAdGroupDemographicCriteria codeExample = new AddAdGroupDemographicCriteria(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds demographic target criteria to an ad group. " + - "To get ad groups, run AddAdGroup.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which criteria are - /// added. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Create biddable ad group criterion for gender - Gender genderTarget = new Gender - { - // Criterion Id for male. The IDs can be found here - // https://developers.google.com/adwords/api/docs/appendix/genders - id = 10 - }; - - BiddableAdGroupCriterion genderBiddableAdGroupCriterion = - new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = genderTarget - }; - - // Create negative ad group criterion for age range - AgeRange ageRangeNegative = new AgeRange - { - // Criterion Id for age 18 to 24. The IDs can be found here - // https://developers.google.com/adwords/api/docs/appendix/ages - - id = 503001 - }; - NegativeAdGroupCriterion ageRangeNegativeAdGroupCriterion = - new NegativeAdGroupCriterion - { - adGroupId = adGroupId, - criterion = ageRangeNegative - }; - - // Create operations. - AdGroupCriterionOperation genderBiddableAdGroupCriterionOperation = - new AdGroupCriterionOperation - { - operand = genderBiddableAdGroupCriterion, - @operator = Operator.ADD - }; - - AdGroupCriterionOperation ageRangeNegativeAdGroupCriterionOperation = - new AdGroupCriterionOperation - { - operand = ageRangeNegativeAdGroupCriterion, - @operator = Operator.ADD - }; - - AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] - { - genderBiddableAdGroupCriterionOperation, - ageRangeNegativeAdGroupCriterionOperation - }; - - try - { - // Add ad group criteria. - AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations); - - // Display ad group criteria. - if (result != null && result.value != null) - { - foreach (AdGroupCriterion adGroupCriterionResult in result.value) - { - Console.WriteLine( - "Ad group criterion with ad group id \"{0}\", criterion id " + - "\"{1}\", and type \"{2}\" was added.", - adGroupCriterionResult.adGroupId, - adGroupCriterionResult.criterion.id, - adGroupCriterionResult.criterion.CriterionType); - } - } - else - { - Console.WriteLine("No ad group criteria were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create ad group criteria.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroups.cs b/examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroups.cs deleted file mode 100755 index 335b6a74fe9..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/AddAdGroups.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to create ad groups. To create - /// campaigns, run AddCampaigns.cs. - /// - public class AddAdGroups : ExampleBase - { - /// - /// Number of items being added / updated in this code example. - /// - private const int NUM_ITEMS = 5; - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddAdGroups codeExample = new AddAdGroups(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example illustrates how to create ad groups. To create campaigns, " + - "run AddCampaigns.cs"; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to which ad groups are - /// added. - public void Run(AdWordsUser user, long campaignId) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - List operations = new List(); - - for (int i = 0; i < NUM_ITEMS; i++) - { - // Create the ad group. - AdGroup adGroup = new AdGroup - { - name = string.Format("Earth to Mars Cruises #{0}", - ExampleUtilities.GetRandomString()), - status = AdGroupStatus.ENABLED, - campaignId = campaignId - }; - - // Set the ad group bids. - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration(); - - CpcBid cpcBid = new CpcBid - { - bid = new Money - { - microAmount = 10000000 - } - }; - - biddingConfig.bids = new Bids[] - { - cpcBid - }; - - adGroup.biddingStrategyConfiguration = biddingConfig; - - // Optional: Set targeting restrictions. - // Depending on the criterionTypeGroup value, most TargetingSettingDetail - // only affect Display campaigns. However, the USER_INTEREST_AND_LIST value - // works for RLSA campaigns - Search campaigns targeting using a - // remarketing list. - TargetingSetting targetingSetting = new TargetingSetting(); - - // Restricting to serve ads that match your ad group placements. - // This is equivalent to choosing "Target and bid" in the UI. - TargetingSettingDetail placementDetail = new TargetingSettingDetail - { - criterionTypeGroup = CriterionTypeGroup.PLACEMENT, - targetAll = false - }; - - // Using your ad group verticals only for bidding. This is equivalent - // to choosing "Bid only" in the UI. - TargetingSettingDetail verticalDetail = new TargetingSettingDetail - { - criterionTypeGroup = CriterionTypeGroup.VERTICAL, - targetAll = true - }; - - targetingSetting.details = new TargetingSettingDetail[] - { - placementDetail, - verticalDetail - }; - - adGroup.settings = new Setting[] - { - targetingSetting - }; - - // Set the rotation mode. - AdGroupAdRotationMode rotationMode = new AdGroupAdRotationMode - { - adRotationMode = AdRotationMode.OPTIMIZE - }; - adGroup.adGroupAdRotationMode = rotationMode; - - // Create the operation. - AdGroupOperation operation = new AdGroupOperation - { - @operator = Operator.ADD, - operand = adGroup - }; - - operations.Add(operation); - } - - try - { - // Create the ad group. - AdGroupReturnValue retVal = adGroupService.mutate(operations.ToArray()); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - foreach (AdGroup newAdGroup in retVal.value) - { - Console.WriteLine( - "Ad group with id = '{0}' and name = '{1}' was created.", - newAdGroup.id, newAdGroup.name); - } - } - else - { - Console.WriteLine("No ad groups were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create ad groups.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/AddCampaigns.cs b/examples/AdWords/CSharp/v201806/BasicOperations/AddCampaigns.cs deleted file mode 100755 index a4e6cdfe506..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/AddCampaigns.cs +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds campaigns. To get campaigns, run GetCampaigns.cs. - /// - public class AddCampaigns : ExampleBase - { - /// - /// Number of items being added / updated in this code example. - /// - private const int NUM_ITEMS = 5; - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCampaigns codeExample = new AddCampaigns(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds campaigns. To get campaigns, run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - Budget budget = CreateBudget(user); - - List operations = new List(); - - for (int i = 0; i < NUM_ITEMS; i++) - { - // Create the campaign. - Campaign campaign = new Campaign - { - name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(), - advertisingChannelType = AdvertisingChannelType.SEARCH, - - // 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 - }; - - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration - { - biddingStrategyType = BiddingStrategyType.MANUAL_CPC - }; - campaign.biddingStrategyConfiguration = biddingConfig; - - campaign.budget = new Budget - { - budgetId = budget.budgetId - }; - - // Set the campaign network options. - campaign.networkSetting = new NetworkSetting - { - targetGoogleSearch = true, - targetSearchNetwork = true, - targetContentNetwork = false, - targetPartnerSearchNetwork = false - }; - - // Set the campaign settings for Advanced location options. - GeoTargetTypeSetting geoSetting = new GeoTargetTypeSetting - { - positiveGeoTargetType = GeoTargetTypeSettingPositiveGeoTargetType.DONT_CARE, - negativeGeoTargetType = GeoTargetTypeSettingNegativeGeoTargetType.DONT_CARE - }; - - campaign.settings = new Setting[] - { - geoSetting - }; - - // Optional: Set the start date. - campaign.startDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd"); - - // Optional: Set the end date. - campaign.endDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd"); - - // Optional: Set the frequency cap. - FrequencyCap frequencyCap = new FrequencyCap - { - impressions = 5, - level = Level.ADGROUP, - timeUnit = TimeUnit.DAY - }; - campaign.frequencyCap = frequencyCap; - - // Create the operation. - CampaignOperation operation = new CampaignOperation - { - @operator = Operator.ADD, - operand = campaign - }; - - operations.Add(operation); - } - - try - { - // Add the campaign. - CampaignReturnValue retVal = campaignService.mutate(operations.ToArray()); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - foreach (Campaign newCampaign in retVal.value) - { - Console.WriteLine( - "Campaign with name = '{0}' and id = '{1}' was added.", - newCampaign.name, newCampaign.id); - } - } - else - { - Console.WriteLine("No campaigns were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add campaigns.", e); - } - - } - } - - /// - /// Creates the budget for the campaign. - /// - /// The AdWords user. - /// The budget instance. - private static Budget CreateBudget(AdWordsUser user) - { - using (BudgetService budgetService = - (BudgetService) user.GetService(AdWordsService.v201806.BudgetService)) - { - // Create the campaign budget. - Budget budget = new Budget - { - name = "Interplanetary Cruise Budget #" + ExampleUtilities.GetRandomString(), - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD, - amount = new Money - { - microAmount = 500000 - } - }; - - BudgetOperation budgetOperation = new BudgetOperation - { - @operator = Operator.ADD, - operand = budget - }; - - try - { - BudgetReturnValue budgetRetval = budgetService.mutate(new BudgetOperation[] - { - budgetOperation - }); - return budgetRetval.value[0]; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add shared budget.", e); - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/AddExpandedTextAds.cs b/examples/AdWords/CSharp/v201806/BasicOperations/AddExpandedTextAds.cs deleted file mode 100755 index a96140784db..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/AddExpandedTextAds.cs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds expanded text ads to a given ad group. To list - /// ad groups, run GetAdGroups.cs. - /// - public class AddExpandedTextAds : ExampleBase - { - /// - /// Number of ads being added / updated in this code example. - /// - private const int NUMBER_OF_ADS = 5; - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddExpandedTextAds codeExample = new AddExpandedTextAds(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds expanded text ads to a given ad group. To list " + - "ad groups, run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which ads are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - List operations = new List(); - - for (int i = 0; i < NUMBER_OF_ADS; i++) - { - // Create the expanded text ad. - ExpandedTextAd expandedTextAd = new ExpandedTextAd - { - headlinePart1 = "Cruise #" + i.ToString() + " to Mars", - headlinePart2 = "Best Space Cruise Line", - description = "Buy your tickets now!", - finalUrls = new string[] - { - "http://www.example.com/" + i - } - }; - - AdGroupAd expandedTextAdGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = expandedTextAd, - - // Optional: Set the status. - status = AdGroupAdStatus.PAUSED - }; - - // Create the operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - @operator = Operator.ADD, - operand = expandedTextAdGroupAd - }; - - operations.Add(operation); - } - - AdGroupAdReturnValue retVal = null; - - try - { - // Create the ads. - retVal = adGroupAdService.mutate(operations.ToArray()); - - // Display the results. - if (retVal != null && retVal.value != null) - { - foreach (AdGroupAd adGroupAd in retVal.value) - { - ExpandedTextAd newAd = adGroupAd.ad as ExpandedTextAd; - Console.WriteLine( - "Expanded text ad with ID '{0}' and headline '{1} - {2}' " + - "was added.", newAd.id, newAd.headlinePart1, newAd.headlinePart2); - } - } - else - { - Console.WriteLine("No expanded text ads were created."); - } - - adGroupAdService.Close(); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create expanded text ad.", e); - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/AddKeywords.cs b/examples/AdWords/CSharp/v201806/BasicOperations/AddKeywords.cs deleted file mode 100755 index 3bd307b502b..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/AddKeywords.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Web; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds keywords to an ad group. To get ad groups, run - /// GetAdGroups.cs. - /// - public class AddKeywords : ExampleBase - { - /// - /// Items being added in this code example. - /// - private readonly string[] KEYWORDS = new string[] - { - "mars cruise", - "space hotel" - }; - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddKeywords codeExample = new AddKeywords(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds keywords to an ad group. To get ad groups, run " + - "GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which keywords are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - List operations = new List(); - - foreach (string keywordText in KEYWORDS) - { - // Create the keyword. - Keyword keyword = new Keyword - { - text = keywordText, - matchType = KeywordMatchType.BROAD - }; - - // Create the biddable ad group criterion. - BiddableAdGroupCriterion keywordCriterion = new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = keyword, - - // Optional: Set the user status. - userStatus = UserStatus.PAUSED, - - // Optional: Set the keyword destination url. - finalUrls = new UrlList() - { - urls = new string[] - { - "http://example.com/mars/cruise/?kw=" + - HttpUtility.UrlEncode(keywordText) - } - } - }; - - // Create the operations. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation - { - @operator = Operator.ADD, - operand = keywordCriterion - }; - - operations.Add(operation); - } - - try - { - // Create the keywords. - AdGroupCriterionReturnValue retVal = - adGroupCriterionService.mutate(operations.ToArray()); - - // Display the results. - if (retVal != null && retVal.value != null) - { - foreach (AdGroupCriterion adGroupCriterion in retVal.value) - { - // If you are adding multiple type of criteria, then you may need to - // check for - // - // if (adGroupCriterion is Keyword) { ... } - // - // to identify the criterion type. - Console.WriteLine( - "Keyword with ad group id = '{0}', keyword id = '{1}', text = " + - "'{2}' and match type = '{3}' was created.", - adGroupCriterion.adGroupId, adGroupCriterion.criterion.id, - (adGroupCriterion.criterion as Keyword).text, - (adGroupCriterion.criterion as Keyword).matchType); - } - } - else - { - Console.WriteLine("No keywords were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create keywords.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/AddResponsiveSearchAd.cs b/examples/AdWords/CSharp/v201806/BasicOperations/AddResponsiveSearchAd.cs deleted file mode 100755 index 2b43dfad7c7..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/AddResponsiveSearchAd.cs +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a responsive search ad to a given ad group. To get ad groups, - /// run GetAdGroups.cs. - /// - public class AddResponsiveSearchAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddResponsiveSearchAd codeExample = new AddResponsiveSearchAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a responsive search ad to a given ad group. " + - "To get ad groups, run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which ads are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create a responsive search ad. - ResponsiveSearchAd responsiveSearchAd = new ResponsiveSearchAd() - { - finalUrls = new string[] - { - "http://www.example.com/cruise" - }, - path1 = "all-inclusive", - path2 = "deals", - headlines = new AssetLink[] - { - new AssetLink() - { - asset = new TextAsset() - { - assetText = - "Cruise to Mars #" + ExampleUtilities.GetShortRandomString(), - }, - // Set a pinning to always choose this asset for HEADLINE_1. - // Pinning is optional; if no pinning is set, then headlines - // and descriptions will be rotated and the ones that perform - // best will be used more often. - pinnedField = ServedAssetFieldType.HEADLINE_1 - }, - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Best Space Cruise Line", - } - }, - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Experience the Stars", - } - }, - }, - descriptions = new AssetLink[] - { - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Buy your tickets now", - } - }, - new AssetLink() - { - asset = new TextAsset() - { - assetText = "Visit the Red Planet", - } - }, - } - }; - - // Create ad group ad. - AdGroupAd adGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = responsiveSearchAd, - - // Optional: Set additional settings. - status = AdGroupAdStatus.PAUSED - }; - - - // Create ad group ad operation and add it to the list. - AdGroupAdOperation operation = new AdGroupAdOperation() - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - try - { - // Add the responsive search ad on the server. - AdGroupAdReturnValue retval = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - // Print out some information for the created ad. - foreach (AdGroupAd newAdGroupAd in retval.value) - { - ResponsiveSearchAd newAd = (ResponsiveSearchAd) newAdGroupAd.ad; - Console.WriteLine( - $"New responsive search ad with ID {newAd.id} was added."); - Console.WriteLine("Headlines:"); - foreach (AssetLink headline in newAd.headlines) - { - TextAsset textAsset = headline.asset as TextAsset; - Console.WriteLine($" {textAsset.assetText}"); - if (headline.pinnedFieldSpecified) - { - Console.WriteLine($" (pinned to {headline.pinnedField})"); - } - } - - Console.WriteLine("Descriptions:"); - foreach (AssetLink description in newAd.descriptions) - { - TextAsset textAsset = description.asset as TextAsset; - Console.WriteLine($" {textAsset.assetText}"); - if (description.pinnedFieldSpecified) - { - Console.WriteLine($" (pinned to {description.pinnedField})"); - } - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create responsive search ad.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/GetAdGroups.cs b/examples/AdWords/CSharp/v201806/BasicOperations/GetAdGroups.cs deleted file mode 100755 index e29047c9374..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/GetAdGroups.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to retrieve all the ad groups for a - /// campaign. To create an ad group, run AddAdGroup.cs. - /// - public class GetAdGroups : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAdGroups codeExample = new GetAdGroups(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to retrieve all the ad groups for a " + - "campaign. To create an ad group, run AddAdGroup.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign for which ad groups are - /// retrieved. - public void Run(AdWordsUser user, long campaignId) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - AdGroup.Fields.Id, - AdGroup.Fields.Name - }, - predicates = new Predicate[] - { - Predicate.Equals(AdGroup.Fields.CampaignId, campaignId) - }, - paging = Paging.Default, - ordering = new OrderBy[] - { - OrderBy.Asc(AdGroup.Fields.Name) - } - }; - - AdGroupPage page = new AdGroupPage(); - - try - { - do - { - // Get the ad groups. - page = adGroupService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (AdGroup adGroup in page.entries) - { - Console.WriteLine("{0}) Ad group name is '{1}' and id is {2}.", - i + 1, adGroup.name, adGroup.id); - i++; - } - } - - // Note: You can also use selector.paging.IncrementOffsetBy(customPageSize) - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of ad groups found: {0}", page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve ad groups.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/GetCampaigns.cs b/examples/AdWords/CSharp/v201806/BasicOperations/GetCampaigns.cs deleted file mode 100755 index ee14d0cce47..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/GetCampaigns.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example lists all campaigns. To add a campaign, run - /// AddCampaign.cs. - /// - public class GetCampaigns : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetCampaigns codeExample = new GetCampaigns(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example lists all campaigns. To add a campaign, run AddCampaign.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - Campaign.Fields.Id, - Campaign.Fields.Name, - Campaign.Fields.Status - }, - paging = Paging.Default - }; - - CampaignPage page = new CampaignPage(); - - try - { - do - { - // Get the campaigns. - page = campaignService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (Campaign campaign in page.entries) - { - Console.WriteLine( - "{0}) Campaign with id = '{1}', name = '{2}' and " + - "status = '{3}' was found.", i + 1, campaign.id, campaign.name, - campaign.status); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of campaigns found: {0}", page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve campaigns", e); - } - - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/GetCampaignsWithAwql.cs b/examples/AdWords/CSharp/v201806/BasicOperations/GetCampaignsWithAwql.cs deleted file mode 100755 index d11652b2847..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/GetCampaignsWithAwql.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example lists all campaigns using an AWQL query. See - /// https://developers.google.com/adwords/api/docs/guides/awql for AWQL - /// documentation. To add a campaign, run AddCampaign.cs. - /// - public class GetCampaignsWithAwql : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetCampaignsWithAwql codeExample = new GetCampaignsWithAwql(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example lists all campaigns using an AWQL query. See " + - "https://developers.google.com/adwords/api/docs/guides/awql for AWQL " + - "documentation. To add a campaign, run AddCampaign.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create the query. - SelectQuery query = new SelectQueryBuilder() - .Select(Campaign.Fields.Name, Campaign.Fields.Id, Campaign.Fields.Status) - .OrderByAscending(Campaign.Fields.Name) - .DefaultLimit() - .Build(); - - CampaignPage page = new CampaignPage(); - int i = 0; - - try - { - do - { - // Get the campaigns. - page = campaignService.query(query); - - // Display the results. - if (page != null && page.entries != null) - { - foreach (Campaign campaign in page.entries) - { - Console.WriteLine( - "{0}) Campaign with id = '{1}', name = '{2}' and status = " + - "'{3}' was found.", i + 1, campaign.id, campaign.name, - campaign.status); - i++; - } - } - - query.NextPage(page); - } while (query.HasNextPage(page)); - - Console.WriteLine("Number of campaigns found: {0}", page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve campaigns", e); - } - - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/GetExpandedTextAds.cs b/examples/AdWords/CSharp/v201806/BasicOperations/GetExpandedTextAds.cs deleted file mode 100755 index 2c07a395469..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/GetExpandedTextAds.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example retrieves all expanded text ads given an existing ad group. - /// To add expanded text ads to an existing ad group, run AddExpandedTextAds.cs. - /// - public class GetExpandedTextAds : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetExpandedTextAds codeExample = new GetExpandedTextAds(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example retrieves all expanded text ads given an existing ad " + - "group. To add expanded text ads to an existing ad group, " + - "run AddExpandedTextAds.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group from which expanded text ads - /// are retrieved. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create a selector. - Selector selector = new Selector() - { - fields = new string[] - { - ExpandedTextAd.Fields.Id, - AdGroupAd.Fields.Status, - ExpandedTextAd.Fields.HeadlinePart1, - ExpandedTextAd.Fields.HeadlinePart2, - ExpandedTextAd.Fields.Description, - }, - ordering = new OrderBy[] - { - OrderBy.Asc(ExpandedTextAd.Fields.Id) - }, - predicates = new Predicate[] - { - // Restrict the fetch to only the selected ad group id. - Predicate.Equals(AdGroupAd.Fields.AdGroupId, adGroupId), - - // Retrieve only expanded text ads. - Predicate.Equals("AdType", "EXPANDED_TEXT_AD"), - - // By default disabled ads aren't returned by the selector. To return - // them include the DISABLED status in the statuses field. - Predicate.In(AdGroupAd.Fields.Status, new string[] - { - AdGroupAdStatus.ENABLED.ToString(), - AdGroupAdStatus.PAUSED.ToString(), - AdGroupAdStatus.DISABLED.ToString() - }) - }, - paging = Paging.Default - }; - - AdGroupAdPage page = new AdGroupAdPage(); - - try - { - do - { - // Get the expanded text ads. - page = adGroupAdService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - - foreach (AdGroupAd adGroupAd in page.entries) - { - ExpandedTextAd expandedTextAd = (ExpandedTextAd) adGroupAd.ad; - Console.WriteLine( - "{0} : Expanded text ad with ID '{1}', headline '{2} - {3}' " + - "and description '{4} was found.", i + 1, expandedTextAd.id, - expandedTextAd.headlinePart1, expandedTextAd.headlinePart2, - expandedTextAd.description); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of expanded text ads found: {0}", - page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get expanded text ads", e); - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/GetKeywords.cs b/examples/AdWords/CSharp/v201806/BasicOperations/GetKeywords.cs deleted file mode 100755 index dd914f41910..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/GetKeywords.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets all keywords in an ad group. To add keywords, run - /// AddKeywords.cs. - /// - public class GetKeywords : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetKeywords codeExample = new GetKeywords(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets all keywords in an ad group. To add keywords, run " + - "AddKeywords.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// ID of the ad group from which keywords are - /// retrieved. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Create a selector. - Selector selector = new Selector() - { - fields = new string[] - { - Keyword.Fields.Id, - Keyword.Fields.KeywordMatchType, - Keyword.Fields.KeywordText, - Keyword.Fields.CriteriaType - }, - predicates = new Predicate[] - { - // Select only keywords. - Predicate.In(Keyword.Fields.CriteriaType, new string[] - { - "KEYWORD" - }), - - // Restrict search to an ad group. - Predicate.Equals(AdGroupCriterion.Fields.AdGroupId, adGroupId), - }, - ordering = new OrderBy[] - { - OrderBy.Asc(Keyword.Fields.KeywordText) - }, - paging = Paging.Default - }; - - AdGroupCriterionPage page = new AdGroupCriterionPage(); - - try - { - do - { - // Get the keywords. - page = adGroupCriterionService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - - foreach (AdGroupCriterion adGroupCriterion in page.entries) - { - Keyword keyword = (Keyword) adGroupCriterion.criterion; - - Console.WriteLine( - "{0}) Keyword with text '{1}', match type '{2}', criteria " + - "type '{3}', and ID {4} was found.", i + 1, keyword.text, - keyword.matchType, keyword.type, keyword.id); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of keywords found: {0}", page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve keywords.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/GetResponsiveSearchAds.cs b/examples/AdWords/CSharp/v201806/BasicOperations/GetResponsiveSearchAds.cs deleted file mode 100755 index e80c2f1e321..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/GetResponsiveSearchAds.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets non-removed responsive search ads in an ad group. To add - /// responsive search ads, run AddResponsiveSearchAd.cs. To get ad groups, run - /// GetAdGroups.cs. - /// - public class GetResponsiveSearchAds : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetResponsiveSearchAds codeExample = new GetResponsiveSearchAds(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets non-removed responsive search ads in an ad group. " + - "To add responsive search ads, run AddResponsiveSearchAd.cs. To get ad " + - "groups, run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group from which expanded text ads - /// are retrieved. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create a selector to select all ads for the specified ad group. - Selector selector = new Selector() - { - fields = new string[] - { - ResponsiveSearchAd.Fields.Id, - AdGroupAd.Fields.Status, - ResponsiveSearchAd.Fields.ResponsiveSearchAdHeadlines, - ResponsiveSearchAd.Fields.ResponsiveSearchAdDescriptions - }, - ordering = new OrderBy[] - { - OrderBy.Asc(ResponsiveSearchAd.Fields.Id) - }, - predicates = new Predicate[] - { - // Restrict the fetch to only the selected ad group id. - Predicate.Equals(AdGroupAd.Fields.AdGroupId, adGroupId), - - // Retrieve only responsive search ads. - Predicate.Equals("AdType", AdType.RESPONSIVE_SEARCH_AD.ToString()), - }, - paging = Paging.Default - }; - - AdGroupAdPage page = new AdGroupAdPage(); - try - { - do - { - // Get the responsive search ads. - page = adGroupAdService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - - foreach (AdGroupAd adGroupAd in page.entries) - { - ResponsiveSearchAd ad = (ResponsiveSearchAd) adGroupAd.ad; - Console.WriteLine( - $"{i + 1} New responsive search ad with ID {ad.id} and " + - $"status {adGroupAd.status} was found."); - Console.WriteLine("Headlines:"); - foreach (AssetLink headline in ad.headlines) - { - TextAsset textAsset = headline.asset as TextAsset; - Console.WriteLine($" {textAsset.assetText}"); - if (headline.pinnedFieldSpecified) - { - Console.WriteLine( - $" (pinned to {headline.pinnedField})"); - } - } - - Console.WriteLine("Descriptions:"); - foreach (AssetLink description in ad.descriptions) - { - TextAsset textAsset = description.asset as TextAsset; - Console.WriteLine($" {textAsset.assetText}"); - if (description.pinnedFieldSpecified) - { - Console.WriteLine( - $" (pinned to {description.pinnedField})"); - } - } - - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of responsive search ads found: {0}", - page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get responsive search ads.", - e); - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/PauseAd.cs b/examples/AdWords/CSharp/v201806/BasicOperations/PauseAd.cs deleted file mode 100755 index 85cfa7060c8..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/PauseAd.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example pauses a given ad. To list all ads, run GetExpandedTextAds.cs. - /// - public class PauseAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - PauseAd codeExample = new PauseAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long adId = long.Parse("INSERT_AD_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, adId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example pauses a given ad. To list all ads, " + - "run GetExpandedTextAds.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group that contains the ad. - /// - /// Id of the ad to be paused. - public void Run(AdWordsUser user, long adGroupId, long adId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - AdGroupAdStatus status = AdGroupAdStatus.PAUSED; - - // Create the ad group ad. - AdGroupAd adGroupAd = new AdGroupAd - { - status = status, - adGroupId = adGroupId, - - ad = new Ad - { - id = adId - } - }; - - // Create the operation. - AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation - { - @operator = Operator.SET, - operand = adGroupAd - }; - - try - { - // Update the ad. - AdGroupAdReturnValue retVal = adGroupAdService.mutate(new AdGroupAdOperation[] - { - adGroupAdOperation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - AdGroupAd pausedAdGroupAd = retVal.value[0]; - Console.WriteLine("Ad with id \"{0}\" and ad group id \"{1}\"was paused.", - pausedAdGroupAd.ad.id, pausedAdGroupAd.adGroupId); - } - else - { - Console.WriteLine("No ads were paused."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to pause ad.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveAd.cs b/examples/AdWords/CSharp/v201806/BasicOperations/RemoveAd.cs deleted file mode 100755 index d2fce9aa6ee..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveAd.cs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example removes an ad using the 'REMOVE' operator. To list ads, - /// run GetTextAds.cs. - /// - public class RemoveAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - RemoveAd codeExample = new RemoveAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long adId = long.Parse("INSERT_AD_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, adId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example removes an ad using the 'REMOVE' operator. To list ads, " + - "run GetTextAds.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group that contains the ad. - /// Id of the ad being removed. - public void Run(AdWordsUser user, long adGroupId, long adId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Since we do not need to update any ad-specific fields, it is enough to - // create the base type. - Ad ad = new Ad - { - id = adId - }; - - // Create the ad group ad. - AdGroupAd adGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - - ad = ad - }; - - // Create the operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - operand = adGroupAd, - @operator = Operator.REMOVE - }; - - try - { - // Remove the ad. - AdGroupAdReturnValue retVal = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - AdGroupAd removedAdGroupAd = retVal.value[0]; - Console.WriteLine("Ad with id = \"{0}\" and type = \"{1}\" was removed.", - removedAdGroupAd.ad.id, removedAdGroupAd.ad.AdType); - } - else - { - Console.WriteLine("No ads were removed."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to remove ad.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveAdGroup.cs b/examples/AdWords/CSharp/v201806/BasicOperations/RemoveAdGroup.cs deleted file mode 100755 index 8f540acfb32..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveAdGroup.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example removes an ad group by setting the status to 'REMOVED'. - /// To get ad groups, run GetAdGroups.cs. - /// - public class RemoveAdGroup : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - RemoveAdGroup codeExample = new RemoveAdGroup(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example removes an ad group by setting the status to 'REMOVED'. " + - "To get ad groups, run GetAdGroups.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to be removed. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - // Create ad group with REMOVED status. - AdGroup adGroup = new AdGroup - { - id = adGroupId, - status = AdGroupStatus.REMOVED - }; - - // Create the operation. - AdGroupOperation operation = new AdGroupOperation - { - operand = adGroup, - @operator = Operator.SET - }; - - try - { - // Remove the ad group. - AdGroupReturnValue retVal = adGroupService.mutate(new AdGroupOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - AdGroup removedAdGroup = retVal.value[0]; - Console.WriteLine( - "Ad group with id = \"{0}\" and name = \"{1}\" was removed.", - removedAdGroup.id, removedAdGroup.name); - } - else - { - Console.WriteLine("No ad groups were removed."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to remove ad group.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveCampaign.cs b/examples/AdWords/CSharp/v201806/BasicOperations/RemoveCampaign.cs deleted file mode 100755 index a185662a815..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveCampaign.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example removes a campaign by setting the status to 'REMOVED'. - /// To get campaigns, run GetCampaigns.cs. - /// - public class RemoveCampaign : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - RemoveCampaign codeExample = new RemoveCampaign(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example removes a campaign by setting the status to 'REMOVED'. " + - "To get campaigns, run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to be removed. - public void Run(AdWordsUser user, long campaignId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create campaign with REMOVED status. - Campaign campaign = new Campaign - { - id = campaignId, - status = CampaignStatus.REMOVED - }; - - // Create the operation. - CampaignOperation operation = new CampaignOperation - { - operand = campaign, - @operator = Operator.SET - }; - - try - { - // Remove the campaign. - CampaignReturnValue retVal = campaignService.mutate(new CampaignOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - Campaign removedCampaign = retVal.value[0]; - Console.WriteLine( - "Campaign with id = \"{0}\" was renamed to \"{1}\" and removed.", - removedCampaign.id, removedCampaign.name); - } - else - { - Console.WriteLine("No campaigns were removed."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to remove campaign.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveKeyword.cs b/examples/AdWords/CSharp/v201806/BasicOperations/RemoveKeyword.cs deleted file mode 100755 index 11debdd6026..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/RemoveKeyword.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example removes a keyword using the 'REMOVE' operator. To get - /// keywords, run GetKeywords.cs. - /// - public class RemoveKeyword : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - RemoveKeyword codeExample = new RemoveKeyword(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long keywordId = long.Parse("INSERT_KEYWORD_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, keywordId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example removes a keyword using the 'REMOVE' operator. To get " + - "keywords, run GetKeywords.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group that contains the keyword. - /// - /// Id of the keyword to be removed. - public void Run(AdWordsUser user, long adGroupId, long keywordId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Create base class criterion to avoid setting keyword-specific fields. - Criterion criterion = new Criterion - { - id = keywordId - }; - - // Create the ad group criterion. - BiddableAdGroupCriterion adGroupCriterion = new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = criterion - }; - - // Create the operation. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation - { - operand = adGroupCriterion, - @operator = Operator.REMOVE - }; - - try - { - // Remove the keyword. - AdGroupCriterionReturnValue retVal = adGroupCriterionService.mutate( - new AdGroupCriterionOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - AdGroupCriterion removedKeyword = retVal.value[0]; - Console.WriteLine( - "Keyword with ad group id = \"{0}\" and id = \"{1}\" was removed.", - removedKeyword.adGroupId, removedKeyword.criterion.id); - } - else - { - Console.WriteLine("No keywords were removed."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to remove keyword.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateAdGroup.cs b/examples/AdWords/CSharp/v201806/BasicOperations/UpdateAdGroup.cs deleted file mode 100755 index cd75d08fedf..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateAdGroup.cs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to update an ad group, setting its - /// status to 'PAUSED', and its CPC bid to a new value if specified. - /// To create an ad group, run AddAdGroup.cs. - /// - public class UpdateAdGroup : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UpdateAdGroup codeExample = new UpdateAdGroup(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long? bidMicroAmount = null; - - // Optional: Provide a cpc bid for the ad group, in micro amounts. - long tempVal = 0; - if (long.TryParse("INSERT_CPC_BID_IN_MICROS_HERE", out tempVal)) - { - bidMicroAmount = tempVal; - } - - codeExample.Run(new AdWordsUser(), adGroupId, bidMicroAmount); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return " This code example illustrates how to update an ad group, setting its " + - "status to 'PAUSED', and its CPC bid to a new value if specified. To create " + - "an ad group, run AddAdGroup.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to be updated. - /// The CPC bid amount in micros. - public void Run(AdWordsUser user, long adGroupId, long? bidMicroAmount) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - // Create an ad group with the specified ID. - AdGroup adGroup = new AdGroup - { - id = adGroupId, - - // Pause the ad group. - status = AdGroupStatus.PAUSED - }; - - // Update the CPC bid if specified. - if (bidMicroAmount != null) - { - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration(); - Money cpcBidMoney = new Money - { - microAmount = bidMicroAmount.Value - }; - CpcBid cpcBid = new CpcBid - { - bid = cpcBidMoney - }; - biddingStrategyConfiguration.bids = new Bids[] - { - cpcBid - }; - adGroup.biddingStrategyConfiguration = biddingStrategyConfiguration; - } - - // Create the operation. - AdGroupOperation operation = new AdGroupOperation - { - @operator = Operator.SET, - operand = adGroup - }; - - try - { - // Update the ad group. - AdGroupReturnValue retVal = adGroupService.mutate(new AdGroupOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - AdGroup adGroupResult = retVal.value[0]; - BiddingStrategyConfiguration bsConfig = - adGroupResult.biddingStrategyConfiguration; - - // Find the CpcBid in the bidding strategy configuration's bids collection. - long cpcBidMicros = 0L; - if (bsConfig != null && bsConfig.bids != null) - { - foreach (Bids bid in bsConfig.bids) - { - if (bid is CpcBid) - { - cpcBidMicros = ((CpcBid) bid).bid.microAmount; - break; - } - } - } - - Console.WriteLine( - "Ad group with ID {0} and name '{1}' updated to have status '{2}'" + - " and CPC bid {3}", adGroupResult.id, adGroupResult.name, - adGroupResult.status, cpcBidMicros); - } - else - { - Console.WriteLine("No ad groups were updated."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to update ad group.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateCampaign.cs b/examples/AdWords/CSharp/v201806/BasicOperations/UpdateCampaign.cs deleted file mode 100755 index 59ca3e916b7..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateCampaign.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example updates a campaign. To get campaigns, run - /// GetCampaigns.cs. - /// - public class UpdateCampaign : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UpdateCampaign codeExample = new UpdateCampaign(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example updates a campaign. To get campaigns, run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to be updated. - public void Run(AdWordsUser user, long campaignId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create the campaign. - Campaign campaign = new Campaign - { - id = campaignId, - status = CampaignStatus.PAUSED - }; - - // Create the operation. - CampaignOperation operation = new CampaignOperation - { - @operator = Operator.SET, - operand = campaign - }; - - try - { - // Update the campaign. - CampaignReturnValue retVal = campaignService.mutate(new CampaignOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - Campaign updatedCampaign = retVal.value[0]; - Console.WriteLine("Campaign with name = '{0}' and id = '{1}' was updated.", - updatedCampaign.name, updatedCampaign.id); - } - else - { - Console.WriteLine("No campaigns were updated."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to update campaign.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateExpandedTextAd.cs b/examples/AdWords/CSharp/v201806/BasicOperations/UpdateExpandedTextAd.cs deleted file mode 100755 index 942576ca04c..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateExpandedTextAd.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example updates an expanded text ad. To get expanded text ads, - /// run GetExpandedTextAds.cs. - /// - public class UpdateExpandedTextAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UpdateExpandedTextAd codeExample = new UpdateExpandedTextAd(); - Console.WriteLine(codeExample.Description); - try - { - long adId = long.Parse("INSERT_AD_ID_HERE"); - codeExample.Run(new AdWordsUser(), adId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example updates an expanded text ad. To get expanded text ads, " + - "run GetExpandedTextAds.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad to be updated. - public void Run(AdWordsUser user, long adId) - { - using (AdService adService = - (AdService) user.GetService(AdWordsService.v201806.AdService)) - { - // Create an expanded text ad using the provided ad ID. - ExpandedTextAd expandedTextAd = new ExpandedTextAd - { - id = adId, - - // Update some properties of the expanded text ad. - headlinePart1 = "Cruise to Pluto #" + ExampleUtilities.GetShortRandomString(), - headlinePart2 = "Tickets on sale now", - description = "Best space cruise ever.", - finalUrls = new string[] - { - "http://www.example.com/" - }, - finalMobileUrls = new string[] - { - "http://www.example.com/mobile" - } - }; - - // Create ad group ad operation and add it to the list. - AdOperation operation = new AdOperation - { - operand = expandedTextAd, - @operator = Operator.SET - }; - - try - { - // Update the ad on the server. - AdReturnValue result = adService.mutate(new AdOperation[] - { - operation - }); - ExpandedTextAd updatedAd = (ExpandedTextAd) result.value[0]; - - // Print out some information. - Console.WriteLine("Expanded text ad with ID {0} was updated.", updatedAd.id); - Console.WriteLine( - "Headline part 1: {0}\nHeadline part 2: {1}\nDescription: {2}" + - "\nFinal URL: {3}\nFinal mobile URL: {4}", updatedAd.headlinePart1, - updatedAd.headlinePart2, updatedAd.description, updatedAd.finalUrls[0], - updatedAd.finalMobileUrls[0]); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to update expanded text ad.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateKeyword.cs b/examples/AdWords/CSharp/v201806/BasicOperations/UpdateKeyword.cs deleted file mode 100755 index 42b1a1f3321..00000000000 --- a/examples/AdWords/CSharp/v201806/BasicOperations/UpdateKeyword.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example updates the bid of a keyword. To get keyword, run - /// GetKeywords.cs. - /// - public class UpdateKeyword : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UpdateKeyword codeExample = new UpdateKeyword(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long keywordId = long.Parse("INSERT_KEYWORD_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, keywordId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example updates the bid of a keyword. To get keyword, run " + - "GetKeywords.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group that contains the keyword. - /// - /// Id of the keyword to be updated. - public void Run(AdWordsUser user, long adGroupId, long keywordId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Since we are not updating any keyword-specific fields, it is enough to - // create a criterion object. - Criterion criterion = new Criterion - { - id = keywordId - }; - - // Create ad group criterion. - BiddableAdGroupCriterion biddableAdGroupCriterion = new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = criterion - }; - - // Create the bids. - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration(); - CpcBid cpcBid = new CpcBid - { - bid = new Money - { - microAmount = 1000000 - } - }; - biddingConfig.bids = new Bids[] - { - cpcBid - }; - - biddableAdGroupCriterion.biddingStrategyConfiguration = biddingConfig; - - // Create the operation. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation - { - @operator = Operator.SET, - operand = biddableAdGroupCriterion - }; - - try - { - // Update the keyword. - AdGroupCriterionReturnValue retVal = adGroupCriterionService.mutate( - new AdGroupCriterionOperation[] - { - operation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - AdGroupCriterion adGroupCriterion = retVal.value[0]; - long bidAmount = 0; - foreach (Bids bids in (adGroupCriterion as BiddableAdGroupCriterion) - .biddingStrategyConfiguration.bids) - { - if (bids is CpcBid) - { - bidAmount = (bids as CpcBid).bid.microAmount; - break; - } - } - - Console.WriteLine( - "Keyword with ad group id = '{0}', id = '{1}' was updated with " + - "bid amount = '{2}' micros.", adGroupCriterion.adGroupId, - adGroupCriterion.criterion.id, bidAmount); - } - else - { - Console.WriteLine("No keyword was updated."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to update keyword.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.cs deleted file mode 100755 index b68bbe06723..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.cs +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a campaign group and sets a performance target for that group. To - /// get campaigns, run GetCampaigns.cs. To download reports, run - /// DownloadCriteriaReportWithAwql.cs. - /// - public class AddCampaignGroupsAndPerformanceTargets : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCampaignGroupsAndPerformanceTargets codeExample = - new AddCampaignGroupsAndPerformanceTargets(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId1 = long.Parse("INSERT_CAMPAIGN_ID1_HERE"); - long campaignId2 = long.Parse("INSERT_CAMPAIGN_ID2_HERE"); - codeExample.Run(new AdWordsUser(), campaignId1, campaignId2); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example adds a campaign group and sets a performance target for " + - "that group. To get campaigns, run GetCampaigns.cs. To download reports, run " + - "DownloadCriteriaReportWithAwql.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to be added to the campaign group. - /// Id of the campaign to be added to the campaign group. - public void Run(AdWordsUser user, long campaignId1, long campaignId2) - { - CampaignGroup campaignGroup = CreateCampaignGroup(user); - AddCampaignsToGroup(user, campaignGroup.id, new long[] - { - campaignId1, - campaignId2 - }); - CreatePerformanceTarget(user, campaignGroup.id); - Console.WriteLine("Campaign group and its performance target were setup successfully."); - } - - /// - /// Create a campaign group. - /// - /// The AdWords user. - /// The campaign group. - private static CampaignGroup CreateCampaignGroup(AdWordsUser user) - { - using (CampaignGroupService campaignGroupService = - (CampaignGroupService) user.GetService(AdWordsService.v201806.CampaignGroupService)) - { - // Create the campaign group. - CampaignGroup campaignGroup = new CampaignGroup - { - name = "Mars campaign group - " + ExampleUtilities.GetShortRandomString() - }; - - // Create the operation. - CampaignGroupOperation operation = new CampaignGroupOperation - { - operand = campaignGroup, - @operator = Operator.ADD - }; - - try - { - CampaignGroupReturnValue retval = campaignGroupService.mutate( - new CampaignGroupOperation[] - { - operation - }); - - // Display the results. - CampaignGroup newCampaignGroup = retval.value[0]; - Console.WriteLine( - "Campaign group with ID = '{0}' and name = '{1}' was created.", - newCampaignGroup.id, newCampaignGroup.name); - return newCampaignGroup; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add campaign group.", e); - } - } - } - - - /// - /// Adds multiple campaigns to a campaign group. - /// - /// The AdWords user. - /// The campaign group ID. - /// IDs of the campaigns to be added to the campaign group. - /// - private static void AddCampaignsToGroup(AdWordsUser user, long campaignGroupId, - long[] campaignIds) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - List operations = new List(); - - for (int i = 0; i < campaignIds.Length; i++) - { - Campaign campaign = new Campaign - { - id = campaignIds[i], - campaignGroupId = campaignGroupId - }; - - CampaignOperation operation = new CampaignOperation - { - operand = campaign, - @operator = Operator.SET - }; - operations.Add(operation); - } - - try - { - CampaignReturnValue retval = campaignService.mutate(operations.ToArray()); - List updatedCampaignIds = new List(); - retval.value.ToList().ForEach(updatedCampaign => - updatedCampaignIds.Add(updatedCampaign.id)); - - // Display the results. - Console.WriteLine( - "The following campaign IDs were added to the campaign group " + - "with ID '{0}':\n\t{1}'", campaignGroupId, - string.Join(", ", updatedCampaignIds)); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to add campaigns to campaign group.", e); - } - } - } - - - /// - /// Creates a performance target for the campaign group. - /// - /// The AdWords user. - /// Campaign group ID. - /// The newly created performance target. - private static CampaignGroupPerformanceTarget CreatePerformanceTarget(AdWordsUser user, - long campaignGroupId) - { - using (CampaignGroupPerformanceTargetService campaignGroupPerformanceTargetService = - (CampaignGroupPerformanceTargetService) user.GetService(AdWordsService.v201806 - .CampaignGroupPerformanceTargetService)) - { - // Create the performance target. - CampaignGroupPerformanceTarget campaignGroupPerformanceTarget = - new CampaignGroupPerformanceTarget - { - campaignGroupId = campaignGroupId - }; - - PerformanceTarget performanceTarget = new PerformanceTarget - { - // Keep the CPC for the campaigns < $3. - efficiencyTargetType = EfficiencyTargetType.CPC_LESS_THAN_OR_EQUAL_TO, - efficiencyTargetValue = 3000000, - - // Keep the maximum spend under $50. - spendTargetType = SpendTargetType.MAXIMUM - }; - Money maxSpend = new Money - { - microAmount = 500000000 - }; - performanceTarget.spendTarget = maxSpend; - - // Aim for at least 3000 clicks. - performanceTarget.volumeTargetValue = 3000; - performanceTarget.volumeGoalType = VolumeGoalType.MAXIMIZE_CLICKS; - - // Start the performance target today, and run it for the next 90 days. - System.DateTime startDate = System.DateTime.Now; - System.DateTime endDate = startDate.AddDays(90); - - performanceTarget.startDate = startDate.ToString("yyyyMMdd"); - performanceTarget.endDate = endDate.ToString("yyyyMMdd"); - - campaignGroupPerformanceTarget.performanceTarget = performanceTarget; - - // Create the operation. - CampaignGroupPerformanceTargetOperation operation = - new CampaignGroupPerformanceTargetOperation - { - operand = campaignGroupPerformanceTarget, - @operator = Operator.ADD - }; - - try - { - CampaignGroupPerformanceTargetReturnValue retval = - campaignGroupPerformanceTargetService.mutate( - new CampaignGroupPerformanceTargetOperation[] - { - operation - }); - - // Display the results. - CampaignGroupPerformanceTarget newCampaignPerfTarget = retval.value[0]; - - Console.WriteLine( - "Campaign performance target with id = '{0}' was added for " + - "campaign group ID '{1}'.", newCampaignPerfTarget.id, - newCampaignPerfTarget.campaignGroupId); - return newCampaignPerfTarget; - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create campaign performance target.", e); - } - } - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignLabels.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignLabels.cs deleted file mode 100755 index a1555769ee6..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCampaignLabels.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a label to multiple campaigns. - /// - public class AddCampaignLabels : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCampaignLabels codeExample = new AddCampaignLabels(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId1 = long.Parse("INSERT_CAMPAIGN_ID1_HERE"); - long campaignId2 = long.Parse("INSERT_CAMPAIGN_ID2_HERE"); - long labelId = long.Parse("INSERT_LABEL_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId1, campaignId2, labelId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example adds a label to multiple campaigns."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to which labels are - /// added. - /// Id of the campaign to which labels are - /// added. - /// ID of the label to apply. - public void Run(AdWordsUser user, long campaignId1, long campaignId2, long labelId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create label operations. - List operations = new List(); - - foreach (long campaignId in new long[] - { - campaignId1, - campaignId2 - }) - { - CampaignLabel campaignLabel = new CampaignLabel - { - campaignId = campaignId, - labelId = labelId - }; - - CampaignLabelOperation operation = new CampaignLabelOperation - { - operand = campaignLabel, - @operator = Operator.ADD - }; - - operations.Add(operation); - } - - try - { - CampaignLabelReturnValue retval = - campaignService.mutateLabel(operations.ToArray()); - - // Display campaign labels. - if (retval != null && retval.value != null) - { - foreach (CampaignLabel newCampaignLabel in retval.value) - { - Console.WriteLine( - "Campaign label for campaign ID {0} and label ID {1} was added.\n", - newCampaignLabel.campaignId, newCampaignLabel.labelId); - } - } - else - { - Console.WriteLine("No campaign labels were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add campaign label.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.cs deleted file mode 100755 index 7e11b20a46e..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.cs +++ /dev/null @@ -1,420 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.BatchJob.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code sample illustrates how to use BatchJobService to create multiple - /// complete campaigns, including ad groups and keywords. - /// - public class AddCompleteCampaignsUsingBatchJob : ExampleBase - { - /// - /// The last ID that was automatically generated. - /// - private static long LAST_ID = -1; - - /// - /// The number of campaigns to be added. - /// - private const long NUMBER_OF_CAMPAIGNS_TO_ADD = 2; - - /// - /// The number of ad groups to be added per campaign. - /// - private const long NUMBER_OF_ADGROUPS_TO_ADD = 2; - - /// - /// The number of keywords to be added per campaign. - /// - private const long NUMBER_OF_KEYWORDS_TO_ADD = 5; - - /// - /// The polling interval base to be used for exponential backoff. - /// - private const int POLL_INTERVAL_SECONDS_BASE = 30; - - /// - /// The maximum milliseconds to wait for completion. - /// - private const int TIME_TO_WAIT_FOR_COMPLETION = 15 * 60 * 1000; // 15 minutes - - /// - /// Create a temporary ID generator that will produce a sequence of descending - /// negative numbers. - /// - /// - private static long NextId() - { - return Interlocked.Decrement(ref LAST_ID); - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCompleteCampaignsUsingBatchJob codeExample = new AddCompleteCampaignsUsingBatchJob(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code sample illustrates how to use BatchJobService to create multiple " + - "complete campaigns, including ad groups and keywords."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (BatchJobService batchJobService = - (BatchJobService) user.GetService(AdWordsService.v201806.BatchJobService)) - { - try - { - // Create a BatchJob. - BatchJobOperation addOp = new BatchJobOperation() - { - @operator = Operator.ADD, - operand = new BatchJob() - }; - - BatchJob batchJob = batchJobService.mutate(new BatchJobOperation[] - { - addOp - }).value[0]; - - // Get the upload URL from the new job. - string uploadUrl = batchJob.uploadUrl.url; - - Console.WriteLine( - "Created BatchJob with ID {0}, status '{1}' and upload URL {2}.", - batchJob.id, batchJob.status, batchJob.uploadUrl.url); - - // Create the mutate request that will be sent to the upload URL. - List operations = new List(); - - // Create and add an operation to create a new budget. - BudgetOperation budgetOperation = BuildBudgetOperation(); - operations.Add(budgetOperation); - - // Create and add operations to create new campaigns. - List campaignOperations = - BuildCampaignOperations(budgetOperation.operand.budgetId); - operations.AddRange(campaignOperations); - - // Create and add operations to create new ad groups. - List adGroupOperations = new List(); - foreach (CampaignOperation campaignOperation in campaignOperations) - { - adGroupOperations.AddRange( - BuildAdGroupOperations(campaignOperation.operand.id)); - } - - operations.AddRange(adGroupOperations); - - // Create and add operations to create new ad group ads (expanded text ads). - foreach (AdGroupOperation adGroupOperation in adGroupOperations) - { - operations.AddRange(BuildAdGroupAdOperations(adGroupOperation.operand.id)); - } - - // Create and add operations to create new ad group criteria (keywords). - foreach (AdGroupOperation adGroupOperation in adGroupOperations) - { - operations.AddRange( - BuildAdGroupCriterionOperations(adGroupOperation.operand.id)); - } - - BatchJobUtilities batchJobUploadHelper = new BatchJobUtilities(user); - - // Create a resumable Upload URL to upload the operations. - string resumableUploadUrl = - batchJobUploadHelper.GetResumableUploadUrl(uploadUrl); - - // Use the BatchJobUploadHelper to upload all operations. - batchJobUploadHelper.Upload(resumableUploadUrl, operations); - - bool isCompleted = batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - delegate(BatchJob waitBatchJob, long timeElapsed) - { - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed / 1000, waitBatchJob.id, waitBatchJob.status); - batchJob = waitBatchJob; - return false; - }); - - if (!isCompleted) - { - throw new TimeoutException( - "Job is still in pending state after waiting for " + - TIME_TO_WAIT_FOR_COMPLETION + " seconds."); - } - - if (batchJob.processingErrors != null) - { - foreach (BatchJobProcessingError processingError in batchJob - .processingErrors) - { - Console.WriteLine(" Processing error: {0}, {1}, {2}, {3}, {4}", - processingError.ApiErrorType, processingError.trigger, - processingError.errorString, processingError.fieldPath, - processingError.reason); - } - } - - if (batchJob.downloadUrl != null && batchJob.downloadUrl.url != null) - { - BatchJobMutateResponse mutateResponse = - batchJobUploadHelper.Download(batchJob.downloadUrl.url); - Console.WriteLine("Downloaded results from {0}.", batchJob.downloadUrl.url); - foreach (MutateResult mutateResult in mutateResponse.rval) - { - string outcome = mutateResult.errorList == null ? "SUCCESS" : "FAILURE"; - Console.WriteLine(" Operation [{0}] - {1}", mutateResult.index, - outcome); - } - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to add campaigns using batch job.", e); - } - } - } - - /// - /// Builds the operation for creating an ad within an ad group. - /// - /// ID of the ad group for which ads are created. - /// A list of operations for creating ads. - private static List BuildAdGroupAdOperations(long adGroupId) - { - List operations = new List(); - AdGroupAd adGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = new ExpandedTextAd() - { - headlinePart1 = "Luxury Cruise to Mars", - headlinePart2 = "Visit the Red Planet in style.", - description = "Low-gravity fun for everyone!", - finalUrls = new string[] - { - "http://www.example.com/1" - } - } - }; - - AdGroupAdOperation operation = new AdGroupAdOperation() - { - operand = adGroupAd, - @operator = Operator.ADD - }; - operations.Add(operation); - return operations; - } - - /// - /// Builds the operations for creating keywords within an ad group. - /// - /// ID of the ad group for which keywords are - /// created. - /// A list of operations for creating keywords. - private static List BuildAdGroupCriterionOperations( - long adGroupId) - { - List adGroupCriteriaOperations = - new List(); - - // Create AdGroupCriterionOperations to add keywords. - - for (int i = 0; i < NUMBER_OF_KEYWORDS_TO_ADD; i++) - { - // Create Keyword. - string text = string.Format("mars{0}", i); - - // Make 50% of keywords invalid to demonstrate error handling. - if ((i % 2) == 0) - { - text = text + "!!!"; - } - - // Create AdGroupCriterionOperation. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation() - { - operand = new BiddableAdGroupCriterion() - { - adGroupId = adGroupId, - criterion = new Keyword() - { - text = text, - matchType = KeywordMatchType.BROAD - } - }, - @operator = Operator.ADD - }; - - // Add to list. - adGroupCriteriaOperations.Add(operation); - } - - return adGroupCriteriaOperations; - } - - /// - /// Builds the operations for creating ad groups within a campaign. - /// - /// ID of the campaign for which ad groups are - /// created. - /// A list of operations for creating ad groups. - private static List BuildAdGroupOperations(long campaignId) - { - List operations = new List(); - for (int i = 0; i < NUMBER_OF_ADGROUPS_TO_ADD; i++) - { - AdGroup adGroup = new AdGroup() - { - campaignId = campaignId, - id = NextId(), - name = "Batch Ad Group # " + ExampleUtilities.GetRandomString(), - biddingStrategyConfiguration = new BiddingStrategyConfiguration() - { - bids = new Bids[] - { - new CpcBid() - { - bid = new Money() - { - microAmount = 10000000L - } - } - } - } - }; - - AdGroupOperation operation = new AdGroupOperation() - { - operand = adGroup, - @operator = Operator.ADD - }; - - operations.Add(operation); - } - - return operations; - } - - /// - /// Builds the operations for creating new campaigns. - /// - /// ID of the budget to be used for the campaign. - /// - /// A list of operations for creating campaigns. - private static List BuildCampaignOperations(long budgetId) - { - List operations = new List(); - - for (int i = 0; i < NUMBER_OF_CAMPAIGNS_TO_ADD; i++) - { - Campaign campaign = new Campaign() - { - name = "Batch Campaign " + ExampleUtilities.GetRandomString(), - - // 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, - id = NextId(), - advertisingChannelType = AdvertisingChannelType.SEARCH, - budget = new Budget() - { - budgetId = budgetId - }, - biddingStrategyConfiguration = new BiddingStrategyConfiguration() - { - biddingStrategyType = BiddingStrategyType.MANUAL_CPC, - - // You can optionally provide a bidding scheme in place of the type. - biddingScheme = new ManualCpcBiddingScheme() - } - }; - - CampaignOperation operation = new CampaignOperation() - { - operand = campaign, - @operator = Operator.ADD - }; - operations.Add(operation); - } - - return operations; - } - - /// - /// Builds an operation for creating a budget. - /// - /// The operation for creating a budget. - private static BudgetOperation BuildBudgetOperation() - { - Budget budget = new Budget() - { - budgetId = NextId(), - name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(), - amount = new Money() - { - microAmount = 50000000L, - }, - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD, - }; - - BudgetOperation budgetOperation = new BudgetOperation() - { - operand = budget, - @operator = Operator.ADD - }; - return budgetOperation; - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.cs deleted file mode 100755 index 76d91f10076..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.cs +++ /dev/null @@ -1,440 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.BatchJob; -using Google.Api.Ads.AdWords.Util.BatchJob.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code sample illustrates how to use BatchJobService to create multiple - /// complete campaigns, including ad groups and keywords. - /// - public class AddCompleteCampaignsUsingStreamingBatchJob : ExampleBase - { - /// - /// The last ID that was automatically generated. - /// - private static long LAST_ID = -1; - - /// - /// The number of campaigns to be added. - /// - private const long NUMBER_OF_CAMPAIGNS_TO_ADD = 2; - - /// - /// The number of ad groups to be added per campaign. - /// - private const long NUMBER_OF_ADGROUPS_TO_ADD = 2; - - /// - /// The number of keywords to be added per campaign. - /// - private const long NUMBER_OF_KEYWORDS_TO_ADD = 5; - - /// - /// The polling interval base to be used for exponential backoff. - /// - private const int POLL_INTERVAL_SECONDS_BASE = 30; - - /// - /// The maximum milliseconds to wait for completion. - /// - private const int TIME_TO_WAIT_FOR_COMPLETION = 15 * 60 * 1000; // 15 minutes - - /// - /// Create a temporary ID generator that will produce a sequence of descending - /// negative numbers. - /// - /// - private static long NextId() - { - return Interlocked.Decrement(ref LAST_ID); - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCompleteCampaignsUsingStreamingBatchJob codeExample = - new AddCompleteCampaignsUsingStreamingBatchJob(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code sample illustrates how to use BatchJobService to create multiple " + - "complete campaigns, including ad groups and keywords."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (BatchJobService batchJobService = - (BatchJobService) user.GetService(AdWordsService.v201806.BatchJobService)) - { - try - { - // Create a BatchJob. - BatchJobOperation addOp = new BatchJobOperation() - { - @operator = Operator.ADD, - operand = new BatchJob() - }; - - BatchJob batchJob = batchJobService.mutate(new BatchJobOperation[] - { - addOp - }).value[0]; - - // Get the upload URL from the new job. - string uploadUrl = batchJob.uploadUrl.url; - - Console.WriteLine( - "Created BatchJob with ID {0}, status '{1}' and upload URL {2}.", - batchJob.id, batchJob.status, batchJob.uploadUrl.url); - - BatchJobUtilities batchJobUploadHelper = new BatchJobUtilities(user); - - // Create a resumable Upload URL to upload the operations. - string resumableUploadUrl = - batchJobUploadHelper.GetResumableUploadUrl(uploadUrl); - - BatchUploadProgress uploadProgress = - batchJobUploadHelper.BeginStreamUpload(resumableUploadUrl); - - // Create and add an operation to create a new budget. - BudgetOperation budgetOperation = BuildBudgetOperation(); - - uploadProgress = batchJobUploadHelper.StreamUpload(uploadProgress, - new List() - { - budgetOperation - }); - - // Create and add operations to create new campaigns. - List campaignOperations = new List(); - campaignOperations.AddRange( - BuildCampaignOperations(budgetOperation.operand.budgetId)); - - uploadProgress = - batchJobUploadHelper.StreamUpload(uploadProgress, campaignOperations); - - // Create and add operations to create new ad groups. - List adGroupOperations = new List(); - foreach (CampaignOperation campaignOperation in campaignOperations) - { - adGroupOperations.AddRange( - BuildAdGroupOperations(campaignOperation.operand.id)); - } - - uploadProgress = - batchJobUploadHelper.StreamUpload(uploadProgress, adGroupOperations); - - // Create and add operations to create new ad group ads (expanded text ads). - List adOperations = new List(); - foreach (AdGroupOperation adGroupOperation in adGroupOperations) - { - adOperations.AddRange( - BuildAdGroupAdOperations(adGroupOperation.operand.id)); - } - - uploadProgress = - batchJobUploadHelper.StreamUpload(uploadProgress, adOperations); - - // Create and add operations to create new ad group criteria (keywords). - List keywordOperations = new List(); - foreach (AdGroupOperation adGroupOperation in adGroupOperations) - { - keywordOperations.AddRange( - BuildAdGroupCriterionOperations(adGroupOperation.operand.id)); - } - - uploadProgress = - batchJobUploadHelper.StreamUpload(uploadProgress, keywordOperations); - - // Mark the upload as complete. - batchJobUploadHelper.EndStreamUpload(uploadProgress); - - bool isCompleted = batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - delegate(BatchJob waitBatchJob, long timeElapsed) - { - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed / 1000, waitBatchJob.id, waitBatchJob.status); - batchJob = waitBatchJob; - return false; - }); - - if (!isCompleted) - { - throw new TimeoutException( - "Job is still in pending state after waiting for " + - TIME_TO_WAIT_FOR_COMPLETION + " seconds."); - } - - if (batchJob.processingErrors != null) - { - foreach (BatchJobProcessingError processingError in batchJob - .processingErrors) - { - Console.WriteLine(" Processing error: {0}, {1}, {2}, {3}, {4}", - processingError.ApiErrorType, processingError.trigger, - processingError.errorString, processingError.fieldPath, - processingError.reason); - } - } - - if (batchJob.downloadUrl != null && batchJob.downloadUrl.url != null) - { - BatchJobMutateResponse mutateResponse = - batchJobUploadHelper.Download(batchJob.downloadUrl.url); - Console.WriteLine("Downloaded results from {0}.", batchJob.downloadUrl.url); - foreach (MutateResult mutateResult in mutateResponse.rval) - { - string outcome = mutateResult.errorList == null ? "SUCCESS" : "FAILURE"; - Console.WriteLine(" Operation [{0}] - {1}", mutateResult.index, - outcome); - } - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to add campaigns using batch job.", e); - } - } - } - - /// - /// Builds the operation for creating an ad within an ad group. - /// - /// ID of the ad group for which ads are created. - /// A list of operations for creating ads. - private static List BuildAdGroupAdOperations(long adGroupId) - { - List operations = new List(); - AdGroupAd adGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = new ExpandedTextAd() - { - headlinePart1 = "Luxury Cruise to Mars", - headlinePart2 = "Visit the Red Planet in style.", - description = "Low-gravity fun for everyone!", - finalUrls = new string[] - { - "http://www.example.com/1" - } - } - }; - - AdGroupAdOperation operation = new AdGroupAdOperation() - { - operand = adGroupAd, - @operator = Operator.ADD - }; - operations.Add(operation); - return operations; - } - - /// - /// Builds the operations for creating keywords within an ad group. - /// - /// ID of the ad group for which keywords are - /// created. - /// A list of operations for creating keywords. - private static List BuildAdGroupCriterionOperations( - long adGroupId) - { - List adGroupCriteriaOperations = - new List(); - - // Create AdGroupCriterionOperations to add keywords. - - for (int i = 0; i < NUMBER_OF_KEYWORDS_TO_ADD; i++) - { - // Create Keyword. - string text = string.Format("mars{0}", i); - - // Make 50% of keywords invalid to demonstrate error handling. - if ((i % 2) == 0) - { - text = text + "!!!"; - } - - // Create AdGroupCriterionOperation. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation() - { - operand = new BiddableAdGroupCriterion() - { - adGroupId = adGroupId, - criterion = new Keyword() - { - text = text, - matchType = KeywordMatchType.BROAD - } - }, - @operator = Operator.ADD - }; - - // Add to list. - adGroupCriteriaOperations.Add(operation); - } - - return adGroupCriteriaOperations; - } - - /// - /// Builds the operations for creating ad groups within a campaign. - /// - /// ID of the campaign for which ad groups are - /// created. - /// A list of operations for creating ad groups. - private static List BuildAdGroupOperations(long campaignId) - { - List operations = new List(); - for (int i = 0; i < NUMBER_OF_ADGROUPS_TO_ADD; i++) - { - AdGroup adGroup = new AdGroup() - { - campaignId = campaignId, - id = NextId(), - name = "Batch Ad Group # " + ExampleUtilities.GetRandomString(), - biddingStrategyConfiguration = new BiddingStrategyConfiguration() - { - bids = new Bids[] - { - new CpcBid() - { - bid = new Money() - { - microAmount = 10000000L - } - } - } - } - }; - - AdGroupOperation operation = new AdGroupOperation() - { - operand = adGroup, - @operator = Operator.ADD - }; - - operations.Add(operation); - } - - return operations; - } - - /// - /// Builds the operations for creating new campaigns. - /// - /// ID of the budget to be used for the campaign. - /// - /// A list of operations for creating campaigns. - private static List BuildCampaignOperations(long budgetId) - { - List operations = new List(); - - for (int i = 0; i < NUMBER_OF_CAMPAIGNS_TO_ADD; i++) - { - Campaign campaign = new Campaign() - { - name = "Batch Campaign " + ExampleUtilities.GetRandomString(), - - // 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, - id = NextId(), - advertisingChannelType = AdvertisingChannelType.SEARCH, - budget = new Budget() - { - budgetId = budgetId - }, - biddingStrategyConfiguration = new BiddingStrategyConfiguration() - { - biddingStrategyType = BiddingStrategyType.MANUAL_CPC, - - // You can optionally provide a bidding scheme in place of the type. - biddingScheme = new ManualCpcBiddingScheme() - } - }; - - CampaignOperation operation = new CampaignOperation() - { - operand = campaign, - @operator = Operator.ADD - }; - operations.Add(operation); - } - - return operations; - } - - /// - /// Builds an operation for creating a budget. - /// - /// The operation for creating a budget. - private static BudgetOperation BuildBudgetOperation() - { - Budget budget = new Budget() - { - budgetId = NextId(), - name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(), - amount = new Money() - { - microAmount = 50000000L, - }, - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD, - }; - - BudgetOperation budgetOperation = new BudgetOperation() - { - operand = budget, - @operator = Operator.ADD - }; - return budgetOperation; - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddDraft.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddDraft.cs deleted file mode 100755 index 77ac75b95b8..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddDraft.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to create a draft and access its - /// associated draft campaign. See the Campaign Drafts and Experiments guide - /// for more information: - /// https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments - /// - public class AddDraft : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddDraft codeExample = new AddDraft(); - Console.WriteLine(codeExample.Description); - try - { - long baseCampaignId = long.Parse("INSERT_BASE_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), baseCampaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to create a draft and access its " + - "associated draft campaign. See the Campaign Drafts and Experiments guide " + - "for more information: https://developers.google.com/adwords/api/docs/" + - "guides/campaign-drafts-experiments"; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to use as base of the - /// draft. - public void Run(AdWordsUser user, long baseCampaignId) - { - using (DraftService draftService = - (DraftService) user.GetService(AdWordsService.v201806.DraftService)) - using (CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService)) - { - Draft draft = new Draft() - { - baseCampaignId = baseCampaignId, - draftName = "Test Draft #" + ExampleUtilities.GetRandomString() - }; - - DraftOperation draftOperation = new DraftOperation() - { - @operator = Operator.ADD, - operand = draft - }; - - try - { - draft = draftService.mutate(new DraftOperation[] - { - draftOperation - }).value[0]; - - Console.WriteLine( - "Draft with ID {0}, base campaign ID {1} and draft campaign ID " + - "{2} created.", draft.draftId, draft.baseCampaignId, - draft.draftCampaignId); - - // Once the draft is created, you can modify the draft campaign as if it - // were a real campaign. For example, you may add criteria, adjust bids, - // or even include additional ads. Adding a criterion is shown here. - - Language language = new Language() - { - id = 1003L // Spanish - }; - - // Make sure to use the draftCampaignId when modifying the virtual draft - // campaign. - CampaignCriterion campaignCriterion = new CampaignCriterion() - { - campaignId = draft.draftCampaignId, - criterion = language - }; - - CampaignCriterionOperation criterionOperation = - new CampaignCriterionOperation() - { - @operator = Operator.ADD, - operand = campaignCriterion - }; - - campaignCriterion = campaignCriterionService.mutate( - new CampaignCriterionOperation[] - { - criterionOperation - }).value[0]; - Console.WriteLine( - "Draft updated to include criteria in draft campaign ID {0}.", - draft.draftCampaignId); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create draft campaign and add " + "criteria.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.cs deleted file mode 100755 index 2f71c38757a..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.cs +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.BatchJob.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code sample illustrates how to perform asynchronous requests using - /// BatchJobService and incremental uploads of operations. It also - /// demonstrates how to cancel a running batch job. - /// - public class AddKeywordsUsingIncrementalBatchJob : ExampleBase - { - private const long NUMBER_OF_KEYWORDS_TO_ADD = 100; - - // The chunk size to use when uploading operations. - private const int CHUNK_SIZE = 4 * 1024 * 1024; - - /// - /// The maximum milliseconds to wait for completion. - /// - private const int TIME_TO_WAIT_FOR_COMPLETION = 15 * 60 * 1000; // 15 minutes - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddKeywordsUsingIncrementalBatchJob codeExample = - new AddKeywordsUsingIncrementalBatchJob(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code sample illustrates how to perform asynchronous requests using " + - "BatchJobService and incremental uploads of operations. It also demonstrates " + - "how to cancel a running batch job."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad groups to which keywords are - /// added. - public void Run(AdWordsUser user, long adGroupId) - { - using (BatchJobService batchJobService = - (BatchJobService) user.GetService(AdWordsService.v201806.BatchJobService)) - { - BatchJobOperation addOp = new BatchJobOperation() - { - @operator = Operator.ADD, - operand = new BatchJob() - }; - - try - { - BatchJob batchJob = batchJobService.mutate(new BatchJobOperation[] - { - addOp - }).value[0]; - - Console.WriteLine( - "Created BatchJob with ID {0}, status '{1}' and upload URL {2}.", - batchJob.id, batchJob.status, batchJob.uploadUrl.url); - - List operations = CreateOperations(adGroupId); - - // Create a BatchJobUtilities instance for uploading operations. Use a - // chunked upload. - BatchJobUtilities batchJobUploadHelper = - new BatchJobUtilities(user, true, CHUNK_SIZE); - - // Create a resumable Upload URL to upload the operations. - string resumableUploadUrl = - batchJobUploadHelper.GetResumableUploadUrl(batchJob.uploadUrl.url); - - // Use the BatchJobUploadHelper to upload all operations. - batchJobUploadHelper.Upload(resumableUploadUrl, operations.ToArray()); - - // A flag to determine if the job was requested to be cancelled. This - // typically comes from the user. - bool wasCancelRequested = false; - - bool isComplete = batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - delegate(BatchJob waitBatchJob, long timeElapsed) - { - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed / 1000, waitBatchJob.id, waitBatchJob.status); - batchJob = waitBatchJob; - return wasCancelRequested; - }); - - // Optional: Cancel the job if it has not completed after waiting for - // TIME_TO_WAIT_FOR_COMPLETION. - bool shouldWaitForCancellation = false; - if (!isComplete && wasCancelRequested) - { - BatchJobError cancellationError = null; - try - { - batchJobUploadHelper.TryToCancelJob(batchJob.id); - } - catch (AdWordsApiException e) - { - cancellationError = GetBatchJobError(e); - } - - if (cancellationError == null) - { - Console.WriteLine("Successfully requested job cancellation."); - shouldWaitForCancellation = true; - } - else - { - Console.WriteLine("Job cancellation failed. Error says: {0}.", - cancellationError.reason); - } - - if (shouldWaitForCancellation) - { - isComplete = batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - delegate(BatchJob waitBatchJob, long timeElapsed) - { - Console.WriteLine( - "[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed / 1000, waitBatchJob.id, waitBatchJob.status); - batchJob = waitBatchJob; - return false; - }); - } - } - - if (!isComplete) - { - throw new TimeoutException( - "Job is still in pending state after waiting for " + - TIME_TO_WAIT_FOR_COMPLETION + " seconds."); - } - - if (batchJob.processingErrors != null) - { - foreach (BatchJobProcessingError processingError in batchJob - .processingErrors) - { - Console.WriteLine(" Processing error: {0}, {1}, {2}, {3}, {4}", - processingError.ApiErrorType, processingError.trigger, - processingError.errorString, processingError.fieldPath, - processingError.reason); - } - } - - if (batchJob.downloadUrl != null && batchJob.downloadUrl.url != null) - { - BatchJobMutateResponse mutateResponse = - batchJobUploadHelper.Download(batchJob.downloadUrl.url); - Console.WriteLine("Downloaded results from {0}.", batchJob.downloadUrl.url); - foreach (MutateResult mutateResult in mutateResponse.rval) - { - string outcome = mutateResult.errorList == null ? "SUCCESS" : "FAILURE"; - Console.WriteLine(" Operation [{0}] - {1}", mutateResult.index, - outcome); - } - } - else - { - Console.WriteLine("No results available for download."); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create keywords using batch job.", e); - } - } - } - - /// - /// Gets the batch job error. - /// - /// The AdWords API Exception. - /// The underlying batch job error if available, null otherwise. - private BatchJobError GetBatchJobError(AdWordsApiException e) - { - return (e.ApiException as ApiException).GetAllErrorsByType() - .FirstOrDefault(); - } - - /// - /// Creates the operations for uploading via batch job. - /// - /// The ad group ID. - /// The list of operations. - private static List CreateOperations(long adGroupId) - { - List operations = new List(); - - // Create AdGroupCriterionOperations to add keywords, and upload every 10 operations - // incrementally. - for (int i = 0; i < NUMBER_OF_KEYWORDS_TO_ADD; i++) - { - // Create Keyword. - string text = string.Format("mars{0}", i); - - // Make 10% of keywords invalid to demonstrate error handling. - if (i % 10 == 0) - { - text = text + "!!!"; - } - - // Create BiddableAdGroupCriterion. - BiddableAdGroupCriterion bagc = new BiddableAdGroupCriterion() - { - adGroupId = adGroupId, - criterion = new Keyword() - { - text = text, - matchType = KeywordMatchType.BROAD - } - }; - - // Create AdGroupCriterionOperation. - AdGroupCriterionOperation agco = new AdGroupCriterionOperation() - { - operand = bagc, - @operator = Operator.ADD - }; - - // Add to the list of operations. - operations.Add(agco); - } - - return operations; - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/AddTrial.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/AddTrial.cs deleted file mode 100755 index 884a2ccee24..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/AddTrial.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Threading; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to create a trial and wait for it to - /// complete. See the Campaign Drafts and Experiments guide for more - /// information: - /// https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments - /// - public class AddTrial : ExampleBase - { - /// - /// The polling interval base to be used for exponential backoff. - /// - private const int POLL_INTERVAL_SECONDS_BASE = 30; - - /// - /// The maximum number of retries. - /// - private const long MAX_RETRIES = 5; - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddTrial codeExample = new AddTrial(); - Console.WriteLine(codeExample.Description); - try - { - long draftId = long.Parse("INSERT_DRAFT_ID_HERE"); - long baseCampaignId = long.Parse("INSERT_BASE_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), draftId, baseCampaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to create a trial and wait for it to " + - "complete. See the Campaign Drafts and Experiments guide for more " + - "information: https://developers.google.com/adwords/api/docs/guides/campaign-" + - "drafts-experiments"; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to use as base of the - /// trial. - /// Id of the draft. - public void Run(AdWordsUser user, long draftId, long baseCampaignId) - { - using (TrialService trialService = - (TrialService) user.GetService(AdWordsService.v201806.TrialService)) - using (TrialAsyncErrorService trialAsyncErrorService = - (TrialAsyncErrorService) user.GetService(AdWordsService.v201806 - .TrialAsyncErrorService)) - { - Trial trial = new Trial() - { - draftId = draftId, - baseCampaignId = baseCampaignId, - name = "Test Trial #" + ExampleUtilities.GetRandomString(), - trafficSplitPercent = 50 - }; - - TrialOperation trialOperation = new TrialOperation() - { - @operator = Operator.ADD, - operand = trial - }; - try - { - long trialId = trialService.mutate(new TrialOperation[] - { - trialOperation - }).value[0].id; - - // Since creating a trial is asynchronous, we have to poll it to wait - // for it to finish. - Selector trialSelector = new Selector() - { - fields = new string[] - { - Trial.Fields.Id, - Trial.Fields.Status, - Trial.Fields.BaseCampaignId, - Trial.Fields.TrialCampaignId - }, - predicates = new Predicate[] - { - Predicate.Equals(Trial.Fields.Id, trialId) - } - }; - - trial = null; - bool isPending = true; - int pollAttempts = 0; - - do - { - int sleepMillis = (int) Math.Pow(2, pollAttempts) * - POLL_INTERVAL_SECONDS_BASE * 1000; - Console.WriteLine("Sleeping {0} millis...", sleepMillis); - Thread.Sleep(sleepMillis); - - trial = trialService.get(trialSelector).entries[0]; - - Console.WriteLine("Trial ID {0} has status '{1}'.", trial.id, - trial.status); - pollAttempts++; - isPending = (trial.status == TrialStatus.CREATING); - } while (isPending && pollAttempts <= MAX_RETRIES); - - if (trial.status == TrialStatus.ACTIVE) - { - // The trial creation was successful. - Console.WriteLine( - "Trial created with ID {0} and trial campaign ID {1}.", trial.id, - trial.trialCampaignId); - } - else if (trial.status == TrialStatus.CREATION_FAILED) - { - // The trial creation failed, and errors can be fetched from the - // TrialAsyncErrorService. - Selector errorsSelector = new Selector() - { - fields = new string[] - { - TrialAsyncError.Fields.TrialId, - TrialAsyncError.Fields.AsyncError - }, - predicates = new Predicate[] - { - Predicate.Equals(TrialAsyncError.Fields.TrialId, trial.id) - } - }; - - TrialAsyncErrorPage trialAsyncErrorPage = - trialAsyncErrorService.get(errorsSelector); - if (trialAsyncErrorPage.entries == null || - trialAsyncErrorPage.entries.Length == 0) - { - Console.WriteLine("Could not retrieve errors for trial {0}.", - trial.id); - } - else - { - Console.WriteLine( - "Could not create trial ID {0} for draft ID {1} due to the " + - "following errors:", trial.id, draftId); - int i = 0; - foreach (TrialAsyncError error in trialAsyncErrorPage.entries) - { - ApiError asyncError = error.asyncError; - Console.WriteLine( - "Error #{0}: errorType='{1}', errorString='{2}', " + - "trigger='{3}', fieldPath='{4}'", i++, - asyncError.ApiErrorType, asyncError.errorString, - asyncError.trigger, asyncError.fieldPath); - } - } - - } - else - { - // Most likely, the trial is still being created. You can continue - // polling, but we have limited the number of attempts in the - // example. - Console.WriteLine( - "Timed out waiting to create trial from draft ID {0} with " + - "base campaign ID {1}.", draftId, baseCampaignId); - } - - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create trial from draft.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAds.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAds.cs deleted file mode 100755 index 1915ca2b533..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAds.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example retrieves all the disapproved ads in a given campaign. - /// - public class GetAllDisapprovedAds : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAllDisapprovedAds codeExample = new GetAllDisapprovedAds(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example retrieves all the disapproved ads in a given campaign."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign for which disapproved ads - /// are retrieved. - public void Run(AdWordsUser user, long campaignId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - Ad.Fields.Id, - AdGroupAd.Fields.PolicySummary - }, - predicates = new Predicate[] - { - Predicate.Equals(AdGroup.Fields.CampaignId, campaignId), - Predicate.Equals(AdGroupAdPolicySummary.Fields.CombinedApprovalStatus, - PolicyApprovalStatus.DISAPPROVED.ToString()) - }, - paging = Paging.Default - }; - - AdGroupAdPage page = new AdGroupAdPage(); - int disapprovedAdsCount = 0; - - try - { - do - { - // Get the disapproved ads. - page = adGroupAdService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - foreach (AdGroupAd adGroupAd in page.entries) - { - AdGroupAdPolicySummary policySummary = adGroupAd.policySummary; - disapprovedAdsCount++; - Console.WriteLine( - "Ad with ID {0} and type '{1}' was disapproved with the " + - "following policy topic entries: ", adGroupAd.ad.id, - adGroupAd.ad.AdType); - // Display the policy topic entries related to the ad disapproval. - foreach (PolicyTopicEntry policyTopicEntry in policySummary - .policyTopicEntries) - { - Console.WriteLine(" topic id: {0}, topic name: '{1}'", - policyTopicEntry.policyTopicId, - policyTopicEntry.policyTopicName); - // Display the attributes and values that triggered the policy - // topic. - if (policyTopicEntry.policyTopicEvidences != null) - { - foreach (PolicyTopicEvidence evidence in policyTopicEntry - .policyTopicEvidences) - { - Console.WriteLine(" evidence type: {0}", - evidence.policyTopicEvidenceType); - if (evidence.evidenceTextList != null) - { - for (int i = 0; - i < evidence.evidenceTextList.Length; - i++) - { - Console.WriteLine( - " evidence text[{0}]: {1}", i, - evidence.evidenceTextList[i]); - } - } - } - } - } - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of disapproved ads found: {0}", disapprovedAdsCount); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get disapproved ads.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.cs deleted file mode 100755 index f71031cdb00..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example retrieves all the disapproved ads in a given campaign - /// using AWQL. See https://developers.google.com/adwords/api/docs/guides/awql - /// for AWQL documentation. - /// - public class GetAllDisapprovedAdsWithAwql : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAllDisapprovedAdsWithAwql codeExample = new GetAllDisapprovedAdsWithAwql(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example retrieves all the disapproved ads in a given campaign " + - "using AWQL. See https://developers.google.com/adwords/api/docs/guides/awql " + - "for AWQL documentation."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign for which disapproved ads - /// are retrieved. - public void Run(AdWordsUser user, long campaignId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Get all the disapproved ads for this campaign. - SelectQuery query = new SelectQueryBuilder() - .Select(Ad.Fields.Id, AdGroupAd.Fields.PolicySummary) - .Where(AdGroup.Fields.CampaignId).Equals(campaignId) - .Where(AdGroupAdPolicySummary.Fields.CombinedApprovalStatus) - .Equals(ApprovalStatus.DISAPPROVED.ToString()) - .OrderByAscending(Ad.Fields.Id) - .DefaultLimit() - .Build(); - - AdGroupAdPage page = new AdGroupAdPage(); - int disapprovedAdsCount = 0; - - try - { - do - { - // Get the disapproved ads. - page = adGroupAdService.query(query); - - // Display the results. - if (page != null && page.entries != null) - { - foreach (AdGroupAd adGroupAd in page.entries) - { - AdGroupAdPolicySummary policySummary = adGroupAd.policySummary; - disapprovedAdsCount++; - Console.WriteLine( - "Ad with ID {0} and type '{1}' was disapproved with the " + - "following policy topic entries: ", adGroupAd.ad.id, - adGroupAd.ad.AdType); - // Display the policy topic entries related to the ad disapproval. - foreach (PolicyTopicEntry policyTopicEntry in policySummary - .policyTopicEntries) - { - Console.WriteLine(" topic id: {0}, topic name: '{1}'", - policyTopicEntry.policyTopicId, - policyTopicEntry.policyTopicName); - // Display the attributes and values that triggered the policy - // topic. - if (policyTopicEntry.policyTopicEvidences != null) - { - foreach (PolicyTopicEvidence evidence in policyTopicEntry - .policyTopicEvidences) - { - Console.WriteLine(" evidence type: {0}", - evidence.policyTopicEvidenceType); - if (evidence.evidenceTextList != null) - { - for (int i = 0; - i < evidence.evidenceTextList.Length; - i++) - { - Console.WriteLine( - " evidence text[{0}]: {1}", i, - evidence.evidenceTextList[i]); - } - } - } - } - } - } - } - - query.NextPage(page); - } while (query.HasNextPage(page)); - - Console.WriteLine("Number of disapproved ads found: {0}", disapprovedAdsCount); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get disapproved ads.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/GetCampaignsByLabel.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/GetCampaignsByLabel.cs deleted file mode 100755 index 307ce99f912..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/GetCampaignsByLabel.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets all campaigns with a specific label. To add a - /// label to campaigns, run AddCampaignLabels.cs. - /// - public class GetCampaignsByLabel : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetCampaignsByLabel codeExample = new GetCampaignsByLabel(); - Console.WriteLine(codeExample.Description); - try - { - long labelId = long.Parse("INSERT_LABEL_ID_HERE"); - codeExample.Run(new AdWordsUser(), labelId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example gets all campaigns with a specific label. To add a label " + - "to campaigns, run AddCampaignLabels.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// ID of the label. - public void Run(AdWordsUser user, long labelId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - Campaign.Fields.Id, - Campaign.Fields.Name, - Campaign.Fields.Labels - }, - predicates = new Predicate[] - { - // Labels filtering is performed by ID. You can use CONTAINS_ANY to - // select campaigns with any of the label IDs, CONTAINS_ALL to select - // campaigns with all of the label IDs, or CONTAINS_NONE to select - // campaigns with none of the label IDs. - Predicate.ContainsAny(Campaign.Fields.Labels, new string[] - { - labelId.ToString() - }) - }, - paging = Paging.Default - }; - - CampaignPage page = new CampaignPage(); - - try - { - do - { - // Get the campaigns. - page = campaignService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (Campaign campaign in page.entries) - { - List labelNames = new List(); - foreach (Label label in campaign.labels) - { - labelNames.Add(label.name); - } - - Console.WriteLine( - "{0}) Campaign with id = '{1}', name = '{2}' and " + - "labels = '{3}' was found.", i + 1, campaign.id, campaign.name, - string.Join(", ", labelNames.ToArray())); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of campaigns found: {0}", page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve campaigns by label", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/GraduateTrial.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/GraduateTrial.cs deleted file mode 100755 index cd25c026d33..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/GraduateTrial.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to graduate a trial. See the Campaign - /// Drafts and Experiments guide for more information: - /// https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments - /// - public class GraduateTrial : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GraduateTrial codeExample = new GraduateTrial(); - Console.WriteLine(codeExample.Description); - try - { - long trialId = long.Parse("INSERT_TRIAL_ID_HERE"); - codeExample.Run(new AdWordsUser(), trialId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to graduate a trial. See the Campaign " + - "Drafts and Experiments guide for more information: " + - "https://developers.google.com/adwords/api/docs/guides/campaign-drafts-" + - "experiments"; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the trial to be graduated. - public void Run(AdWordsUser user, long trialId) - { - using (TrialService trialService = - (TrialService) user.GetService(AdWordsService.v201806.TrialService)) - { - // To graduate a trial, you must specify a different budget from the - // base campaign. The base campaign (in order to have had a trial based - // on it) must have a non-shared budget, so it cannot be shared with - // the new independent campaign created by graduation. - Budget budget = CreateBudget(user); - - Trial trial = new Trial() - { - id = trialId, - budgetId = budget.budgetId, - status = TrialStatus.GRADUATED - }; - - TrialOperation trialOperation = new TrialOperation() - { - @operator = Operator.SET, - operand = trial - }; - try - { - // Update the trial. - trial = trialService.mutate(new TrialOperation[] - { - trialOperation - }).value[0]; - - // Graduation is a synchronous operation, so the campaign is already - // ready. If you promote instead, make sure to see the polling scheme - // demonstrated in AddTrial.cs to wait for the asynchronous operation - // to finish. - Console.WriteLine( - "Trial ID {0} graduated. Campaign ID {1} was given a new budget " + - "ID {2} and is no longer dependent on this trial.", trial.id, - trial.trialCampaignId, budget.budgetId); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to graduate trial.", e); - } - } - } - - /// - /// Creates the budget. - /// - /// The user. - /// The new budget. - public Budget CreateBudget(AdWordsUser user) - { - using (BudgetService budgetService = - (BudgetService) user.GetService(AdWordsService.v201806.BudgetService)) - { - Budget budget = new Budget() - { - name = "Budget #" + ExampleUtilities.GetRandomString(), - amount = new Money() - { - microAmount = 50000000L - }, - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - }; - - BudgetOperation budgetOperation = new BudgetOperation() - { - @operator = Operator.ADD, - operand = budget - }; - - return budgetService.mutate(new BudgetOperation[] - { - budgetOperation - }).value[0]; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/SetAdParameters.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/SetAdParameters.cs deleted file mode 100755 index fa2f76d1c1a..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/SetAdParameters.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to create a text ad with ad parameters. - /// To add an ad group, run AddAdGroup.cs. To add a keyword, run - /// run AddKeyword.cs. - /// - public class SetAdParameters : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - SetAdParameters codeExample = new SetAdParameters(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long criterionId = long.Parse("INSERT_CRITERION_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, criterionId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to create a text ad with ad parameters." + - " To add an ad group, run AddAdGroup.cs. To add a keyword, run AddKeyword.vb."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group that contains the criterion. - /// - /// Id of the keyword for which the ad - /// parameters are set. - public void Run(AdWordsUser user, long adGroupId, long criterionId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - using (AdParamService adParamService = - (AdParamService) user.GetService(AdWordsService.v201806.AdParamService)) - { - // Create the expanded text ad. - ExpandedTextAd expandedTextAd = new ExpandedTextAd - { - headlinePart1 = "Mars Cruises", - headlinePart2 = "Low-gravity fun for {param1:cheap}.", - description = "Only {param2:a few} seats left!", - finalUrls = new string[] - { - "http://www.example.com" - } - }; - - AdGroupAd adOperand = new AdGroupAd - { - adGroupId = adGroupId, - status = AdGroupAdStatus.ENABLED, - ad = expandedTextAd - }; - - // Create the operation. - AdGroupAdOperation adOperation = new AdGroupAdOperation - { - operand = adOperand, - @operator = Operator.ADD - }; - - - // Create the text ad. - AdGroupAdReturnValue retVal = adGroupAdService.mutate(new AdGroupAdOperation[] - { - adOperation - }); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - Console.WriteLine("Expanded text ad with id ='{0}' was successfully added.", - retVal.value[0].ad.id); - } - else - { - throw new System.ApplicationException( - "Failed to create expanded text ads."); - } - - // Create the ad param for price. - AdParam priceParam = new AdParam - { - adGroupId = adGroupId, - criterionId = criterionId, - paramIndex = 1, - insertionText = "$100" - }; - - // Create the ad param for seats. - AdParam seatParam = new AdParam - { - adGroupId = adGroupId, - criterionId = criterionId, - paramIndex = 2, - insertionText = "50" - }; - - // Create the operations. - AdParamOperation priceOperation = new AdParamOperation - { - @operator = Operator.SET, - operand = priceParam - }; - - AdParamOperation seatOperation = new AdParamOperation - { - @operator = Operator.SET, - operand = seatParam - }; - - try - { - // Set the ad parameters. - AdParam[] newAdParams = adParamService.mutate(new AdParamOperation[] - { - priceOperation, - seatOperation - }); - - // Display the results. - if (newAdParams != null) - { - Console.WriteLine("Ad parameters were successfully updated."); - } - else - { - Console.WriteLine("No ad parameters were set."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to set ad parameters.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/SetBidModifier.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/SetBidModifier.cs deleted file mode 100755 index 38415ec9e66..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/SetBidModifier.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example sets a bid modifier for the mobile platform on given - /// campaign. The campaign must be an enhanced type of campaign. To get - /// campaigns, run GetCampaigns.cs. To enhance a campaign, run - /// SetCampaignEnhanced.cs. - /// - public class SetBidModifier : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - SetBidModifier codeExample = new SetBidModifier(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - double bidModifier = double.Parse("INSERT_BID_MODIFIER_HERE"); - codeExample.Run(new AdWordsUser(), campaignId, bidModifier); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example sets a bid modifier for the mobile platform on given " + - "campaign. The campaign must be an enhanced type of campaign. To get " + - "campaigns, run GetCampaigns.cs. To enhance a campaign, " + - "run SetCampaignEnhanced.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign whose bid should be modified. - /// - /// The bid modifier. - public void Run(AdWordsUser user, long campaignId, double bidModifier) - { - using (CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService)) - { - // Create mobile platform. The ID can be found in the documentation. - // https://developers.google.com/adwords/api/docs/appendix/platforms - Platform mobile = new Platform - { - id = 30001 - }; - - // Create criterion with modified bid. - CampaignCriterion criterion = new CampaignCriterion - { - campaignId = campaignId, - criterion = mobile, - bidModifier = bidModifier - }; - - // Create SET operation. - CampaignCriterionOperation operation = new CampaignCriterionOperation - { - @operator = Operator.SET, - operand = criterion - }; - - try - { - // Update campaign criteria. - CampaignCriterionReturnValue result = campaignCriterionService.mutate( - new CampaignCriterionOperation[] - { - operation - }); - - // Display campaign criteria. - if (result.value != null) - { - foreach (CampaignCriterion newCriterion in result.value) - { - Console.WriteLine( - "Campaign criterion with campaign id '{0}', criterion id '{1}', " + - "and type '{2}' was modified with bid {3:F2}.", - newCriterion.campaignId, newCriterion.criterion.id, - newCriterion.criterion.type, newCriterion.bidModifier); - } - } - else - { - Console.WriteLine("No campaign criteria were modified."); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to set bid modifier for campaign.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/CampaignManagement/ValidateTextAd.cs b/examples/AdWords/CSharp/v201806/CampaignManagement/ValidateTextAd.cs deleted file mode 100755 index f1014fb7efb..00000000000 --- a/examples/AdWords/CSharp/v201806/CampaignManagement/ValidateTextAd.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example shows how to use the validateOnly header to validate - /// an expanded text ad. No objects will be created, but exceptions will - /// still be thrown. - /// - public class ValidateTextAd : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - ValidateTextAd codeExample = new ValidateTextAd(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example shows how to use the validateOnly header to validate " + - "an expanded text ad. No objects will be created, but exceptions will still " + - "be thrown."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which text ads are - /// added. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Set the validateOnly headers. - adGroupAdService.RequestHeader.validateOnly = true; - - // Create your expanded text ad. - ExpandedTextAd expandedTextAd = new ExpandedTextAd() - { - headlinePart1 = "Luxury Cruise to Mars", - headlinePart2 = "Visit the Red Planet in style.", - description = "Low-gravity fun for everyone!!", - finalUrls = new string[] - { - "http://www.example.com" - } - }; - - AdGroupAd adGroupAd = new AdGroupAd() - { - adGroupId = adGroupId, - ad = expandedTextAd - }; - - AdGroupAdOperation operation = new AdGroupAdOperation() - { - @operator = Operator.ADD, - operand = adGroupAd - }; - - try - { - adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - // Since validation is ON, result will be null. - Console.WriteLine("Expanded text ad validated successfully."); - } - catch (AdWordsApiException e) - { - // This block will be hit if there is a validation error from the server. - Console.WriteLine( - "There were validation error(s) while adding expanded text ad."); - - if (e.ApiException != null) - { - foreach (ApiError error in ((ApiException) e.ApiException).errors) - { - Console.WriteLine(" Error type is '{0}' and fieldPath is '{1}'.", - error.ApiErrorType, error.fieldPath); - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to validate expanded text ad.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ErrorHandling/HandlePartialFailures.cs b/examples/AdWords/CSharp/v201806/ErrorHandling/HandlePartialFailures.cs deleted file mode 100755 index 07ff6344999..00000000000 --- a/examples/AdWords/CSharp/v201806/ErrorHandling/HandlePartialFailures.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example demonstrates how to handle partial failures. - /// - public class HandlePartialFailures : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - HandlePartialFailures codeExample = new HandlePartialFailures(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example demonstrates how to handle partial failures."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which keywords are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Set partial failure mode for the service. - adGroupCriterionService.RequestHeader.partialFailure = true; - - try - { - List operations = - new List(); - - // Create the keywords. - string[] keywords = new string[] - { - "mars cruise", - "inv@lid cruise", - "venus cruise", - "b(a)d keyword cruise" - }; - - foreach (string keywordText in keywords) - { - Keyword keyword = new Keyword - { - text = keywordText, - matchType = KeywordMatchType.BROAD - }; - - // Create biddable ad group criterion. - BiddableAdGroupCriterion keywordBiddableAdGroupCriterion = - new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = keyword - }; - - // Create the operation. - AdGroupCriterionOperation keywordAdGroupCriterionOperation = - new AdGroupCriterionOperation - { - operand = keywordBiddableAdGroupCriterion, - @operator = Operator.ADD - }; - operations.Add(keywordAdGroupCriterionOperation); - } - - // Create the keywords. - AdGroupCriterionReturnValue result = - adGroupCriterionService.mutate(operations.ToArray()); - - // Display the results. - if (result != null && result.value != null) - { - foreach (AdGroupCriterion adGroupCriterionResult in result.value) - { - if (adGroupCriterionResult.criterion != null) - { - Console.WriteLine( - "Keyword with ad group id '{0}', criterion id '{1}', and " + - "text '{2}' was added.\n", adGroupCriterionResult.adGroupId, - adGroupCriterionResult.criterion.id, - ((Keyword) adGroupCriterionResult.criterion).text); - } - } - } - else - { - Console.WriteLine("No keywords were added."); - } - - // Display the partial failure errors. - if (result != null && result.partialFailureErrors != null) - { - foreach (ApiError apiError in result.partialFailureErrors) - { - int operationIndex = apiError.GetOperationIndex(); - if (operationIndex != -1) - { - AdGroupCriterion adGroupCriterion = - operations[operationIndex].operand; - Console.WriteLine( - "Keyword with ad group id '{0}' and text '{1}' " + - "triggered a failure for the following reason: '{2}'.\n", - adGroupCriterion.adGroupId, - ((Keyword) adGroupCriterion.criterion).text, - apiError.errorString); - } - else - { - Console.WriteLine( - "A failure for the following reason: '{0}' has occurred.\n", - apiError.errorString); - } - } - } - - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to add keywords in partial failure mode.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ErrorHandling/HandlePolicyViolationError.cs b/examples/AdWords/CSharp/v201806/ErrorHandling/HandlePolicyViolationError.cs deleted file mode 100755 index 479ef1e0947..00000000000 --- a/examples/AdWords/CSharp/v201806/ErrorHandling/HandlePolicyViolationError.cs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a text ad, and shows how to handle a policy - /// violation. - /// - public class HandlePolicyViolationError : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - HandlePolicyViolationError codeExample = new HandlePolicyViolationError(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example adds a text ad, and shows how to handle a policy violation."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which ads are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create the text ad. - TextAd textAd = new TextAd - { - headline = "Luxury Cruise to Mars", - description1 = "Visit the Red Planet in style.", - description2 = "Low-gravity fun for everyone!!", - displayUrl = "www.example.com", - finalUrls = new string[] - { - "http://www.example.com" - } - }; - - AdGroupAd textadGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = textAd - }; - - // Create the operations. - AdGroupAdOperation textAdOperation = new AdGroupAdOperation - { - @operator = Operator.ADD, - operand = textadGroupAd - }; - - try - { - AdGroupAdReturnValue retVal = null; - - // Setup two arrays, one to hold the list of all operations to be - // validated, and another to hold the list of operations that cannot be - // fixed after validation. - List allOperations = new List(); - List operationsToBeRemoved = new List(); - - allOperations.Add(textAdOperation); - - try - { - // Validate the operations. - adGroupAdService.RequestHeader.validateOnly = true; - retVal = adGroupAdService.mutate(allOperations.ToArray()); - } - catch (AdWordsApiException e) - { - ApiException innerException = e.ApiException as ApiException; - if (innerException == null) - { - throw new Exception( - "Failed to retrieve ApiError. See inner exception for more " + - "details.", e); - } - - // Examine each ApiError received from the server. - foreach (ApiError apiError in innerException.errors) - { - int index = apiError.GetOperationIndex(); - if (index == -1) - { - // This API error is not associated with an operand, so we cannot - // recover from this error by removing one or more operations. - // Rethrow the exception for manual inspection. - throw; - } - - // Handle policy violation errors. - if (apiError is PolicyViolationError) - { - PolicyViolationError policyError = (PolicyViolationError) apiError; - - if (policyError.isExemptable) - { - // If the policy violation error is exemptable, add an exemption - // request. - List exemptionRequests = - new List(); - if (allOperations[index].exemptionRequests != null) - { - exemptionRequests.AddRange(allOperations[index] - .exemptionRequests); - } - - ExemptionRequest exemptionRequest = new ExemptionRequest - { - key = policyError.key - }; - exemptionRequests.Add(exemptionRequest); - allOperations[index].exemptionRequests = - exemptionRequests.ToArray(); - } - else - { - // Policy violation error is not exemptable, remove this - // operation from the list of operations. - operationsToBeRemoved.Add(allOperations[index]); - } - } - else - { - // This is not a policy violation error, remove this operation - // from the list of operations. - operationsToBeRemoved.Add(allOperations[index]); - } - - } - - // Remove all operations that aren't exemptable. - foreach (AdGroupAdOperation operation in operationsToBeRemoved) - { - allOperations.Remove(operation); - } - } - - if (allOperations.Count > 0) - { - // Perform the operations exemptible of a policy violation. - adGroupAdService.RequestHeader.validateOnly = false; - retVal = adGroupAdService.mutate(allOperations.ToArray()); - - // Display the results. - if (retVal != null && retVal.value != null && retVal.value.Length > 0) - { - foreach (AdGroupAd newAdGroupAd in retVal.value) - { - Console.WriteLine( - "New ad with id = \"{0}\" and displayUrl = \"{1}\" " + - "was created.", - newAdGroupAd.ad.id, newAdGroupAd.ad.displayUrl); - } - } - else - { - Console.WriteLine("No ads were created."); - } - } - else - { - Console.WriteLine( - "There are no ads to create after policy violation checks."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create ads.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ErrorHandling/HandleRateExceededError.cs b/examples/AdWords/CSharp/v201806/ErrorHandling/HandleRateExceededError.cs deleted file mode 100755 index 0091c9cf57b..00000000000 --- a/examples/AdWords/CSharp/v201806/ErrorHandling/HandleRateExceededError.cs +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example shows how to handle RateExceededError in your - /// application. To trigger the rate exceeded error, this code example runs - /// 100 threads in parallel, each thread attempting to validate 100 keywords - /// in a single request. Note that spawning 100 parallel threads is for - /// illustrative purposes only, you shouldn't do this in your application. - /// - public class HandleRateExceededError : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - HandleRateExceededError codeExample = new HandleRateExceededError(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example shows how to handle RateExceededError in your " + - "application. To trigger the rate exceeded error, this code example runs " + - "100 threads in parallel, each thread attempting to validate 100 keywords in " + - "a single request. Note that spawning 100 parallel threads is for " + - "illustrative purposes only, you shouldn't do this in your application."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group to which keywords are added. - /// - public void Run(AdWordsUser user, long adGroupId) - { - const int NUM_THREADS = 100; - - // Increase the maximum number of parallel HTTP connections that .NET - // framework allows. By default, this is set to 2 by the .NET framework. - System.Net.ServicePointManager.DefaultConnectionLimit = NUM_THREADS; - - List threads = new List(); - - for (int i = 0; i < NUM_THREADS; i++) - { - Thread thread = new Thread(new KeywordThread(user, i, adGroupId).Run); - threads.Add(thread); - } - - for (int i = 0; i < NUM_THREADS; i++) - { - threads[i].Start(i); - } - - for (int i = 0; i < NUM_THREADS; i++) - { - threads[i].Join(); - } - } - - /// - /// Thread class for validating keywords. - /// - private class KeywordThread - { - /// - /// Index of this thread, for identifying and debugging. - /// - private int threadIndex; - - /// - /// The ad group id to which keywords are added. - /// - private long adGroupId; - - /// - /// The AdWords user who owns this ad group. - /// - private AdWordsUser user; - - /// - /// Number of keywords to be validated in each API call. - /// - private const int NUM_KEYWORDS = 100; - - /// - /// Initializes a new instance of the class. - /// - /// Index of the thread. - /// The ad group id. - /// The AdWords user who owns the ad group. - public KeywordThread(AdWordsUser user, int threadIndex, long adGroupId) - { - this.user = user; - this.threadIndex = threadIndex; - this.adGroupId = adGroupId; - } - - /// - /// Main method for the thread. - /// - /// The thread parameter. - public void Run(object obj) - { - // Create the operations. - List operations = new List(); - - for (int j = 0; j < NUM_KEYWORDS; j++) - { - // Create the keyword. - Keyword keyword = new Keyword - { - text = "mars cruise thread " + threadIndex.ToString() + " seed " + - j.ToString(), - matchType = KeywordMatchType.BROAD - }; - - // Create the biddable ad group criterion. - AdGroupCriterion keywordCriterion = new BiddableAdGroupCriterion - { - adGroupId = adGroupId, - criterion = keyword - }; - - // Create the operations. - AdGroupCriterionOperation keywordOperation = new AdGroupCriterionOperation - { - @operator = Operator.ADD, - operand = keywordCriterion - }; - - operations.Add(keywordOperation); - } - - // Get the AdGroupCriterionService. This should be done within the - // thread, since a service can only handle one outgoing HTTP request - // at a time. - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - adGroupCriterionService.RequestHeader.validateOnly = true; - int retryCount = 0; - const int NUM_RETRIES = 3; - try - { - while (retryCount < NUM_RETRIES) - { - try - { - // Validate the keywords. - adGroupCriterionService.mutate(operations.ToArray()); - break; - } - catch (AdWordsApiException e) - { - // Handle API errors. - ApiException innerException = e.ApiException as ApiException; - if (innerException == null) - { - throw new Exception( - "Failed to retrieve ApiError. See inner exception " + - "for more details.", e); - } - - foreach (ApiError apiError in innerException.errors) - { - if (!(apiError is RateExceededError)) - { - // Rethrow any errors other than RateExceededError. - throw; - } - - // Handle rate exceeded errors. - RateExceededError rateExceededError = - (RateExceededError) apiError; - Console.WriteLine( - "Got Rate exceeded error - rate name = '{0}', " + - "scope = '{1}', retry After {2} seconds.", - rateExceededError.rateScope, rateExceededError.rateName, - rateExceededError.retryAfterSeconds); - Thread.Sleep(rateExceededError.retryAfterSeconds * 1000); - retryCount = retryCount + 1; - } - } - finally - { - if (retryCount == NUM_RETRIES) - { - throw new Exception(string.Format( - "Could not recover after making {0} attempts.", - retryCount)); - } - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to validate keywords.", e); - } - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.cs b/examples/AdWords/CSharp/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.cs deleted file mode 100755 index c99733fbc3c..00000000000 --- a/examples/AdWords/CSharp/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.cs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Lib; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a feed that syncs feed items from a Google - /// My Business (GMB) account and associates the feed with a customer. - /// - public class AddGoogleMyBusinessLocationExtensions : ExampleBase - { - /// - /// The placeholder type for location extensions. See the Placeholder - /// reference page for a list of all the placeholder types and fields. - /// - /// https://developers.google.com/adwords/api/docs/appendix/placeholders - /// - private const int PLACEHOLDER_LOCATION = 7; - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a feed that syncs feed items from a Google My " + - "Business (GMB) account and associates the feed with a customer."; - } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddGoogleMyBusinessLocationExtensions codeExample = - new AddGoogleMyBusinessLocationExtensions(); - Console.WriteLine(codeExample.Description); - - AdWordsUser user = new AdWordsUser(); - - try - { - // The email address of either an owner or a manager of the GMB account. - string gmbEmailAddress = "INSERT_GMB_EMAIL_ADDRESS_HERE"; - - // Refresh the access token so that there's a valid access token. - user.OAuthProvider.RefreshAccessToken(); - - // If the gmbEmailAddress above is the same user you used to generate - // your AdWords API refresh token, leave the assignment below unchanged. - // Otherwise, to obtain an access token for your GMB account, run the - // OAuth Token generator utility while logged in as the same user as - // gmbEmailAddress. Copy and paste the AccessToken value into the - // assignment below. - string gmbAccessToken = user.OAuthProvider.Config.OAuth2AccessToken; - - // If the gmbEmailAddress above is for a GMB manager instead of the GMB - // account owner, then set businessAccountIdentifier to the +Page ID of - // a location for which the manager has access. See the location - // extensions guide at - // https://developers.google.com/adwords/api/docs/guides/feed-services-locations - // for details. - string businessAccountIdentifier = null; - codeExample.Run(user, gmbEmailAddress, gmbAccessToken, businessAccountIdentifier); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The email address for Google My Business - /// account. - /// The OAuth2 access token for Google - /// My Business account. - /// The account identifier for - /// Google My Business account. - public void Run(AdWordsUser user, string gmbEmailAddress, string gmbAccessToken, - string businessAccountIdentifier) - { - Feed gmbFeed = CreateGmbFeed(user, gmbEmailAddress, gmbAccessToken, - businessAccountIdentifier); - AddCustomerFeed(user, gmbFeed); - } - - /// - /// Create a feed that will sync to the Google My Business account - /// specified by gmbEmailAddress. - /// - /// The user. - /// The GMB email address. - /// The GMB access token. - /// The GMB account identifier. - /// The newly created GMB feed. - private static Feed CreateGmbFeed(AdWordsUser user, string gmbEmailAddress, - string gmbAccessToken, string businessAccountIdentifier) - { - using (FeedService feedService = - (FeedService) user.GetService(AdWordsService.v201806.FeedService)) - { - // Create a feed that will sync to the Google My Business account - // specified by gmbEmailAddress. Do not add FeedAttributes to this object, - // as AdWords will add them automatically because this will be a - // system generated feed. - Feed gmbFeed = new Feed - { - name = string.Format("Google My Business feed #{0}", - ExampleUtilities.GetRandomString()) - }; - - PlacesLocationFeedData feedData = new PlacesLocationFeedData - { - emailAddress = gmbEmailAddress, - businessAccountIdentifier = businessAccountIdentifier, - - // Optional: specify labels to filter Google My Business listings. If - // specified, only listings that have any of the labels set are - // synchronized into FeedItems. - labelFilters = new string[] - { - "Stores in New York City" - } - }; - - OAuthInfo oAuthInfo = new OAuthInfo - { - httpMethod = "GET", - - // Permissions for the AdWords API scope will also cover GMB. - httpRequestUrl = user.Config.GetDefaultOAuth2Scope(), - httpAuthorizationHeader = string.Format("Bearer {0}", gmbAccessToken) - }; - feedData.oAuthInfo = oAuthInfo; - - gmbFeed.systemFeedGenerationData = feedData; - - // Since this feed's feed items will be managed by AdWords, - // you must set its origin to ADWORDS. - gmbFeed.origin = FeedOrigin.ADWORDS; - - // Create an operation to add the feed. - FeedOperation feedOperation = new FeedOperation - { - operand = gmbFeed, - @operator = Operator.ADD - }; - - try - { - // Add the feed. Since it is a system generated feed, AdWords will - // automatically: - // 1. Set up the FeedAttributes on the feed. - // 2. Set up a FeedMapping that associates the FeedAttributes of the - // feed with the placeholder fields of the LOCATION placeholder - // type. - FeedReturnValue addFeedResult = feedService.mutate(new FeedOperation[] - { - feedOperation - }); - Feed addedFeed = addFeedResult.value[0]; - Console.WriteLine("Added GMB feed with ID {0}", addedFeed.id); - return addedFeed; - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create GMB feed.", e); - } - } - } - - /// - /// Add a CustomerFeed that associates the feed with this customer for - /// the LOCATION placeholder type. - /// - /// The AdWords user. - /// The GMB feed. - void AddCustomerFeed(AdWordsUser user, Feed feed) - { - using (CustomerFeedService customerFeedService = - (CustomerFeedService) user.GetService(AdWordsService.v201806.CustomerFeedService)) - { - // Add a CustomerFeed that associates the feed with this customer for - // the LOCATION placeholder type. - CustomerFeed customerFeed = new CustomerFeed - { - feedId = feed.id, - placeholderTypes = new int[] - { - PLACEHOLDER_LOCATION - } - }; - - // Create a matching function that will always evaluate to true. - Function customerMatchingFunction = new Function(); - ConstantOperand constOperand = new ConstantOperand - { - type = ConstantOperandConstantType.BOOLEAN, - booleanValue = true - }; - customerMatchingFunction.lhsOperand = new FunctionArgumentOperand[] - { - constOperand - }; - customerMatchingFunction.@operator = FunctionOperator.IDENTITY; - customerFeed.matchingFunction = customerMatchingFunction; - - // Create an operation to add the customer feed. - CustomerFeedOperation customerFeedOperation = new CustomerFeedOperation - { - operand = customerFeed, - @operator = Operator.ADD - }; - - // After the completion of the Feed ADD operation above the added feed - // will not be available for usage in a CustomerFeed until the sync - // between the AdWords and GMB accounts completes. The loop below - // will retry adding the CustomerFeed up to ten times with an - // exponential back-off policy. - CustomerFeed addedCustomerFeed = null; - - AdWordsAppConfig config = new AdWordsAppConfig - { - RetryCount = 10 - }; - - ErrorHandler errorHandler = new ErrorHandler(config); - try - { - do - { - try - { - CustomerFeedReturnValue customerFeedResult = customerFeedService.mutate( - new CustomerFeedOperation[] - { - customerFeedOperation - }); - addedCustomerFeed = customerFeedResult.value[0]; - - Console.WriteLine( - "Added CustomerFeed for feed ID {0} and placeholder type {1}", - addedCustomerFeed.feedId, addedCustomerFeed.placeholderTypes[0]); - break; - } - catch (AdWordsApiException e) - { - ApiException apiException = (ApiException) e.ApiException; - foreach (ApiError error in apiException.errors) - { - if (error is CustomerFeedError) - { - if ((error as CustomerFeedError).reason == - CustomerFeedErrorReason - .MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE) - { - errorHandler.DoExponentialBackoff(); - errorHandler.IncrementRetriedAttempts(); - } - else - { - throw; - } - } - } - } - } while (errorHandler.HaveMoreRetryAttemptsLeft()); - // OPTIONAL: Create a CampaignFeed to specify which FeedItems to use at - // the Campaign level. This will be similar to the CampaignFeed in the - // AddSiteLinks example, except you can also filter based on the - // business name and category of each FeedItem by using a - // FeedAttributeOperand in your matching function. - - // OPTIONAL: Create an AdGroupFeed for even more fine grained control - // over which feed items are used at the AdGroup level. - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create customer feed.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Extensions/AddPrices.cs b/examples/AdWords/CSharp/v201806/Extensions/AddPrices.cs deleted file mode 100755 index c26d8bbe446..00000000000 --- a/examples/AdWords/CSharp/v201806/Extensions/AddPrices.cs +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -using DayOfWeek = Google.Api.Ads.AdWords.v201806.DayOfWeek; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a price extension and associates it with an - /// account. Campaign targeting is also set using the specified campaign ID. - /// To get campaigns, run AddCampaigns.cs. - /// - public class AddPrices : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddPrices codeExample = new AddPrices(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a price extension and associates it with an " + - "account. Campaign targeting is also set using the specified campaign ID. " + - "To get campaigns, run AddCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to which sitelinks will - /// be added. - public void Run(AdWordsUser user, long campaignId) - { - using (CustomerExtensionSettingService customerExtensionSettingService = - (CustomerExtensionSettingService) user.GetService(AdWordsService.v201806 - .CustomerExtensionSettingService)) - { - // Create the price extension feed item. - PriceFeedItem priceFeedItem = new PriceFeedItem() - { - priceExtensionType = PriceExtensionType.SERVICES, - - // Price qualifier is optional. - priceQualifier = PriceExtensionPriceQualifier.FROM, - trackingUrlTemplate = "http://tracker.example.com/?u={lpurl}", - language = "en", - - campaignTargeting = new FeedItemCampaignTargeting() - { - TargetingCampaignId = campaignId, - }, - scheduling = new FeedItemSchedule[] - { - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.SATURDAY, - startHour = 10, - startMinute = MinuteOfHour.ZERO, - endHour = 22, - endMinute = MinuteOfHour.ZERO - }, - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.SUNDAY, - startHour = 10, - startMinute = MinuteOfHour.ZERO, - endHour = 18, - endMinute = MinuteOfHour.ZERO - } - } - }; - - // To create a price extension, at least three table rows are needed. - List priceTableRows = new List(); - string currencyCode = "USD"; - priceTableRows.Add(CreatePriceTableRow("Scrubs", "Body Scrub, Salt Scrub", - "http://www.example.com/scrubs", "http://m.example.com/scrubs", 60000000, - currencyCode, PriceExtensionPriceUnit.PER_HOUR)); - priceTableRows.Add(CreatePriceTableRow("Hair Cuts", "Once a month", - "http://www.example.com/haircuts", "http://m.example.com/haircuts", 75000000, - currencyCode, PriceExtensionPriceUnit.PER_MONTH)); - priceTableRows.Add(CreatePriceTableRow("Skin Care Package", "Four times a month", - "http://www.example.com/skincarepackage", null, 250000000, currencyCode, - PriceExtensionPriceUnit.PER_MONTH)); - - priceFeedItem.tableRows = priceTableRows.ToArray(); - - // Create your campaign extension settings. This associates the sitelinks - // to your campaign. - CustomerExtensionSetting customerExtensionSetting = new CustomerExtensionSetting() - { - extensionType = FeedType.PRICE, - extensionSetting = new ExtensionSetting() - { - extensions = new ExtensionFeedItem[] - { - priceFeedItem - } - } - }; - - CustomerExtensionSettingOperation operation = - new CustomerExtensionSettingOperation() - { - operand = customerExtensionSetting, - @operator = Operator.ADD - }; - - try - { - // Add the extensions. - CustomerExtensionSettingReturnValue retVal = - customerExtensionSettingService.mutate( - new CustomerExtensionSettingOperation[] - { - operation - }); - if (retVal.value != null && retVal.value.Length > 0) - { - CustomerExtensionSetting newExtensionSetting = retVal.value[0]; - Console.WriteLine("Extension setting with type '{0}' was added.", - newExtensionSetting.extensionType); - } - else - { - Console.WriteLine("No extension settings were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create extension settings.", - e); - } - } - } - - /// - /// Creates a price table row. - /// - /// The row header. - /// The description text. - /// The final URL. - /// The mobile final URL, or null if this field - /// should not be set. - /// The price in micros. - /// The currency code. - /// The price unit. - /// A price table row for creating price extension. - private static PriceTableRow CreatePriceTableRow(string header, string description, - string finalUrl, string finalMobileUrl, long priceInMicros, string currencyCode, - PriceExtensionPriceUnit priceUnit) - { - PriceTableRow retval = new PriceTableRow() - { - header = header, - description = description, - finalUrls = new UrlList() - { - urls = new string[] - { - finalUrl - } - }, - price = new MoneyWithCurrency() - { - currencyCode = currencyCode, - money = new Money() - { - microAmount = priceInMicros - } - }, - priceUnit = priceUnit - }; - - // Optional: set the mobile final URLs. - if (!string.IsNullOrEmpty(finalMobileUrl)) - { - retval.finalMobileUrls = new UrlList() - { - urls = new string[] - { - finalMobileUrl - } - }; - } - - return retval; - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/Extensions/AddSitelinks.cs b/examples/AdWords/CSharp/v201806/Extensions/AddSitelinks.cs deleted file mode 100755 index df945351eb0..00000000000 --- a/examples/AdWords/CSharp/v201806/Extensions/AddSitelinks.cs +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -using DayOfWeek = Google.Api.Ads.AdWords.v201806.DayOfWeek; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds sitelinks to a campaign. To create a campaign, - /// run AddCampaign.cs. - /// - public class AddSitelinks : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddSitelinks codeExample = new AddSitelinks(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example adds sitelinks to a campaign. To create a campaign, run " + - "AddCampaign.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to which sitelinks will - /// be added. - public void Run(AdWordsUser user, long campaignId) - { - using (CampaignExtensionSettingService campaignExtensionSettingService = - (CampaignExtensionSettingService) user.GetService(AdWordsService.v201806 - .CampaignExtensionSettingService)) - { - Customer customer = null; - using (CustomerService customerService = - (CustomerService) user.GetService(AdWordsService.v201806.CustomerService)) - { - // Find the matching customer and its time zone. The getCustomers method - // will return a single Customer object corresponding to the session's - // clientCustomerId. - customer = customerService.getCustomers()[0]; - Console.WriteLine("Found customer ID {0:###-###-####} with time zone '{1}'.", - customer.customerId, customer.dateTimeZone); - } - - List extensions = new List(); - - // Create your sitelinks. - SitelinkFeedItem sitelink1 = new SitelinkFeedItem() - { - sitelinkText = "Store Hours", - sitelinkFinalUrls = new UrlList() - { - urls = new string[] - { - "http://www.example.com/storehours" - } - } - }; - extensions.Add(sitelink1); - - DateTime startOfThanksGiving = new DateTime(DateTime.Now.Year, 11, 20, 0, 0, 0); - DateTime endOfThanksGiving = new DateTime(DateTime.Now.Year, 11, 27, 23, 59, 59); - - // Add check to make sure we don't create a sitelink with end date in the - // past. - if (DateTime.Now < endOfThanksGiving) - { - // Show the Thanksgiving specials link only from 20 - 27 Nov. - SitelinkFeedItem sitelink2 = new SitelinkFeedItem() - { - sitelinkText = "Thanksgiving Specials", - sitelinkFinalUrls = new UrlList() - { - urls = new string[] - { - "http://www.example.com/thanksgiving" - } - }, - startTime = string.Format("{0} {1}", - startOfThanksGiving.ToString("yyyyMMdd HHmmss"), customer.dateTimeZone), - endTime = string.Format("{0} {1}", - endOfThanksGiving.ToString("yyyyMMdd HHmmss"), customer.dateTimeZone), - - // Target this sitelink for United States only. See - // https://developers.google.com/adwords/api/docs/appendix/geotargeting - // for valid geolocation codes. - geoTargeting = new Location() - { - id = 2840 - }, - - // Restrict targeting only to people physically within the United States. - // Otherwise, this could also show to people interested in the United States - // but not physically located there. - geoTargetingRestriction = new FeedItemGeoRestriction() - { - geoRestriction = GeoRestriction.LOCATION_OF_PRESENCE - } - }; - extensions.Add(sitelink2); - } - - // Show the wifi details primarily for high end mobile users. - SitelinkFeedItem sitelink3 = new SitelinkFeedItem() - { - sitelinkText = "Wifi available", - sitelinkFinalUrls = new UrlList() - { - urls = new string[] - { - "http://www.example.com/mobile/wifi" - } - }, - devicePreference = new FeedItemDevicePreference() - { - // See https://developers.google.com/adwords/api/docs/appendix/platforms - // for device criteria IDs. - devicePreference = 30001 - }, - - // Target this sitelink for the keyword "free wifi". - keywordTargeting = new Keyword() - { - text = "free wifi", - matchType = KeywordMatchType.BROAD - } - }; - extensions.Add(sitelink3); - - // Show the happy hours link only during Mon - Fri 6PM to 9PM. - SitelinkFeedItem sitelink4 = new SitelinkFeedItem() - { - sitelinkText = "Happy hours", - sitelinkFinalUrls = new UrlList() - { - urls = new string[] - { - "http://www.example.com/happyhours" - }, - }, - scheduling = new FeedItemSchedule[] - { - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.MONDAY, - startHour = 18, - startMinute = MinuteOfHour.ZERO, - endHour = 21, - endMinute = MinuteOfHour.ZERO - }, - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.TUESDAY, - startHour = 18, - startMinute = MinuteOfHour.ZERO, - endHour = 21, - endMinute = MinuteOfHour.ZERO - }, - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.WEDNESDAY, - startHour = 18, - startMinute = MinuteOfHour.ZERO, - endHour = 21, - endMinute = MinuteOfHour.ZERO - }, - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.THURSDAY, - startHour = 18, - startMinute = MinuteOfHour.ZERO, - endHour = 21, - endMinute = MinuteOfHour.ZERO - }, - new FeedItemSchedule() - { - dayOfWeek = DayOfWeek.FRIDAY, - startHour = 18, - startMinute = MinuteOfHour.ZERO, - endHour = 21, - endMinute = MinuteOfHour.ZERO - } - } - }; - extensions.Add(sitelink4); - - // Create your campaign extension settings. This associates the sitelinks - // to your campaign. - CampaignExtensionSetting campaignExtensionSetting = new CampaignExtensionSetting - { - campaignId = campaignId, - extensionType = FeedType.SITELINK, - extensionSetting = new ExtensionSetting() - { - extensions = extensions.ToArray() - } - }; - - CampaignExtensionSettingOperation operation = - new CampaignExtensionSettingOperation() - { - operand = campaignExtensionSetting, - @operator = Operator.ADD - }; - - try - { - // Add the extensions. - CampaignExtensionSettingReturnValue retVal = - campaignExtensionSettingService.mutate( - new CampaignExtensionSettingOperation[] - { - operation - }); - - // Display the results. - if (retVal.value != null && retVal.value.Length > 0) - { - CampaignExtensionSetting newExtensionSetting = retVal.value[0]; - Console.WriteLine( - "Extension setting with type = {0} was added to campaign ID {1}.", - newExtensionSetting.extensionType, newExtensionSetting.campaignId); - } - else - { - Console.WriteLine("No extension settings were created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create extension settings.", - e); - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Extensions/AddSitelinksUsingFeeds.cs b/examples/AdWords/CSharp/v201806/Extensions/AddSitelinksUsingFeeds.cs deleted file mode 100755 index a2f9e3f36ab..00000000000 --- a/examples/AdWords/CSharp/v201806/Extensions/AddSitelinksUsingFeeds.cs +++ /dev/null @@ -1,525 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds sitelinks to a campaign using feed services. - /// To create a campaign, run AddCampaign.cs. To add sitelinks using the - /// simpler ExtensionSetting services, see AddSitelinks.cs. - /// - public class AddSitelinksUsingFeeds : ExampleBase - { - /// - /// Holds data about sitelinks in a feed. - /// - private class SitelinksDataHolder - { - /// - /// The sitelink feed item IDs. - /// - private List feedItemIds = new List(); - - /// - /// Gets the sitelink feed item IDs. - /// - public List FeedItemIds - { - get { return feedItemIds; } - } - - /// - /// Gets or sets the feed ID. - /// - public long FeedId { get; set; } - - /// - /// Gets or sets the link text feed attribute ID. - /// - public long LinkTextFeedAttributeId { get; set; } - - /// - /// Gets or sets the link URL feed attribute ID. - /// - public long LinkFinalUrlFeedAttributeId { get; set; } - - /// - /// Gets or sets the line 2 feed attribute ID. - /// - public long Line2FeedAttributeId { get; set; } - - /// - /// Gets or sets the line 3 feed attribute ID. - /// - public long Line3FeedAttributeId { get; set; } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddSitelinksUsingFeeds codeExample = new AddSitelinksUsingFeeds(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - string feedName = "INSERT_FEED_NAME_HERE"; - codeExample.Run(new AdWordsUser(), campaignId, feedName, adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds sitelinks to a campaign using feed services." + - "To create a campaign, run AddCampaign.cs. To add sitelinks using the " + - "simpler ExtensionSetting services, see AddSitelinks.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign with which sitelinks are associated. - /// - /// Id of the adgroup to restrict targeting to. - /// Name of the feed to be created. - public void Run(AdWordsUser user, long campaignId, string feedName, long? adGroupId) - { - SitelinksDataHolder sitelinksData = new SitelinksDataHolder(); - CreateSitelinksFeed(user, sitelinksData, feedName); - CreateSitelinksFeedItems(user, sitelinksData); - createSitelinksFeedMapping(user, sitelinksData); - CreateSitelinksCampaignFeed(user, sitelinksData, campaignId); - RestrictFeedItemToAdGroup(user, sitelinksData, adGroupId); - } - - private static void RestrictFeedItemToGeoTarget(AdWordsUser user, FeedItem feedItem, - long locationId) - { - FeedItemCriterionTarget criterionTarget = new FeedItemCriterionTarget() - { - feedId = feedItem.feedId, - feedItemId = feedItem.feedItemId, - // The IDs can be found in the documentation or retrieved with the - // LocationCriterionService. - criterion = new Location() - { - id = locationId, - } - }; - - using (FeedItemTargetService feedItemTargetService = - (FeedItemTargetService) user.GetService( - AdWordsService.v201806.FeedItemTargetService)) - { - FeedItemTargetOperation operation = new FeedItemTargetOperation() - { - @operator = Operator.ADD, - operand = criterionTarget - }; - - - FeedItemTargetReturnValue retval = feedItemTargetService.mutate( - new FeedItemTargetOperation[] - { - operation - }); - FeedItemCriterionTarget newLocationTarget = - (FeedItemCriterionTarget) retval.value[0]; - Console.WriteLine( - "Feed item target for feed ID {0} and feed item ID {1}" + - " was created to restrict serving to location ID {2}", newLocationTarget.feedId, - newLocationTarget.feedItemId, newLocationTarget.criterion.id); - } - } - - private static void RestrictFeedItemToAdGroup(AdWordsUser user, - SitelinksDataHolder sitelinksData, long? adGroupId) - { - // Optional: Restrict the first feed item to only serve with ads for the - // specified ad group ID. - FeedItemAdGroupTarget adGroupTarget = new FeedItemAdGroupTarget() - { - feedId = sitelinksData.FeedId, - feedItemId = sitelinksData.FeedItemIds[0], - adGroupId = adGroupId.Value - }; - - using (FeedItemTargetService feedItemTargetService = - (FeedItemTargetService) user.GetService( - AdWordsService.v201806.FeedItemTargetService)) - { - FeedItemTargetOperation operation = new FeedItemTargetOperation() - { - @operator = Operator.ADD, - operand = adGroupTarget - }; - - FeedItemTargetReturnValue retval = feedItemTargetService.mutate( - new FeedItemTargetOperation[] - { - operation - }); - FeedItemAdGroupTarget newAdGroupTarget = (FeedItemAdGroupTarget) retval.value[0]; - Console.WriteLine( - "Feed item target for feed ID {0} and feed item ID {1}" + - " was created to restrict serving to ad group ID {2}", newAdGroupTarget.feedId, - newAdGroupTarget.feedItemId, newAdGroupTarget.adGroupId); - } - } - - private static void CreateSitelinksFeed(AdWordsUser user, SitelinksDataHolder sitelinksData, - string feedName) - { - using (FeedService feedService = - (FeedService) user.GetService(AdWordsService.v201806.FeedService)) - { - // Create attributes. - FeedAttribute textAttribute = new FeedAttribute() - { - type = FeedAttributeType.STRING, - name = "Link Text" - }; - - FeedAttribute finalUrlAttribute = new FeedAttribute() - { - type = FeedAttributeType.URL_LIST, - name = "Link Final URLs" - }; - - FeedAttribute line2Attribute = new FeedAttribute() - { - type = FeedAttributeType.STRING, - name = "Line 2" - }; - - FeedAttribute line3Attribute = new FeedAttribute() - { - type = FeedAttributeType.STRING, - name = "Line 3" - }; - - // Create the feed. - Feed sitelinksFeed = new Feed() - { - name = feedName, - attributes = new FeedAttribute[] - { - textAttribute, - finalUrlAttribute, - line2Attribute, - line3Attribute - }, - origin = FeedOrigin.USER - }; - - // Create operation. - FeedOperation operation = new FeedOperation() - { - operand = sitelinksFeed, - @operator = Operator.ADD - }; - - // Add the feed. - FeedReturnValue result = feedService.mutate(new FeedOperation[] - { - operation - }); - - Feed savedFeed = result.value[0]; - sitelinksData.FeedId = savedFeed.id; - - FeedAttribute[] savedAttributes = savedFeed.attributes; - sitelinksData.LinkTextFeedAttributeId = savedAttributes[0].id; - sitelinksData.LinkFinalUrlFeedAttributeId = savedAttributes[1].id; - sitelinksData.Line2FeedAttributeId = savedAttributes[2].id; - sitelinksData.Line3FeedAttributeId = savedAttributes[3].id; - - Console.WriteLine( - "Feed with name {0} and ID {1} with linkTextAttributeId {2}, " + - "linkFinalUrlAttributeId {3}, line2AttributeId {4} and line3AttributeId {5} " + - "was created.", savedFeed.name, savedFeed.id, savedAttributes[0].id, - savedAttributes[1].id, savedAttributes[2].id, savedAttributes[3].id); - } - } - - private static void CreateSitelinksFeedItems(AdWordsUser user, - SitelinksDataHolder siteLinksData) - { - using (FeedItemService feedItemService = - (FeedItemService) user.GetService(AdWordsService.v201806.FeedItemService)) - { - // Create operations to add FeedItems. - FeedItemOperation home = NewSitelinkFeedItemAddOperation(siteLinksData, "Home", - "http://www.example.com", "Home line 2", "Home line 3"); - FeedItemOperation stores = NewSitelinkFeedItemAddOperation(siteLinksData, "Stores", - "http://www.example.com/stores", "Stores line 2", "Stores line 3"); - FeedItemOperation onSale = NewSitelinkFeedItemAddOperation(siteLinksData, "On Sale", - "http://www.example.com/sale", "On Sale line 2", "On Sale line 3"); - FeedItemOperation support = NewSitelinkFeedItemAddOperation(siteLinksData, - "Support", "http://www.example.com/support", "Support line 2", - "Support line 3"); - FeedItemOperation products = NewSitelinkFeedItemAddOperation(siteLinksData, - "Products", "http://www.example.com/prods", "Products line 2", - "Products line 3"); - - // This site link is using geographical targeting to use LOCATION_OF_PRESENCE. - FeedItemOperation aboutUs = NewSitelinkFeedItemAddOperation(siteLinksData, - "About Us", "http://www.example.com/about", "About Us line 2", - "About Us line 3", true); - - FeedItemOperation[] operations = new FeedItemOperation[] - { - home, - stores, - onSale, - support, - products, - aboutUs - }; - - FeedItemReturnValue result = feedItemService.mutate(operations); - foreach (FeedItem item in result.value) - { - Console.WriteLine("FeedItem with feedItemId {0} was added.", item.feedItemId); - siteLinksData.FeedItemIds.Add(item.feedItemId); - } - - // Target the "aboutUs" sitelink to geographically target California. - // See https://developers.google.com/adwords/api/docs/appendix/geotargeting for - // location criteria for supported locations. - RestrictFeedItemToGeoTarget(user, result.value[5], 21137); - } - } - - // See the Placeholder reference page for a list of all the placeholder types and fields. - // https://developers.google.com/adwords/api/docs/appendix/placeholders.html - private const int PLACEHOLDER_SITELINKS = 1; - - // See the Placeholder reference page for a list of all the placeholder types and fields. - private const int PLACEHOLDER_FIELD_SITELINK_LINK_TEXT = 1; - - private const int PLACEHOLDER_FIELD_SITELINK_FINAL_URL = 5; - private const int PLACEHOLDER_FIELD_LINE_2_TEXT = 3; - private const int PLACEHOLDER_FIELD_LINE_3_TEXT = 4; - - private static void createSitelinksFeedMapping(AdWordsUser user, - SitelinksDataHolder sitelinksData) - { - using (FeedMappingService feedMappingService = - (FeedMappingService) user.GetService(AdWordsService.v201806.FeedMappingService)) - { - // Map the FeedAttributeIds to the fieldId constants. - AttributeFieldMapping linkTextFieldMapping = new AttributeFieldMapping() - { - feedAttributeId = sitelinksData.LinkTextFeedAttributeId, - fieldId = PLACEHOLDER_FIELD_SITELINK_LINK_TEXT - }; - - AttributeFieldMapping linkFinalUrlFieldMapping = new AttributeFieldMapping() - { - feedAttributeId = sitelinksData.LinkFinalUrlFeedAttributeId, - fieldId = PLACEHOLDER_FIELD_SITELINK_FINAL_URL - }; - - AttributeFieldMapping line2FieldMapping = new AttributeFieldMapping() - { - feedAttributeId = sitelinksData.Line2FeedAttributeId, - fieldId = PLACEHOLDER_FIELD_LINE_2_TEXT - }; - - AttributeFieldMapping line3FieldMapping = new AttributeFieldMapping() - { - feedAttributeId = sitelinksData.Line3FeedAttributeId, - fieldId = PLACEHOLDER_FIELD_LINE_3_TEXT - }; - - // Create the FieldMapping and operation. - FeedMappingOperation operation = new FeedMappingOperation() - { - operand = new FeedMapping() - { - placeholderType = PLACEHOLDER_SITELINKS, - feedId = sitelinksData.FeedId, - attributeFieldMappings = new AttributeFieldMapping[] - { - linkTextFieldMapping, - linkFinalUrlFieldMapping, - line2FieldMapping, - line3FieldMapping - } - }, - @operator = Operator.ADD - }; - - // Save the field mapping. - FeedMappingReturnValue result = feedMappingService.mutate(new FeedMappingOperation[] - { - operation - }); - - foreach (FeedMapping savedFeedMapping in result.value) - { - Console.WriteLine( - "Feed mapping with ID {0} and placeholderType {1} was saved for feed " + - "with ID {2}.", - savedFeedMapping.feedMappingId, savedFeedMapping.placeholderType, - savedFeedMapping.feedId); - } - } - } - - private static void CreateSitelinksCampaignFeed(AdWordsUser user, - SitelinksDataHolder sitelinksData, long campaignId) - { - using (CampaignFeedService campaignFeedService = - (CampaignFeedService) user.GetService(AdWordsService.v201806.CampaignFeedService)) - { - // Construct a matching function that associates the sitelink feeditems - // to the campaign, and set the device preference to Mobile. See the - // matching function guide at - // https://developers.google.com/adwords/api/docs/guides/feed-matching-functions - // for more details. - string matchingFunctionString = string.Format(@" - AND( - IN(FEED_ITEM_ID, {{{0}}}), - EQUALS(CONTEXT.DEVICE, 'Mobile') - )", string.Join(",", sitelinksData.FeedItemIds)); - - CampaignFeed campaignFeed = new CampaignFeed() - { - feedId = sitelinksData.FeedId, - campaignId = campaignId, - matchingFunction = new Function() - { - functionString = matchingFunctionString - }, - // Specifying placeholder types on the CampaignFeed allows the same feed - // to be used for different placeholders in different Campaigns. - placeholderTypes = new int[] - { - PLACEHOLDER_SITELINKS - } - }; - - CampaignFeedOperation operation = new CampaignFeedOperation() - { - operand = campaignFeed, - @operator = Operator.ADD - }; - - CampaignFeedReturnValue result = campaignFeedService.mutate( - new CampaignFeedOperation[] - { - operation - }); - - foreach (CampaignFeed savedCampaignFeed in result.value) - { - Console.WriteLine("Campaign with ID {0} was associated with feed with ID {1}", - savedCampaignFeed.campaignId, savedCampaignFeed.feedId); - } - } - } - - private static FeedItemOperation NewSitelinkFeedItemAddOperation( - SitelinksDataHolder sitelinksData, string text, string finalUrl, string line2, - string line3) - { - return NewSitelinkFeedItemAddOperation(sitelinksData, text, finalUrl, line2, line3, - false); - } - - private static FeedItemOperation NewSitelinkFeedItemAddOperation( - SitelinksDataHolder sitelinksData, string text, string finalUrl, string line2, - string line3, bool restrictToLop) - { - // Create the FeedItemAttributeValues for our text values. - FeedItemAttributeValue linkTextAttributeValue = new FeedItemAttributeValue() - { - feedAttributeId = sitelinksData.LinkTextFeedAttributeId, - stringValue = text - }; - - FeedItemAttributeValue linkFinalUrlAttributeValue = new FeedItemAttributeValue() - { - feedAttributeId = sitelinksData.LinkFinalUrlFeedAttributeId, - stringValues = new string[] - { - finalUrl - } - }; - - FeedItemAttributeValue line2AttributeValue = new FeedItemAttributeValue() - { - feedAttributeId = sitelinksData.Line2FeedAttributeId, - stringValue = line2 - }; - - FeedItemAttributeValue line3AttributeValue = new FeedItemAttributeValue() - { - feedAttributeId = sitelinksData.Line3FeedAttributeId, - stringValue = line3 - }; - - // Create the feed item and operation. - FeedItem item = new FeedItem() - { - feedId = sitelinksData.FeedId, - attributeValues = new FeedItemAttributeValue[] - { - linkTextAttributeValue, - linkFinalUrlAttributeValue, - line2AttributeValue, - line3AttributeValue - } - }; - - // OPTIONAL: Restrict targeting only to people physically within the location. - if (restrictToLop) - { - item.geoTargetingRestriction = new FeedItemGeoRestriction() - { - geoRestriction = GeoRestriction.LOCATION_OF_PRESENCE - }; - } - - return new FeedItemOperation() - { - operand = item, - @operator = Operator.ADD - }; - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Migration/MigrateToExtensionSettings.cs b/examples/AdWords/CSharp/v201806/Migration/MigrateToExtensionSettings.cs deleted file mode 100755 index 6ea572dc577..00000000000 --- a/examples/AdWords/CSharp/v201806/Migration/MigrateToExtensionSettings.cs +++ /dev/null @@ -1,634 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example migrates your feed based sitelinks at campaign level to - /// use extension settings. To learn more about extensionsettings, see - /// https://developers.google.com/adwords/api/docs/guides/extension-settings. - /// To learn more about migrating Feed based extensions to extension - /// settings, see - /// https://developers.google.com/adwords/api/docs/guides/migrate-to-extension-settings. - /// - /// This code example doesn't migrate scheduling or feeditem-level campaign, adgroup, - /// keyword, or geo targeting settings. - public class MigrateToExtensionSettings : ExampleBase - { - /// - /// The placeholder type for sitelinks. See - /// https://developers.google.com/adwords/api/docs/appendix/placeholders for - /// the list of all supported placeholder types. - /// - private const int PLACEHOLDER_TYPE_SITELINKS = 1; - - /// - /// Holds the placeholder field IDs for sitelinks. See - /// https://developers.google.com/adwords/api/docs/appendix/placeholders for - /// the list of all supported placeholder types. - /// - private class SiteLinkFields - { - public const long TEXT = 1; - public const long URL = 2; - public const long LINE2 = 3; - public const long LINE3 = 4; - public const long FINAL_URLS = 5; - public const long FINAL_MOBILE_URLS = 6; - public const long TRACKING_URL_TEMPLATE = 7; - }; - - /// - /// A sitelink object read from a feed. - /// - private class SiteLinkFromFeed - { - /// - /// Gets or sets the feed ID. - /// - public long FeedId { get; set; } - - /// - /// Gets or sets the feed item ID. - /// - public long FeedItemId { get; set; } - - /// - /// Gets or sets the sitelink text. - /// - public string Text { get; set; } - - /// - /// Gets or sets the sitelink URL. - /// - public string Url { get; set; } - - /// - /// Gets or sets the sitelink final URLs. - /// - public string[] FinalUrls { get; set; } - - /// - /// Gets or sets the sitelink final Mobile URLs. - /// - public string[] FinalMobileUrls { get; set; } - - /// - /// Gets or sets the sitelink tracking URL template. - /// - public string TrackingUrlTemplate { get; set; } - - /// - /// Gets or sets the sitelink line2 description. - /// - public string Line2 { get; set; } - - /// - /// Gets or sets the sitelink line3 description. - /// - public string Line3 { get; set; } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - MigrateToExtensionSettings codeExample = new MigrateToExtensionSettings(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example migrates your feed based sitelinks at campaign level " + - "to use extension settings. To learn more about extensionsettings, see " + - "https://developers.google.com/adwords/api/docs/guides/extension-settings. " + - "To learn more about migrating Feed based extensions to extension settings, " + - "see https://developers.google.com/adwords/api/docs/guides/migrate-to-" + - "extension-settings."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - // Get all the feeds from the user account. - Feed[] feeds = GetFeeds(user); - - foreach (Feed feed in feeds) - { - // Retrieve all the sitelinks from the current feed. - Dictionary feedItems = GetSiteLinksFromFeed(user, feed.id); - - // Get all the instances where a sitelink from this feed has been added - // to a campaign. - CampaignFeed[] campaignFeeds = - GetCampaignFeeds(user, feed, PLACEHOLDER_TYPE_SITELINKS); - - if (campaignFeeds != null) - { - HashSet allFeedItemsToDelete = new HashSet(); - - foreach (CampaignFeed campaignFeed in campaignFeeds) - { - // Retrieve the sitelinks that have been associated with this - // campaign. - List feedItemIds = GetFeedItemsForCampaign(campaignFeed); - ExtensionSettingPlatform platformRestrictions = - GetPlatformRestrictionsForCampaign(campaignFeed); - - if (feedItemIds.Count == 0) - { - Console.WriteLine( - "Migration skipped for campaign feed with campaign ID {0} and " + - "feed ID {1} because no mapped feed item IDs were found in the " + - "campaign feed's matching function.", campaignFeed.campaignId, - campaignFeed.feedId); - } - else - { - // Delete the campaign feed that associates the sitelinks from the - // feed to the campaign. - DeleteCampaignFeed(user, campaignFeed); - - // Create extension settings instead of sitelinks. - CreateExtensionSetting(user, feedItems, campaignFeed.campaignId, - feedItemIds, platformRestrictions); - - // Mark the sitelinks from the feed for deletion. - allFeedItemsToDelete.UnionWith(feedItemIds); - } - } - - // Delete all the sitelinks from the feed. - DeleteOldFeedItems(user, new List(allFeedItemsToDelete), feed.id); - } - } - - } - - /// - /// Gets the site links from a feed. - /// - /// The user that owns the feed. - /// The feed ID. - /// A dictionary of sitelinks from the feed, with key as the feed - /// item ID, and value as the sitelink. - private Dictionary GetSiteLinksFromFeed(AdWordsUser user, - long feedId) - { - Dictionary siteLinks = new Dictionary(); - - // Retrieve all the feed items from the feed. - FeedItem[] feedItems = GetFeedItems(user, feedId); - - // Retrieve the feed's attribute mapping. - Dictionary> feedMappings = - GetFeedMapping(user, feedId, PLACEHOLDER_TYPE_SITELINKS); - - if (feedItems != null) - { - foreach (FeedItem feedItem in feedItems) - { - SiteLinkFromFeed sitelinkFromFeed = new SiteLinkFromFeed() - { - FeedId = feedItem.feedId, - FeedItemId = feedItem.feedItemId - }; - - foreach (FeedItemAttributeValue attributeValue in feedItem.attributeValues) - { - // This attribute hasn't been mapped to a field. - if (!feedMappings.ContainsKey(attributeValue.feedAttributeId)) - { - continue; - } - - // Get the list of all the fields to which this attribute has been mapped. - foreach (long fieldId in feedMappings[attributeValue.feedAttributeId]) - { - // Read the appropriate value depending on the ID of the mapped - // field. - switch (fieldId) - { - case SiteLinkFields.TEXT: - sitelinkFromFeed.Text = attributeValue.stringValue; - break; - - case SiteLinkFields.URL: - sitelinkFromFeed.Url = attributeValue.stringValue; - break; - - case SiteLinkFields.FINAL_URLS: - sitelinkFromFeed.FinalUrls = attributeValue.stringValues; - break; - - case SiteLinkFields.FINAL_MOBILE_URLS: - sitelinkFromFeed.FinalMobileUrls = attributeValue.stringValues; - break; - - case SiteLinkFields.TRACKING_URL_TEMPLATE: - sitelinkFromFeed.TrackingUrlTemplate = - attributeValue.stringValue; - break; - - case SiteLinkFields.LINE2: - sitelinkFromFeed.Line2 = attributeValue.stringValue; - break; - - case SiteLinkFields.LINE3: - sitelinkFromFeed.Line3 = attributeValue.stringValue; - break; - } - } - } - - siteLinks.Add(feedItem.feedItemId, sitelinkFromFeed); - } - } - - return siteLinks; - } - - /// - /// Gets the feed mapping for a feed. - /// - /// The user that owns the feed. - /// The feed ID. - /// Type of the place holder for which feed - /// mappings should be retrieved. - /// A dictionary, with key as the feed attribute ID, and value as - /// the set of all fields which the attribute has a mapping to. - private Dictionary> GetFeedMapping(AdWordsUser user, long feedId, - long placeHolderType) - { - using (FeedMappingService feedMappingService = - (FeedMappingService) user.GetService(AdWordsService.v201806.FeedMappingService)) - { - FeedMappingPage page = feedMappingService.query(string.Format( - "SELECT FeedMappingId, " + - "AttributeFieldMappings where FeedId='{0}' and PlaceholderType={1} and " + - "Status='ENABLED'", feedId, placeHolderType)); - - Dictionary> attributeMappings = - new Dictionary>(); - - if (page.entries != null) - { - // Normally, a feed attribute is mapped only to one field. However, - // you may map it to more than one field if needed. - foreach (FeedMapping feedMapping in page.entries) - { - foreach (AttributeFieldMapping attributeMapping in feedMapping - .attributeFieldMappings) - { - if (!attributeMappings.ContainsKey(attributeMapping.feedAttributeId)) - { - attributeMappings[attributeMapping.feedAttributeId] = - new HashSet(); - } - - attributeMappings[attributeMapping.feedAttributeId] - .Add(attributeMapping.fieldId); - } - } - } - - return attributeMappings; - } - } - - /// - /// Gets the feeds. - /// - /// The user for which feeds are retrieved. - /// The list of feeds. - private Feed[] GetFeeds(AdWordsUser user) - { - using (FeedService feedService = - (FeedService) user.GetService(AdWordsService.v201806.FeedService)) - { - FeedPage page = feedService.query("SELECT Id, Name, Attributes where " + - "Origin='USER' and FeedStatus='ENABLED'"); - return page.entries; - } - - } - - /// - /// Gets the feed items in a feed. - /// - /// The user that owns the feed. - /// The feed ID. - /// The list of feed items in the feed. - private FeedItem[] GetFeedItems(AdWordsUser user, long feedId) - { - using (FeedItemService feedItemService = - (FeedItemService) user.GetService(AdWordsService.v201806.FeedItemService)) - { - FeedItemPage page = feedItemService.query(string.Format( - "Select FeedItemId, " + - "AttributeValues where Status = 'ENABLED' and FeedId = '{0}'", feedId)); - return page.entries; - } - - } - - /// - /// Deletes the old feed items for which extension settings have been - /// created. - /// - /// The user that owns the feed items. - /// IDs of the feed items to be removed. - /// ID of the feed that holds the feed items. - private void DeleteOldFeedItems(AdWordsUser user, List feedItemIds, long feedId) - { - if (feedItemIds.Count == 0) - { - return; - } - - List operations = new List(); - foreach (long feedItemId in feedItemIds) - { - FeedItemOperation operation = new FeedItemOperation() - { - @operator = Operator.REMOVE, - operand = new FeedItem() - { - feedItemId = feedItemId, - feedId = feedId - } - }; - operations.Add(operation); - } - - using (FeedItemService feedItemService = - (FeedItemService) user.GetService(AdWordsService.v201806.FeedItemService)) - { - feedItemService.mutate(operations.ToArray()); - return; - } - } - - /// - /// Creates the extension setting fo a list of feed items. - /// - /// The user for which extension settings are created. - /// - /// The list of all feed items. - /// ID of the campaign to which extension settings - /// are added. - /// IDs of the feed items for which extension - /// settings should be created. - /// The platform restrictions for the - /// extension setting. - private static void CreateExtensionSetting(AdWordsUser user, - Dictionary feedItems, long campaignId, List feedItemIds, - ExtensionSettingPlatform platformRestrictions) - { - CampaignExtensionSetting extensionSetting = new CampaignExtensionSetting() - { - campaignId = campaignId, - extensionType = FeedType.SITELINK, - extensionSetting = new ExtensionSetting() - { - } - }; - - List extensionFeedItems = new List(); - - foreach (long feedItemId in feedItemIds) - { - SiteLinkFromFeed feedItem = feedItems[feedItemId]; - SitelinkFeedItem newFeedItem = new SitelinkFeedItem() - { - sitelinkText = feedItem.Text, - sitelinkUrl = feedItem.Url, - sitelinkFinalUrls = new UrlList() - { - urls = feedItem.FinalUrls - }, - sitelinkFinalMobileUrls = new UrlList() - { - urls = feedItem.FinalMobileUrls - }, - sitelinkTrackingUrlTemplate = feedItem.TrackingUrlTemplate, - sitelinkLine2 = feedItem.Line2, - sitelinkLine3 = feedItem.Line3 - }; - - extensionFeedItems.Add(newFeedItem); - } - - extensionSetting.extensionSetting.extensions = extensionFeedItems.ToArray(); - extensionSetting.extensionSetting.platformRestrictions = platformRestrictions; - extensionSetting.extensionType = FeedType.SITELINK; - - using (CampaignExtensionSettingService campaignExtensionSettingService = - (CampaignExtensionSettingService) user.GetService(AdWordsService.v201806 - .CampaignExtensionSettingService)) - { - CampaignExtensionSettingOperation operation = - new CampaignExtensionSettingOperation() - { - operand = extensionSetting, - @operator = Operator.ADD - }; - - campaignExtensionSettingService.mutate(new CampaignExtensionSettingOperation[] - { - operation - }); - } - - return; - } - - /// - /// Deletes a campaign feed. - /// - /// The AdWords user. - /// The campaign feed. - /// - private CampaignFeed DeleteCampaignFeed(AdWordsUser user, CampaignFeed campaignFeed) - { - using (CampaignFeedService campaignFeedService = - (CampaignFeedService) user.GetService(AdWordsService.v201806.CampaignFeedService)) - { - CampaignFeedOperation operation = new CampaignFeedOperation() - { - operand = campaignFeed, - @operator = Operator.REMOVE - }; - - CampaignFeed retval = campaignFeedService.mutate(new CampaignFeedOperation[] - { - operation - }).value[0]; - return retval; - } - } - - /// - /// Gets the platform restrictions for sitelinks in a campaign. - /// - /// The campaign feed. - /// The platform restrictions. - private ExtensionSettingPlatform GetPlatformRestrictionsForCampaign( - CampaignFeed campaignFeed) - { - string platformRestrictions = "NONE"; - - if (campaignFeed.matchingFunction.@operator == FunctionOperator.AND) - { - foreach (FunctionArgumentOperand argument in campaignFeed.matchingFunction - .lhsOperand) - { - // Check if matchingFunction is of the form EQUALS(CONTEXT.DEVICE, 'Mobile'). - FunctionOperand operand = argument as FunctionOperand; - if (operand?.value.@operator == FunctionOperator.EQUALS) - { - RequestContextOperand requestContextOperand = - operand.value.lhsOperand[0] as RequestContextOperand; - if (requestContextOperand != null && requestContextOperand.contextType == - RequestContextOperandContextType.DEVICE_PLATFORM) - { - platformRestrictions = (operand.value.rhsOperand[0] as ConstantOperand) - .stringValue; - } - } - } - } - - return (ExtensionSettingPlatform) Enum.Parse(typeof(ExtensionSettingPlatform), - platformRestrictions, true); - } - - /// - /// Gets the list of feed items that are used by a campaign through a given - /// campaign feed. - /// - /// The campaign feed. - /// The list of feed items. - private List GetFeedItemsForCampaign(CampaignFeed campaignFeed) - { - List feedItems = new List(); - - switch (campaignFeed.matchingFunction.@operator) - { - case FunctionOperator.IN: - // Check if matchingFunction is of the form IN(FEED_ITEM_ID,{xxx,xxx}). - // Extract feedItems if applicable. - feedItems.AddRange(GetFeedItemsFromArgument(campaignFeed.matchingFunction)); - - break; - - case FunctionOperator.AND: - // Check each condition. - - foreach (FunctionArgumentOperand argument in campaignFeed.matchingFunction - .lhsOperand) - { - // Check if matchingFunction is of the form IN(FEED_ITEM_ID,{xxx,xxx}). - // Extract feedItems if applicable. - if (argument is FunctionOperand) - { - FunctionOperand operand = (argument as FunctionOperand); - if (operand.value.@operator == FunctionOperator.IN) - { - feedItems.AddRange(GetFeedItemsFromArgument(operand.value)); - } - } - } - - break; - - default: - // There are no other matching functions involving feeditem ids. - break; - } - - return feedItems; - } - - private List GetFeedItemsFromArgument(Function function) - { - List feedItems = new List(); - if (function.lhsOperand.Length == 1) - { - RequestContextOperand requestContextOperand = - function.lhsOperand[0] as RequestContextOperand; - if (requestContextOperand != null && requestContextOperand.contextType == - RequestContextOperandContextType.FEED_ITEM_ID) - { - foreach (ConstantOperand argument in function.rhsOperand) - { - feedItems.Add(argument.longValue); - } - } - } - - return feedItems; - } - - /// - /// Gets the campaignfeeds that use a particular feed. - /// - /// The user that owns the feed. - /// The feed for which campaign feeds should be - /// retrieved. - /// The type of placeholder to restrict - /// search. - /// The list of campaignfeeds. - private CampaignFeed[] GetCampaignFeeds(AdWordsUser user, Feed feed, int placeholderType) - { - using (CampaignFeedService campaignFeedService = - (CampaignFeedService) user.GetService(AdWordsService.v201806.CampaignFeedService)) - { - CampaignFeedPage page = campaignFeedService.query( - string.Format( - "SELECT CampaignId, MatchingFunction, PlaceholderTypes where " + - "Status='ENABLED' and FeedId = '{0}' and PlaceholderTypes " + - "CONTAINS_ANY[{1}]", feed.id, placeholderType)); - return page.entries; - } - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/Miscellaneous/GetAllImageAssets.cs b/examples/AdWords/CSharp/v201806/Miscellaneous/GetAllImageAssets.cs deleted file mode 100755 index 4cb22bd662f..00000000000 --- a/examples/AdWords/CSharp/v201806/Miscellaneous/GetAllImageAssets.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets all image assets. To upload an image asset, run UploadImageAsset.cs. - /// - public class GetAllImageAssets : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAllImageAssets codeExample = new GetAllImageAssets(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets all image assets. To upload an image asset, run " + - "UploadImageAsset.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (AssetService assetService = - (AssetService) user.GetService(AdWordsService.v201806.AssetService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - Asset.Fields.AssetName, - Asset.Fields.AssetStatus, - ImageAsset.Fields.ImageFileSize, - ImageDimensionInfo.Fields.ImageWidth, - ImageDimensionInfo.Fields.ImageHeight, - ImageDimensionInfo.Fields.ImageFullSizeUrl - }, - predicates = new Predicate[] - { - // Filter for image assets only. - Predicate.Equals(Asset.Fields.AssetSubtype, AssetType.IMAGE.ToString()) - }, - paging = Paging.Default - }; - - AssetPage page = new AssetPage(); - - try - { - do - { - // Get the image assets. - page = assetService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (ImageAsset imageAsset in page.entries) - { - Console.WriteLine( - "{0}) Image asset with id = '{1}', name = '{2}' and " + - "status = '{3}' was found.", i + 1, imageAsset.assetId, - imageAsset.assetName, imageAsset.assetStatus); - Console.WriteLine(" Size is {0}x{1} and asset URL is {2}.", - imageAsset.fullSizeInfo.imageWidth, - imageAsset.fullSizeInfo.imageHeight, - imageAsset.fullSizeInfo.imageUrl); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of image assets found: {0}", page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve image assets.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Miscellaneous/GetAllVideosAndImages.cs b/examples/AdWords/CSharp/v201806/Miscellaneous/GetAllVideosAndImages.cs deleted file mode 100755 index 265f6cf342a..00000000000 --- a/examples/AdWords/CSharp/v201806/Miscellaneous/GetAllVideosAndImages.cs +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets all videos and images. Use the Google Ads website to upload new - /// videos. To upload image, run UploadImage.cs. - /// - public class GetAllVideosAndImages : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAllVideosAndImages codeExample = new GetAllVideosAndImages(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets all videos and images. Use the Google Ads " + - "website to upload new videos. To upload image, run UploadImage.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - // Create a selector. - Selector selector = new Selector() - { - fields = new string[] - { - Media.Fields.MediaId, - Dimensions.Fields.Width, - Dimensions.Fields.Height, - Media.Fields.MimeType - }, - predicates = new Predicate[] - { - Predicate.In(Media.Fields.Type, new string[] - { - MediaMediaType.VIDEO.ToString(), - MediaMediaType.IMAGE.ToString() - }) - }, - paging = Paging.Default - }; - MediaPage page = new MediaPage(); - - try - { - do - { - page = mediaService.get(selector); - - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - - foreach (Media media in page.entries) - { - if (media is Video) - { - Video video = (Video) media; - Console.WriteLine( - "{0}) Video with id '{1}' and name '{2}' was found.", i + 1, - video.mediaId, video.name); - } - else if (media is Image) - { - Image image = (Image) media; - Dictionary dimensions = - image.dimensions.ToDict(); - Console.WriteLine( - "{0}) Image with id '{1}', dimensions '{2}x{3}', and " + - "MIME type '{4}' was found.", i + 1, image.mediaId, - dimensions[MediaSize.FULL].width, - dimensions[MediaSize.FULL].height, image.mimeType); - } - - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of images and videos found: {0}", - page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get images and videos.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Miscellaneous/UploadImage.cs b/examples/AdWords/CSharp/v201806/Miscellaneous/UploadImage.cs deleted file mode 100755 index d11e9694f15..00000000000 --- a/examples/AdWords/CSharp/v201806/Miscellaneous/UploadImage.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example uploads an image. To get images, run GetAllVideosAndImages.cs. - /// - public class UploadImage : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UploadImage codeExample = new UploadImage(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example uploads an image. To get images, " + - "run GetAllVideosAndImages.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - // Create the image. - Image image = new Image - { - data = MediaUtilities.GetAssetDataFromUrl("https://goo.gl/3b9Wfh", user.Config), - type = MediaMediaType.IMAGE - }; - - try - { - // Upload the image. - Media[] result = mediaService.upload(new Media[] - { - image - }); - - // Display the results. - if (result != null && result.Length > 0) - { - Media newImage = result[0]; - Dictionary dimensions = newImage.dimensions.ToDict(); - Console.WriteLine( - "Image with id '{0}', dimensions '{1}x{2}', and MIME type '{3}'" + - " was uploaded.", newImage.mediaId, dimensions[MediaSize.FULL].width, - dimensions[MediaSize.FULL].height, newImage.mimeType); - } - else - { - Console.WriteLine("No images were uploaded."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to upload image.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Miscellaneous/UploadImageAsset.cs b/examples/AdWords/CSharp/v201806/Miscellaneous/UploadImageAsset.cs deleted file mode 100755 index c29e33710e4..00000000000 --- a/examples/AdWords/CSharp/v201806/Miscellaneous/UploadImageAsset.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example uploads an image asset. To get images, run GetAllImageAssets.cs. - /// - public class UploadImageAsset : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UploadImageAsset codeExample = new UploadImageAsset(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example uploads an image asset. To get images, run " + - "GetAllImageAssets.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (AssetService assetService = - (AssetService) user.GetService(AdWordsService.v201806.AssetService)) - { - // Create the image asset. - ImageAsset imageAsset = new ImageAsset() - { - // Optional: Provide a unique friendly name to identify your asset. If you - // specify the assetName field, then both the asset name and the image being - // uploaded should be unique, and should not match another ACTIVE asset in this - // customer account. - // assetName = "Jupiter Trip " + ExampleUtilities.GetRandomString(), - imageData = - MediaUtilities.GetAssetDataFromUrl("https://goo.gl/3b9Wfh", user.Config), - }; - - // Create the operation. - AssetOperation operation = new AssetOperation() - { - @operator = Operator.ADD, - operand = imageAsset - }; - - try - { - // Create the asset. - AssetReturnValue result = assetService.mutate(new AssetOperation[] - { - operation - }); - - // Display the results. - if (result != null && result.value != null && result.value.Length > 0) - { - Asset newAsset = result.value[0]; - - Console.WriteLine("Image asset with id = '{0}' and name = {1} was created.", - newAsset.assetId, newAsset.assetName); - } - else - { - Console.WriteLine("No image asset was created."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create image asset.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Miscellaneous/UploadMediaBundle.cs b/examples/AdWords/CSharp/v201806/Miscellaneous/UploadMediaBundle.cs deleted file mode 100755 index e7078cab5f7..00000000000 --- a/examples/AdWords/CSharp/v201806/Miscellaneous/UploadMediaBundle.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example uploads an HTML5 zip file. - /// - public class UploadMediaBundle : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UploadMediaBundle codeExample = new UploadMediaBundle(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This example uploads an HTML5 zip file."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - try - { - // Create HTML5 media. - byte[] html5Zip = - MediaUtilities.GetAssetDataFromUrl("https://goo.gl/9Y7qI2", user.Config); - // Create a media bundle containing the zip file with all the HTML5 components. - Media[] mediaBundle = new Media[] - { - new MediaBundle() - { - data = html5Zip, - type = MediaMediaType.MEDIA_BUNDLE - } - }; - - // Upload HTML5 zip. - mediaBundle = mediaService.upload(mediaBundle); - - // Display HTML5 zip. - if (mediaBundle != null && mediaBundle.Length > 0) - { - Media newBundle = mediaBundle[0]; - Dictionary - dimensions = newBundle.dimensions.ToDict(); - Console.WriteLine( - "HTML5 media with id \"{0}\", dimensions \"{1}x{2}\", and MIME type " + - "\"{3}\" was uploaded.", newBundle.mediaId, - dimensions[MediaSize.FULL].width, dimensions[MediaSize.FULL].height, - newBundle.mimeType); - } - else - { - Console.WriteLine("No HTML5 zip was uploaded."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to upload HTML5 zip file.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Optimization/EstimateKeywordTraffic.cs b/examples/AdWords/CSharp/v201806/Optimization/EstimateKeywordTraffic.cs deleted file mode 100755 index 849dc46bbe1..00000000000 --- a/examples/AdWords/CSharp/v201806/Optimization/EstimateKeywordTraffic.cs +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets keyword traffic estimates. - /// - public class EstimateKeywordTraffic : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - EstimateKeywordTraffic codeExample = new EstimateKeywordTraffic(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example gets keyword traffic estimates."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (TrafficEstimatorService trafficEstimatorService = - (TrafficEstimatorService) user.GetService(AdWordsService.v201806 - .TrafficEstimatorService)) - { - // Create keywords. Refer to the TrafficEstimatorService documentation for the - // maximum number of keywords that can be passed in a single request. - // https://developers.google.com/adwords/api/docs/reference/latest/TrafficEstimatorService - Keyword keyword1 = new Keyword - { - text = "mars cruise", - matchType = KeywordMatchType.BROAD - }; - - Keyword keyword2 = new Keyword - { - text = "cheap cruise", - matchType = KeywordMatchType.PHRASE - }; - - Keyword keyword3 = new Keyword - { - text = "cruise", - matchType = KeywordMatchType.EXACT - }; - - Keyword[] keywords = new Keyword[] - { - keyword1, - keyword2, - keyword3 - }; - - // Create a keyword estimate request for each keyword. - List keywordEstimateRequests = - new List(); - - foreach (Keyword keyword in keywords) - { - KeywordEstimateRequest keywordEstimateRequest = new KeywordEstimateRequest - { - keyword = keyword - }; - keywordEstimateRequests.Add(keywordEstimateRequest); - } - - // Create negative keywords. - Keyword negativeKeyword1 = new Keyword - { - text = "moon walk", - matchType = KeywordMatchType.BROAD - }; - - KeywordEstimateRequest negativeKeywordEstimateRequest = new KeywordEstimateRequest - { - keyword = negativeKeyword1, - isNegative = true - }; - keywordEstimateRequests.Add(negativeKeywordEstimateRequest); - - // Create ad group estimate requests. - AdGroupEstimateRequest adGroupEstimateRequest = new AdGroupEstimateRequest - { - keywordEstimateRequests = keywordEstimateRequests.ToArray(), - maxCpc = new Money - { - microAmount = 1000000 - } - }; - - // Create campaign estimate requests. - CampaignEstimateRequest campaignEstimateRequest = new CampaignEstimateRequest - { - adGroupEstimateRequests = new AdGroupEstimateRequest[] - { - adGroupEstimateRequest - } - }; - - // Optional: Set additional criteria for filtering estimates. - // See http://code.google.com/apis/adwords/docs/appendix/countrycodes.html - // for a detailed list of country codes. - Location countryCriterion = new Location - { - id = 2840 //US - }; - - // See http://code.google.com/apis/adwords/docs/appendix/languagecodes.html - // for a detailed list of language codes. - Language languageCriterion = new Language - { - id = 1000 //en - }; - - campaignEstimateRequest.criteria = new Criterion[] - { - countryCriterion, - languageCriterion - }; - - try - { - // Create the selector. - TrafficEstimatorSelector selector = new TrafficEstimatorSelector() - { - campaignEstimateRequests = new CampaignEstimateRequest[] - { - campaignEstimateRequest - }, - - // Optional: Request a list of campaign level estimates segmented by - // platform. - platformEstimateRequested = true - }; - - // Get traffic estimates. - TrafficEstimatorResult result = trafficEstimatorService.get(selector); - - // Display traffic estimates. - if (result != null && result.campaignEstimates != null && - result.campaignEstimates.Length > 0) - { - CampaignEstimate campaignEstimate = result.campaignEstimates[0]; - - // Display the campaign level estimates segmented by platform. - if (campaignEstimate.platformEstimates != null) - { - foreach (PlatformCampaignEstimate platformEstimate in campaignEstimate - .platformEstimates) - { - string platformMessage = string.Format( - "Results for the platform with ID: " + "{0} and name : {1}.", - platformEstimate.platform.id, - platformEstimate.platform.platformName); - - DisplayMeanEstimates(platformMessage, platformEstimate.minEstimate, - platformEstimate.maxEstimate); - } - } - - // Display the keyword estimates. - if (campaignEstimate.adGroupEstimates != null && - campaignEstimate.adGroupEstimates.Length > 0) - { - AdGroupEstimate adGroupEstimate = campaignEstimate.adGroupEstimates[0]; - - if (adGroupEstimate.keywordEstimates != null) - { - for (int i = 0; i < adGroupEstimate.keywordEstimates.Length; i++) - { - Keyword keyword = keywordEstimateRequests[i].keyword; - KeywordEstimate keywordEstimate = - adGroupEstimate.keywordEstimates[i]; - - if (keywordEstimateRequests[i].isNegative) - { - continue; - } - - string kwdMessage = string.Format( - "Results for the keyword with text = '{0}' " + - "and match type = '{1}':", keyword.text, keyword.matchType); - DisplayMeanEstimates(kwdMessage, keywordEstimate.min, - keywordEstimate.max); - } - } - } - } - else - { - Console.WriteLine("No traffic estimates were returned."); - } - - trafficEstimatorService.Close(); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve traffic estimates.", - e); - } - } - } - - /// - /// Displays the mean estimates. - /// - /// The message to display. - /// The minimum stats estimate. - /// The maximum stats estimate. - private void DisplayMeanEstimates(string message, StatsEstimate minEstimate, - StatsEstimate maxEstimate) - { - // Find the mean of the min and max values. - long meanAverageCpc = 0; - double meanAveragePosition = 0; - float meanClicks = 0; - long meanTotalCost = 0; - - if (minEstimate != null && maxEstimate != null) - { - if (minEstimate.averageCpc != null && maxEstimate.averageCpc != null) - { - meanAverageCpc = (minEstimate.averageCpc.microAmount + - maxEstimate.averageCpc.microAmount) / 2; - } - - if (minEstimate.averagePositionSpecified && maxEstimate.averagePositionSpecified) - { - meanAveragePosition = - (minEstimate.averagePosition + maxEstimate.averagePosition) / 2; - } - - if (minEstimate.clicksPerDaySpecified && maxEstimate.clicksPerDaySpecified) - { - meanClicks = (minEstimate.clicksPerDay + maxEstimate.clicksPerDay) / 2; - } - - if (minEstimate.totalCost != null && maxEstimate.totalCost != null) - { - meanTotalCost = (minEstimate.totalCost.microAmount + - maxEstimate.totalCost.microAmount) / 2; - } - } - - Console.WriteLine(message); - Console.WriteLine(" Estimated average CPC: {0}", meanAverageCpc); - Console.WriteLine(" Estimated ad position: {0:0.00}", meanAveragePosition); - Console.WriteLine(" Estimated daily clicks: {0}", meanClicks); - Console.WriteLine(" Estimated daily cost: {0}", meanTotalCost); - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Optimization/GetAdGroupBidSimulations.cs b/examples/AdWords/CSharp/v201806/Optimization/GetAdGroupBidSimulations.cs deleted file mode 100755 index 0077c5d073b..00000000000 --- a/examples/AdWords/CSharp/v201806/Optimization/GetAdGroupBidSimulations.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets bid landscapes for an ad group. To get ad groups, - /// run GetAdGroups.cs. - /// - public class GetAdGroupBidSimulations : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetAdGroupBidSimulations codeExample = new GetAdGroupBidSimulations(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets bid landscapes for an ad group. " + - "To get ad groups, run GetAdGroups.cs"; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group for which bid simulations are - /// retrieved. - public void Run(AdWordsUser user, long adGroupId) - { - using (DataService dataService = - (DataService) user.GetService(AdWordsService.v201806.DataService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - AdGroupBidLandscape.Fields.AdGroupId, - AdGroupBidLandscape.Fields.LandscapeType, - AdGroupBidLandscape.Fields.LandscapeCurrent, - AdGroupBidLandscape.Fields.StartDate, - AdGroupBidLandscape.Fields.EndDate, - BidLandscapeLandscapePoint.Fields.Bid, - BidLandscapeLandscapePoint.Fields.LocalClicks, - BidLandscapeLandscapePoint.Fields.LocalCost, - BidLandscapeLandscapePoint.Fields.LocalImpressions - }, - predicates = new Predicate[] - { - Predicate.Equals(AdGroupBidLandscape.Fields.AdGroupId, adGroupId) - } - }; - - try - { - // Get bid landscape for ad group. - AdGroupBidLandscapePage page = dataService.getAdGroupBidLandscape(selector); - if (page != null && page.entries != null && page.entries.Length > 0) - { - foreach (AdGroupBidLandscape bidLandscape in page.entries) - { - Console.WriteLine( - "Found ad group bid landscape with ad group id '{0}', " + - "type '{1}', current: '{2}', start date '{3}', " + - "end date '{4}', and landscape points", - bidLandscape.adGroupId, bidLandscape.type, - bidLandscape.landscapeCurrent, bidLandscape.startDate, - bidLandscape.endDate); - foreach (BidLandscapeLandscapePoint point in bidLandscape - .landscapePoints) - { - Console.WriteLine( - "- bid: {0} => clicks: {1}, cost: {2}, impressions: {3}", - point.bid.microAmount, point.clicks, point.cost.microAmount, - point.impressions); - } - } - } - else - { - Console.WriteLine("No ad group bid landscapes were found."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get ad group bid landscapes.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.cs b/examples/AdWords/CSharp/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.cs deleted file mode 100755 index 31fd020c37c..00000000000 --- a/examples/AdWords/CSharp/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets all available campaign mobile bid modifier - /// landscapes for a given campaign. To get campaigns, run GetCampaigns.cs. - /// - public class GetCampaignCriterionBidModifierSimulations : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetCampaignCriterionBidModifierSimulations codeExample = - new GetCampaignCriterionBidModifierSimulations(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets all available campaign mobile bid modifier " + - "landscapes for a given campaign. To get campaigns, run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign for which bid simulations are - /// retrieved. - public void Run(AdWordsUser user, long campaignId) - { - using (DataService dataService = - (DataService) user.GetService(AdWordsService.v201806.DataService)) - { - // Create selector. - Selector selector = new Selector() - { - fields = new string[] - { - CriterionBidLandscape.Fields.CampaignId, - CriterionBidLandscape.Fields.CriterionId, - CriterionBidLandscape.Fields.StartDate, - CriterionBidLandscape.Fields.EndDate, - BidLandscapeLandscapePoint.Fields.LocalClicks, - BidLandscapeLandscapePoint.Fields.LocalCost, - BidLandscapeLandscapePoint.Fields.LocalImpressions, - BidLandscapeLandscapePoint.Fields.TotalLocalClicks, - BidLandscapeLandscapePoint.Fields.TotalLocalCost, - BidLandscapeLandscapePoint.Fields.TotalLocalImpressions, - BidLandscapeLandscapePoint.Fields.RequiredBudget, - BidLandscapeLandscapePoint.Fields.BidModifier, - }, - predicates = new Predicate[] - { - Predicate.Equals(CriterionBidLandscape.Fields.CampaignId, campaignId) - }, - paging = Paging.Default - }; - - int landscapePointsInLastResponse = 0; - int landscapePointsFound = 0; - - try - { - CriterionBidLandscapePage page = null; - - do - { - // When retrieving bid landscape, page.totalNumEntities cannot be used to - // determine if there are more entries, since it shows only the total number - // of bid landscapes and not the number of bid landscape points. So you need - // to iterate until you no longer get back any bid landscapes. - - // Get bid landscape for campaign. - page = dataService.getCampaignCriterionBidLandscape(selector); - - landscapePointsInLastResponse = 0; - - if (page != null && page.entries != null) - { - foreach (CriterionBidLandscape bidLandscape in page.entries) - { - Console.WriteLine( - "Found campaign-level criterion bid modifier landscapes for " + - "criterion with ID {0}, start date '{1}', end date '{2}', " + - "and landscape points:",bidLandscape.criterionId, - bidLandscape.startDate, bidLandscape.endDate); - - foreach (BidLandscapeLandscapePoint point in bidLandscape - .landscapePoints) - { - Console.WriteLine( - "- bid modifier: {0:0.00} => clicks: {1}, cost: {2}, " + - "impressions: {3}, total clicks: {4}, total cost: {5}, " + - "total impressions: {6}, and required budget: {7}", - point.bidModifier, point.clicks, point.cost.microAmount, - point.impressions, point.totalLocalClicks, - point.totalLocalCost.microAmount, - point.totalLocalImpressions, - point.requiredBudget.microAmount); - landscapePointsInLastResponse++; - landscapePointsFound++; - } - } - } - - // Offset by the number of landscape points, NOT the number - // of entries (bid landscapes) in the last response. - selector.paging.IncreaseOffsetBy(landscapePointsInLastResponse); - } while (landscapePointsInLastResponse > 0); - - Console.WriteLine("Number of bid landscape points found: {0}", - landscapePointsFound); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get campaign bid landscapes.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Optimization/GetKeywordBidSimulations.cs b/examples/AdWords/CSharp/v201806/Optimization/GetKeywordBidSimulations.cs deleted file mode 100755 index d9a7c85c208..00000000000 --- a/examples/AdWords/CSharp/v201806/Optimization/GetKeywordBidSimulations.cs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets a bid landscape for an ad group and a keyword. - /// To get ad groups, run GetAdGroups.cs. To get keywords, run - /// GetKeywords.cs. - /// - public class GetKeywordBidSimulations : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetKeywordBidSimulations codeExample = new GetKeywordBidSimulations(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - long keywordId = long.Parse("INSERT_KEYWORD_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId, keywordId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets a bid landscape for an ad group and a keyword. " + - "To get ad groups, run GetAdGroups.cs. To get keywords, run GetKeywords.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the ad group for which keyword bid - /// simulations are retrieved. - /// Id of the keyword for which bid simulations are - /// retrieved. - public void Run(AdWordsUser user, long adGroupId, long keywordId) - { - using (DataService dataService = - (DataService) user.GetService(AdWordsService.v201806.DataService)) - { - - // Create the query. - SelectQuery query = new SelectQueryBuilder() - .Select(CriterionBidLandscape.Fields.AdGroupId, - CriterionBidLandscape.Fields.CriterionId, - CriterionBidLandscape.Fields.StartDate, - CriterionBidLandscape.Fields.EndDate, - BidLandscapeLandscapePoint.Fields.Bid, - BidLandscapeLandscapePoint.Fields.LocalClicks, - BidLandscapeLandscapePoint.Fields.LocalCost, - BidLandscapeLandscapePoint.Fields.LocalImpressions, - BidLandscapeLandscapePoint.Fields.BiddableConversions, - BidLandscapeLandscapePoint.Fields.BiddableConversionsValue) - .Where(CriterionBidLandscape.Fields.AdGroupId).Equals(adGroupId) - .Where(CriterionBidLandscape.Fields.CriterionId).Equals(keywordId) - .DefaultLimit().Build(); - - CriterionBidLandscapePage page = new CriterionBidLandscapePage(); - int landscapePointsFound = 0; - - try - { - do - { - // Get bid landscape for keywords. - page = dataService.queryCriterionBidLandscape(query); - - // Display bid landscapes. - if (page != null && page.entries != null) - { - foreach (CriterionBidLandscape bidLandscape in page.entries) - { - Console.WriteLine( - "Found criterion bid landscape with ad group id '{0}', " + - "keyword id '{1}', start date '{2}', end date '{3}', and " + - "landscape points:", - bidLandscape.adGroupId, bidLandscape.criterionId, - bidLandscape.startDate, bidLandscape.endDate); - foreach (BidLandscapeLandscapePoint bidLandscapePoint in - bidLandscape.landscapePoints) - { - Console.WriteLine( - "- bid: {0} => clicks: {1}, cost: {2}, impressions: {3}, " + - "biddable conversions: {4:0.00}, biddable conversions " + - "value:{5:0.00}", - bidLandscapePoint.bid.microAmount, bidLandscapePoint.clicks, - bidLandscapePoint.cost.microAmount, - bidLandscapePoint.impressions, - bidLandscapePoint.biddableConversions, - bidLandscapePoint.biddableConversionsValue); - landscapePointsFound++; - } - } - } - - query.NextPage(page); - } while (query.HasNextPage(page)); - - Console.WriteLine("Number of keyword bid landscape points found: {0}", - landscapePointsFound); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to retrieve keyword bid landscapes.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Optimization/GetKeywordIdeas.cs b/examples/AdWords/CSharp/v201806/Optimization/GetKeywordIdeas.cs deleted file mode 100755 index f7cf1fc6935..00000000000 --- a/examples/AdWords/CSharp/v201806/Optimization/GetKeywordIdeas.cs +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example retrieves keywords that are related to a given keyword. - /// - public class GetKeywordIdeas : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetKeywordIdeas codeExample = new GetKeywordIdeas(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example retrieves keywords that are related to a given keyword."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// ID of the ad group to use for generating ideas. - public void Run(AdWordsUser user, long? adGroupId) - { - using (TargetingIdeaService targetingIdeaService = - (TargetingIdeaService) user.GetService(AdWordsService.v201806.TargetingIdeaService)) - { - // Create selector. - TargetingIdeaSelector selector = new TargetingIdeaSelector - { - requestType = RequestType.IDEAS, - ideaType = IdeaType.KEYWORD, - requestedAttributeTypes = new AttributeType[] - { - AttributeType.KEYWORD_TEXT, - AttributeType.SEARCH_VOLUME, - AttributeType.AVERAGE_CPC, - AttributeType.COMPETITION, - AttributeType.CATEGORY_PRODUCTS_AND_SERVICES - } - }; - - - List searchParameters = new List(); - - // Create related to query search parameter. - RelatedToQuerySearchParameter relatedToQuerySearchParameter = - new RelatedToQuerySearchParameter - { - queries = new string[] - { - "bakery", - "pastries", - "birthday cake" - } - }; - searchParameters.Add(relatedToQuerySearchParameter); - - // Add a language search parameter (optional). - // The ID can be found in the documentation: - // https://developers.google.com/adwords/api/docs/appendix/languagecodes - LanguageSearchParameter languageParameter = new LanguageSearchParameter(); - Language english = new Language - { - id = 1000 - }; - languageParameter.languages = new Language[] - { - english - }; - searchParameters.Add(languageParameter); - - // Add network search parameter (optional). - NetworkSetting networkSetting = new NetworkSetting - { - targetGoogleSearch = true, - targetSearchNetwork = false, - targetContentNetwork = false, - targetPartnerSearchNetwork = false - }; - - NetworkSearchParameter networkSearchParameter = new NetworkSearchParameter - { - networkSetting = networkSetting - }; - searchParameters.Add(networkSearchParameter); - - // Optional: Use an existing ad group to generate ideas. - if (adGroupId != null) - { - SeedAdGroupIdSearchParameter seedAdGroupIdSearchParameter = - new SeedAdGroupIdSearchParameter - { - adGroupId = adGroupId.Value - }; - searchParameters.Add(seedAdGroupIdSearchParameter); - } - - // Set the search parameters. - selector.searchParameters = searchParameters.ToArray(); - - // Set selector paging (required for targeting idea service). - selector.paging = Paging.Default; - - TargetingIdeaPage page = new TargetingIdeaPage(); - - try - { - int i = 0; - do - { - // Get related keywords. - page = targetingIdeaService.get(selector); - - // Display related keywords. - if (page.entries != null && page.entries.Length > 0) - { - foreach (TargetingIdea targetingIdea in page.entries) - { - Dictionary - ideas = targetingIdea.data.ToDict(); - - string keyword = - (ideas[AttributeType.KEYWORD_TEXT] as StringAttribute).value; - IntegerSetAttribute categorySet = - ideas[AttributeType.CATEGORY_PRODUCTS_AND_SERVICES] as - IntegerSetAttribute; - - string categories = ""; - - if (categorySet != null && categorySet.value != null) - { - categories = string.Join(", ", categorySet.value); - } - - long averageMonthlySearches = - (ideas[AttributeType.SEARCH_VOLUME] as LongAttribute).value; - - Money averageCpc = - (ideas[AttributeType.AVERAGE_CPC] as MoneyAttribute).value; - double competition = - (ideas[AttributeType.COMPETITION] as DoubleAttribute).value; - Console.WriteLine( - "Keyword with text '{0}', average monthly search volume {1}, " + - "average CPC {2}, and competition {3:F2} was found with " + - "categories: {4}", keyword, averageMonthlySearches, - averageCpc?.microAmount, competition, categories); - - Console.WriteLine( - "Keyword with text '{0}', and average monthly search volume " + - "'{1}' was found with categories: {2}", keyword, - averageMonthlySearches, categories); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of related keywords found: {0}", - page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to retrieve related keywords.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/AddAudience.cs b/examples/AdWords/CSharp/v201806/Remarketing/AddAudience.cs deleted file mode 100755 index d5ab2663e49..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/AddAudience.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to create a user list a.k.a. audience. - /// - public class AddAudience : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddAudience codeExample = new AddAudience(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to create a user list a.k.a. audience."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (AdwordsUserListService userListService = - (AdwordsUserListService) user.GetService(AdWordsService.v201806 - .AdwordsUserListService)) - using (ConversionTrackerService conversionTrackerService = - (ConversionTrackerService) user.GetService(AdWordsService.v201806 - .ConversionTrackerService)) - { - BasicUserList userList = new BasicUserList - { - name = "Mars cruise customers #" + ExampleUtilities.GetRandomString(), - description = "A list of mars cruise customers in the last year.", - status = UserListMembershipStatus.OPEN, - membershipLifeSpan = 365 - }; - - UserListConversionType conversionType = new UserListConversionType - { - name = userList.name - }; - userList.conversionTypes = new UserListConversionType[] - { - conversionType - }; - - // Optional: Set the user list status. - userList.status = UserListMembershipStatus.OPEN; - - // Create the operation. - UserListOperation operation = new UserListOperation - { - operand = userList, - @operator = Operator.ADD - }; - - try - { - // Add the user list. - UserListReturnValue retval = userListService.mutate(new UserListOperation[] - { - operation - }); - - UserList newUserList = retval.value[0]; - - Console.WriteLine("User list with name '{0}' and id '{1}' was added.", - newUserList.name, newUserList.id); - - List conversionIds = new List(); - Array.ForEach(userList.conversionTypes, - delegate(UserListConversionType item) - { - conversionIds.Add(item.id.ToString()); - }); - - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - ConversionTracker.Fields.Id, - ConversionTracker.Fields.GoogleGlobalSiteTag, - ConversionTracker.Fields.GoogleEventSnippet - }, - predicates = new Predicate[] - { - Predicate.In(ConversionTracker.Fields.Id, conversionIds.ToArray()) - } - }; - - // Get all conversion trackers. - ConversionTrackerPage page = conversionTrackerService.get(selector); - - if (page != null && page.entries != null) - { - foreach (ConversionTracker tracker in page.entries) - { - Console.WriteLine( - "Google global site tag:\n{0}\nGoogle event snippet:\n{1}", - tracker.googleGlobalSiteTag, tracker.googleGlobalSiteTag); - } - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to add user lists (a.k.a. audiences).", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/AddConversionTrackers.cs b/examples/AdWords/CSharp/v201806/Remarketing/AddConversionTrackers.cs deleted file mode 100755 index 3262de76e5e..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/AddConversionTrackers.cs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds an AdWords conversion tracker and an upload conversion tracker. - /// - public class AddConversionTrackers : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddConversionTrackers codeExample = new AddConversionTrackers(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds an AdWords conversion tracker and an upload " + - "conversion tracker."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (ConversionTrackerService conversionTrackerService = - (ConversionTrackerService) user.GetService(AdWordsService.v201806 - .ConversionTrackerService)) - { - List conversionTrackers = new List(); - - // Create an Adwords conversion tracker. - AdWordsConversionTracker adWordsConversionTracker = new AdWordsConversionTracker - { - name = - "Earth to Mars Cruises Conversion #" + ExampleUtilities.GetRandomString(), - category = ConversionTrackerCategory.DEFAULT, - - // Set optional fields. - status = ConversionTrackerStatus.ENABLED, - viewthroughLookbackWindow = 15, - defaultRevenueValue = 23.41, - alwaysUseDefaultRevenueValue = true - }; - conversionTrackers.Add(adWordsConversionTracker); - - // Create an upload conversion for offline conversion imports. - UploadConversion uploadConversion = new UploadConversion - { - // Set an appropriate category. This field is optional, and will be set to - // DEFAULT if not mentioned. - category = ConversionTrackerCategory.LEAD, - name = "Upload Conversion #" + ExampleUtilities.GetRandomString(), - viewthroughLookbackWindow = 30, - ctcLookbackWindow = 90, - - // Optional: Set the default currency code to use for conversions - // that do not specify a conversion currency. This must be an ISO 4217 - // 3-character currency code such as "EUR" or "USD". - // If this field is not set on this UploadConversion, AdWords will use - // the account's currency. - defaultRevenueCurrencyCode = "EUR", - - // Optional: Set the default revenue value to use for conversions - // that do not specify a conversion value. Note that this value - // should NOT be in micros. - defaultRevenueValue = 2.50 - }; - - // Optional: To upload fractional conversion credits, mark the upload conversion - // as externally attributed. See - // https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions - // to learn more about importing externally attributed conversions. - - // uploadConversion.isExternallyAttributed = true; - - conversionTrackers.Add(uploadConversion); - - try - { - // Create operations. - List operations = - new List(); - foreach (ConversionTracker conversionTracker in conversionTrackers) - { - operations.Add(new ConversionTrackerOperation() - { - @operator = Operator.ADD, - operand = conversionTracker - }); - } - - // Add conversion tracker. - ConversionTrackerReturnValue retval = - conversionTrackerService.mutate(operations.ToArray()); - - // Display the results. - if (retval != null && retval.value != null) - { - foreach (ConversionTracker conversionTracker in retval.value) - { - Console.WriteLine( - "Conversion with ID {0}, name '{1}', status '{2}' and " + - "category '{3}' was added.", conversionTracker.id, - conversionTracker.name, conversionTracker.status, - conversionTracker.category); - if (conversionTracker is AdWordsConversionTracker) - { - AdWordsConversionTracker newAdWordsConversionTracker = - (AdWordsConversionTracker) conversionTracker; - Console.WriteLine( - "Google global site tag:\n{0}\nGoogle event snippet:\n{1}", - newAdWordsConversionTracker.googleGlobalSiteTag, - newAdWordsConversionTracker.googleEventSnippet); - } - } - } - else - { - Console.WriteLine("No conversion trackers were added."); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add conversion trackers.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/AddCrmBasedUserList.cs b/examples/AdWords/CSharp/v201806/Remarketing/AddCrmBasedUserList.cs deleted file mode 100755 index c5f1fda2911..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/AddCrmBasedUserList.cs +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Security.Cryptography; -using System.Text; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a user list (a.k.a. audience) and uploads hashed - /// email addresses to populate the list. - /// - ///

- /// Note: It may take up to several hours for the list to be - /// populated with members. Email addresses must be associated with a Google - /// account. For privacy purposes, the user list size will show as zero until - /// the list has at least 1000 members. After that, the size will be rounded - /// to the two most significant digits. - ///

- ///
- public class AddCrmBasedUserList : ExampleBase - { - private static readonly string[] EMAILS = new string[] - { - "customer1@example.com", - "customer2@example.com", - " Customer3@example.com " - }; - - private const string FIRST_NAME = "John"; - private const string LAST_NAME = "Doe"; - private const string COUNTRY_CODE = "US"; - private const string ZIP_CODE = "10001"; - - private SHA256 digest = SHA256.Create(); - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCrmBasedUserList codeExample = new AddCrmBasedUserList(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds a user list (a.k.a. audience) and " + - "uploads hashed email addresses to populate the list."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (AdwordsUserListService userListService = - (AdwordsUserListService) user.GetService(AdWordsService.v201806 - .AdwordsUserListService)) - { - // Create a user list. - CrmBasedUserList userList = new CrmBasedUserList() - { - name = "Customer relationship management list #" + - ExampleUtilities.GetRandomString(), - description = "A list of customers that originated from email addresses", - - // CRM - based user lists can use a membershipLifeSpan of 10000 to indicate - // unlimited; otherwise normal values apply. - membershipLifeSpan = 30L, - uploadKeyType = CustomerMatchUploadKeyType.CONTACT_INFO - }; - - // Create operation. - UserListOperation operation = new UserListOperation() - { - operand = userList, - @operator = Operator.ADD - }; - - try - { - // Add user list. - UserListReturnValue result = userListService.mutate(new UserListOperation[] - { - operation - }); - - Console.WriteLine( - "Created new user list with name = '{0}' and id = " + "'{1}'.", - result.value[0].name, result.value[0].id); - - // Get user list ID. - long userListId = result.value[0].id; - - // Prepare the emails for upload. - List memberList = new List(); - - // Hash normalized email addresses based on SHA-256 hashing algorithm. - string[] emailHashes = new string[EMAILS.Length]; - for (int i = 0; i < EMAILS.Length; i++) - { - Member member = new Member - { - hashedEmail = ToSha256String(digest, ToNormalizedEmail(EMAILS[i])) - }; - memberList.Add(member); - } - - ; - - // Add a user by first and last name. - AddressInfo addressInfo = new AddressInfo - { - // First and last name must be normalized and hashed. - hashedFirstName = ToSha256String(digest, FIRST_NAME), - hashedLastName = ToSha256String(digest, LAST_NAME), - // Country code and zip code are sent in plaintext. - zipCode = ZIP_CODE, - countryCode = COUNTRY_CODE - }; - - Member memberByAddress = new Member - { - addressInfo = addressInfo - }; - memberList.Add(memberByAddress); - - // Create operation to add members to the user list based on email - // addresses. - MutateMembersOperation mutateMembersOperation = new MutateMembersOperation() - { - operand = new MutateMembersOperand() - { - userListId = userListId, - membersList = memberList.ToArray() - }, - @operator = Operator.ADD - }; - - // Add members to the user list based on email addresses. - MutateMembersReturnValue mutateMembersResult = userListService.mutateMembers( - new MutateMembersOperation[] - { - mutateMembersOperation - }); - - // Display results. - // Reminder: it may take several hours for the list to be populated - // with members. - foreach (UserList userListResult in mutateMembersResult.userLists) - { - Console.WriteLine( - "Email addresses were added to user list with " + - "name '{0}' and id '{1}'.", userListResult.name, userListResult.id); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to add user lists " + - "(a.k.a. audiences) and upload email addresses.", e); - } - } - } - - /// - /// Hash email address using SHA-256 hashing algorithm. - /// - /// Provides the algorithm for SHA-256. - /// The email address to hash. - /// Hash email address using SHA-256 hashing algorithm. - private static string ToSha256String(SHA256 digest, string email) - { - byte[] digestBytes = digest.ComputeHash(Encoding.UTF8.GetBytes(email)); - // Convert the byte array into an unhyphenated hexadecimal string. - return BitConverter.ToString(digestBytes).Replace("-", string.Empty); - } - - /// - /// Removes leading and trailing whitespace and converts all characters to - /// lower case. - /// - /// The email address to normalize. - /// A normalized copy of the string. - private static string ToNormalizedEmail(string email) - { - return email.Trim().ToLower(); - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/AddRuleBasedRemarketingList.cs b/examples/AdWords/CSharp/v201806/Remarketing/AddRuleBasedRemarketingList.cs deleted file mode 100755 index caf43d92795..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/AddRuleBasedRemarketingList.cs +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds two rule-based remarketing user lists: one with no - /// site visit date restrictions, and another that will only include users - /// who visit your site in the next six months. See - /// https://developers.google.com/adwords/api/docs/guides/rule-based-remarketing - /// to learn more about rule based remarketing. - /// - public class AddRuleBasedRemarketingList : ExampleBase - { - private const string DATE_FORMAT_STRING = "yyyyMMdd"; - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddRuleBasedRemarketingList codeExample = new AddRuleBasedRemarketingList(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds two rule-based remarketing user lists: one with " + - "no site visit date restrictions, and another that will only include users " + - "who visit your site in the next six months. See " + - "https://developers.google.com/adwords/api/docs/guides/rule-based-remarketing" + - " to learn more about rule based remarketing."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (AdwordsUserListService userListService = - (AdwordsUserListService) user.GetService(AdWordsService.v201806 - .AdwordsUserListService)) - { - // First rule item group - users who visited the checkout page and had - // more than one item in their shopping cart. - StringRuleItem checkoutStringRuleItem = new StringRuleItem - { - key = new StringKey - { - name = "ecomm_pagetype" - }, - op = StringRuleItemStringOperator.EQUALS, - value = "checkout" - }; - - RuleItem checkoutRuleItem = new RuleItem - { - Item = checkoutStringRuleItem - }; - - NumberRuleItem cartSizeNumberRuleItem = new NumberRuleItem - { - key = new NumberKey - { - name = "cartsize" - }, - op = NumberRuleItemNumberOperator.GREATER_THAN, - value = 1 - }; - - RuleItem cartSizeRuleItem = new RuleItem - { - Item = cartSizeNumberRuleItem - }; - - // Combine the two rule items into a RuleItemGroup so AdWords will AND - // their rules together. - RuleItemGroup checkoutMultipleItemGroup = new RuleItemGroup - { - items = new RuleItem[] - { - checkoutRuleItem, - cartSizeRuleItem - } - }; - - // Second rule item group - users who check out within the next 3 months. - DateRuleItem startDateDateRuleItem = new DateRuleItem - { - key = new DateKey - { - name = "checkoutdate" - }, - op = DateRuleItemDateOperator.AFTER, - value = DateTime.Now.ToString(DATE_FORMAT_STRING) - }; - RuleItem startDateRuleItem = new RuleItem - { - Item = startDateDateRuleItem - }; - - DateRuleItem endDateDateRuleItem = new DateRuleItem - { - key = new DateKey - { - name = "checkoutdate" - }, - op = DateRuleItemDateOperator.BEFORE, - value = DateTime.Now.AddMonths(3).ToString(DATE_FORMAT_STRING) - }; - RuleItem endDateRuleItem = new RuleItem - { - Item = endDateDateRuleItem - }; - - // Combine the date rule items into a RuleItemGroup. - RuleItemGroup checkedOutNextThreeMonthsItemGroup = new RuleItemGroup - { - items = new RuleItem[] - { - startDateRuleItem, - endDateRuleItem - } - }; - - // Combine the rule item groups into a Rule so AdWords knows how to apply the rules. - Rule rule = new Rule - { - groups = new RuleItemGroup[] - { - checkoutMultipleItemGroup, - checkedOutNextThreeMonthsItemGroup - }, - - // ExpressionRuleUserLists can use either CNF Or DNF For matching. CNF means - // 'at least one item in each rule item group must match', and DNF means 'at - // least one entire rule item group must match'. - // DateSpecificRuleUserList only supports DNF. You can also omit the rule - // type altogether To Default To DNF. - ruleType = UserListRuleTypeEnumsEnum.DNF - }; - - // Third and fourth rule item groups. - // Visitors of a page who visited another page. See - // https://developers.google.com/adwords/api/docs/reference/latest/AdwordsUserListService.StringKey - // for more details. - StringKey urlStringKey = new StringKey() - { - name = "url__" - }; - - StringRuleItem site1StringRuleItem = new StringRuleItem - { - key = urlStringKey, - op = StringRuleItemStringOperator.EQUALS, - value = "example.com/example1" - }; - RuleItem site1RuleItem = new RuleItem - { - Item = site1StringRuleItem - }; - - StringRuleItem site2StringRuleItem = new StringRuleItem - { - key = (urlStringKey), - op = (StringRuleItemStringOperator.EQUALS), - value = ("example.com/example2") - }; - RuleItem site2RuleItem = new RuleItem - { - Item = (site2StringRuleItem) - }; - - // Create two RuleItemGroups to show that a visitor browsed two sites. - RuleItemGroup site1RuleItemGroup = new RuleItemGroup - { - items = new RuleItem[] - { - site1RuleItem - } - }; - RuleItemGroup site2RuleItemGroup = new RuleItemGroup - { - items = new RuleItem[] - { - site2RuleItem - } - }; - - // Create two rules to show that a visitor browsed two sites. - Rule userVisitedSite1Rule = new Rule - { - groups = new RuleItemGroup[] - { - site1RuleItemGroup - } - }; - - Rule userVisitedSite2Rule = new Rule - { - groups = new RuleItemGroup[] - { - site2RuleItemGroup - } - }; - - // Create the user list with no restrictions on site visit date. - ExpressionRuleUserList expressionUserList = new ExpressionRuleUserList(); - string creationTimeString = DateTime.Now.ToString("yyyyMMdd_HHmmss"); - expressionUserList.name = - "Expression based user list created at " + creationTimeString; - expressionUserList.description = "Users who checked out in three month window OR " + - "visited the checkout page with more than one item in their cart."; - expressionUserList.rule = rule; - - // Optional: Set the prepopulationStatus to REQUESTED to include past users - // in the user list. - expressionUserList.prepopulationStatus = - RuleBasedUserListPrepopulationStatus.REQUESTED; - - // Create the user list restricted to users who visit your site within - // the next six months. - DateTime startDate = DateTime.Now; - DateTime endDate = startDate.AddMonths(6); - - DateSpecificRuleUserList dateUserList = new DateSpecificRuleUserList - { - name = "Date rule user list created at " + creationTimeString, - description = string.Format( - "Users who visited the site between {0} and " + - "{1} and checked out in three month window OR visited the checkout page " + - "with more than one item in their cart.", - startDate.ToString(DATE_FORMAT_STRING), - endDate.ToString(DATE_FORMAT_STRING)), - rule = rule, - - // Set the start and end dates of the user list. - startDate = startDate.ToString(DATE_FORMAT_STRING), - endDate = endDate.ToString(DATE_FORMAT_STRING) - }; - - // Create the user list where "Visitors of a page who did visit another page". - // To create a user list where "Visitors of a page who did not visit another - // page", change the ruleOperator from AND to AND_NOT. - CombinedRuleUserList combinedRuleUserList = new CombinedRuleUserList - { - name = "Combined rule user list created at " + creationTimeString, - description = "Users who visited two sites.", - leftOperand = userVisitedSite1Rule, - rightOperand = userVisitedSite2Rule, - ruleOperator = CombinedRuleUserListRuleOperator.AND - }; - - // Create operations to add the user lists. - List operations = new List(); - foreach (UserList userList in new UserList[] - { - expressionUserList, - dateUserList, - combinedRuleUserList - }) - { - UserListOperation operation = new UserListOperation - { - operand = userList, - @operator = Operator.ADD - }; - operations.Add(operation); - } - - try - { - // Submit the operations. - UserListReturnValue result = userListService.mutate(operations.ToArray()); - - // Display the results. - foreach (UserList userListResult in result.value) - { - Console.WriteLine( - "User list added with ID {0}, name '{1}', status '{2}', " + - "list type '{3}', accountUserListStatus '{4}', description '{5}'.", - userListResult.id, userListResult.name, userListResult.status, - userListResult.listType, userListResult.accountUserListStatus, - userListResult.description); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to add rule based user lists.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineCallConversions.cs b/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineCallConversions.cs deleted file mode 100755 index 45647734a68..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineCallConversions.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example imports offline call conversion values for calls related to the - /// ads in your account. - /// - public class UploadOfflineCallConversions : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - string conversionName = "INSERT_CONVERSION_NAME_HERE"; - - // For times use the format yyyyMMdd HHmmss tz. For more details on formats, see: - // https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats - // For time zones, see: - // https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids - - // The conversion time should be after the call start time. - string conversionTime = "INSERT_CONVERSION_TIME_HERE"; - string callStartTime = "INSERT_CALL_START_TIME_HERE"; - - string callerId = "INSERT_CALLER_ID_HERE"; - double conversionValue = double.Parse("INSERT_CONVERSION_VALUE_HERE"); - - UploadOfflineCallConversions codeExample = new UploadOfflineCallConversions(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser(), conversionName, callStartTime, callerId, - conversionTime, conversionValue); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return - "This code example imports offline call conversion values for calls related " + - "to the ads in your account."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The name of the call conversion to be updated. - /// The call start time. - /// The conversion value to be uploaded. - /// The caller ID to be uploaded. - /// The conversion time, in yyyymmdd hhmmss - /// format. - public void Run(AdWordsUser user, string conversionName, string callStartTime, - string callerId, string conversionTime, double conversionValue) - { - using (OfflineCallConversionFeedService offlineCallConversionFeedService = - (OfflineCallConversionFeedService) user.GetService(AdWordsService.v201806 - .OfflineCallConversionFeedService)) - { - // Associate offline call conversions with the existing named conversion tracker. - // If this tracker was newly created, it may be a few hours before it can accept - // conversions. - OfflineCallConversionFeed feed = new OfflineCallConversionFeed - { - callerId = callerId, - callStartTime = callStartTime, - conversionName = conversionName, - conversionTime = conversionTime, - conversionValue = conversionValue - }; - - OfflineCallConversionFeedOperation offlineCallConversionOperation = - new OfflineCallConversionFeedOperation - { - @operator = Operator.ADD, - operand = feed - }; - - try - { - // This example uploads only one call conversion, but you can upload - // multiple call conversions by passing additional operations. - OfflineCallConversionFeedReturnValue offlineCallConversionReturnValue = - offlineCallConversionFeedService.mutate( - new OfflineCallConversionFeedOperation[] - { - offlineCallConversionOperation - }); - - // Display results. - foreach (OfflineCallConversionFeed feedResult in - offlineCallConversionReturnValue.value) - { - Console.WriteLine( - "Uploaded offline call conversion value of {0} for caller ID '{1}'.", - feedResult.conversionValue, feedResult.callerId); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to upload offline call conversions.", e); - } - } - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversionAdjustments.cs b/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversionAdjustments.cs deleted file mode 100755 index e2887646020..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversionAdjustments.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example demonstrates adjusting one conversion, but you can add more than one - /// operation in a single mutate request. - /// - public class UploadOfflineConversionAdjustments : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - UploadOfflineConversionAdjustments codeExample = - new UploadOfflineConversionAdjustments(); - Console.WriteLine(codeExample.Description); - try - { - string conversionName = "INSERT_CONVERSION_NAME_HERE"; - string gclid = "INSERT_GOOGLE_CLICK_ID_HERE"; - string conversionTime = "INSERT_CONVERSION_TIME_HERE"; - OfflineConversionAdjustmentType adjustmentType = - (OfflineConversionAdjustmentType) Enum.Parse( - typeof(OfflineConversionAdjustmentType), "INSERT_ADJUSTMENT_TYPE_HERE"); - string adjustmentTime = "INSERT_ADJUSTMENT_TIME_HERE"; - double adjustedValue = double.Parse("INSERT_ADJUSTED_VALUE_HERE"); - - codeExample.Run(new AdWordsUser(), conversionName, gclid, conversionTime, - adjustmentType, adjustmentTime, adjustedValue); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example demonstrates adjusting one conversion, but you can add " + - "more than one operation in a single mutate request."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Name of the conversion to make adjustments. - /// The google click ID for the adjustment. - /// The conversion time. - /// The type of conversion adjustment. - /// The conversion adjustment time. - /// The conversion adjustment value. - public void Run(AdWordsUser user, string conversionName, string gclid, - string conversionTime, OfflineConversionAdjustmentType adjustmentType, - string adjustmentTime, double adjustedValue) - { - using (OfflineConversionAdjustmentFeedService service = - (OfflineConversionAdjustmentFeedService) user.GetService(AdWordsService.v201806 - .OfflineConversionAdjustmentFeedService)) - { - // Associate conversion adjustments with the existing named conversion - // tracker. The GCLID should have been uploaded before with a - // conversion. - GclidOfflineConversionAdjustmentFeed feed = - new GclidOfflineConversionAdjustmentFeed() - { - conversionName = conversionName, - googleClickId = gclid, - conversionTime = conversionTime, - adjustmentType = adjustmentType, - adjustmentTime = adjustmentTime, - adjustedValue = adjustedValue - }; - - // Create the operation. - var operation = new OfflineConversionAdjustmentFeedOperation() - { - @operator = Operator.ADD, - operand = feed - }; - - try - { - // Issue a request to the servers for adjustments of the conversion. - OfflineConversionAdjustmentFeedReturnValue retval = service.mutate( - new OfflineConversionAdjustmentFeedOperation[] - { - operation - }); - GclidOfflineConversionAdjustmentFeed updatedFeed = - (GclidOfflineConversionAdjustmentFeed) retval.value[0]; - Console.WriteLine( - "Uploaded conversion adjustment value of '{0}' for Google " + - "Click ID '{1}'.", updatedFeed.conversionName, updatedFeed.googleClickId); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to update conversion adjustment.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversions.cs b/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversions.cs deleted file mode 100755 index 1abd12b6d88..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineConversions.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example imports offline conversion values for specific clicks to - /// your account. To get Google Click ID for a click, run - /// CLICK_PERFORMANCE_REPORT. To set up a conversion tracker, run the - /// AddConversionTrackers.cs example. - /// - public class UploadOfflineConversions : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - string conversionName = "INSERT_CONVERSION_NAME_HERE"; - // GCLID needs to be newer than 30 days. - string gClId = "INSERT_GOOGLE_CLICK_ID_HERE"; - // The conversion time should be higher than the click time. - string conversionTime = "INSERT_CONVERSION_TIME_HERE"; - double conversionValue = double.Parse("INSERT_CONVERSION_VALUE_HERE"); - - UploadOfflineConversions codeExample = new UploadOfflineConversions(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser(), conversionName, gClId, conversionTime, - conversionValue); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example imports offline conversion values for specific clicks " + - "to your account. To get Google Click ID for a click, run " + - "CLICK_PERFORMANCE_REPORT. To set up a conversion tracker, run the " + - "AddConversionTrackers.cs example."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The name of the upload conversion to be - /// created. - /// The Google Click ID of the click for which offline - /// conversions are uploaded. - /// The conversion value to be uploaded. - /// - /// The conversion time, in yyyymmdd hhmmss - /// format. - public void Run(AdWordsUser user, string conversionName, string gClid, - string conversionTime, double conversionValue) - { - using (OfflineConversionFeedService offlineConversionFeedService = - (OfflineConversionFeedService) user.GetService(AdWordsService.v201806 - .OfflineConversionFeedService)) - { - try - { - // Associate offline conversions with the existing named conversion tracker. If - // this tracker was newly created, it may be a few hours before it can accept - // conversions. - OfflineConversionFeed feed = new OfflineConversionFeed - { - conversionName = conversionName, - conversionTime = conversionTime, - conversionValue = conversionValue, - googleClickId = gClid - }; - - // Optional: To upload fractional conversion credits, set the external - // attribution model and credit. To use this feature, your conversion tracker - // should be marked as externally attributed. See - // https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions - // to learn more about importing externally attributed conversions. - - // feed.externalAttributionModel = "Linear"; - // feed.externalAttributionCredit = 0.3; - - OfflineConversionFeedOperation offlineConversionOperation = - new OfflineConversionFeedOperation - { - @operator = Operator.ADD, - operand = feed - }; - - OfflineConversionFeedReturnValue offlineConversionRetval = - offlineConversionFeedService.mutate(new OfflineConversionFeedOperation[] - { - offlineConversionOperation - }); - - OfflineConversionFeed newFeed = offlineConversionRetval.value[0]; - - Console.WriteLine( - "Uploaded offline conversion value of {0} for Google Click ID = " + - "'{1}' to '{2}'.", newFeed.conversionValue, newFeed.googleClickId, - newFeed.conversionName); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed upload offline conversions.", e); - } - } - } - - } -} diff --git a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineData.cs b/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineData.cs deleted file mode 100755 index bb9bc0c5ef2..00000000000 --- a/examples/AdWords/CSharp/v201806/Remarketing/UploadOfflineData.cs +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; -using System.Security.Cryptography; -using System.Text; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example shows how to upload offline data for store sales transactions. - /// - public class UploadOfflineData : ExampleBase - { - private SHA256 digest = SHA256.Create(); - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - // The external upload ID can be any number that you use to keep track of your uploads. - long externalUploadId = long.Parse("INSERT_EXTERNAL_UPLOAD_ID"); - - // Insert the conversion type name that you'd like to attribute this upload to. - string conversionName = "INSERT_CONVERSION_NAME"; - - // Insert email addresses below for creating user identifiers. - string[] emailAddresses = - { - "EMAIL_ADDRESS_1", - "EMAIL_ADDRESS_2" - }; - - // Insert advertiser upload time. // For times, use the format yyyyMMdd HHmmss tz. For - // more details on formats, see: - // https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats - // For time zones, see: - // https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids - string advertiserUploadTime = "INSERT_ADVERTISER_UPLOAD_TIME"; - - // Insert bridge map version ID. - string bridgeMapVersionId = "INSERT_BRIDGEMAP_VERSION_ID"; - - // Insert partner ID. - int partnerId = int.Parse("INSERT_PARTNER_ID"); - - // Specify the upload type (STORE_SALES_UPLOAD_FIRST_PARTY or - // STORE_SALES_UPLOAD_THIRD_PARTY) - OfflineDataUploadType uploadType = - (OfflineDataUploadType) Enum.Parse(typeof(OfflineDataUploadType), - "INSERT_UPLOAD_TYPE"); - - UploadOfflineData codeExample = new UploadOfflineData(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser(), conversionName, externalUploadId, emailAddresses, - advertiserUploadTime, bridgeMapVersionId, uploadType, partnerId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example shows how to upload offline data for store sales " + - "transactions."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The conversion type name that you'd like to attribute this - /// upload to. - /// The external upload ID can be any number that you use to - /// keep track of your uploads. - /// The email addresses for creating user identifiers. - /// The advertiser upload time. For times, use the format - /// yyyyMMdd HHmmss tz. For more details on formats, see: - /// https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats - /// For time zones, see: - /// https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids - /// - /// The version ID of the bridge map. - /// The type of data upload. - /// The partner ID - public void Run(AdWordsUser user, string conversionName, long externalUploadId, - string[] emailAddresses, string advertiserUploadTime, string bridgeMapVersionId, - OfflineDataUploadType uploadType, int partnerId) - { - using (OfflineDataUploadService offlineDataUploadService = - (OfflineDataUploadService) user.GetService(AdWordsService.v201806 - .OfflineDataUploadService)) - { - offlineDataUploadService.RequestHeader.partialFailure = true; - - // Create the first offline data row for upload. - // This transaction occurred 7 days ago with amount of 200 USD. - DateTime transactionTime1 = DateTime.Now; - transactionTime1.AddDays(-7); - long transactionAmount1 = 200000000; - string transactionCurrencyCode1 = "USD"; - UserIdentifier[] userIdentifierList1 = new UserIdentifier[] - { - CreateUserIdentifier(OfflineDataUploadUserIdentifierType.HASHED_EMAIL, - emailAddresses[0]), - CreateUserIdentifier(OfflineDataUploadUserIdentifierType.STATE, "New York") - }; - OfflineData offlineData1 = CreateOfflineDataRow(transactionTime1, - transactionAmount1, transactionCurrencyCode1, conversionName, - userIdentifierList1); - - // Create the second offline data row for upload. - // This transaction occurred 14 days ago with amount of 450 EUR. - DateTime transactionTime2 = DateTime.Now; - transactionTime2.AddDays(-14); - long transactionAmount2 = 450000000; - string transactionCurrencyCode2 = "EUR"; - UserIdentifier[] userIdentifierList2 = new UserIdentifier[] - { - CreateUserIdentifier(OfflineDataUploadUserIdentifierType.HASHED_EMAIL, - emailAddresses[1]), - CreateUserIdentifier(OfflineDataUploadUserIdentifierType.STATE, "California") - }; - OfflineData offlineData2 = CreateOfflineDataRow(transactionTime2, - transactionAmount2, transactionCurrencyCode2, conversionName, - userIdentifierList2); - - // Create offline data upload object. - OfflineDataUpload offlineDataUpload = new OfflineDataUpload - { - externalUploadId = externalUploadId, - offlineDataList = new OfflineData[] - { - offlineData1, - offlineData2 - }, - - // Set the type and metadata of this upload. - uploadType = uploadType - }; - StoreSalesUploadCommonMetadata storeSalesMetaData = null; - - switch (uploadType) - { - case OfflineDataUploadType.STORE_SALES_UPLOAD_FIRST_PARTY: - storeSalesMetaData = new FirstPartyUploadMetadata() - { - loyaltyRate = 1, - transactionUploadRate = 1 - }; - break; - - case OfflineDataUploadType.STORE_SALES_UPLOAD_THIRD_PARTY: - storeSalesMetaData = new ThirdPartyUploadMetadata() - { - loyaltyRate = 1.0, - transactionUploadRate = 1.0, - advertiserUploadTime = advertiserUploadTime, - validTransactionRate = 1.0, - partnerMatchRate = 1.0, - partnerUploadRate = 1.0, - bridgeMapVersionId = bridgeMapVersionId, - partnerId = partnerId - }; - break; - } - - UploadMetadata uploadMetadata = new UploadMetadata - { - Item = storeSalesMetaData - }; - offlineDataUpload.uploadMetadata = uploadMetadata; - - // Create an offline data upload operation. - OfflineDataUploadOperation offlineDataUploadOperation = - new OfflineDataUploadOperation - { - @operator = Operator.ADD, - operand = offlineDataUpload - }; - - // Keep the operations in an array, so it may be reused later for error processing. - List - operations = new List(); - operations.Add(offlineDataUploadOperation); - - try - { - // Upload offline data to the server. - OfflineDataUploadReturnValue result = - offlineDataUploadService.mutate(operations.ToArray()); - offlineDataUpload = result.value[0]; - - // Print the upload ID and status. - Console.WriteLine( - "Uploaded offline data with external upload ID {0}, " + - "and upload status {1}.", offlineDataUpload.externalUploadId, - offlineDataUpload.uploadStatus); - - // Print any partial failure errors from the response. - if (result.partialFailureErrors != null) - { - foreach (ApiError apiError in result.partialFailureErrors) - { - // Get the index of the failed operation from the error's field path - // elements. - int operationIndex = apiError.GetOperationIndex(); - if (operationIndex != -1) - { - OfflineDataUpload failedOfflineDataUpload = - operations[operationIndex].operand; - // Get the index of the entry in the offline data list from the - // error's field path elements. - int offlineDataListIndex = - apiError.GetFieldPathIndex("offlineDataList"); - Console.WriteLine( - "Offline data list entry {0} in operation {1} with external " + - "upload ID {2} and type '{3}' has triggered a failure for " + - "the following reason: '{4}'.", - offlineDataListIndex, operationIndex, - failedOfflineDataUpload.externalUploadId, - failedOfflineDataUpload.uploadType, apiError.errorString); - } - else - { - Console.WriteLine( - "A failure has occurred for the following reason: {0}", - apiError.errorString); - } - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed upload offline data conversions.", - e); - } - } - } - - /// - /// Creates the offline data row from the specified transaction time, transaction micro - /// amount, transaction currency, conversion name and user identifier list. - /// - /// The transaction time. - /// The transaction micro amount. - /// The transaction currency. - /// Name of the conversion. - /// The user identifier list. - /// The offline data row. - private OfflineData CreateOfflineDataRow(DateTime transactionTime, - long transactionMicroAmount, string transactionCurrency, string conversionName, - UserIdentifier[] userIdentifierList) - { - StoreSalesTransaction storeSalesTransaction = new StoreSalesTransaction - { - // For times use the format yyyyMMdd HHmmss [tz]. - // For details, see - // https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats - transactionTime = transactionTime.ToString("yyyyMMdd HHmmss"), - conversionName = conversionName, - userIdentifiers = userIdentifierList - }; - - Money money = new Money - { - microAmount = transactionMicroAmount - }; - RemarketingMoneyWithCurrency moneyWithCurrency = new RemarketingMoneyWithCurrency - { - money = money, - currencyCode = transactionCurrency - }; - storeSalesTransaction.transactionAmount = moneyWithCurrency; - - OfflineData offlineData = new OfflineData - { - Item = storeSalesTransaction - }; - - return offlineData; - } - - /// - /// Hash a string value using SHA-256 hashing algorithm. - /// - /// Provides the algorithm for SHA-256. - /// The string value (e.g. an email address) to hash. - /// The hashed value. - private static string ToSha256String(SHA256 digest, string value) - { - byte[] digestBytes = digest.ComputeHash(Encoding.UTF8.GetBytes(value)); - // Convert the byte array into an unhyphenated hexadecimal string. - return BitConverter.ToString(digestBytes).Replace("-", string.Empty); - } - - /// - /// Creates the user identifier. - /// - /// The user identifier type. - /// The user identifier value. - /// - private UserIdentifier CreateUserIdentifier(OfflineDataUploadUserIdentifierType type, - string value) - { - // If the user identifier type is a hashed type, also call hash function - // on the value. - if (type.ToString().StartsWith("HASHED_")) - { - value = ToSha256String(digest, ToNormalizedValue(value)); - } - - UserIdentifier userIdentifier = new UserIdentifier - { - userIdentifierType = type, - value = value - }; - - return userIdentifier; - } - - /// - /// Removes leading and trailing whitespace and converts all characters to - /// lower case. - /// - /// The value to normalize. - /// The normalized value. - private static string ToNormalizedValue(string value) - { - return value.Trim().ToLower(); - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithAwql.cs b/examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithAwql.cs deleted file mode 100755 index 21f0d1123c9..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithAwql.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util.Reports; - -using System; -using System.IO; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets and downloads a criteria Ad Hoc report from an AWQL - /// query. See https://developers.google.com/adwords/api/docs/guides/awql for - /// AWQL documentation. - /// - public class DownloadCriteriaReportWithAwql : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - DownloadCriteriaReportWithAwql codeExample = new DownloadCriteriaReportWithAwql(); - Console.WriteLine(codeExample.Description); - try - { - string fileName = "INSERT_FILE_NAME_HERE"; - codeExample.Run(new AdWordsUser(), fileName); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets and downloads a criteria Ad Hoc report from an " + - "AWQL query. See " + - "https://developers.google.com/adwords/api/docs/guides/awql for AWQL " + - "documentation."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The file to which the report is downloaded. - /// - public void Run(AdWordsUser user, string fileName) - { - ReportQuery query = new ReportQueryBuilder() - .Select("CampaignId", "AdGroupId", "Id", "Criteria", "CriteriaType", - "Impressions", "Clicks", "Cost") - .From(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT) - .Where("Status").In("ENABLED", "PAUSED") - .During(ReportDefinitionDateRangeType.LAST_7_DAYS) - .Build(); - - string filePath = - ExampleUtilities.GetHomeDir() + Path.DirectorySeparatorChar + fileName; - - try - { - ReportUtilities utilities = new ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_CSV.ToString()); - using (ReportResponse response = utilities.GetResponse()) - { - response.Save(filePath); - } - - Console.WriteLine("Report was downloaded to '{0}'.", filePath); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to download report.", e); - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithSelector.cs b/examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithSelector.cs deleted file mode 100755 index 008cf604bc9..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/DownloadCriteriaReportWithSelector.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util.Reports; - -using System; -using System.IO; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets and downloads a criteria Ad Hoc report from an XML - /// report definition. - /// - public class DownloadCriteriaReportWithSelector : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - DownloadCriteriaReportWithSelector codeExample = - new DownloadCriteriaReportWithSelector(); - Console.WriteLine(codeExample.Description); - try - { - string fileName = "INSERT_FILE_NAME_HERE"; - codeExample.Run(new AdWordsUser(), fileName); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets and downloads a criteria Ad Hoc report from an " + - "XML report definition."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The file to which the report is downloaded. - /// - public void Run(AdWordsUser user, string fileName) - { - ReportDefinition definition = new ReportDefinition() - { - reportName = "Last 7 days CRITERIA_PERFORMANCE_REPORT", - reportType = ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT, - downloadFormat = DownloadFormat.GZIPPED_CSV, - dateRangeType = ReportDefinitionDateRangeType.LAST_7_DAYS, - - selector = new Selector() - { - fields = new string[] - { - "CampaignId", - "AdGroupId", - "Id", - "CriteriaType", - "Criteria", - "FinalUrls", - "Clicks", - "Impressions", - "Cost" - }, - predicates = new Predicate[] - { - Predicate.In("Status", new string[] - { - "ENABLED", - "PAUSED" - }) - } - }, - }; - - // Optional: Include zero impression rows. - (user.Config as AdWordsAppConfig).IncludeZeroImpressions = true; - - // Optional: You can also skip the report headers, column headers and - // report summary etc. to make the report parsing simpler. - // (user.Config as AdWordsAppConfig).SkipColumnHeader = true; - // (user.Config as AdWordsAppConfig).SkipReportHeader = true; - // (user.Config as AdWordsAppConfig).SkipReportSummary = true; - - string filePath = - ExampleUtilities.GetHomeDir() + Path.DirectorySeparatorChar + fileName; - - try - { - ReportUtilities utilities = new ReportUtilities(user, "v201806", definition); - using (ReportResponse response = utilities.GetResponse()) - { - response.Save(filePath); - } - - Console.WriteLine("Report was downloaded to '{0}'.", filePath); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to download report.", e); - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/GetReportFields.cs b/examples/AdWords/CSharp/v201806/Reporting/GetReportFields.cs deleted file mode 100755 index 8829bf15d0e..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/GetReportFields.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets report fields. - /// - public class GetReportFields : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetReportFields codeExample = new GetReportFields(); - Console.WriteLine(codeExample.Description); - try - { - ReportDefinitionReportType reportType = - (ReportDefinitionReportType) Enum.Parse(typeof(ReportDefinitionReportType), - "INSERT_REPORT_TYPE_HERE"); - codeExample.Run(new AdWordsUser(), reportType); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example gets report fields."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The report type to be run. - public void Run(AdWordsUser user, ReportDefinitionReportType reportType) - { - using (ReportDefinitionService reportDefinitionService = - (ReportDefinitionService) user.GetService(AdWordsService.v201806 - .ReportDefinitionService)) - { - try - { - // Get the report fields. - ReportDefinitionField[] reportDefinitionFields = - reportDefinitionService.getReportFields(reportType); - if (reportDefinitionFields != null && reportDefinitionFields.Length > 0) - { - // Display report fields. - Console.WriteLine("The report type '{0}' contains the following fields:", - reportType); - - foreach (ReportDefinitionField reportDefinitionField in - reportDefinitionFields) - { - Console.Write("- {0} ({1})", reportDefinitionField.fieldName, - reportDefinitionField.fieldType); - if (reportDefinitionField.enumValues != null) - { - Console.Write(" := [{0}]", - string.Join(", ", reportDefinitionField.enumValues)); - } - - Console.WriteLine(); - } - } - else - { - Console.WriteLine("This report type has no fields."); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to retrieve fields for report type.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/ParallelReportDownload.cs b/examples/AdWords/CSharp/v201806/Reporting/ParallelReportDownload.cs deleted file mode 100755 index 56a0a738c6c..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/ParallelReportDownload.cs +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util.Reports; - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Threading; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example runs a report for every advertiser account under a - /// given manager account, using multiple parallel threads. This code example - /// needs to be run against an AdWords manager account. - /// - public class ParallelReportDownload : ExampleBase - { - /// - /// The maximum number of reports to download in parallel. This number should - /// be less than or equal to . - /// - private const int MAX_REPORT_DOWNLOADS_IN_PARALLEL = 3; - - /// - /// The maximum number of threads to initialize for report downloads. - /// Normally, you would set this to . - /// However, a more dynamic strategy involves changing - /// MAX_REPORT_DOWNLOADS_IN_PARALLEL at runtime depending on the AdWords - /// API server loads. - /// - private const int MAX_NUMBER_OF_THREADS = 10; - - /// - /// Represents a report that was successfully downloaded. - /// - public class SuccessfulReportDownload - { - /// - /// Gets or sets the customer ID for the report. - /// - public long CustomerId { get; set; } - - /// - /// Gets or sets the path to which report was downloaded. - /// - public string Path { get; set; } - } - - /// - /// Represents a report download that failed. - /// - public class FailedReportDownload - { - /// - /// Gets or sets the customer ID for the report. - /// - public long CustomerId { get; set; } - - /// - /// Gets or sets the exception that was thrown.. - /// - public AdWordsReportsException Exception { get; set; } - } - - /// - /// A data structure to hold data specific for a particular report download - /// thread. - /// - public class ReportDownloadData - { - /// - /// Gets or sets the application configuration. - /// - public AdWordsAppConfig Config { get; set; } - - /// - /// Gets or sets the index of the thread that identifies it. - /// - public int ThreadIndex { get; set; } - - /// - /// Gets or sets the folder to which reports are downloaded. - /// - public string DownloadFolder { get; set; } - - /// - /// Gets or sets the event that signals the main thread that this thread - /// is finished with its job. - /// - public ManualResetEvent SignalEvent { get; set; } - - /// - /// Gets or sets the queue that holds the list of all customerIDs to be - /// processed. - /// - public IProducerConsumerCollection CustomerIdQueue { get; set; } - - /// - /// Gets or sets the queue that holds the list of successful report - /// downloads. - /// - public IProducerConsumerCollection SuccessfulReports - { - get; - set; - } - - /// - /// Gets or sets the queue that holds the list of failed report downloads. - /// - public IProducerConsumerCollection FailedReports { get; set; } - - /// - /// Gets or sets the lock that ensures only a fixed number of report - /// downloads happen simultaneously. - /// - public Semaphore QuotaLock { get; set; } - - /// - /// The callback method for the report download thread. - /// - public void ThreadCallback(object arg) - { - string query = (string) arg; - - AdWordsUser user = new AdWordsUser(this.Config); - - while (true) - { - // Wait to acquire a lock on the quota lock. - QuotaLock.WaitOne(); - - // Try to get a customer ID from the queue. - long customerId = 0; - bool hasMoreCustomers = CustomerIdQueue.TryTake(out customerId); - - if (!hasMoreCustomers) - { - // Nothing more to do, break the loop. - QuotaLock.Release(); - break; - } - - try - { - ProcessCustomer(user, customerId, query); - } - finally - { - // Release the quota lock once we have downloaded the report for the - // customer ID. - QuotaLock.Release(); - } - } - - // Mark the download as finished. - this.SignalEvent.Set(); - } - - /// - /// Processes the customer. - /// - /// The AdWords user. - /// The customer ID. - /// The report query. - private void ProcessCustomer(AdWordsUser user, long customerId, string query) - { - // Set the customer ID to the current customer. - this.Config.ClientCustomerId = customerId.ToString(); - - string downloadFile = string.Format("{0}{1}adgroup_{2:D10}.gz", this.DownloadFolder, - Path.DirectorySeparatorChar, customerId); - - // Download the report. - Console.WriteLine("[Thread #{0}]: Downloading report for customer: {1} into {2}...", - this.ThreadIndex, customerId, downloadFile); - - try - { - ReportUtilities utilities = new ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_CSV.ToString()); - using (ReportResponse response = utilities.GetResponse()) - { - response.Save(downloadFile); - } - - // Mark this report download as success. - SuccessfulReportDownload success = new SuccessfulReportDownload - { - CustomerId = customerId, - Path = downloadFile - }; - SuccessfulReports.TryAdd(success); - - Console.WriteLine("Report was downloaded to '{0}'.", downloadFile); - } - catch (AdWordsReportsException e) - { - // Mark this report download as failure. - FailedReportDownload failure = new FailedReportDownload - { - CustomerId = customerId, - Exception = e - }; - FailedReports.TryAdd(failure); - - Console.WriteLine( - "Failed to download report for customer: {0}. Exception says {1}", - customerId, e.Message); - } - } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - ParallelReportDownload codeExample = new ParallelReportDownload(); - Console.WriteLine(codeExample.Description); - try - { - string fileName = "INSERT_FOLDER_NAME_HERE"; - codeExample.Run(new AdWordsUser(), fileName); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example runs a report for every advertiser account under a " + - "given manager account, using multiple parallel threads. This code example " + - "needs to be run against an AdWords manager account."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The file to which the report is downloaded. - /// - public void Run(AdWordsUser user, string downloadFolder) - { - // Increase the number of HTTP connections we can do in parallel. - System.Net.ServicePointManager.DefaultConnectionLimit = 100; - - try - { - // Start the rate limiter with an initial value of zero, so that all - // threads block immediately. - Semaphore rateLimiter = new Semaphore(0, MAX_REPORT_DOWNLOADS_IN_PARALLEL); - - // Get all the advertiser accounts under this manager account. - List allCustomerIds = GetDescendantAdvertiserAccounts(user); - - // Create a concurrent queue of customers so that all threads can work - // on the collection in parallel. - ConcurrentQueue customerQueue = new ConcurrentQueue(allCustomerIds); - - // Create queues to keep track of successful and failed report downloads. - ConcurrentQueue reportsSucceeeded = - new ConcurrentQueue(); - ConcurrentQueue reportsFailed = - new ConcurrentQueue(); - - // Keep an array of events. This is used by the main thread to wait for - // all worker threads to join. - ManualResetEvent[] doneEvents = new ManualResetEvent[MAX_NUMBER_OF_THREADS]; - - // The list of threads to download reports. - Thread[] threads = new Thread[MAX_NUMBER_OF_THREADS]; - - // The data for each thread. - ReportDownloadData[] threadData = new ReportDownloadData[MAX_NUMBER_OF_THREADS]; - - // The query to be run on each account. - ReportQuery query = new ReportQueryBuilder() - .Select("CampaignId", "AdGroupId", "Impressions", "Clicks", "Cost") - .From(ReportDefinitionReportType.ADGROUP_PERFORMANCE_REPORT) - .Where("AdGroupStatus").In("ENABLED", "PAUSED") - .During(ReportDefinitionDateRangeType.LAST_7_DAYS).Build(); - - // Initialize the threads and their data. - for (int i = 0; i < MAX_NUMBER_OF_THREADS; i++) - { - doneEvents[i] = new ManualResetEvent(false); - threadData[i] = new ReportDownloadData() - { - Config = (AdWordsAppConfig) (user.Config.Clone()), - DownloadFolder = downloadFolder, - SignalEvent = doneEvents[i], - ThreadIndex = i, - QuotaLock = rateLimiter, - CustomerIdQueue = customerQueue, - SuccessfulReports = reportsSucceeeded, - FailedReports = reportsFailed - }; - - threads[i] = new Thread(threadData[i].ThreadCallback); - } - - // Start the threads. Since the initial value of rate limiter is zero, - // all threads will block immediately. - for (int i = 0; i < threads.Length; i++) - { - threads[i].Start(query); - } - - // Now reset the rate limiter so all threads can start downloading reports. - rateLimiter.Release(MAX_REPORT_DOWNLOADS_IN_PARALLEL); - - // Wait for all threads in pool to complete. - WaitHandle.WaitAll(doneEvents); - Console.WriteLine("Download completed, results:"); - - Console.WriteLine("Successful reports:"); - while (!reportsSucceeeded.IsEmpty) - { - SuccessfulReportDownload success = null; - if (reportsSucceeeded.TryDequeue(out success)) - { - Console.WriteLine("Client ID: {0}, Path: {1}", success.CustomerId, - success.Path); - } - } - - Console.WriteLine("Failed reports:"); - while (!reportsFailed.IsEmpty) - { - FailedReportDownload failure = null; - if (reportsFailed.TryDequeue(out failure)) - { - Console.WriteLine("Client ID: {0}, Cause: {1}", failure.CustomerId, - failure.Exception.Message); - } - } - - Console.WriteLine("All reports are downloaded."); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to download reports.", e); - } - } - - /// - /// Gets the list of all descendant advertiser accounts under the manager - /// account. - /// - /// The AdWords user. - /// A list of customer IDs for descendant advertiser accounts. - public static List GetDescendantAdvertiserAccounts(AdWordsUser user) - { - List retval = new List(); - - // Get the ManagedCustomerService. - ManagedCustomerService managedCustomerService = - (ManagedCustomerService) user.GetService(AdWordsService.v201806 - .ManagedCustomerService); - - // Create selector. - Selector selector = new Selector() - { - fields = new string[] - { - ManagedCustomer.Fields.CustomerId - }, - predicates = new Predicate[] - { - // Select only advertiser accounts. - Predicate.Equals(ManagedCustomer.Fields.CanManageClients, false.ToString()) - }, - paging = Paging.Default - }; - - ManagedCustomerPage page = null; - try - { - do - { - page = managedCustomerService.get(selector); - - if (page.entries != null) - { - foreach (ManagedCustomer customer in page.entries) - { - retval.Add(customer.customerId); - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - } - catch (Exception) - { - Console.WriteLine( - "Failed to retrieve advertiser accounts under the manager account."); - throw; - } - - return retval; - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportResults.cs b/examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportResults.cs deleted file mode 100755 index 27a76a0df60..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportResults.cs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util.Reports; - -using System; -using System.Collections.Generic; -using System.IO.Compression; -using System.Xml; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example streams the results of an ad hoc report, collecting - /// total impressions by network from each line. This demonstrates how you - /// can extract data from a large report without holding the entire result - /// set in memory or using files. - /// - public class StreamCriteriaReportResults : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - StreamCriteriaReportResults codeExample = new StreamCriteriaReportResults(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example streams the results of an ad hoc report, collecting " + - "total impressions by network from each line. This demonstrates how you can " + - "extract data from a large report without holding the entire result set in " + - "memory or using files."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - // Create the query. - ReportQuery query = new ReportQueryBuilder() - .Select("Id", "AdNetworkType1", "Impressions") - .From(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT) - .Where("Status").In("ENABLED", "PAUSED") - .During(ReportDefinitionDateRangeType.LAST_7_DAYS) - .Build(); - - ReportUtilities reportUtilities = new ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_XML.ToString()); - - Dictionary impressionsByAdNetworkType1 = new Dictionary(); - - try - { - using (ReportResponse response = reportUtilities.GetResponse()) - { - using (GZipStream gzipStream = - new GZipStream(response.Stream, CompressionMode.Decompress)) - { - using (XmlTextReader reader = new XmlTextReader(gzipStream)) - { - while (reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: // The node is an Element. - if (reader.Name == "row") - { - ParseRow(impressionsByAdNetworkType1, reader); - } - - break; - } - } - } - } - } - - Console.WriteLine("Network, Impressions"); - foreach (string network in impressionsByAdNetworkType1.Keys) - { - Console.WriteLine("{0}, {1}", network, impressionsByAdNetworkType1[network]); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to download report.", e); - } - } - - /// - /// Parses a report row. - /// - /// The map that keeps track of - /// the impressions grouped by by ad network type1. - /// The XML reader that parses the report. - private static void ParseRow(Dictionary impressionsByAdNetworkType1, - XmlTextReader reader) - { - string network = null; - long impressions = 0; - - while (reader.MoveToNextAttribute()) - { - switch (reader.Name) - { - case "network": - network = reader.Value; - break; - - case "impressions": - impressions = long.Parse(reader.Value); - break; - } - } - - if (network != null) - { - if (!impressionsByAdNetworkType1.ContainsKey(network)) - { - impressionsByAdNetworkType1[network] = 0; - } - - impressionsByAdNetworkType1[network] += impressions; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportToPoco.cs b/examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportToPoco.cs deleted file mode 100755 index 6d44bf26447..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/StreamCriteriaReportToPoco.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util.Reports; - -using System; -using System.IO.Compression; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// The class that holds the data of one row of the report. - /// - public class CriteriaReportRow - { - /// - /// The Keyword ID column. - /// - [ReportColumn("keywordID")] - public long KeywordID { get; set; } - - /// - /// The impressions column. - /// - [ReportColumn("impressions")] - public long Impressions { get; set; } - - /// - /// The network column. - /// - [ReportColumn("network")] - public string NetworkType { get; set; } - - /// - /// Returns a string that represents the current report row. - /// - override public string ToString() - { - return "Id: " + KeywordID + " Impressions: " + Impressions + " NetworkType: " + - NetworkType; - } - } - - /// - /// This code example streams the results of an ad hoc report, and - /// returns the data in the report as objects of a given type. - /// - public class StreamCriteriaReportToPoco : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - StreamCriteriaReportToPoco codeExample = new StreamCriteriaReportToPoco(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - - Console.ReadLine(); - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example streams the results of an ad hoc report, and " + - "returns the data in the report as objects of a given type."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - // Create the query. - ReportQuery query = new ReportQueryBuilder() - .Select("Id", "AdNetworkType1", "Impressions") - .From(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT) - .Where("Status").In("ENABLED", "PAUSED") - .During(ReportDefinitionDateRangeType.LAST_7_DAYS) - .Build(); - - ReportUtilities reportUtilities = new ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_XML.ToString()); - - try - { - using (ReportResponse response = reportUtilities.GetResponse()) - { - using (GZipStream gzipStream = - new GZipStream(response.Stream, CompressionMode.Decompress)) - { - // Deserialize the report into a list of CriteriaReportRow. - // You can also deserialize the list into your own POCOs as follows. - // 1. Annotate your class properties with ReportRow annotation. - // - // public class MyCriteriaReportRow { - // - // [ReportColumn] - // public long KeywordID { get; set; } - // - // [ReportColumn] - // public long Impressions { get; set; } - // } - // - // 2. Deserialize into your own report rows. - // - // var report = new AwReport( - // new AwXmlTextReader(gzipStream), "Example"); - using (var report = - new AwReport(new AwXmlTextReader(gzipStream), - "Example")) - { - // Print the contents of each row object. - foreach (var record in report.Rows) - { - Console.WriteLine(record); - } - } - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to download and parse report.", e); - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Reporting/StreamReportToPredefinedReportRowType.cs b/examples/AdWords/CSharp/v201806/Reporting/StreamReportToPredefinedReportRowType.cs deleted file mode 100755 index d3e235ecfeb..00000000000 --- a/examples/AdWords/CSharp/v201806/Reporting/StreamReportToPredefinedReportRowType.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Reports; -using Google.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util.Reports; - -using System; -using System.IO.Compression; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example streams the results of an ad hoc report, and - /// returns the data in the report as objects of a predefined report row type. - /// - public class StreamReportToPredefinedReportRowType : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - StreamReportToPredefinedReportRowType codeExample = - new StreamReportToPredefinedReportRowType(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - - Console.ReadLine(); - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example streams the results of an ad hoc report, and " + - "returns the data in the report as objects of a predefined report row type."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - // Retreiving the raw values of enum-type fields instead of display values - (user.Config as AdWordsAppConfig).UseRawEnumValues = true; - - // Create the query. - string query = - "SELECT AccountCurrencyCode, AccountDescriptiveName FROM FINAL_URL_REPORT " + - "DURING LAST_7_DAYS"; - - ReportUtilities reportUtilities = new ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_XML.ToString()); - - try - { - using (ReportResponse response = reportUtilities.GetResponse()) - { - using (GZipStream gzipStream = - new GZipStream(response.Stream, CompressionMode.Decompress)) - { - // Create the report object using the stream. - using (var report = - new AwReport(new AwXmlTextReader(gzipStream), - "Example")) - { - // Print the contents of each row object. - while (report.MoveNext()) - { - Console.WriteLine(report.Current.accountCurrencyCode + " " + - report.Current.accountDescriptiveName); - } - } - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to download and parse report.", e); - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductPartitionTree.cs b/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductPartitionTree.cs deleted file mode 100755 index d6e0d62d1c5..00000000000 --- a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductPartitionTree.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example creates a ProductPartition tree. - /// - public class AddProductPartitionTree : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddProductPartitionTree codeExample = new AddProductPartitionTree(); - Console.WriteLine(codeExample.Description); - try - { - long adGroupId = long.Parse("INSERT_ADGROUP_ID_HERE"); - codeExample.Run(new AdWordsUser(), adGroupId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example creates a ProductPartition tree."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The ad group to which product partition is - /// added. - public void Run(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Build a new ProductPartitionTree using the ad group's current set of criteria. - ProductPartitionTree partitionTree = - ProductPartitionTree.DownloadAdGroupTree(user, adGroupId); - - Console.WriteLine("Original tree: {0}", partitionTree); - - // Clear out any existing criteria. - ProductPartitionNode rootNode = partitionTree.Root.RemoveAllChildren(); - - // Make the root node a subdivision. - rootNode = rootNode.AsSubdivision(); - - // Add a unit node for condition = NEW. - ProductPartitionNode newConditionNode = rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)); - newConditionNode.AsBiddableUnit().CpcBid = 200000; - - ProductPartitionNode usedConditionNode = rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)); - usedConditionNode.AsBiddableUnit().CpcBid = 100000; - - // Add a subdivision node for condition = null (everything else). - ProductPartitionNode otherConditionNode = rootNode - .AddChild(ProductDimensions.CreateCanonicalCondition()).AsSubdivision(); - - // Add a unit node under condition = null for brand = "CoolBrand". - ProductPartitionNode coolBrandNode = - otherConditionNode.AddChild(ProductDimensions.CreateBrand("CoolBrand")); - coolBrandNode.AsBiddableUnit().CpcBid = 900000L; - - // Add a unit node under condition = null for brand = "CheapBrand". - ProductPartitionNode cheapBrandNode = - otherConditionNode.AddChild(ProductDimensions.CreateBrand("CheapBrand")); - cheapBrandNode.AsBiddableUnit().CpcBid = 10000L; - - // Add a subdivision node under condition = null for brand = null (everything else). - ProductPartitionNode otherBrandNode = otherConditionNode - .AddChild(ProductDimensions.CreateBrand(null)).AsSubdivision(); - - // Add unit nodes under condition = null/brand = null. - // The value for each bidding category is a fixed ID for a specific - // category. You can retrieve IDs for categories from the ConstantDataService. - // See the 'GetProductCategoryTaxonomy' example for more details. - - // Add a unit node under condition = null/brand = null for product type - // level 1 = 'Luggage & Bags'. - ProductPartitionNode luggageAndBagNode = - otherBrandNode.AddChild(ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L1, -5914235892932915235L)); - luggageAndBagNode.AsBiddableUnit().CpcBid = 750000L; - - // Add a unit node under condition = null/brand = null for product type - // level 1 = null (everything else). - ProductPartitionNode everythingElseNode = - otherBrandNode.AddChild( - ProductDimensions.CreateBiddingCategory(ProductDimensionType - .BIDDING_CATEGORY_L1)); - everythingElseNode.AsBiddableUnit().CpcBid = 110000L; - - try - { - // Make the mutate request, using the operations returned by the - // ProductPartitionTree. - AdGroupCriterionOperation[] mutateOperations = - partitionTree.GetMutateOperations(); - - if (mutateOperations.Length == 0) - { - Console.WriteLine( - "Skipping the mutate call because the original tree and the " + - "current tree are logically identical."); - } - else - { - adGroupCriterionService.mutate(mutateOperations); - } - - // The request was successful, so create a new ProductPartitionTree based on - // the updated state of the ad group. - partitionTree = ProductPartitionTree.DownloadAdGroupTree(user, adGroupId); - - Console.WriteLine("Final tree: {0}", partitionTree); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to set shopping product partition.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductScope.cs b/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductScope.cs deleted file mode 100755 index 351c4d814f5..00000000000 --- a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddProductScope.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example restricts the products that will be included in the - /// campaign by setting a ProductScope. - /// - public class AddProductScope : ExampleBase - { - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example restricts the products that will be included in the " + - "campaign by setting a ProductScope."; - } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddProductScope codeExample = new AddProductScope(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The campaign id to add product scope. - public void Run(AdWordsUser user, long campaignId) - { - using (CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService)) - { - ProductScope productScope = new ProductScope(); - // This set of dimensions is for demonstration purposes only. It would be - // extremely unlikely that you want to include so many dimensions in your - // product scope. - ProductBrand nexusBrand = new ProductBrand - { - value = "Nexus" - }; - - ProductCanonicalCondition newProducts = new ProductCanonicalCondition - { - condition = ProductCanonicalConditionCondition.NEW - }; - - ProductCustomAttribute customAttribute = new ProductCustomAttribute - { - type = ProductDimensionType.CUSTOM_ATTRIBUTE_0, - value = "my attribute value" - }; - - ProductOfferId bookOffer = new ProductOfferId - { - value = "book1" - }; - - ProductType mediaProducts = new ProductType - { - type = ProductDimensionType.PRODUCT_TYPE_L1, - value = "Media" - }; - - ProductType bookProducts = new ProductType - { - type = ProductDimensionType.PRODUCT_TYPE_L2, - value = "Books" - }; - - // The value for the bidding category is a fixed ID for the - // 'Luggage & Bags' category. You can retrieve IDs for categories from - // the ConstantDataService. See the 'GetProductCategoryTaxonomy' example - // for more details. - ProductBiddingCategory luggageBiddingCategory = new ProductBiddingCategory - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = -5914235892932915235 - }; - - productScope.dimensions = new ProductDimension[] - { - nexusBrand, - newProducts, - bookOffer, - mediaProducts, - luggageBiddingCategory - }; - - CampaignCriterion campaignCriterion = new CampaignCriterion - { - campaignId = campaignId, - criterion = productScope - }; - - // Create operation. - CampaignCriterionOperation operation = new CampaignCriterionOperation - { - operand = campaignCriterion, - @operator = Operator.ADD - }; - - try - { - // Make the mutate request. - CampaignCriterionReturnValue result = campaignCriterionService.mutate( - new CampaignCriterionOperation[] - { - operation - }); - - Console.WriteLine("Created a ProductScope criterion with ID '{0}'", - result.value[0].criterion.id); - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to set shopping product scope.", - e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaign.cs b/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaign.cs deleted file mode 100755 index b35e792d35b..00000000000 --- a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaign.cs +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a Shopping campaign. - /// - public class AddShoppingCampaign : ExampleBase - { - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example adds a Shopping campaign."; } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddShoppingCampaign codeExample = new AddShoppingCampaign(); - Console.WriteLine(codeExample.Description); - try - { - long budgetId = long.Parse("INSERT_BUDGET_ID_HERE"); - long merchantId = long.Parse("INSERT_MERCHANT_ID_HERE"); - bool createDefaultPartition = false; - codeExample.Run(new AdWordsUser(), budgetId, merchantId, createDefaultPartition); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The budget id. - /// The Merchant Center account ID. - /// If set to true, a default - /// partition will be created. If running the AddProductPartition.cs - /// example right after this example, make sure this stays set to - /// false. - public void Run(AdWordsUser user, long budgetId, long merchantId, - bool createDefaultPartition) - { - try - { - Campaign campaign = CreateCampaign(user, budgetId, merchantId); - Console.WriteLine("Campaign with name '{0}' and ID '{1}' was added.", campaign.name, - campaign.id); - - AdGroup adGroup = CreateAdGroup(user, campaign.id); - Console.WriteLine("Ad group with name '{0}' and ID '{1}' was added.", adGroup.name, - adGroup.id); - - AdGroupAd adGroupAd = CreateProductAd(user, adGroup.id); - Console.WriteLine("Product ad with ID {0}' was added.", adGroupAd.ad.id); - - if (createDefaultPartition) - { - CreateDefaultPartitionTree(user, adGroup.id); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to create shopping campaign.", e); - } - } - - /// - /// Creates the default partition. - /// - /// The AdWords user. - /// The ad group ID. - private void CreateDefaultPartitionTree(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Build a new ProductPartitionTree using an empty set of criteria. - ProductPartitionTree partitionTree = - ProductPartitionTree.CreateAdGroupTree(adGroupId, new List()); - partitionTree.Root.AsBiddableUnit().CpcBid = 1000000; - - try - { - // Make the mutate request, using the operations returned by the - // ProductPartitionTree. - AdGroupCriterionOperation[] mutateOperations = - partitionTree.GetMutateOperations(); - - if (mutateOperations.Length == 0) - { - Console.WriteLine( - "Skipping the mutate call because the original tree and the " + - "current tree are logically identical."); - } - else - { - adGroupCriterionService.mutate(mutateOperations); - } - - // The request was successful, so create a new ProductPartitionTree based on - // the updated state of the ad group. - partitionTree = ProductPartitionTree.DownloadAdGroupTree(user, adGroupId); - - Console.WriteLine("Final tree: {0}", partitionTree); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to set shopping product partition.", e); - } - } - } - - /// - /// Creates the Product Ad. - /// - /// The AdWords user. - /// The ad group ID. - /// The Product Ad. - private static AdGroupAd CreateProductAd(AdWordsUser user, long adGroupId) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create product ad. - ProductAd productAd = new ProductAd(); - - // Create ad group ad. - AdGroupAd adGroupAd = new AdGroupAd - { - adGroupId = adGroupId, - ad = productAd - }; - - // Create operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - // Make the mutate request. - AdGroupAdReturnValue retval = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - return retval.value[0]; - } - } - - /// - /// Creates the ad group in a Shopping campaign. - /// - /// The AdWords user. - /// The campaign ID. - /// The ad group. - private static AdGroup CreateAdGroup(AdWordsUser user, long campaignId) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - // Create ad group. - AdGroup adGroup = new AdGroup - { - campaignId = campaignId, - name = "Ad Group #" + ExampleUtilities.GetRandomString() - }; - - // Create operation. - AdGroupOperation operation = new AdGroupOperation - { - operand = adGroup, - @operator = Operator.ADD - }; - - // Make the mutate request. - AdGroupReturnValue retval = adGroupService.mutate(new AdGroupOperation[] - { - operation - }); - return retval.value[0]; - } - } - - /// - /// Creates the shopping campaign. - /// - /// The AdWords user. - /// The budget id. - /// The Merchant Center id. - /// The Shopping campaign. - private static Campaign CreateCampaign(AdWordsUser user, long budgetId, long merchantId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create campaign. - Campaign campaign = new Campaign - { - name = "Shopping campaign #" + ExampleUtilities.GetRandomString(), - - // The advertisingChannelType is what makes this a Shopping campaign. - advertisingChannelType = AdvertisingChannelType.SHOPPING, - - // 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, - - // Set shared budget (required). - budget = new Budget - { - budgetId = budgetId - } - }; - - // Set bidding strategy (required). - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration - { - biddingStrategyType = BiddingStrategyType.MANUAL_CPC - }; - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration; - - // All Shopping campaigns need a ShoppingSetting. - ShoppingSetting shoppingSetting = new ShoppingSetting - { - salesCountry = "US", - campaignPriority = 0, - merchantId = merchantId, - - // Set to "true" to enable Local Inventory Ads in your campaign. - enableLocal = true - }; - campaign.settings = new Setting[] - { - shoppingSetting - }; - - // Create operation. - CampaignOperation campaignOperation = new CampaignOperation - { - operand = campaign, - @operator = Operator.ADD - }; - - // Make the mutate request. - CampaignReturnValue retval = campaignService.mutate(new CampaignOperation[] - { - campaignOperation - }); - - return retval.value[0]; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.cs b/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.cs deleted file mode 100755 index 793ba281bee..00000000000 --- a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.cs +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds a Shopping campaign for Showcase ads. - /// - public class AddShoppingCampaignForShowcaseAds : ExampleBase - { - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example adds a Shopping campaign for Showcase ads."; } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddShoppingCampaignForShowcaseAds codeExample = new AddShoppingCampaignForShowcaseAds(); - Console.WriteLine(codeExample.Description); - try - { - long budgetId = long.Parse("INSERT_BUDGET_ID_HERE"); - long merchantId = long.Parse("INSERT_MERCHANT_ID_HERE"); - codeExample.Run(new AdWordsUser(), budgetId, merchantId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// The budget id. - /// The Merchant Center account ID. - public void Run(AdWordsUser user, long budgetId, long merchantId) - { - try - { - Campaign campaign = CreateCampaign(user, budgetId, merchantId); - Console.WriteLine("Campaign with name '{0}' and ID '{1}' was added.", campaign.name, - campaign.id); - - AdGroup adGroup = CreateAdGroup(user, campaign); - Console.WriteLine("Ad group with name '{0}' and ID '{1}' was added.", adGroup.name, - adGroup.id); - - AdGroupAd adGroupAd = CreateShowcaseAd(user, adGroup); - Console.WriteLine("Showcase ad with ID '{0}' was added.", adGroupAd.ad.id); - - ProductPartitionTree partitionTree = CreateProductPartition(user, adGroup.id); - Console.WriteLine("Final tree: {0}", partitionTree); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to create shopping campaign for " + "showcase ads.", e); - } - } - - /// - /// Creates the Shopping campaign. - /// - /// The AdWords user for which the campaign is created. - /// The budget ID. - /// The Merchant Center ID. - /// The newly created Shopping campaign. - private static Campaign CreateCampaign(AdWordsUser user, long budgetId, long merchantId) - { - using (CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService)) - { - // Create the campaign. - Campaign campaign = new Campaign - { - name = "Shopping campaign #" + ExampleUtilities.GetRandomString(), - - // The advertisingChannelType is what makes this a Shopping campaign. - advertisingChannelType = AdvertisingChannelType.SHOPPING, - - // 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, - - // Set shared budget (required). - budget = new Budget - { - budgetId = budgetId - } - }; - - // Set bidding strategy (required). - BiddingStrategyConfiguration biddingStrategyConfiguration = - new BiddingStrategyConfiguration - { - // Note: Showcase ads require that the campaign has a ManualCpc - // BiddingStrategyConfiguration. - biddingStrategyType = BiddingStrategyType.MANUAL_CPC - }; - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration; - - // All Shopping campaigns need a ShoppingSetting. - ShoppingSetting shoppingSetting = new ShoppingSetting - { - salesCountry = "US", - campaignPriority = 0, - merchantId = merchantId, - - // Set to "true" to enable Local Inventory Ads in your campaign. - enableLocal = true - }; - campaign.settings = new Setting[] - { - shoppingSetting - }; - - // Create operation. - CampaignOperation campaignOperation = new CampaignOperation - { - operand = campaign, - @operator = Operator.ADD - }; - - // Make the mutate request. - CampaignReturnValue retval = campaignService.mutate(new CampaignOperation[] - { - campaignOperation - }); - return retval.value[0]; - } - } - - /// - /// Creates the ad group in a Shopping campaign. - /// - /// The AdWords user for which the ad group is created. - /// The Shopping campaign. - /// The newly created ad group. - private static AdGroup CreateAdGroup(AdWordsUser user, Campaign campaign) - { - using (AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService)) - { - // Create ad group. - AdGroup adGroup = new AdGroup - { - campaignId = campaign.id, - name = "Ad Group #" + ExampleUtilities.GetRandomString(), - - // Required: Set the ad group type to SHOPPING_SHOWCASE_ADS. - adGroupType = AdGroupType.SHOPPING_SHOWCASE_ADS - }; - - // Required: Set the ad group's bidding strategy configuration. - BiddingStrategyConfiguration biddingConfiguration = new BiddingStrategyConfiguration - { - // Optional: Set the bids. - bids = new Bids[] - { - new CpcBid() - { - bid = new Money() - { - microAmount = 100000 - } - } - } - }; - - adGroup.biddingStrategyConfiguration = biddingConfiguration; - - // Create the operation. - AdGroupOperation operation = new AdGroupOperation - { - operand = adGroup, - @operator = Operator.ADD - }; - - // Make the mutate request. - AdGroupReturnValue retval = adGroupService.mutate(new AdGroupOperation[] - { - operation - }); - return retval.value[0]; - } - } - - /// - /// Creates the Showcase ad. - /// - /// The AdWords user for which the ad is created. - /// The ad group in which the ad is created. - /// The newly created Showcase ad. - private static AdGroupAd CreateShowcaseAd(AdWordsUser user, AdGroup adGroup) - { - using (AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService)) - { - // Create the Showcase ad. - ShowcaseAd showcaseAd = new ShowcaseAd - { - // Required: set the ad's name, final URLs and display URL. - name = "Showcase ad " + ExampleUtilities.GetShortRandomString(), - finalUrls = new string[] - { - "http://example.com/showcase" - }, - displayUrl = "example.com" - }; - - // Required: Set the ad's expanded image. - Image expandedImage = new Image - { - mediaId = UploadImage(user, "https://goo.gl/IfVlpF") - }; - showcaseAd.expandedImage = expandedImage; - - // Optional: Set the collapsed image. - Image collapsedImage = new Image - { - mediaId = UploadImage(user, "https://goo.gl/NqTxAE") - }; - showcaseAd.collapsedImage = collapsedImage; - - // Create ad group ad. - AdGroupAd adGroupAd = new AdGroupAd - { - adGroupId = adGroup.id, - ad = showcaseAd - }; - - // Create operation. - AdGroupAdOperation operation = new AdGroupAdOperation - { - operand = adGroupAd, - @operator = Operator.ADD - }; - - // Make the mutate request. - AdGroupAdReturnValue retval = adGroupAdService.mutate(new AdGroupAdOperation[] - { - operation - }); - return retval.value[0]; - } - } - - /// - /// Creates a product partition tree. - /// - /// The AdWords user for which the product partition is created. - /// Ad group ID. - /// The product partition. - private static ProductPartitionTree CreateProductPartition(AdWordsUser user, long adGroupId) - { - using (AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService)) - { - // Build a new ProductPartitionTree using the ad group's current set of criteria. - ProductPartitionTree partitionTree = - ProductPartitionTree.DownloadAdGroupTree(user, adGroupId); - - Console.WriteLine("Original tree: {0}", partitionTree); - - // Clear out any existing criteria. - ProductPartitionNode rootNode = partitionTree.Root.RemoveAllChildren(); - - // Make the root node a subdivision. - rootNode = rootNode.AsSubdivision(); - - // Add a unit node for condition = NEW to include it. - rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)); - - // Add a unit node for condition = USED to include it. - rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)); - - // Exclude everything else. - rootNode.AddChild(ProductDimensions.CreateCanonicalCondition()).AsExcludedUnit(); - - // Make the mutate request, using the operations returned by the - // ProductPartitionTree. - AdGroupCriterionOperation[] mutateOperations = partitionTree.GetMutateOperations(); - - if (mutateOperations.Length == 0) - { - Console.WriteLine( - "Skipping the mutate call because the original tree and the current " + - "tree are logically identical."); - } - else - { - adGroupCriterionService.mutate(mutateOperations); - } - - // The request was successful, so create a new ProductPartitionTree based on the - // updated state of the ad group. - partitionTree = ProductPartitionTree.DownloadAdGroupTree(user, adGroupId); - return partitionTree; - } - } - - /// - /// Uploads an image. - /// - /// The AdWords user for which the image is uploaded. - /// The image URL. - /// The uploaded image. - private static long UploadImage(AdWordsUser user, string url) - { - using (MediaService mediaService = - (MediaService) user.GetService(AdWordsService.v201806.MediaService)) - { - // Create the image. - Image image = new Image - { - data = MediaUtilities.GetAssetDataFromUrl(url, user.Config), - type = MediaMediaType.IMAGE - }; - - // Upload the image. - Media[] result = mediaService.upload(new Media[] - { - image - }); - return result[0].mediaId; - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.cs b/examples/AdWords/CSharp/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.cs deleted file mode 100755 index 8389b5b596b..00000000000 --- a/examples/AdWords/CSharp/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example fetches the set of valid ProductBiddingCategories. - /// - public class GetProductCategoryTaxonomy : ExampleBase - { - /// - /// Stores details about a product category and its hierarchy. - /// - private class ProductCategory - { - /// - /// The product category id. - /// - private long id; - - /// - /// The product category name. - /// - private string name; - - /// - /// The product category children. - /// - private List children = new List(); - - /// - /// Gets or sets the product category id. - /// - public long Id - { - get { return id; } - set { id = value; } - } - - /// - /// Gets or sets the product category name. - /// - public string Name - { - get { return name; } - set { name = value; } - } - - /// - /// Gets or sets the product category children. - /// - public List Children - { - get { return children; } - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example fetches the set of valid ProductBiddingCategories."; } - } - - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetProductCategoryTaxonomy codeExample = new GetProductCategoryTaxonomy(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (ConstantDataService constantDataService = - (ConstantDataService) user.GetService(AdWordsService.v201806.ConstantDataService)) - { - Selector selector = new Selector() - { - predicates = new Predicate[] - { - Predicate.In(ProductBiddingCategoryData.Fields.Country, new string[] - { - "US" - }) - } - }; - - try - { - ProductBiddingCategoryData[] results = - constantDataService.getProductBiddingCategoryData(selector); - - Dictionary biddingCategories = - new Dictionary(); - List rootCategories = new List(); - - foreach (ProductBiddingCategoryData productBiddingCategory in results) - { - long id = productBiddingCategory.dimensionValue.value; - long parentId = 0; - string name = productBiddingCategory.displayValue[0].value; - - if (productBiddingCategory.parentDimensionValue != null) - { - parentId = productBiddingCategory.parentDimensionValue.value; - } - - if (!biddingCategories.ContainsKey(id)) - { - biddingCategories.Add(id, new ProductCategory()); - } - - ProductCategory category = biddingCategories[id]; - - if (parentId != 0) - { - if (!biddingCategories.ContainsKey(parentId)) - { - biddingCategories.Add(parentId, new ProductCategory()); - } - - ProductCategory parent = biddingCategories[parentId]; - parent.Children.Add(category); - } - else - { - rootCategories.Add(category); - } - - category.Id = id; - category.Name = name; - } - - DisplayProductCategories(rootCategories, ""); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to set shopping product category.", e); - } - } - } - - /// - /// Displays the product categories. - /// - /// The product categories. - /// The prefix for display purposes. - private void DisplayProductCategories(List categories, string prefix) - { - foreach (ProductCategory category in categories) - { - Console.WriteLine("{0}{1} [{2}]", prefix, category.Name, category.Id); - DisplayProductCategories(category.Children, - string.Format("{0}{1} > ", prefix, category.Name)); - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Targeting/AddCampaignTargetingCriteria.cs b/examples/AdWords/CSharp/v201806/Targeting/AddCampaignTargetingCriteria.cs deleted file mode 100755 index 63ba5137ce9..00000000000 --- a/examples/AdWords/CSharp/v201806/Targeting/AddCampaignTargetingCriteria.cs +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds various types of targeting criteria to a campaign. - /// To get a list of campaigns, run GetCampaigns.cs. - /// - public class AddCampaignTargetingCriteria : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCampaignTargetingCriteria codeExample = new AddCampaignTargetingCriteria(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - string feedIdText = "INSERT_LOCATION_FEED_ID_HERE"; - - long? feedId = null; - long temp; - - if (long.TryParse(feedIdText, out temp)) - { - feedId = temp; - } - - codeExample.Run(new AdWordsUser(), campaignId, feedId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds various types of targeting criteria to a " + - "campaign. To get a list of campaigns, run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign to which targeting criteria - /// are added. - /// ID of a feed that has been configured for location - /// targeting, meaning it has an ENABLED FeedMapping with criterionType of - /// 77. Feeds linked to a GMB account automatically have this FeedMapping. - /// If you don't have such a feed, set this value to null. - public void Run(AdWordsUser user, long campaignId, long? feedId) - { - using (CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService)) - { - // Create locations. The IDs can be found in the documentation or - // retrieved with the LocationCriterionService. - Location california = new Location() - { - id = 21137L - }; - - Location mexico = new Location() - { - id = 2484L - }; - - // Create languages. The IDs can be found in the documentation or - // retrieved with the ConstantDataService. - Language english = new Language() - { - id = 1000L - }; - - Language spanish = new Language() - { - id = 1003L - }; - - List criteria = new List() - { - california, - mexico, - english, - spanish - }; - - // Distance targeting. Area of 10 miles around the locations in the location feed. - if (feedId != null) - { - LocationGroups radiusLocationGroup = new LocationGroups() - { - feedId = feedId.Value, - matchingFunction = new Function() - { - @operator = FunctionOperator.IDENTITY, - lhsOperand = new FunctionArgumentOperand[] - { - new LocationExtensionOperand() - { - radius = new ConstantOperand() - { - type = ConstantOperandConstantType.DOUBLE, - unit = ConstantOperandUnit.MILES, - doubleValue = 10 - } - } - } - } - }; - - criteria.Add(radiusLocationGroup); - } - - // Create operations to add each of the criteria above. - List - operations = new List(); - foreach (Criterion criterion in criteria) - { - CampaignCriterionOperation operation = new CampaignCriterionOperation() - { - operand = new CampaignCriterion() - { - campaignId = campaignId, - criterion = criterion - }, - @operator = Operator.ADD - }; - - operations.Add(operation); - } - - // Add a negative campaign criterion. - - CampaignCriterion negativeCriterion = new NegativeCampaignCriterion() - { - campaignId = campaignId, - criterion = new Keyword() - { - text = "jupiter cruise", - matchType = KeywordMatchType.BROAD - } - }; - - CampaignCriterionOperation negativeCriterionOperation = - new CampaignCriterionOperation() - { - operand = negativeCriterion, - @operator = Operator.ADD - }; - - operations.Add(negativeCriterionOperation); - - try - { - // Set the campaign targets. - CampaignCriterionReturnValue retVal = - campaignCriterionService.mutate(operations.ToArray()); - - if (retVal != null && retVal.value != null) - { - // Display campaign targets. - foreach (CampaignCriterion criterion in retVal.value) - { - Console.WriteLine( - "Campaign criteria of type '{0}' was set to campaign with" + - " id = '{1}'.", criterion.criterion.CriterionType, - criterion.campaignId); - } - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to set Campaign criteria.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Targeting/AddCustomerNegativeCriteria.cs b/examples/AdWords/CSharp/v201806/Targeting/AddCustomerNegativeCriteria.cs deleted file mode 100755 index 0170087de6b..00000000000 --- a/examples/AdWords/CSharp/v201806/Targeting/AddCustomerNegativeCriteria.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example adds various types of negative criteria to a customer. These criteria - /// will be applied to all campaigns for the customer. - /// - public class AddCustomerNegativeCriteria : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - AddCustomerNegativeCriteria codeExample = new AddCustomerNegativeCriteria(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example adds various types of negative criteria to a customer. " + - "These criteria will be applied to all campaigns for the customer."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (CustomerNegativeCriterionService customerNegativeCriterionService = - (CustomerNegativeCriterionService) user.GetService(AdWordsService.v201806 - .CustomerNegativeCriterionService)) - { - List criteria = new List(); - - // Exclude tragedy & conflict content. - ContentLabel tragedyContentLabel = new ContentLabel - { - contentLabelType = ContentLabelType.TRAGEDY - }; - criteria.Add(tragedyContentLabel); - - // Exclude a specific placement. - Placement placement = new Placement - { - url = "http://www.example.com" - }; - criteria.Add(placement); - - // Additional criteria types are available for this service. See the types listed - // under Criterion here: - // https://developers.google.com/adwords/api/docs/reference/latest/CustomerNegativeCriterionService.Criterion - - // Create operations to add each of the criteria above. - List operations = - new List(); - foreach (Criterion criterion in criteria) - { - CustomerNegativeCriterion negativeCriterion = new CustomerNegativeCriterion - { - criterion = criterion - }; - CustomerNegativeCriterionOperation operation = - new CustomerNegativeCriterionOperation - { - @operator = Operator.ADD, - operand = negativeCriterion - }; - operations.Add(operation); - } - - try - { - // Send the request to add the criteria. - CustomerNegativeCriterionReturnValue result = - customerNegativeCriterionService.mutate(operations.ToArray()); - - // Display the results. - foreach (CustomerNegativeCriterion negativeCriterion in result.value) - { - Console.WriteLine( - "Customer negative criterion with criterion ID {0} and type '{1}' " + - "was added.", negativeCriterion.criterion.id, - negativeCriterion.criterion.type); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to set customer negative criteria.", e); - } - } - - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Targeting/GetCampaignTargetingCriteria.cs b/examples/AdWords/CSharp/v201806/Targeting/GetCampaignTargetingCriteria.cs deleted file mode 100755 index 8e4608e521d..00000000000 --- a/examples/AdWords/CSharp/v201806/Targeting/GetCampaignTargetingCriteria.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets all targeting criteria for a campaign. To set - /// campaign targeting criteria, run AddCampaignTargetingCriteria.cs. To get - /// campaigns, run GetCampaigns.cs. - /// - public class GetCampaignTargetingCriteria : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetCampaignTargetingCriteria codeExample = new GetCampaignTargetingCriteria(); - Console.WriteLine(codeExample.Description); - try - { - long campaignId = long.Parse("INSERT_CAMPAIGN_ID_HERE"); - codeExample.Run(new AdWordsUser(), campaignId); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example gets all targeting criteria for a campaign. To set " + - "campaign targeting criteria, run AddCampaignTargetingCriteria.cs. To get " + - "campaigns, run GetCampaigns.cs."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - /// Id of the campaign from which targeting - /// criteria are retrieved. - public void Run(AdWordsUser user, long campaignId) - { - using (CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService)) - { - // Create the selector. - Selector selector = new Selector() - { - fields = new string[] - { - Criterion.Fields.Id, - Criterion.Fields.CriteriaType, - CampaignCriterion.Fields.CampaignId - }, - predicates = new Predicate[] - { - Predicate.Equals(CampaignCriterion.Fields.CampaignId, campaignId) - }, - paging = Paging.Default - }; - - CampaignCriterionPage page = new CampaignCriterionPage(); - - try - { - do - { - // Get all campaign targets. - page = campaignCriterionService.get(selector); - - // Display the results. - if (page != null && page.entries != null) - { - int i = selector.paging.startIndex; - foreach (CampaignCriterion campaignCriterion in page.entries) - { - string negative = (campaignCriterion is NegativeCampaignCriterion) - ? "Negative " - : ""; - Console.WriteLine( - "{0}) {1}Campaign criterion with id = '{2}' and Type = {3} " + - "was found for campaign id '{4}'", i + 1, negative, - campaignCriterion.criterion.id, - campaignCriterion.criterion.type, campaignCriterion.campaignId); - i++; - } - } - - selector.paging.IncreaseOffset(); - } while (selector.paging.startIndex < page.totalNumEntries); - - Console.WriteLine("Number of campaign targeting criteria found: {0}", - page.totalNumEntries); - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to get campaign targeting criteria.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Targeting/GetTargetableLanguagesAndCarriers.cs b/examples/AdWords/CSharp/v201806/Targeting/GetTargetableLanguagesAndCarriers.cs deleted file mode 100755 index e6b5064b5fa..00000000000 --- a/examples/AdWords/CSharp/v201806/Targeting/GetTargetableLanguagesAndCarriers.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example illustrates how to retrieve all carriers and languages - /// available for targeting. - /// - public class GetTargetableLanguagesAndCarriers : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - GetTargetableLanguagesAndCarriers codeExample = new GetTargetableLanguagesAndCarriers(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get - { - return "This code example illustrates how to retrieve all carriers and languages " + - "available for targeting."; - } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (ConstantDataService constantDataService = - (ConstantDataService) user.GetService(AdWordsService.v201806.ConstantDataService)) - { - try - { - // Get all carriers. - Carrier[] carriers = constantDataService.getCarrierCriterion(); - - // Display the results. - if (carriers != null) - { - foreach (Carrier carrier in carriers) - { - Console.WriteLine( - "Carrier name is '{0}', ID is {1} and country code is '{2}'.", - carrier.name, carrier.id, carrier.countryCode); - } - } - else - { - Console.WriteLine("No carriers were retrieved."); - } - - // Get all languages. - Language[] languages = constantDataService.getLanguageCriterion(); - - // Display the results. - if (languages != null) - { - foreach (Language language in languages) - { - Console.WriteLine( - "Language name is '{0}', ID is {1} and code is '{2}'.", - language.name, language.id, language.code); - } - } - else - { - Console.WriteLine("No languages were found."); - } - } - catch (Exception e) - { - throw new System.ApplicationException( - "Failed to get targetable carriers and languages.", e); - } - } - } - } -} diff --git a/examples/AdWords/CSharp/v201806/Targeting/LookupLocation.cs b/examples/AdWords/CSharp/v201806/Targeting/LookupLocation.cs deleted file mode 100755 index 67881c8b21a..00000000000 --- a/examples/AdWords/CSharp/v201806/Targeting/LookupLocation.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Examples.CSharp.v201806 -{ - /// - /// This code example gets location criteria by name. - /// - public class LookupLocation : ExampleBase - { - /// - /// Main method, to run this code example as a standalone application. - /// - /// The command line arguments. - public static void Main(string[] args) - { - LookupLocation codeExample = new LookupLocation(); - Console.WriteLine(codeExample.Description); - try - { - codeExample.Run(new AdWordsUser()); - } - catch (Exception e) - { - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)); - } - } - - /// - /// Returns a description about the code example. - /// - public override string Description - { - get { return "This code example gets location criteria by name."; } - } - - /// - /// Runs the code example. - /// - /// The AdWords user. - public void Run(AdWordsUser user) - { - using (LocationCriterionService locationCriterionService = - (LocationCriterionService) user.GetService(AdWordsService.v201806 - .LocationCriterionService)) - { - string[] locationNames = new string[] - { - "Paris", - "Quebec", - "Spain", - "Deutschland" - }; - - Selector selector = new Selector() - { - fields = new string[] - { - Location.Fields.Id, - Location.Fields.LocationName, - LocationCriterion.Fields.CanonicalName, - Location.Fields.DisplayType, - Location.Fields.ParentLocations, - LocationCriterion.Fields.Reach, - Location.Fields.TargetingStatus - }, - - predicates = new Predicate[] - { - // Location names must match exactly, only EQUALS and IN are supported. - Predicate.In(Location.Fields.LocationName, locationNames), - - // Set the locale of the returned location names. - Predicate.Equals(LocationCriterion.Fields.Locale, "en") - } - }; - - try - { - // Make the get request. - LocationCriterion[] locationCriteria = locationCriterionService.get(selector); - - // Display the resulting location criteria. - foreach (LocationCriterion locationCriterion in locationCriteria) - { - string parentLocations = "N/A"; - - if (locationCriterion.location != null && - locationCriterion.location.parentLocations != null) - { - List parentLocationList = new List(); - foreach (Location location in locationCriterion.location.parentLocations - ) - { - parentLocationList.Add(GetLocationString(location)); - } - - parentLocations = string.Join(", ", parentLocationList); - } - - Console.WriteLine( - "The search term '{0}' returned the location '{1}' of type '{2}' " + - "with parent locations '{3}', reach '{4}' and targeting status '{5}.", - locationCriterion.searchTerm, locationCriterion.location.locationName, - locationCriterion.location.displayType, parentLocations, - locationCriterion.reach, locationCriterion.location.targetingStatus); - } - } - catch (Exception e) - { - throw new System.ApplicationException("Failed to get location criteria.", e); - } - } - } - - /// - /// Gets a string representation for a location. - /// - /// The location - /// The string representation - public string GetLocationString(Location location) - { - return string.Format("{0} ({1})", location.locationName, location.displayType); - } - } -} diff --git a/examples/AdWords/Vb/AdWords.Examples.VB.vbproj b/examples/AdWords/Vb/AdWords.Examples.VB.vbproj index 04f5ab5ece3..97ee8063204 100755 --- a/examples/AdWords/Vb/AdWords.Examples.VB.vbproj +++ b/examples/AdWords/Vb/AdWords.Examples.VB.vbproj @@ -16,7 +16,7 @@
- + diff --git a/examples/AdWords/Vb/App.config b/examples/AdWords/Vb/App.config index a105b874bbc..87d0ce37f55 100755 --- a/examples/AdWords/Vb/App.config +++ b/examples/AdWords/Vb/App.config @@ -2,6 +2,7 @@
+
- - - - - - ''' This code example accepts a pending invitation to link your AdWords - ''' account to a Google Merchant Center account. - ''' - Public Class AcceptServiceLink - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AcceptServiceLink - Console.WriteLine(codeExample.Description) - Try - Dim serviceLinkId As Long = Long.Parse("INSERT_SERVICE_LINK_ID_HERE") - codeExample.Run(New AdWordsUser, serviceLinkId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example accepts a pending invitation to link your AdWords " & - "account to a Google Merchant Center account." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The service link ID to accept. - Public Sub Run(ByVal user As AdWordsUser, ByVal serviceLinkId As Long) - ' [START acceptServiceLink] MOE:strip_line - Using customerService As CustomerService = CType( - user.GetService( - AdWordsService.v201806.CustomerService), - CustomerService) - - ' Create the operation to set the status to ACTIVE. - Dim op As New ServiceLinkOperation() - op.operator = [Operator].SET - Dim serviceLink As New ServiceLink() - serviceLink.serviceLinkId = serviceLinkId - serviceLink.serviceType = ServiceType.MERCHANT_CENTER - serviceLink.linkStatus = ServiceLinkLinkStatus.ACTIVE - op.operand = serviceLink - - Try - ' Update the service link. - Dim mutatedServiceLinks As ServiceLink() = - customerService.mutateServiceLinks(New ServiceLinkOperation() {op}) - - ' Display the results. - For Each mutatedServiceLink As ServiceLink In mutatedServiceLinks - Console.WriteLine( - "Service link with service link ID {0}, type '{1}' updated to " & - "status: {2}.", mutatedServiceLink.serviceLinkId, - mutatedServiceLink.serviceType, - mutatedServiceLink.linkStatus) - Next - ' [END acceptServiceLink] MOE:strip_line - Catch e As Exception - Throw New System.ApplicationException("Failed to update service link.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AccountManagement/CreateAccount.vb b/examples/AdWords/Vb/v201806/AccountManagement/CreateAccount.vb deleted file mode 100755 index 9f92a3182b3..00000000000 --- a/examples/AdWords/Vb/v201806/AccountManagement/CreateAccount.vb +++ /dev/null @@ -1,96 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to create an account. Note by default, - ''' this account will only be accessible via its parent AdWords manager - ''' account. - ''' - Public Class CreateAccount - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New CreateAccount - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to create an account. Note by default, " & - "this account will only be accessible via its parent AdWords manager " & - "account." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using managedCustomerService As ManagedCustomerService = CType( - user.GetService( - AdWordsService.v201806.ManagedCustomerService), - ManagedCustomerService) - - ' Create account. - Dim customer As New ManagedCustomer() - customer.name = "Customer created with ManagedCustomerService on " & - New DateTime().ToString() - customer.currencyCode = "EUR" - customer.dateTimeZone = "Europe/London" - - ' Create operations. - Dim operation As New ManagedCustomerOperation() - operation.operand = customer - operation.operator = [Operator].ADD - - Try - Dim operations As ManagedCustomerOperation() = New ManagedCustomerOperation() _ - {operation} - ' Add account. - Dim result As ManagedCustomerReturnValue = - managedCustomerService.mutate(operations) - - ' Display accounts. - If (Not result.value Is Nothing) AndAlso (result.value.Length > 0) Then - Dim customerResult As ManagedCustomer = result.value(0) - Console.WriteLine("Account with customer ID '{0}' was created.", - customerResult.customerId) - Else - Console.WriteLine("No accounts were created.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create accounts.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AccountManagement/GetAccountChanges.vb b/examples/AdWords/Vb/v201806/AccountManagement/GetAccountChanges.vb deleted file mode 100755 index 8634ec059b5..00000000000 --- a/examples/AdWords/Vb/v201806/AccountManagement/GetAccountChanges.vb +++ /dev/null @@ -1,183 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports System.Text - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets the changes in the account during the last 24 - ''' hours. - ''' - Public Class GetAccountChanges - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAccountChanges - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets the changes in the account during the last 24 hours." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using customerSyncService As CustomerSyncService = CType( - user.GetService( - AdWordsService.v201806.CustomerSyncService), - CustomerSyncService) - - ' The date time string should be of the form yyyyMMdd HHmmss zzz. - Dim minDateTime As String = (DateTime.Now.AddDays(- 1).ToUniversalTime.ToString( - "yyyyMMdd HHmmss") & " UTC") - Dim maxDateTime As String = (DateTime.Now.ToUniversalTime.ToString( - "yyyyMMdd HHmmss") & " UTC") - - ' Create date time range. - Dim dateTimeRange As New DateTimeRange - dateTimeRange.min = minDateTime - dateTimeRange.max = maxDateTime - - Try - ' Create the selector. - Dim selector As New CustomerSyncSelector - selector.dateTimeRange = dateTimeRange - selector.campaignIds = GetAllCampaignIds(user) - - ' Get all account changes for campaign. - Dim accountChanges As CustomerChangeData = customerSyncService.get(selector) - - ' Display the changes. - If ((Not accountChanges Is Nothing) AndAlso - (Not accountChanges.changedCampaigns Is Nothing)) Then - Console.WriteLine("Displaying changes up to: {0}", - accountChanges.lastChangeTimestamp) - - For Each campaignChanges As CampaignChangeData In _ - accountChanges.changedCampaigns - Console.WriteLine("Campaign with id ""{0}"" was changed:", - campaignChanges.campaignId) - Console.WriteLine(" Campaign changed status: {0}", - campaignChanges.campaignChangeStatus) - If (campaignChanges.campaignChangeStatus <> ChangeStatus.NEW) Then - - Console.WriteLine(" Added campaign criteria: {0}", - GetFormattedList( - campaignChanges.addedCampaignCriteria)) - - Console.WriteLine(" Removed campaign criteria: {0}", - GetFormattedList( - campaignChanges.removedCampaignCriteria)) - - If (Not campaignChanges.changedAdGroups Is Nothing) Then - For Each adGroupChanges As AdGroupChangeData In _ - campaignChanges.changedAdGroups - Console.WriteLine(" Ad group with id ""{0}"" was changed:", - adGroupChanges.adGroupId) - Console.WriteLine(" Ad group changed status: {0}", - adGroupChanges.adGroupChangeStatus) - If (adGroupChanges.adGroupChangeStatus <> _ - ChangeStatus.NEW) Then - Console.WriteLine(" Ads changed: {0}", - GetFormattedList( - adGroupChanges.changedAds)) - Console.WriteLine(" Criteria changed: {0}", - GetFormattedList( - adGroupChanges.changedCriteria)) - Console.WriteLine(" Criteria removed: {0}", - GetFormattedList( - adGroupChanges.removedCriteria)) - End If - Next - End If - End If - Console.WriteLine() - Next - Else - Console.WriteLine("No account changes were found.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to get account changes.", e) - End Try - End Using - End Sub - - ''' - ''' Formats a list of ids as a comma separated string. - ''' - ''' The list of ids. - ''' The comma separed formatted string, enclosed in square braces. - ''' - Private Function GetFormattedList(ByVal ids As Long()) As String - Dim builder As New StringBuilder - If (Not ids Is Nothing) Then - For Each id As Long In ids - builder.AppendFormat("{0}, ", id) - Next - End If - Return ("[" & builder.ToString.TrimEnd(New Char() {","c, " "c}) & "]") - End Function - - ''' - ''' Gets all campaign ids in the account. - ''' - ''' The user for which campaigns are retrieved. - ''' The list of campaign ids. - Private Function GetAllCampaignIds(ByVal user As AdWordsUser) As Long() - ' Get the CampaignService. - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - Dim allCampaigns As New List(Of Long) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() {Campaign.Fields.Id} - - ' Get all campaigns. - Dim page As CampaignPage = campaignService.get(selector) - - ' Return the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - For Each campaign As Campaign In page.entries - allCampaigns.Add(campaign.id) - Next - End If - Return allCampaigns.ToArray - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AccountManagement/GetAccountHierarchy.vb b/examples/AdWords/Vb/v201806/AccountManagement/GetAccountHierarchy.vb deleted file mode 100755 index 5393d81a047..00000000000 --- a/examples/AdWords/Vb/v201806/AccountManagement/GetAccountHierarchy.vb +++ /dev/null @@ -1,218 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports System.Text - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to retrieve the account hierarchy under - ''' an account. This code example won't work with Test Accounts. See - ''' https://developers.google.com/adwords/api/docs/test-accounts - ''' - Public Class GetAccountHierarchy - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAccountHierarchy - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example illustrates how to retrieve the account hierarchy under " & - "an account. This code example won't work with Test Accounts. See " & - "https://developers.google.com/adwords/api/docs/test-accounts" - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using managedCustomerService As ManagedCustomerService = CType( - user.GetService( - AdWordsService.v201806.ManagedCustomerService), - ManagedCustomerService) - - ' Create selector. - Dim selector As New Selector() - selector.fields = New String() { _ - ManagedCustomer.Fields.CustomerId, - ManagedCustomer.Fields.Name - } - selector.paging = Paging.Default - - ' Map from customerId to customer node. - Dim customerIdToCustomerNode As Dictionary(Of Long, ManagedCustomerTreeNode) = - New Dictionary(Of Long, ManagedCustomerTreeNode)() - - ' Temporary cache to save links. - Dim allLinks As New List(Of ManagedCustomerLink) - - Dim page As ManagedCustomerPage = Nothing - Try - Do - page = managedCustomerService.get(selector) - - ' Display serviced account graph. - If Not page.entries Is Nothing Then - ' Create account tree nodes for each customer. - For Each customer As ManagedCustomer In page.entries - Dim node As New ManagedCustomerTreeNode() - node.Account = customer - customerIdToCustomerNode.Add(customer.customerId, node) - Next - - If Not page.links Is Nothing Then - allLinks.AddRange(page.links) - End If - End If - - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - - ' For each link, connect nodes in tree. - For Each link As ManagedCustomerLink In allLinks - Dim managerNode As ManagedCustomerTreeNode = - customerIdToCustomerNode(link.managerCustomerId) - Dim childNode As ManagedCustomerTreeNode = - customerIdToCustomerNode(link.clientCustomerId) - childNode.ParentNode = managerNode - If (Not managerNode Is Nothing) Then - managerNode.ChildAccounts.Add(childNode) - End If - Next - - ' Find the root account node in the tree. - Dim rootNode As ManagedCustomerTreeNode = Nothing - For Each node As ManagedCustomerTreeNode In customerIdToCustomerNode.Values - If node.ParentNode Is Nothing Then - rootNode = node - Exit For - End If - Next - - ' Display account tree. - Console.WriteLine("CustomerId, Name") - Console.WriteLine(rootNode.ToTreeString(0, New StringBuilder())) - Catch e As Exception - Throw New System.ApplicationException("Failed to get accounts.", e) - End Try - End Using - End Sub - End Class - - ''' - '''Example implementation of a node that would exist in an account tree. - ''' - Class ManagedCustomerTreeNode - ''' - ''' The parent node. - ''' - Private _parentNode As ManagedCustomerTreeNode - - ''' - ''' The account associated with this node. - ''' - Private _account As ManagedCustomer - - ''' - ''' The list of child accounts. - ''' - Private _childAccounts As New List(Of ManagedCustomerTreeNode) - - ''' - ''' Gets or sets the parent node. - ''' - Public Property ParentNode() As ManagedCustomerTreeNode - Get - Return _parentNode - End Get - Set(ByVal value As ManagedCustomerTreeNode) - _parentNode = value - End Set - End Property - - ''' - ''' Gets or sets the account. - ''' - Public Property Account() As ManagedCustomer - Get - Return _account - End Get - Set(ByVal value As ManagedCustomer) - _account = value - End Set - End Property - - ''' - ''' Gets or sets the child accounts. - ''' - Public Property ChildAccounts() As List(Of ManagedCustomerTreeNode) - Get - Return _childAccounts - End Get - Set(ByVal value As List(Of ManagedCustomerTreeNode)) - _childAccounts = value - End Set - End Property - - ''' - ''' Returns a that represents this instance. - ''' - ''' - ''' A that represents this instance. - ''' - Public Overrides Function ToString() As String - Return String.Format("{0}, {1}", _account.customerId, _account.name) - End Function - - ''' - ''' Returns a string representation of the current level of the tree and - ''' recursively returns the string representation of the levels below it. - ''' - ''' The depth of the node. - ''' The String Builder containing the tree - ''' representation. - ''' The tree string representation. - Public Function ToTreeString(ByVal depth As Integer, ByVal sb As StringBuilder) _ - As StringBuilder - sb.Append("-"c, depth*2) - sb.Append(Me) - sb.AppendLine() - For Each childAccount As ManagedCustomerTreeNode In _childAccounts - childAccount.ToTreeString(depth + 1, sb) - Next - Return sb - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddAdCustomizers.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddAdCustomizers.vb deleted file mode 100755 index dcba719833a..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddAdCustomizers.vb +++ /dev/null @@ -1,312 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds an ad customizer feed. Then it adds an ad in two - ''' different ad groups that uses the feed to populate dynamic data. - ''' - Public Class AddAdCustomizers - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddAdCustomizers - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId1 As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim adGroupId2 As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim feedName As String = "INSERT_FEED_NAME_HERE" - codeExample.Run(New AdWordsUser(), adGroupId1, adGroupId2, feedName) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds an ad customizer feed. Then it adds an ad in two " & - "different ad groups that uses the feed to populate dynamic data." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the first adgroup to which ads with ad - ''' customizers are added. - ''' Id of the second adgroup to which ads with ad - ''' customizers are added. - ''' Name of the feed to be created. - Public Sub Run(ByVal user As AdWordsUser, - ByVal adGroupId1 As Long, - ByVal adGroupId2 As Long, - ByVal feedName As String) - Try - ' Create a customizer feed. One feed per account can be used for all ads. - Dim adCustomizerFeed As AdCustomizerFeed = CreateCustomizerFeed(user, feedName) - - ' Add feed items containing the values we'd like to place in ads. - CreateCustomizerFeedItems(user, New Long() {adGroupId1, adGroupId2}, - adCustomizerFeed) - - ' All set! We can now create ads with customizations. - CreateAdsWithCustomizations(user, New Long() {adGroupId1, adGroupId2}, feedName) - Catch e As Exception - Throw New System.ApplicationException("Failed to add ad customizers modifiers to " + - "ad group.", e) - End Try - End Sub - - ''' - ''' Creates a new Feed for ad customizers. - ''' - ''' The AdWords user. - ''' Name of the feed to be created. - ''' An ad customizer feed. - Private Shared Function CreateCustomizerFeed(ByVal user As AdWordsUser, - ByVal feedName As String) As AdCustomizerFeed - ' [START createFeed] MOE:strip_line - Using adCustomizerFeedService As AdCustomizerFeedService = DirectCast( - user.GetService( - AdWordsService.v201806.AdCustomizerFeedService), - AdCustomizerFeedService) - - Dim feed As New AdCustomizerFeed() - feed.feedName = feedName - - Dim attribute1 As New AdCustomizerFeedAttribute - attribute1.name = "Name" - attribute1.type = AdCustomizerFeedAttributeType.STRING - - Dim attribute2 As New AdCustomizerFeedAttribute - attribute2.name = "Price" - attribute2.type = AdCustomizerFeedAttributeType.PRICE - - Dim attribute3 As New AdCustomizerFeedAttribute - attribute3.name = "Date" - attribute3.type = AdCustomizerFeedAttributeType.DATE_TIME - - feed.feedAttributes = New AdCustomizerFeedAttribute() { _ - attribute1, attribute2, - attribute3 - } - ' [END createFeed] MOE:strip_line - - ' [START mutateFeed] MOE:strip_line - Dim feedOperation As New AdCustomizerFeedOperation() - feedOperation.operand = feed - feedOperation.operator = [Operator].ADD - - Dim addedFeed As AdCustomizerFeed = adCustomizerFeedService.mutate( - New AdCustomizerFeedOperation() {feedOperation}).value(0) - - Console.WriteLine("Created ad customizer feed with ID = {0} and name = '{1}'.", - addedFeed.feedId, addedFeed.feedName) - ' [END mutateFeed] MOE:strip_line - Return addedFeed - End Using - End Function - - ''' - ''' Creates FeedItems with the values to use in ad customizations for each - ''' ad group in adGroupIds. - ''' - ''' The AdWords user. - ''' IDs of adgroups to which ad customizations are - ''' made. - ''' The ad customizer feed. - Private Shared Sub CreateCustomizerFeedItems(ByVal user As AdWordsUser, - ByVal adGroupIds As Long(), - ByVal adCustomizerFeed As AdCustomizerFeed) - Using feedItemService As FeedItemService = CType( - user.GetService( - AdWordsService.v201806.FeedItemService), - FeedItemService) - - Dim feedItemOperations As New List(Of FeedItemOperation) - - ' [START specifyFeedItemValues] MOE:strip_line - Dim marsDate As New DateTime(DateTime.Now.Year, DateTime.Now.Month, 1) - feedItemOperations.Add(CreateFeedItemAddOperation(adCustomizerFeed, "Mars", - "$1234.56", - marsDate.ToString( - "yyyyMMdd HHmmss"))) - - Dim venusDate As New DateTime(DateTime.Now.Year, DateTime.Now.Month, 15) - feedItemOperations.Add(CreateFeedItemAddOperation(adCustomizerFeed, "Venus", - "$1450.00", - venusDate.ToString( - "yyyyMMdd HHmmss"))) - ' [END specifyFeedItemValues] MOE:strip_line - Dim feedItemReturnValue As FeedItemReturnValue = feedItemService.mutate( - feedItemOperations.ToArray) - - For Each addedFeedItem As FeedItem In feedItemReturnValue.value - Console.WriteLine("Added feed item with ID {0}", addedFeedItem.feedItemId) - Next - - ' Add feed item targeting to restrict the feed item to specific ad groups. - RestrictFeedItemToAdGroup(user, feedItemReturnValue.value(0), adGroupIds(0)) - RestrictFeedItemToAdGroup(user, feedItemReturnValue.value(1), adGroupIds(1)) - End Using - End Sub - - ''' - ''' Restricts the feed item to an ad group. - ''' - ''' The user. - ''' The feed item. - ''' The ad group ID. - Private Shared Sub RestrictFeedItemToAdGroup(user As AdWordsUser, - feedItem As FeedItem, adGroupId As Long?) - Dim adGroupTarget As New FeedItemAdGroupTarget() - adGroupTarget.feedId = feedItem.feedId - adGroupTarget.feedItemId = feedItem.feedItemId - adGroupTarget.adGroupId = adGroupId.Value - - Using feedItemTargetService As FeedItemTargetService = CType( - user.GetService( - AdWordsService.v201806.FeedItemTargetService), - FeedItemTargetService) - Dim operation As New FeedItemTargetOperation() - operation.operator = [Operator].ADD - operation.operand = adGroupTarget - - Dim retval As FeedItemTargetReturnValue = feedItemTargetService.mutate( - New FeedItemTargetOperation() {operation}) - Dim newAdGroupTarget As FeedItemAdGroupTarget = - CType(retval.value(0), FeedItemAdGroupTarget) - Console.WriteLine("Feed item target for feed ID {0} and feed item ID {1}" + - " was created to restrict serving to ad group ID {2}", - newAdGroupTarget.feedId, newAdGroupTarget.feedItemId, - newAdGroupTarget.adGroupId) - End Using - End Sub - - ''' - ''' Creates a FeedItemOperation that will create a FeedItem with the - ''' specified values when sent to FeedItemService.mutate. - ''' - ''' The ad customizer feed. - ''' The value for the name attribute of the - ''' FeedItem. - ''' The value for the price attribute of the - ''' FeedItem. - ''' The value for the date attribute of the - ''' FeedItem. - ''' A new FeedItemOperation for adding a FeedItem. - Private Shared Function CreateFeedItemAddOperation(ByVal adCustomizerFeed As _ - AdCustomizerFeed, - ByVal nameValue As String, - ByVal priceValue As String, - ByVal dateValue As String) _ - As FeedItemOperation - ' [START createFeedItem] MOE:strip_line - Dim feedItem As New FeedItem - feedItem.feedId = adCustomizerFeed.feedId - Dim attributeValues As New List(Of FeedItemAttributeValue) - - ' FeedAttributes appear in the same order as they were created - ' - Name, Price, Date. See CreateCustomizerFeed method for details. - Dim nameAttributeValue As New FeedItemAttributeValue - nameAttributeValue.feedAttributeId = adCustomizerFeed.feedAttributes(0).id - nameAttributeValue.stringValue = nameValue - attributeValues.Add(nameAttributeValue) - - Dim priceAttributeValue As New FeedItemAttributeValue - priceAttributeValue.feedAttributeId = adCustomizerFeed.feedAttributes(1).id - priceAttributeValue.stringValue = priceValue - attributeValues.Add(priceAttributeValue) - - Dim dateAttributeValue As New FeedItemAttributeValue - dateAttributeValue.feedAttributeId = adCustomizerFeed.feedAttributes(2).id - dateAttributeValue.stringValue = dateValue - attributeValues.Add(dateAttributeValue) - - feedItem.attributeValues = attributeValues.ToArray - - ' [END createFeedItem] MOE:strip_line - - Dim feedItemOperation As New FeedItemOperation - feedItemOperation.operand = feedItem - feedItemOperation.operator = [Operator].ADD - - Return feedItemOperation - End Function - - ''' - ''' Creates text ads that use ad customizations for the specified ad group - ''' IDs. - ''' - ''' The AdWords user. - ''' IDs of the ad groups to which customized ads - ''' are added. - ''' Name of the feed to use. - Private Shared Sub CreateAdsWithCustomizations(ByVal user As AdWordsUser, - ByVal adGroupIds As Long(), - ByVal feedName As String) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' [START createAd] MOE:strip_line - Dim expandedTextAd As New ExpandedTextAd - expandedTextAd.headlinePart1 = String.Format("Luxury Cruise to {{={0}.Name}}", - feedName) - expandedTextAd.headlinePart2 = String.Format("Only {{={0}.Price}}", feedName) - expandedTextAd.description = - String.Format("Offer ends in {{=countdown({0}.Date)}}!", - feedName) - expandedTextAd.finalUrls = New String() {"http://www.example.com"} - ' [END createAd] MOE:strip_line - - ' We add the same ad to both ad groups. When they serve, they will show - ' different values, since they match different feed items. - Dim adGroupAdOperations As New List(Of AdGroupAdOperation) - For Each adGroupId As Long In adGroupIds - Dim adGroupAd As New AdGroupAd - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = expandedTextAd - - Dim adGroupAdOperation As New AdGroupAdOperation - adGroupAdOperation.operand = adGroupAd - adGroupAdOperation.operator = [Operator].ADD - - adGroupAdOperations.Add(adGroupAdOperation) - Next - - Dim adGroupAdReturnValue As AdGroupAdReturnValue = adGroupAdService.mutate( - adGroupAdOperations.ToArray) - - For Each addedAd As AdGroupAd In adGroupAdReturnValue.value - Console.WriteLine("Created an ad with ID {0}, type '{1}' and status '{2}'.", - addedAd.ad.id, addedAd.ad.AdType, addedAd.status) - Next - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddAdGroupBidModifier.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddAdGroupBidModifier.vb deleted file mode 100755 index 809966e3e24..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddAdGroupBidModifier.vb +++ /dev/null @@ -1,108 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to add ad group level mobile bid - ''' modifier override. - ''' - Public Class AddAdGroupBidModifier - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddAdGroupBidModifier - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim bidModifier As Double = Double.Parse("INSERT_ADGROUP_BID_MODIFIER_HERE") - codeExample.Run(New AdWordsUser, adGroupId, bidModifier) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to add ad group level mobile bid" & - " modifier override." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the adgroup for which bid modifier is - ''' set. - ''' The mobile bid modifier for adgroup - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, - ByVal bidModifier As Double) - Using adGroupBidModifierService As AdGroupBidModifierService = CType( - user.GetService( - AdWordsService.v201806.AdGroupBidModifierService), - AdGroupBidModifierService) - - ' Mobile criterion ID. - Dim criterionId As Long = 30001 - - ' Create the adgroup bid modifier. - Dim adGroupBidModifier As New AdGroupBidModifier() - adGroupBidModifier.bidModifier = bidModifier - adGroupBidModifier.adGroupId = adGroupId - - Dim platform As New Platform() - platform.id = criterionId - - adGroupBidModifier.criterion = platform - - Dim operation As New AdGroupBidModifierOperation() - operation.operator = [Operator].ADD - operation.operand = adGroupBidModifier - - Try - ' Add ad group level mobile bid modifier. - Dim retval As AdGroupBidModifierReturnValue = adGroupBidModifierService.mutate( - New AdGroupBidModifierOperation() {operation}) - - ' Display the results. - If Not retval Is Nothing AndAlso Not retval.value Is Nothing AndAlso - retval.value.Length > 0 Then - Dim newBidModifier As AdGroupBidModifier = retval.value(0) - Console.WriteLine( - "AdGroup ID {0}, Criterion ID {1} was updated with ad group " & - "level modifier: {2}", newBidModifier.adGroupId, - newBidModifier.criterion.id, - newBidModifier.bidModifier) - Else - Console.WriteLine("No bid modifiers were added to the adgroup.") - End If - Catch e As Exception - Throw New _ - System.ApplicationException("Failed to add bid modifiers to adgroup.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicPageFeed.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicPageFeed.vb deleted file mode 100755 index 67e2725e67e..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicPageFeed.vb +++ /dev/null @@ -1,444 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a page feed to specify precisely which URLs to use with your - ''' Dynamic Search Ads campaign. To create a Dynamic Search Ads campaign, run - ''' AddDynamicSearchAdsCampaign.vb. To get campaigns, run GetCampaigns.vb. - ''' - Public Class AddDynamicPageFeed - Inherits ExampleBase - - ''' - ''' The criterion type to be used for DSA page feeds. - ''' - ''' DSA page feeds use criterionType field instead of the placeholderType field - ''' unlike most other feed types. - Private Const DSA_PAGE_FEED_CRITERION_TYPE As Integer = 61 - - ''' - ''' ID that corresponds to the page URLs. - ''' - Private Const DSA_PAGE_URLS_FIELD_ID As Integer = 1 - - ''' - ''' ID that corresponds to the labels. - ''' - Private Const DSA_LABEL_FIELD_ID As Integer = 2 - - ''' - ''' Class to keep track of DSA page feed details. - ''' - Private Class DSAFeedDetails - Dim feedIdField As Long - Dim urlAttributeIdField As Long - Dim labelAttributeIdField As Long - - Public Property FeedId As Long - Get - Return feedIdField - End Get - Set(ByVal value As Long) - feedIdField = value - End Set - End Property - - Public Property UrlAttributeId As Long - Get - Return urlAttributeIdField - End Get - Set(ByVal value As Long) - urlAttributeIdField = value - End Set - End Property - - Public Property LabelAttributeId As Long - Get - Return labelAttributeIdField - End Get - Set(ByVal value As Long) - labelAttributeIdField = value - End Set - End Property - End Class - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddDynamicSearchAdsCampaign - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a page feed to specify precisely which URLs to use " & - "with your Dynamic Search Ads campaign. To create a Dynamic Search Ads " & - "campaign, run AddDynamicSearchAdsCampaign.vb. To get campaigns, run " & - "GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long, ByVal adgroupId As Long) - Dim dsaPageUrlLabel As String = "discounts" - - Try - ' Get the page feed details. This code example creates a new feed, but you can - ' fetch and re-use an existing feed. - Dim feedDetails As DSAFeedDetails = CreateFeed(user) - CreateFeedMapping(user, feedDetails) - CreateFeedItems(user, feedDetails, dsaPageUrlLabel) - - ' Associate the page feed with the campaign. - UpdateCampaignDsaSetting(user, campaignId, feedDetails.FeedId) - - ' Optional: Target Web pages matching the feed's label in the ad group. - AddDsaTargeting(user, adgroupId, dsaPageUrlLabel) - Console.WriteLine("Dynamic page feed setup is complete for campaign ID '{0}'.", - campaignId) - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to setup dynamic page feed for campaign.", e) - End Try - End Sub - - ''' - ''' Creates the feed for DSA page URLs. - ''' - ''' The AdWords User. - ''' The feed details. - Private Function CreateFeed(ByVal user As AdWordsUser) As DSAFeedDetails - Using feedService As FeedService = CType( - user.GetService( - AdWordsService.v201806.FeedService), - FeedService) - - ' Create attributes. - Dim urlAttribute As New FeedAttribute() - urlAttribute.type = FeedAttributeType.URL_LIST - urlAttribute.name = "Page URL" - - Dim labelAttribute As New FeedAttribute() - labelAttribute.type = FeedAttributeType.STRING_LIST - labelAttribute.name = "Label" - - ' Create the feed. - Dim sitelinksFeed As New Feed() - sitelinksFeed.name = "DSA Feed " + ExampleUtilities.GetRandomString() - sitelinksFeed.attributes = New FeedAttribute() {urlAttribute, labelAttribute} - sitelinksFeed.origin = FeedOrigin.USER - - ' Create operation. - Dim operation As New FeedOperation() - operation.operand = sitelinksFeed - operation.operator = [Operator].ADD - - ' Add the feed. - Dim result As FeedReturnValue = feedService.mutate(New FeedOperation() {operation}) - - Dim savedFeed As Feed = result.value(0) - - Dim retval As New DSAFeedDetails - retval.FeedId = savedFeed.id - retval.UrlAttributeId = savedFeed.attributes(0).id - retval.LabelAttributeId = savedFeed.attributes(1).id - Return retval - End Using - End Function - - ''' - ''' Creates the feed mapping for DSA page feeds. - ''' - ''' The AdWords user. - ''' The feed details. - Private Sub CreateFeedMapping(ByVal user As AdWordsUser, - ByVal feedDetails As DSAFeedDetails) - Using feedMappingService As FeedMappingService = CType( - user.GetService( - AdWordsService.v201806.FeedMappingService), - FeedMappingService) - - ' Map the FeedAttributeIds to the fieldId constants. - Dim urlFieldMapping As New AttributeFieldMapping() - urlFieldMapping.feedAttributeId = feedDetails.UrlAttributeId - urlFieldMapping.fieldId = DSA_PAGE_URLS_FIELD_ID - - Dim labelFieldMapping As New AttributeFieldMapping() - labelFieldMapping.feedAttributeId = feedDetails.LabelAttributeId - labelFieldMapping.fieldId = DSA_LABEL_FIELD_ID - - ' Create the fieldMapping and operation. - Dim feedMapping As New FeedMapping() - feedMapping.criterionType = DSA_PAGE_FEED_CRITERION_TYPE - feedMapping.feedId = feedDetails.FeedId - feedMapping.attributeFieldMappings = - New AttributeFieldMapping() { _ - urlFieldMapping, - labelFieldMapping - } - - Dim operation As New FeedMappingOperation() - operation.operand = feedMapping - operation.operator = [Operator].ADD - - ' Add the field mapping. - feedMappingService.mutate(New FeedMappingOperation() {operation}) - End Using - End Sub - - ''' - ''' Creates the page URLs in the DSA page feed. - ''' - ''' The AdWords user. - ''' The feed details. - ''' The pagefeed url label. - Private Sub CreateFeedItems(ByVal user As AdWordsUser, ByVal feedDetails As DSAFeedDetails, - ByVal labelName As String) - Using feedItemService As FeedItemService = CType( - user.GetService( - AdWordsService.v201806.FeedItemService), - FeedItemService) - - Dim rentalCarsUrl As String = "http://www.example.com/discounts/rental-cars" - Dim hotelDealsUrl As String = "http://www.example.com/discounts/hotel-deals" - Dim flightDealsUrl As String = "http://www.example.com/discounts/flight-deals" - Dim operations() As FeedItemOperation = - { _ - CreateDsaUrlAddOperation(feedDetails, - rentalCarsUrl, - labelName), - CreateDsaUrlAddOperation(feedDetails, - hotelDealsUrl, - labelName), - CreateDsaUrlAddOperation(feedDetails, - flightDealsUrl, - labelName) - } - feedItemService.mutate(operations) - End Using - End Sub - - ''' - ''' Creates the DSA URL add operation. - ''' - ''' The page feed details. - ''' The DSA page feed URL. - ''' DSA page feed label. - ''' The DSA URL add operation. - Private Function CreateDsaUrlAddOperation(ByVal feedDetails As DSAFeedDetails, - ByVal url As String, ByVal label As String) _ - As FeedItemOperation - ' Create the FeedItemAttributeValues for our text values. - Dim urlAttributeValue As New FeedItemAttributeValue() - urlAttributeValue.feedAttributeId = feedDetails.UrlAttributeId - - ' See https://support.google.com/adwords/answer/7166527 for page feed URL - ' recommendations and rules. - urlAttributeValue.stringValues = New String() {url} - - Dim labelAttributeValue As New FeedItemAttributeValue() - labelAttributeValue.feedAttributeId = feedDetails.LabelAttributeId - labelAttributeValue.stringValues = New String() {label} - - ' Create the feed item and operation. - Dim item As New FeedItem() - item.feedId = feedDetails.FeedId - - item.attributeValues = New FeedItemAttributeValue() { _ - urlAttributeValue, - labelAttributeValue - } - - Dim operation As New FeedItemOperation() - operation.operand = item - operation.operator = [Operator].ADD - - Return operation - End Function - - ''' - ''' Updates the campaign DSA setting to add DSA pagefeeds. - ''' - ''' The AdWords user. - ''' The Campaign ID. - ''' The page feed ID. - Private Sub UpdateCampaignDsaSetting(ByVal user As AdWordsUser, ByVal campaignId As Long, - ByVal feedId As Long) - ' [START getDsaSetting] MOE:strip_line - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - Dim selector As New Selector() - selector.fields = New String() {Campaign.Fields.Id, Campaign.Fields.Settings} - selector.predicates = New Predicate() { _ - Predicate.Equals(Campaign.Fields.Id, - campaignId) - } - selector.paging = Paging.Default - - Dim page As CampaignPage = campaignService.get(selector) - - If page Is Nothing Or page.entries Is Nothing Or page.entries.Length = 0 Then - Throw New System.ApplicationException( - String.Format( - "Failed to retrieve campaign with ID = {0}.", campaignId)) - End If - - Dim selectedCampaign As Campaign = page.entries(0) - - If selectedCampaign.settings Is Nothing Then - Throw New System.ApplicationException("This is not a DSA campaign.") - End If - - Dim dsaSetting As DynamicSearchAdsSetting = Nothing - Dim campaignSettings() As Setting = selectedCampaign.settings - - For i As Integer = 0 To selectedCampaign.settings.Length - 1 - Dim setting As Setting = campaignSettings(i) - If TypeOf setting Is DynamicSearchAdsSetting Then - dsaSetting = CType(setting, DynamicSearchAdsSetting) - Exit For - End If - Next - - If dsaSetting Is Nothing Then - Throw New System.ApplicationException("This is not a DSA campaign.") - End If - ' [END getDsaSetting] MOE:strip_line - - ' [START updateDsaSetting] MOE:strip_line - ' Use a page feed to specify precisely which URLs to use with your - ' Dynamic Search Ads. - dsaSetting.pageFeed = New PageFeed() - dsaSetting.pageFeed.feedIds = New Long() { _ - feedId - } - - ' Optional: Specify whether only the supplied URLs should be used with your - ' Dynamic Search Ads. - dsaSetting.useSuppliedUrlsOnly = True - - Dim campaignToUpdate As New Campaign() - campaignToUpdate.id = campaignId - campaignToUpdate.settings = campaignSettings - - Dim operation As New CampaignOperation() - operation.operand = campaignToUpdate - operation.operator = [Operator].SET - - Try - Dim retval As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {operation}) - Console.WriteLine( - "DSA page feed for campaign ID '{0}' was updated with feed ID '{1}'.", - campaignToUpdate.id, feedId) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to set page feed for campaign.", e) - End Try - End Using - ' [END updateDsaSetting] MOE:strip_line - End Sub - - ''' - ''' Set custom targeting for the page feed URLs based on a list of labels. - ''' - ''' The AdWords user. - ''' Ad group ID. - ''' The label name. - ''' The newly created webpage criterion. - Private Function AddDsaTargeting(ByVal user As AdWordsUser, ByVal adgroupId As Long, - ByVal labelName As String) As BiddableAdGroupCriterion - ' [START addCustomLabelTargeting] MOE:strip_line - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Create a webpage criterion. - Dim webpage As New Webpage() - - Dim parameter As New WebpageParameter() - parameter.criterionName = "Test criterion" - webpage.parameter = parameter - - ' Add a condition for label=specified_label_name. - Dim condition As New WebpageCondition() - condition.operand = WebpageConditionOperand.CUSTOM_LABEL - condition.argument = labelName - parameter.conditions = New WebpageCondition() {condition} - - Dim criterion As New BiddableAdGroupCriterion() - criterion.adGroupId = adgroupId - criterion.criterion = webpage - - ' Set a custom bid for this criterion. - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - - Dim cpcBid As New CpcBid - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 1500000 - - biddingStrategyConfiguration.bids = New Bids() {cpcBid} - - criterion.biddingStrategyConfiguration = biddingStrategyConfiguration - - Dim operation As New AdGroupCriterionOperation() - operation.operand = criterion - operation.operator = [Operator].ADD - - Try - Dim retval As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - New AdGroupCriterionOperation() {operation}) - Dim newCriterion As BiddableAdGroupCriterion = - CType(retval.value(0), BiddableAdGroupCriterion) - - Console.WriteLine( - "Web page criterion with ID = {0} and status = {1} was created.", - newCriterion.criterion.id, newCriterion.userStatus) - - Return newCriterion - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to create webpage criterion for " + - "custom page feed label.", e) - End Try - End Using - End Function - - ' [END addCustomLabelTargeting] MOE:strip_line - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.vb deleted file mode 100755 index 2ef615f362b..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddDynamicSearchAdsCampaign.vb +++ /dev/null @@ -1,356 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a Dynamic Search Ads campaign. To get campaigns, run GetCampaigns.vb. - ''' - Public Class AddDynamicSearchAdsCampaign - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddDynamicSearchAdsCampaign - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a Dynamic Search Ads campaign. To get campaigns, " + - "run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Try - Dim budget As Budget = CreateBudget(user) - Dim campaign As Campaign = CreateCampaign(user, budget) - Dim adGroup As AdGroup = CreateAdGroup(user, campaign.id) - Dim expandedDSA As ExpandedDynamicSearchAd = CreateExpandedDSA(user, adGroup.id) - Console.WriteLine("Dynamic Search Ads campaign setup is complete.") - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to setup Dynamic Search Ads campaign.", - e) - End Try - End Sub - - ''' - ''' Creates the budget. - ''' - ''' The AdWords user. - ''' The newly created budget. - Private Function CreateBudget(ByVal user As AdWordsUser) As Budget - ' [START createBudget] MOE:strip_line - ' Get the BudgetService. - Using budgetService As BudgetService = CType( - user.GetService( - AdWordsService.v201806.BudgetService), - BudgetService) - - ' Create the campaign budget. - Dim budget As New Budget() - budget.name = "Interplanetary Cruise Budget #" + ExampleUtilities.GetRandomString() - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - budget.amount = New Money() - budget.amount.microAmount = 500000 - - Dim budgetOperation As New BudgetOperation() - budgetOperation.operator = [Operator].ADD - budgetOperation.operand = budget - - Try - Dim budgetRetval As BudgetReturnValue = budgetService.mutate( - New BudgetOperation() {budgetOperation}) - Dim newBudget As Budget = budgetRetval.value(0) - Console.WriteLine("Budget with ID = '{0}' and name = '{1}' was created.", - newBudget.budgetId, newBudget.name) - Return newBudget - Catch e As Exception - Throw New System.ApplicationException("Failed to add budget.", e) - End Try - ' [END createBudget] MOE:strip_line - End Using - End Function - - ''' - ''' Creates the campaign. - ''' - ''' The AdWords user. - ''' The campaign budget. - ''' The newly created campaign. - Private Function CreateCampaign(ByVal user As AdWordsUser, ByVal budget As Budget) _ - As Campaign - ' [START createCampaign] MOE:strip_line - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create a Dynamic Search Ads campaign. - Dim campaign As New Campaign() - campaign.name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString() - campaign.advertisingChannelType = AdvertisingChannelType.SEARCH - - ' 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. - campaign.status = CampaignStatus.PAUSED - - Dim biddingConfig As New BiddingStrategyConfiguration() - biddingConfig.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - campaign.biddingStrategyConfiguration = biddingConfig - - campaign.budget = New Budget() - campaign.budget.budgetId = budget.budgetId - - ' Required: Set the campaign's Dynamic Search Ads settings. - Dim dynamicSearchAdsSetting As New DynamicSearchAdsSetting() - ' Required: Set the domain name And language. - dynamicSearchAdsSetting.domainName = "example.com" - dynamicSearchAdsSetting.languageCode = "en" - - ' Set the campaign settings. - campaign.settings = New Setting() {dynamicSearchAdsSetting} - - ' Optional: Set the start date. - campaign.startDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd") - - ' Optional: Set the end date. - campaign.endDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd") - - ' Create the operation. - Dim operation As New CampaignOperation() - operation.operator = [Operator].ADD - operation.operand = campaign - - Try - ' Add the campaign. - Dim retval As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {operation}) - - ' Display the results. - Dim newCampaign As Campaign = retval.value(0) - Console.WriteLine("Campaign with id = '{0}' and name = '{1}' was added.", - newCampaign.id, newCampaign.name) - Return newCampaign - Catch e As Exception - Throw New System.ApplicationException("Failed to add campaigns.", e) - End Try - ' [END createCampaign] MOE:strip_line - End Using - End Function - - ''' - ''' Creates an ad group. - ''' - ''' The AdWords user. - ''' The campaign ID. - ''' the newly created ad group. - Private Function CreateAdGroup(ByVal user As AdWordsUser, ByVal campaignId As Long) _ - As AdGroup - ' [START createAdGroup] MOE:strip_line - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - - ' Create the ad group. - Dim adGroup As New AdGroup() - - ' Required: set the ad group's type to Dynamic Search Ads. - adGroup.adGroupType = AdGroupType.SEARCH_DYNAMIC_ADS - - adGroup.name = String.Format("Earth to Mars Cruises #{0}", - ExampleUtilities.GetRandomString()) - adGroup.campaignId = campaignId - adGroup.status = AdGroupStatus.PAUSED - - ' Set the ad group bids. - Dim biddingConfig As New BiddingStrategyConfiguration() - - Dim cpcBid As New CpcBid() - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 3000000 - - biddingConfig.bids = New Bids() {cpcBid} - - adGroup.biddingStrategyConfiguration = biddingConfig - - ' Create the operation. - Dim Operation As New AdGroupOperation() - Operation.operator = [Operator].ADD - Operation.operand = adGroup - - Try - ' Create the ad group. - Dim retVal As AdGroupReturnValue = adGroupService.mutate( - New AdGroupOperation() {Operation}) - - ' Display the results. - Dim newAdGroup As AdGroup = retVal.value(0) - Console.WriteLine("Ad group with id = '{0}' and name = '{1}' was created.", - newAdGroup.id, newAdGroup.name) - Return newAdGroup - Catch e As Exception - Throw New System.ApplicationException("Failed to create ad group.", e) - End Try - ' [END createAdGroup] MOE:strip_line - End Using - End Function - - ''' - ''' Creates the expanded Dynamic Search Ad. - ''' - ''' The AdWords user. - ''' ID of the ad group in which ad is created. - ''' The newly created ad. - Private Function CreateExpandedDSA(ByVal user As AdWordsUser, ByVal adGroupId As Long) _ - As ExpandedDynamicSearchAd - ' [START createExpandedDSA] MOE:strip_line - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create an Expanded Dynamic Search Ad. This ad will have its headline, display URL - ' and final URL auto-generated at serving time according to domain name specific - ' information provided by DynamicSearchAdsSetting at the campaign level. - Dim expandedDSA As New ExpandedDynamicSearchAd() - ' Set the ad description. - expandedDSA.description = "Buy your tickets now!" - - ' Create the ad group ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = expandedDSA - - ' Optional: Set the status. - adGroupAd.status = AdGroupAdStatus.PAUSED - - ' Create the operation. - Dim operation As New AdGroupAdOperation() - operation.operator = [Operator].ADD - operation.operand = adGroupAd - - Try - ' Create the ads. - Dim retval As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - ' Display the results. - Dim newAdGroupAd As AdGroupAd = retval.value(0) - Dim newAd As ExpandedDynamicSearchAd = CType(newAdGroupAd.ad, - ExpandedDynamicSearchAd) - Console.WriteLine( - "Expanded Dynamic Search Ad with ID '{0}' and description '{1}' " + - "was added.", newAd.id, newAd.description) - Return newAd - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to create Expanded Dynamic Search Ad.", e) - End Try - ' [END createExpandedDSA] MOE:strip_line - End Using - End Function - - ''' - ''' Adds a web page criteria to target Dynamic Search Ads. - ''' - ''' The AdWords user. - ''' The ad group ID. - ''' The newly created web page criterion. - Private Function AddWebPageCriteria(ByVal user As AdWordsUser, ByVal adGroupId As Long) _ - As BiddableAdGroupCriterion - ' [START createWebPageCriteria] MOE:strip_line - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Create a webpage criterion for special offers for mars cruise. - Dim param As New WebpageParameter() - param.criterionName = "Special offers for mars" - - Dim urlCondition As New WebpageCondition() - urlCondition.operand = WebpageConditionOperand.URL - urlCondition.argument = "/marscruise/special" - - Dim titleCondition As New WebpageCondition() - titleCondition.operand = WebpageConditionOperand.PAGE_TITLE - titleCondition.argument = "Special Offer" - - param.conditions = New WebpageCondition() {urlCondition, titleCondition} - - Dim Webpage As New Webpage() - Webpage.parameter = param - - ' Create biddable ad group criterion. - Dim biddableAdGroupCriterion As New BiddableAdGroupCriterion() - biddableAdGroupCriterion.adGroupId = adGroupId - biddableAdGroupCriterion.criterion = Webpage - biddableAdGroupCriterion.userStatus = UserStatus.PAUSED - - ' Optional: Set a custom bid. - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - Dim bid As New CpcBid() - bid.bid = New Money() - bid.bid.microAmount = 10000000L - - biddingStrategyConfiguration.bids = New Bids() {bid} - biddableAdGroupCriterion.biddingStrategyConfiguration = biddingStrategyConfiguration - - ' Create operations. - Dim operation As New AdGroupCriterionOperation() - operation.operator = [Operator].ADD - operation.operand = biddableAdGroupCriterion - - Try - Dim result As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - New AdGroupCriterionOperation() {operation}) - - Dim newCriterion As BiddableAdGroupCriterion = CType(result.value(0), - BiddableAdGroupCriterion) - Console.WriteLine("Webpage criterion with '{0}' was added to ad group ID " & - "'{1}'.", - newCriterion.adGroupId, newCriterion.criterion.id) - Return newCriterion - Catch e As Exception - Throw New System.ApplicationException("Failed to create webpage criterion.", e) - End Try - ' [END createWebPageCriteria] MOE:strip_line - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.vb deleted file mode 100755 index 09946c213ee..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.vb +++ /dev/null @@ -1,168 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds an expanded text ad that uses advanced features of upgraded - ''' URLs. - ''' - Public Class AddExpandedTextAdWithUpgradedUrls - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddExpandedTextAdWithUpgradedUrls - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds an expanded text ad that uses advanced features of " & - "upgraded URLs." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' ID of the adgroup to which ad is added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create the expanded text ad. - Dim expandedTextAd As New ExpandedTextAd - expandedTextAd.headlinePart1 = "Luxury Cruise to Mars" - expandedTextAd.headlinePart2 = "Visit the Red Planet in style." - expandedTextAd.description = "Low-gravity fun for everyone!" - - ' [START setTrackingUrlTemplate] MOE:strip_line - ' Specify a tracking URL for 3rd party tracking provider. You may - ' specify one at customer, campaign, ad group, ad, criterion or - ' feed item levels. - expandedTextAd.trackingUrlTemplate = - "http://tracker.example.com/?cid={_season}&promocode={_promocode}&u={lpurl}" - ' [END setTrackingUrlTemplate] MOE:strip_line - - ' [START setCustomParameters] MOE:strip_line - ' Since your tracking URL has two custom parameters, provide their - ' values too. This can be provided at campaign, ad group, ad, criterion - ' or feed item levels. - Dim seasonParameter As New CustomParameter - seasonParameter.key = "season" - seasonParameter.value = "christmas" - - Dim promoCodeParameter As New CustomParameter - promoCodeParameter.key = "promocode" - promoCodeParameter.value = "NYC123" - - expandedTextAd.urlCustomParameters = New CustomParameters - expandedTextAd.urlCustomParameters.parameters = - New CustomParameter() {seasonParameter, promoCodeParameter} - ' [END setCustomParameters] MOE:strip_line - - ' Specify a list of final URLs. This field cannot be set if URL field is - ' set. This may be specified at ad, criterion and feed item levels. - expandedTextAd.finalUrls = New String() { _ - "http://www.example.com/cruise/space/", - "http://www.example.com/locations/mars/" - } - - ' Specify a list of final mobile URLs. This field cannot be set if URL - ' field is set, or finalUrls is unset. This may be specified at ad, - ' criterion and feed item levels. - expandedTextAd.finalMobileUrls = - New String() { _ - "http://mobile.example.com/cruise/space/", - "http://mobile.example.com/locations/mars/" - } - - Dim adGroupAd As New AdGroupAd - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = expandedTextAd - - ' Optional: Set the status. - adGroupAd.status = AdGroupAdStatus.PAUSED - - ' Create the operation. - Dim operation As New AdGroupAdOperation - operation.operator = [Operator].ADD - operation.operand = adGroupAd - - Dim retVal As AdGroupAdReturnValue = Nothing - - Try - ' Create the ads. - retVal = adGroupAdService.mutate(New AdGroupAdOperation() {operation}) - - ' Display the results. - If Not (retVal Is Nothing) AndAlso Not (retVal.value Is Nothing) Then - Dim newExpandedTextAd As ExpandedTextAd = CType(retVal.value(0).ad, - ExpandedTextAd) - - Console.WriteLine( - "Expanded text ad with ID '{0}' and headline '{1} - {2}' was added.", - newExpandedTextAd.id, newExpandedTextAd.headlinePart1, - newExpandedTextAd.headlinePart2) - - Console.WriteLine("Upgraded URL properties:") - - Console.WriteLine(" Final URLs: {0}", - String.Join(", ", newExpandedTextAd.finalUrls)) - Console.WriteLine(" Final Mobile URLS: {0}", - String.Join(", ", newExpandedTextAd.finalMobileUrls)) - Console.WriteLine(" Tracking URL template: {0}", - newExpandedTextAd.trackingUrlTemplate) - - Dim parameters As New List(Of String) - For Each customParam As CustomParameter In _ - newExpandedTextAd.urlCustomParameters.parameters - parameters.Add(String.Format("{0}={1}", customParam.key, - customParam.value)) - Next - Console.WriteLine(" Custom parameters: {0}", - String.Join(", ", parameters.ToArray())) - Else - Console.WriteLine("No expanded text ads were created.") - End If - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to add expanded text ad to adgroup.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddGmailAd.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddGmailAd.vb deleted file mode 100755 index 8799c9d8563..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddGmailAd.vb +++ /dev/null @@ -1,145 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a Gmail ad to a given ad group. The ad group's - ''' campaign needs to have an AdvertisingChannelType of DISPLAY and - ''' AdvertisingChannelSubType of DISPLAY_GMAIL_AD. - ''' To get ad groups, run GetAdGroups.cs. - ''' - Public Class AddGmailAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddGmailAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser(), adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a Gmail ad to a given ad group. The ad group's " & - "campaign needs to have an AdvertisingChannelType of DISPLAY and " & - "AdvertisingChannelSubType of DISPLAY_GMAIL_AD. To get ad groups, run " & - "GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the adgroup to which ads are added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupAdService As AdGroupAdService = DirectCast( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - ' This ad format does not allow the creation of an image using the - ' Image.data field. An image must first be created using the - ' MediaService, and Image.mediaId must be populated when creating the - ' ad. - Dim logoImage As New Image() - logoImage.mediaId = UploadImage(user, "https://goo.gl/mtt54n").mediaId - - Dim marketingImage As New Image() - marketingImage.mediaId = UploadImage(user, "https://goo.gl/3b9Wfh").mediaId - - Dim teaser As New GmailTeaser() - teaser.headline = "Dream" - teaser.description = "Create your own adventure" - teaser.businessName = "Interplanetary Ships" - teaser.logoImage = logoImage - - ' Creates a Gmail ad. - Dim gmailAd As New GmailAd() - gmailAd.teaser = teaser - gmailAd.marketingImage = marketingImage - gmailAd.marketingImageHeadline = "Travel" - gmailAd.marketingImageDescription = "Take to the skies!" - gmailAd.finalUrls = New String() {"http://www.example.com/"} - - ' Creates ad group ad for the Gmail ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = gmailAd - - ' Optional: Set additional settings. - adGroupAd.status = AdGroupAdStatus.PAUSED - - ' Creates ad group ad operation and add it to the list. - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - - Try - ' Adds a responsive display ad on the server. - Dim result As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - If result Is Nothing Or result.value Is Nothing Or result.value.Length = 0 Then - Console.WriteLine("No Gmail ads were added.") - Return - End If - - ' Prints out some information for each created Gmail ad. - For Each newAdGroupAd As AdGroupAd In result.value - Console.WriteLine("A Gmail ad with ID {0} and headline '{1}' was added.", - newAdGroupAd.ad.id, - DirectCast(newAdGroupAd.ad, GmailAd).teaser.headline) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to add Gmail ads.", e) - End Try - End Using - End Sub - - ''' - ''' Uploads an image to the server. - ''' - ''' The AdWords user. - ''' The URL of image to upload. - ''' The created image. - Private Shared Function UploadImage(ByVal user As AdWordsUser, ByVal url As String) As Media - Using mediaService As MediaService = DirectCast( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - Dim image As New Image() - image.data = MediaUtilities.GetAssetDataFromUrl(url, user.Config) - image.type = MediaMediaType.IMAGE - Return mediaService.upload(New Media() {image})(0) - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddHtml5Ad.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddHtml5Ad.vb deleted file mode 100755 index 2aa1a3e1312..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddHtml5Ad.vb +++ /dev/null @@ -1,146 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds an HTML5 ad to a given ad group. To get ad - ''' groups, run GetAdGroups.vb. - ''' - Public Class AddHtml5Ad - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddHtml5Ad - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser(), adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds an HTML5 ad to a given ad group. To get ad" & - "groups, run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the first adgroup to which ad is added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create the HTML5 template ad. See - ' https://developers.google.com/adwords/api/docs/guides/template-ads#html5_ads - ' for more details. - Dim html5Ad As New TemplateAd() - html5Ad.name = "Ad for HTML5" - html5Ad.templateId = 419 - html5Ad.finalUrls = New String() {"http://example.com/html5"} - html5Ad.displayUrl = "www.example.com/html5" - - html5Ad.dimensions = New Dimensions() - html5Ad.dimensions.width = 300 - html5Ad.dimensions.height = 250 - - ' 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 - ' Designer (https://www.google.com/webdesigner/). - Dim html5Zip As Byte() = MediaUtilities.GetAssetDataFromUrl("https://goo.gl/9Y7qI2", - user.Config) - - ' Create a media bundle containing the zip file with all the HTML5 components. - Dim mediaBundle As New MediaBundle() - ' You may also upload an HTML5 zip using MediaService.upload() method - ' set the mediaId field. See UploadMediaBundle.vb for an example on how to - ' upload HTML5 zip files. - mediaBundle.data = html5Zip - mediaBundle.entryPoint = "carousel/index.html" - mediaBundle.type = MediaMediaType.MEDIA_BUNDLE - - ' Create the template elements for the ad. You can refer to - ' https://developers.google.com/adwords/api/docs/appendix/templateads - ' for the list of available template fields. - - Dim adData As New TemplateElement - adData.uniqueName = "adData" - - Dim customLayout As New TemplateElementField - customLayout.name = "Custom_layout" - customLayout.fieldMedia = mediaBundle - customLayout.type = TemplateElementFieldType.MEDIA_BUNDLE - - Dim layout As New TemplateElementField - layout.name = "layout" - layout.fieldText = "Custom" - layout.type = TemplateElementFieldType.ENUM - - adData.fields = New TemplateElementField() {customLayout, layout} - - html5Ad.templateElements = New TemplateElement() {adData} - - ' Create the AdGroupAd. - Dim html5AdGroupAd As New AdGroupAd() - html5AdGroupAd.adGroupId = adGroupId - html5AdGroupAd.ad = html5Ad - ' Additional properties (non-required). - html5AdGroupAd.status = AdGroupAdStatus.PAUSED - - Dim adGroupAdOperation As New AdGroupAdOperation() - adGroupAdOperation.operator = [Operator].ADD - adGroupAdOperation.operand = html5AdGroupAd - - Try - ' Add HTML5 ad. - Dim result As AdGroupAdReturnValue = - adGroupAdService.mutate(New AdGroupAdOperation() {adGroupAdOperation}) - - ' Display results. - If (Not result Is Nothing) AndAlso (Not result.value Is Nothing) AndAlso - (result.value.Length > 0) Then - For Each adGroupAd As AdGroupAd In result.value - Console.WriteLine( - "New HTML5 ad with id '{0}' and display url '{1}' was added.", - adGroupAd.ad.id, adGroupAd.ad.displayUrl) - Next - Else - Console.WriteLine("No HTML5 ads were added.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create HTML5 ad.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.vb deleted file mode 100755 index 2a326c8c1af..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddMultiAssetResponsiveDisplayAd.vb +++ /dev/null @@ -1,218 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a responsive display ad (MultiAssetResponsiveDisplayAd) - ''' to an ad group. Image assets are uploaded using AssetService. To get ad groups, - ''' run GetAdGroups.vb. - ''' - Public Class AddMultiAssetResponsiveDisplayAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddMultiAssetResponsiveDisplayAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a responsive display ad " + - "(MultiAssetResponsiveDisplayAd) to an ad group. Image assets are uploaded" + - " using AssetService. To get ad groups, run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' ID of the adgroup to which ad is added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - Try - ' Create the ad. - Dim ad As New MultiAssetResponsiveDisplayAd() - - ' Text assets can be specified directly in the asset field when - ' creating the ad. - Dim textAsset1 As New TextAsset - textAsset1.assetText = "Travel to Mars" - Dim headline1 As New AssetLink - headline1.asset = textAsset1 - - Dim textAsset2 As New TextAsset - textAsset2.assetText = "Travel to Jupiter" - Dim headline2 As New AssetLink - headline2.asset = textAsset2 - - Dim textAsset3 As New TextAsset - textAsset3.assetText = "Travel to Pluto" - Dim headline3 As New AssetLink - headline3.asset = textAsset3 - - ad.headlines = New AssetLink() {headline1, headline2, headline3} - - Dim textAsset4 As New TextAsset - textAsset4.assetText = "Visit the planet in a luxury spaceship." - Dim description1 As New AssetLink - description1.asset = textAsset1 - - Dim textAsset5 As New TextAsset - textAsset5.assetText = "Travel to Jupiter" - Dim description2 As New AssetLink - description2.asset = textAsset5 - - Dim textAsset6 As New TextAsset - textAsset6.assetText = "Travel to Pluto" - Dim description3 As New AssetLink - description3.asset = textAsset6 - - ad.descriptions = New AssetLink() {description1, description2, description3} - ad.businessName = "Galactic Luxury Cruises" - - Dim textAsset7 As New TextAsset - textAsset7.assetText = "Travel to Pluto" - Dim longHeadline As New AssetLink - longHeadline.asset = textAsset7 - - ad.longHeadline = longHeadline - - ' This ad format does not allow the creation of an image asset by setting - ' the asset.imageData field. An image asset must first be created using the - ' AssetService, and asset.assetId must be populated when creating the ad. - - Dim imageAsset1 As New ImageAsset - imageAsset1.assetId = UploadImageAsset(user, "https://goo.gl/3b9Wfh") - Dim marketingImage As New AssetLink - marketingImage.asset = imageAsset1 - ad.marketingImages = New AssetLink() {marketingImage} - - Dim imageAsset2 As New ImageAsset - imageAsset2.assetId = UploadImageAsset(user, "https://goo.gl/mtt54n") - Dim squareMarketingImage As New AssetLink - squareMarketingImage.asset = imageAsset2 - ad.squareMarketingImages = New AssetLink() {squareMarketingImage} - - ad.finalUrls = New String() {"http://www.example.com"} - - ' Optional: set call to action text. - ad.callToActionText = "Shop Now" - - ' Set color settings using hexadecimal values. Set allowFlexibleColor to false - ' if you want your ads to render by always using your colors strictly. - ad.mainColor = "#0000ff" - ad.accentColor = "#ffff00" - ad.allowFlexibleColor = False - - ' Set the format setting that the ad will be served in. - ad.formatSetting = DisplayAdFormatSetting.NON_NATIVE - - ' Optional: set dynamic display ad settings, composed of landscape logo - ' image, promotion text, And price prefix. - ad.dynamicSettingsPricePrefix = "as low as" - ad.dynamicSettingsPromoText = "Free shipping!" - - Dim imageAsset3 As New ImageAsset - imageAsset3.assetId = UploadImageAsset(user, "https://goo.gl/mtt54n") - Dim logoImages As New AssetLink - logoImages.asset = imageAsset3 - ad.logoImages = New AssetLink() {logoImages} - - ' Create the ad group ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.ad = ad - adGroupAd.adGroupId = adGroupId - - ' Create the operation. - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - - ' Make the mutate request. - Dim result As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - ' Display results. - If Not (result Is Nothing) AndAlso Not (result.value Is Nothing) Then - For Each newAdGroupAd As AdGroupAd In result.value - Dim newAd As MultiAssetResponsiveDisplayAd = - CType(newAdGroupAd.ad, MultiAssetResponsiveDisplayAd) - Console.WriteLine( - "Responsive display ad with ID '{0}' and long headline '{1}'" + - " was added.", newAd.id, - CType(newAd.longHeadline.asset, TextAsset).assetText) - Next - End If - Catch e As Exception - Throw New System.ApplicationException( - "Failed to add expanded text ad to adgroup.", - e) - End Try - End Using - End Sub - - ''' - ''' Uploads the image from the specified . - ''' - ''' The AdWords user. - ''' The image URL. - ''' ID of the uploaded image. - Private Shared Function UploadImageAsset(ByVal user As AdWordsUser, ByVal url As String) _ - As Long - Using assetService As AssetService = CType( - user.GetService( - AdWordsService.v201806.AssetService), - AssetService) - - ' Create the image asset. - Dim imageAsset = New ImageAsset() - ' Optional: Provide a unique friendly name to identify your asset. If you specify - ' the assetName field, then both the asset name and the image being uploaded should - ' be unique, and should not match another ACTIVE asset in this customer account. - ' imageAsset.assetName = "Image asset " + ExampleUtilities.GetRandomString() - imageAsset.imageData = MediaUtilities.GetAssetDataFromUrl(url, user.Config) - - ' Create the operation. - Dim operation As New AssetOperation() - operation.operator = [Operator].ADD - operation.operand = imageAsset - - ' Create the asset And return the ID. - Return assetService.mutate(New AssetOperation() {operation}).value(0).assetId - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddResponsiveDisplayAd.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddResponsiveDisplayAd.vb deleted file mode 100755 index cfd9885669b..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddResponsiveDisplayAd.vb +++ /dev/null @@ -1,195 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds an image representing the ad using the MediaService - ''' and then adds a responsive display ad to an ad group. To get ad groups, - ''' run GetAdGroups.vb. - ''' - Public Class AddResponsiveDisplayAd - Inherits ExampleBase - - ''' - ''' Number of items being added / updated in this code example. - ''' - Const NUM_ITEMS As Integer = 5 - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddResponsiveDisplayAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds an image representing the ad using the MediaService" & - "and then adds a responsive display ad to an ad group. To get ad groups, " & - "run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which ads are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - ' [START addResponsiveDisplayAd] MOE:strip_line - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - Try - ' Create a responsive display ad. - Dim responsiveDisplayAd As New ResponsiveDisplayAd() - - ' This ad format does not allow the creation of an image using the - ' Image.data field. An image must first be created using the MediaService, - ' and Image.mediaId must be populated when creating the ad. - responsiveDisplayAd.marketingImage = New Image() - responsiveDisplayAd.marketingImage.mediaId = - UploadImage(user, - "https://goo.gl/3b9Wfh") - - responsiveDisplayAd.shortHeadline = "Travel" - responsiveDisplayAd.longHeadline = "Travel the World" - responsiveDisplayAd.description = "Take to the air!" - responsiveDisplayAd.businessName = "Google" - responsiveDisplayAd.finalUrls = New String() {"http://www.example.com"} - - ' Optional: Create a square marketing image Using MediaService, And set it - ' to the ad. - responsiveDisplayAd.squareMarketingImage = New Image() - responsiveDisplayAd.squareMarketingImage.mediaId = - UploadImage(user, "https://goo.gl/mtt54n") - - ' Optional: Set call to action text. - responsiveDisplayAd.callToActionText = "Shop Now" - - ' Optional: Set dynamic display ad settings, composed of landscape logo - ' image, promotion text, And price prefix. - responsiveDisplayAd.dynamicDisplayAdSettings = - CreateDynamicDisplayAdSettings(user) - - ' Whitelisted accounts only Set color settings using hexadecimal values. - ' Set allowFlexibleColor to false if you want your ads to render by always - ' using your colors strictly. - - ' responsiveDisplayAd.mainColor = "#0000ff" - ' responsiveDisplayAd.accentColor = "#ffff00" - ' responsiveDisplayAd.allowFlexibleColor = false - - ' Whitelisted accounts only Set the format setting that the ad will be - ' served in. - - ' responsiveDisplayAd.formatSetting = DisplayAdFormatSetting.NON_NATIVE; - - ' Create ad group ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = responsiveDisplayAd - adGroupAd.status = AdGroupAdStatus.PAUSED - - ' Create operation. - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - - ' Make the mutate request. - Dim result As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - ' Display results. - If (Not result Is Nothing) AndAlso (Not result.value Is Nothing) Then - For Each newAdGroupAd As AdGroupAd In result.value - Dim newAd As ResponsiveDisplayAd = CType(newAdGroupAd.ad, - ResponsiveDisplayAd) - Console.WriteLine( - "Responsive display ad with ID '{0}' and short headline '{1}'" & - " was added.", newAd.id, newAd.shortHeadline) - Next - Else - Console.WriteLine("No responsive display ads were created.") - End If - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to create responsive display ads.", - e) - End Try - End Using - ' [END addResponsiveDisplayAd] MOE:strip_line - End Sub - - ''' - ''' Creates the dynamic display ad settings. - ''' - ''' The AdWords user. - ''' - Private Shared Function CreateDynamicDisplayAdSettings(ByVal user As AdWordsUser) _ - As DynamicSettings - Dim logoImageMediaId As Long = UploadImage(user, "https://goo.gl/dEvQeF") - Dim logo As New Image() - logo.mediaId = logoImageMediaId - - Dim dynamicSettings As New DynamicSettings() - dynamicSettings.landscapeLogoImage = logo - dynamicSettings.pricePrefix = "as low as" - dynamicSettings.promoText = "Free shipping!" - Return dynamicSettings - End Function - - ''' - ''' Uploads the image from the specified . - ''' - ''' The AdWords user. - ''' The image URL. - ''' ID of the uploaded image. - Private Shared Function UploadImage(ByVal user As AdWordsUser, ByVal url As String) As Long - Using mediaService As MediaService = CType( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - - ' Create the image. - Dim image As New Image() - image.data = MediaUtilities.GetAssetDataFromUrl(url, user.Config) - image.type = MediaMediaType.IMAGE - - ' Upload the image. - Return mediaService.upload(New Media() {image})(0).mediaId - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.vb deleted file mode 100755 index 21244dd91c6..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddShoppingDynamicRemarketingCampaign.vb +++ /dev/null @@ -1,330 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a Shopping dynamic remarketing campaign for the Display Network - ''' via the following steps: - ''' - ''' - ''' Creates a new Display Network campaign. - ''' - ''' - ''' Links the campaign with Merchant Center. - ''' - ''' - ''' Links the user list to the ad group. - ''' - ''' - ''' Creates a responsive display ad to render the dynamic text. - ''' - ''' - ''' - Public Class AddShoppingDynamicRemarketingCampaign - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddShoppingDynamicRemarketingCampaign - Console.WriteLine(codeExample.Description) - Try - ' The ID of the merchant center account from which to source product feed data. - Dim merchantId As Long = Long.Parse("INSERT_MERCHANT_CENTER_ID_HERE") - - ' The ID of a shared budget to associate with the campaign. - Dim budgetId As Long = Long.Parse("INSERT_BUDGET_ID_HERE") - - ' The ID of a user list to target. - Dim userListId As Long = Long.Parse("INSERT_USER_LIST_ID_HERE") - codeExample.Run(New AdWordsUser(), merchantId, budgetId, userListId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a Shopping dynamic remarketing campaign for the " & - "Display Network via the following steps:\n" & - "* Creates a new Display Network campaign.\n" & - "* Links the campaign with Merchant Center.\n" & - "* Links the user list to the ad group.\n" + - "* Creates a responsive display ad to render the dynamic text." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The ID of the merchant center account from which to source - ''' product feed data. - ''' The ID of a shared budget to associate with the campaign. - ''' The ID of a user list to target. - Public Sub Run(ByVal user As AdWordsUser, ByVal merchantId As Long, ByVal budgetId As Long, - ByVal userListId As Long) - Try - Dim campaign As Campaign = CreateCampaign(user, merchantId, budgetId) - Console.WriteLine("Campaign with name '{0}' and ID {1} was added.", - campaign.name, campaign.id) - - Dim adGroup As AdGroup = CreateAdGroup(user, campaign) - Console.WriteLine("Ad group with name '{0}' and ID {1} was added.", - adGroup.name, adGroup.id) - - Dim adGroupAd As AdGroupAd = CreateAd(user, adGroup) - Console.WriteLine("Responsive display ad with ID {0} was added.", adGroupAd.ad.id) - - AttachUserList(user, adGroup, userListId) - Console.WriteLine("User list with ID {0} was attached to ad group with ID {1}.", - userListId, adGroup.id) - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to create Shopping dynamic remarketing " + - "campaign for the Display Network.", e) - End Try - End Sub - - ''' - ''' Creates a Shopping dynamic remarketing campaign object (not including ad group level and - ''' below). This creates a Display campaign with the merchant center feed attached. - ''' Merchant Center is used for the product information in combination with a user list - ''' which contains hits with ecomm_prodid specified. See - ''' - ''' the guide for more detail. - ''' - ''' The AdWords user. - ''' The ID of the Merchant Center account. - ''' The ID of the budget to use for the campaign. - ''' The campaign that was created. - Private Shared Function CreateCampaign(ByVal user As AdWordsUser, ByVal merchantId As Long, - ByVal budgetId As Long) As Campaign - Using campaignService As CampaignService = DirectCast( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - Dim campaign As New Campaign() - campaign.name = "Shopping campaign #" + ExampleUtilities.GetRandomString() - ' Dynamic remarketing campaigns are only available on the Google Display Network. - campaign.advertisingChannelType = AdvertisingChannelType.DISPLAY - campaign.status = CampaignStatus.PAUSED - - Dim budget As New Budget() - budget.budgetId = budgetId - campaign.budget = budget - - ' This example uses a Manual CPC bidding strategy, but you should select the strategy - ' that best aligns with your sales goals. More details here: - ' https://support.google.com/adwords/answer/2472725 - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration - - Dim setting As New ShoppingSetting() - ' Campaigns with numerically higher priorities take precedence over those with lower - ' priorities. - setting.campaignPriority = 0 - - ' Set the Merchant Center account ID from which to source products. - setting.merchantId = merchantId - - ' Display Network campaigns do not support partition by country. The only supported - ' value is "ZZ". This signals that products from all countries are available in the - ' campaign. The actual products which serve are based on the products tagged in the - ' user list entry. - setting.salesCountry = "ZZ" - - ' Optional: Enable local inventory ads (items for sale in physical stores.) - setting.enableLocal = True - - campaign.settings = New Setting() {setting} - - Dim op As New CampaignOperation() - op.operand = campaign - op.operator = [Operator].ADD - - Dim result As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() _ - {op}) - Return result.value(0) - End Using - End Function - - ''' - ''' Creates an ad group in the specified campaign. - ''' - ''' The AdWords user. - ''' The campaign to which the ad group should be attached. - ''' The ad group that was created. - Private Shared Function CreateAdGroup(ByVal user As AdWordsUser, ByVal campaign As Campaign) _ - As AdGroup - Using adGroupService As AdGroupService = DirectCast( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - Dim group As New AdGroup() - group.name = "Dynamic remarketing ad group" - group.campaignId = campaign.id - group.status = AdGroupStatus.ENABLED - - Dim op As New AdGroupOperation() - op.operand = group - op.operator = [Operator].ADD - Dim result As AdGroupReturnValue = adGroupService.mutate(New AdGroupOperation() {op}) - Return result.value(0) - End Using - End Function - - ''' - ''' Attach a user list to an ad group. The user list provides positive targeting and feed - ''' information to drive the dynamic content of the ad. - ''' - ''' The user. - ''' The ad group which will have the user list attached. - ''' The user list to use for targeting and dynamic content. - ''' User lists must be attached at the ad group level for positive targeting in - ''' Shopping dynamic remarketing campaigns. - Private Shared Sub AttachUserList(ByVal user As AdWordsUser, ByVal adGroup As AdGroup, - ByVal userListId As Long) - Using adGroupCriterionService As AdGroupCriterionService = DirectCast( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - Dim userList As New CriterionUserList() - userList.userListId = userListId - Dim adGroupCriterion As New BiddableAdGroupCriterion() - adGroupCriterion.criterion = userList - adGroupCriterion.adGroupId = adGroup.id - - Dim op As New AdGroupCriterionOperation() - op.operand = adGroupCriterion - op.operator = [Operator].ADD - - adGroupCriterionService.mutate(New AdGroupCriterionOperation() {op}) - End Using - End Sub - - ''' - ''' Creates an ad for serving dynamic content in a remarketing campaign. - ''' - ''' The AdWords user. - ''' The ad group under which to create the ad. - ''' The ad that was created. - Private Shared Function CreateAd(ByVal user As AdWordsUser, ByVal adGroup As AdGroup) _ - As AdGroupAd - Using adService As AdGroupAdService = DirectCast( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - Dim ad As New ResponsiveDisplayAd() - - ' This ad format does not allow the creation of an image using the - ' Image.data field. An image must first be created using the MediaService, - ' and Image.mediaId must be populated when creating the ad. - ad.marketingImage = UploadImage(user, "https://goo.gl/3b9Wfh") - - ad.shortHeadline = "Travel" - ad.longHeadline = "Travel the World" - ad.description = "Take to the air!" - ad.businessName = "Interplanetary Cruises" - ad.finalUrls = New String() {"http://www.example.com/"} - - ' Optional: Call to action text. - ' Valid texts: https://support.google.com/adwords/answer/7005917 - ad.callToActionText = "Apply Now" - - ' Optional: Set dynamic display ad settings, composed of landscape logo - ' image, promotion text, and price prefix. - ad.dynamicDisplayAdSettings = CreateDynamicDisplayAdSettings(user) - - ' Optional: Create a logo image and set it to the ad. - ad.logoImage = UploadImage(user, "https://goo.gl/mtt54n") - - ' Optional: Create a square marketing image and set it to the ad. - ad.squareMarketingImage = UploadImage(user, "https://goo.gl/mtt54n") - - ' Whitelisted accounts only: Set color settings using hexadecimal values. - ' Set allowFlexibleColor to false if you want your ads to render by always - ' using your colors strictly. - ' ad.mainColor = "#0000ff" - ' ad.accentColor = "#ffff00" - ' ad.allowFlexibleColor = False - - ' Whitelisted accounts only: Set the format setting that the ad will be - ' served in. - ' ad.formatSetting = DisplayAdFormatSetting.NON_NATIVE - - Dim adGroupAd As New AdGroupAd() - adGroupAd.ad = ad - adGroupAd.adGroupId = adGroup.id - - Dim op As New AdGroupAdOperation() - op.operand = adGroupAd - op.operator = [Operator].ADD - - Dim result As AdGroupAdReturnValue = adService.mutate(New AdGroupAdOperation() {op}) - Return result.value(0) - End Using - End Function - - ''' - ''' Creates the additional content (images, promo text, etc.) supported by dynamic ads. - ''' - ''' The AdWords user. - ''' The DynamicSettings object to be used. - Private Shared Function CreateDynamicDisplayAdSettings(ByVal user As AdWordsUser) _ - As DynamicSettings - Dim logo As Image = UploadImage(user, "https://goo.gl/dEvQeF") - - Dim dynamicSettings As New DynamicSettings() - dynamicSettings.landscapeLogoImage = logo - dynamicSettings.pricePrefix = "as low as" - dynamicSettings.promoText = "Free shipping!" - Return dynamicSettings - End Function - - ''' - ''' Uploads the image from the specified . - ''' - ''' The AdWords user. - ''' The image URL. - ''' ID of the uploaded image. - Private Shared Function UploadImage(ByVal user As AdWordsUser, ByVal url As String) As Image - Using mediaService As MediaService = DirectCast( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - ' Create the image. - Dim image As New Image() - image.data = MediaUtilities.GetAssetDataFromUrl(url, user.Config) - image.type = MediaMediaType.IMAGE - - ' Upload the image And return the ID. - Return DirectCast(mediaService.upload(New Media() {image})(0), Image) - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/AddUniversalAppCampaign.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/AddUniversalAppCampaign.vb deleted file mode 100755 index 46cbd7e028b..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/AddUniversalAppCampaign.vb +++ /dev/null @@ -1,278 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a universal app campaign. To get campaigns, run - ''' GetCampaigns.vb. To upload image assets for this campaign, use - ''' UploadImage.vb. - ''' - Public Class AddUniversalAppCampaign - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddUniversalAppCampaign - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser()) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a universal app campaign. To get campaigns, run" & - " GetCampaigns.vb. To upload image assets for this campaign, use " & - "UploadImage.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' [START prepareUAC] MOE:strip_line - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create the campaign. - Dim campaign As New Campaign - campaign.name = "Interplanetary Cruise App #" + ExampleUtilities.GetRandomString - - ' 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. - campaign.status = CampaignStatus.PAUSED - - ' Set the advertising channel and subchannel types for universal app campaigns. - campaign.advertisingChannelType = AdvertisingChannelType.MULTI_CHANNEL - campaign.advertisingChannelSubType = - AdvertisingChannelSubType.UNIVERSAL_APP_CAMPAIGN - - ' Set the campaign's bidding strategy. Universal app campaigns - ' only support TARGET_CPA bidding strategy. - Dim biddingConfig As New BiddingStrategyConfiguration() - biddingConfig.biddingStrategyType = BiddingStrategyType.TARGET_CPA - - ' Set the target CPA to $1 / app install. - Dim biddingScheme As New TargetCpaBiddingScheme() - biddingScheme.targetCpa = New Money() - biddingScheme.targetCpa.microAmount = 1000000 - - biddingConfig.biddingScheme = biddingScheme - campaign.biddingStrategyConfiguration = biddingConfig - - ' Set the campaign's budget. - campaign.budget = New Budget() - campaign.budget.budgetId = CreateBudget(user).budgetId - - ' Optional: Set the start date. - campaign.startDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd") - - ' Optional: Set the end date. - campaign.endDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd") - ' [END prepareUAC] MOE:strip_line - - ' [START setUACAssets] MOE:strip_line - ' Set the campaign's assets and ad text ideas. These values will be used to - ' generate ads. - Dim universalAppSetting As New UniversalAppCampaignSetting() - universalAppSetting.appId = "com.labpixies.colordrips" - universalAppSetting.appVendor = MobileApplicationVendor.VENDOR_GOOGLE_MARKET - universalAppSetting.description1 = "A cool puzzle game" - universalAppSetting.description2 = "Remove connected blocks" - universalAppSetting.description3 = "3 difficulty levels" - universalAppSetting.description4 = "4 colorful fun skins" - - ' Optional: You can set up to 20 image assets for your campaign. - ' See UploadImage.cs for an example on how to upload images. - ' - ' universalAppSetting.imageMediaIds = new long[] { INSERT_IMAGE_MEDIA_ID_HERE }; - ' [END setUACAssets] MOE:strip_line - - ' [START optimizeUAC] MOE:strip_line - ' Optimize this campaign for getting new users for your app. - universalAppSetting.universalAppBiddingStrategyGoalType = - UniversalAppBiddingStrategyGoalType.OPTIMIZE_FOR_INSTALL_CONVERSION_VOLUME - - ' Optional: If you select the OPTIMIZE_FOR_IN_APP_CONVERSION_VOLUME goal - ' type, then also specify your in-app conversion types so AdWords can - ' focus your campaign on people who are most likely to complete the - ' corresponding in-app actions. - ' Conversion type IDs can be retrieved using ConversionTrackerService.get. - ' - ' campaign.selectiveOptimization = new SelectiveOptimization(); - ' campaign.selectiveOptimization.conversionTypeIds = - ' new long[] { - ' INSERT_CONVERSION_TYPE_ID_1_HERE, - ' INSERT_CONVERSION_TYPE_ID_2_HERE }; - - ' Optional: Set the campaign settings for Advanced location options. - Dim geoSetting As New GeoTargetTypeSetting() - geoSetting.positiveGeoTargetType = - GeoTargetTypeSettingPositiveGeoTargetType.LOCATION_OF_PRESENCE - geoSetting.negativeGeoTargetType = - GeoTargetTypeSettingNegativeGeoTargetType.DONT_CARE - - campaign.settings = New Setting() {universalAppSetting, geoSetting} - ' [END optimizeUAC] MOE:strip_line - - ' [START createUAC] MOE:strip_line - ' Create the operation. - Dim operation As New CampaignOperation() - operation.operator = [Operator].ADD - operation.operand = campaign - - Try - ' Add the campaign. - Dim retVal As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {operation}) - - ' Display the results. - If Not (retVal Is Nothing) AndAlso Not (retVal.value Is Nothing) Then - For Each newCampaign As Campaign In retVal.value - Console.WriteLine( - "Universal app campaign with name = '{0}' and id = '{1}' " + - "was added.", newCampaign.name, newCampaign.id) - - ' Optional: Set the campaign's location and language targeting. No other - ' targeting criteria can be used for universal app campaigns. - SetCampaignTargetingCriteria(user, newCampaign) - Next - Else - Console.WriteLine("No universal app campaigns were added.") - End If - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to add universal app campaigns.", e) - End Try - End Using - ' [END createUAC] MOE:strip_line - End Sub - - ''' - ''' Creates the budget for the campaign. - ''' - ''' The AdWords user. - ''' The budget. - Private Shared Function CreateBudget(ByVal user As AdWordsUser) As Budget - ' [START createBudget] MOE:strip_line - Using budgetService As BudgetService = CType( - user.GetService( - AdWordsService.v201806.BudgetService), - BudgetService) - - ' Create the campaign budget. - Dim budget As New Budget() - budget.name = "Interplanetary Cruise App Budget #" & - ExampleUtilities.GetRandomString() - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - budget.amount = New Money() - budget.amount.microAmount = 5000000 - - ' Universal app campaigns don't support shared budgets. - budget.isExplicitlyShared = False - - Dim budgetOperation As New BudgetOperation() - budgetOperation.operator = [Operator].ADD - budgetOperation.operand = budget - - Dim budgetRetval As BudgetReturnValue = budgetService.mutate( - New BudgetOperation() {budgetOperation}) - ' [END createBudget] MOE:strip_line - Dim newBudget As Budget = budgetRetval.value(0) - - Console.WriteLine("Budget with ID = '{0}' and name = '{1}' was created.", - newBudget.budgetId, newBudget.name) - Return newBudget - End Using - End Function - - ''' - ''' Sets the campaign's targeting criteria. - ''' - ''' The AdWords user. - ''' The campaign for which targeting criteria is - ''' created. - Private Shared Sub SetCampaignTargetingCriteria(ByVal user As AdWordsUser, - ByVal campaign As Campaign) - ' [START setCampaignTargetingCriteria] MOE:strip_line - Using campaignCriterionService As CampaignCriterionService = CType( - user.GetService( - AdWordsService.v201806.CampaignCriterionService), - CampaignCriterionService) - - ' Create locations. The IDs can be found in the documentation or - ' retrieved with the LocationCriterionService. - Dim california As New Location() - california.id = 21137L - - Dim mexico As New Location() - mexico.id = 2484L - - ' Create languages. The IDs can be found in the documentation or - ' retrieved with the ConstantDataService. - Dim english As New Language() - english.id = 1000L - - Dim spanish As New Language() - spanish.id = 1003L - - Dim criteria As Criterion() = {california, mexico, english, spanish} - - ' Create operations to add each of the criteria above. - Dim operations As New List(Of CampaignCriterionOperation)() - For Each criterion As Criterion In criteria - Dim campaignCriterion As New CampaignCriterion - campaignCriterion.campaignId = campaign.id - campaignCriterion.criterion = criterion - - Dim operation As New CampaignCriterionOperation() - operation.operand = campaignCriterion - operation.operator = [Operator].ADD - - operations.Add(operation) - Next - - ' Set the campaign targets. - Dim retVal As CampaignCriterionReturnValue = campaignCriterionService.mutate( - operations.ToArray()) - - If Not (retVal Is Nothing) AndAlso Not (retVal.value Is Nothing) Then - ' Display the added campaign targets. - For Each criterion As CampaignCriterion In retVal.value - Console.WriteLine("Campaign criteria of type '{0}' and id '{1}' was added.", - criterion.criterion.CriterionType, criterion.criterion.id) - Next - End If - End Using - ' [END setCampaignTargetingCriteria] MOE:strip_line - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.vb deleted file mode 100755 index 1faa889eca4..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/CreateAndAttachSharedKeywordSet.vb +++ /dev/null @@ -1,187 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example creates a shared keyword list, adds keywords to the list - ''' and attaches it to an existing campaign. To get the list of campaigns, - ''' run GetCampaigns.vb. - ''' - Public Class CreateAndAttachSharedKeywordSet - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New CreateAndAttachSharedKeywordSet - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser(), campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example creates a shared keyword list, adds keywords to the list" & - "and attaches it to an existing campaign. To get the list of campaigns, run " & - "GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to which keywords are added. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Try - ' Create a shared set. - Dim sharedSet As SharedSet = CreateSharedKeywordSet(user) - - Console.WriteLine( - "Shared set with id = {0}, name = {1}, type = {2}, status = {3} " & - "was created.", sharedSet.sharedSetId, sharedSet.name, sharedSet.type, - sharedSet.status) - - ' Add new keywords to the shared set. - Dim keywordTexts As String() = New String() {"mars cruise", "mars hotels"} - Dim sharedCriteria As SharedCriterion() = - AddKeywordsToSharedSet(user, sharedSet.sharedSetId, keywordTexts) - For Each sharedCriterion As SharedCriterion In sharedCriteria - Dim keyword As Keyword = DirectCast(sharedCriterion.criterion, Keyword) - Console.WriteLine( - "Added keyword with id = {0}, text = {1}, matchtype = {2} to " & - "shared set with id = {3}.", keyword.id, keyword.text, keyword.matchType, - sharedSet.sharedSetId) - Next - - ' Attach the shared set to the campaign. - Dim attachedSharedSet As CampaignSharedSet = - AttachSharedSetToCampaign(user, campaignId, sharedSet.sharedSetId) - - Console.WriteLine("Attached shared set with id = {0} to campaign id {1}.", - attachedSharedSet.sharedSetId, attachedSharedSet.campaignId) - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to create shared keyword set and attach " & - "it to a campaign.", e) - End Try - End Sub - - ''' - ''' Create a shared keyword set. - ''' - ''' The AdWords user. - ''' The shared set. - Public Function CreateSharedKeywordSet(ByVal user As AdWordsUser) As SharedSet - Using sharedSetService As SharedSetService = DirectCast( - user.GetService( - AdWordsService.v201806.SharedSetService), - SharedSetService) - - Dim operation As New SharedSetOperation() - operation.operator = [Operator].ADD - Dim sharedSet As New SharedSet() - sharedSet.name = "API Negative keyword list - " & ExampleUtilities.GetRandomString() - sharedSet.type = SharedSetType.NEGATIVE_KEYWORDS - operation.operand = sharedSet - - Dim retval As SharedSetReturnValue = sharedSetService.mutate( - New SharedSetOperation() {operation}) - Return retval.value(0) - End Using - End Function - - ''' - ''' Adds a set of keywords to a shared set. - ''' - ''' The AdWords user. - ''' The shared set id. - ''' The keywords to be added to the shared set. - ''' The newly added set of shared criteria. - Public Function AddKeywordsToSharedSet(ByVal user As AdWordsUser, ByVal sharedSetId As Long, - ByVal keywordTexts As String()) As SharedCriterion() - Using sharedSetService As SharedCriterionService = DirectCast( - user.GetService( - AdWordsService.v201806.SharedCriterionService), - SharedCriterionService) - - Dim operations As New List(Of SharedCriterionOperation) - For Each keywordText As String In keywordTexts - Dim keyword As New Keyword() - keyword.text = keywordText - keyword.matchType = KeywordMatchType.BROAD - - Dim sharedCriterion As New SharedCriterion() - sharedCriterion.criterion = keyword - sharedCriterion.negative = True - sharedCriterion.sharedSetId = sharedSetId - - Dim operation As New SharedCriterionOperation() - operation.operator = [Operator].ADD - operation.operand = sharedCriterion - operations.Add(operation) - Next - - Dim retval As SharedCriterionReturnValue = - sharedSetService.mutate(operations.ToArray()) - Return retval.value - End Using - End Function - - ''' - ''' Attaches a shared set to a campaign. - ''' - ''' The AdWords user. - ''' The campaign id. - ''' The shared set id. - ''' A CampaignSharedSet object that represents a binding between - ''' the specified campaign and the shared set. - Public Function AttachSharedSetToCampaign(ByVal user As AdWordsUser, - ByVal campaignId As Long, - ByVal sharedSetId As Long) As CampaignSharedSet - Using campaignSharedSetService As CampaignSharedSetService = DirectCast( - user.GetService( - AdWordsService.v201806.CampaignSharedSetService), - CampaignSharedSetService) - - Dim campaignSharedSet As New CampaignSharedSet() - campaignSharedSet.campaignId = campaignId - campaignSharedSet.sharedSetId = sharedSetId - - Dim operation As New CampaignSharedSetOperation() - operation.operator = [Operator].ADD - operation.operand = campaignSharedSet - - Dim retval As CampaignSharedSetReturnValue = campaignSharedSetService.mutate( - New CampaignSharedSetOperation() {operation}) - Return retval.value(0) - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.vb deleted file mode 100755 index 576c6d1d1dc..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/FindAndRemoveCriteriaFromSharedSet.vb +++ /dev/null @@ -1,259 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example demonstrates how to find and remove shared sets and - ''' shared set criteria. - ''' - ''' - Public Class FindAndRemoveCriteriaFromSharedSet - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New FindAndRemoveCriteriaFromSharedSet - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser(), campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example demonstrates how to find and remove shared sets and " & - "shared set criteria." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to which keywords are removed. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - ' Get the list of shared sets that are attached to the campaign. - Dim sharedSetIds As List(Of String) = GetSharedSetIds(user, campaignId) - - ' Get the shared criteria in those shared sets. - Dim sharedCriteria As List(Of SharedCriterion) = GetSharedCriteria(user, sharedSetIds) - - ' Remove the shared criteria from the shared sets. - RemoveSharedCriteria(user, sharedCriteria) - End Sub - - ''' - ''' Gets the shared set IDs associated with a campaign. - ''' - ''' The user that owns the campaign. - ''' The campaign identifier. - ''' The list of shared set IDs associated with the campaign. - Private Function GetSharedSetIds(ByVal user As AdWordsUser, ByVal campaignId As Long) _ - As List(Of String) - Using campaignSharedSetService As CampaignSharedSetService = DirectCast( - user.GetService( - AdWordsService.v201806.CampaignSharedSetService), - CampaignSharedSetService) - - Dim selector As New Selector() - selector.fields = New String() { _ - CampaignSharedSet.Fields.SharedSetId, - CampaignSharedSet.Fields.CampaignId, - CampaignSharedSet.Fields.SharedSetName, - CampaignSharedSet.Fields.SharedSetType - } - - selector.predicates = - New Predicate() { _ - Predicate.Equals( - CampaignSharedSet.Fields.CampaignId, campaignId), - Predicate.In( - CampaignSharedSet.Fields.SharedSetType, - New String() { _ - SharedSetType.NEGATIVE_KEYWORDS. - ToString()}) - } - selector.paging = Paging.Default - Dim sharedSetIds As New List(Of String) - - Dim page As New CampaignSharedSetPage() - - Try - Do - ' Get the campaigns. - page = campaignSharedSetService.get(selector) - - ' Display the results. - If (Not page Is Nothing) AndAlso (Not page.entries Is Nothing) Then - Dim i As Integer = selector.paging.startIndex - For Each campaignSharedSet As CampaignSharedSet In page.entries - sharedSetIds.Add(campaignSharedSet.sharedSetId.ToString()) - Console.WriteLine( - "{0}) Campaign shared set ID {1} and name '{2}' found for " & - "campaign ID {3}.\n", i + 1, campaignSharedSet.sharedSetId, - campaignSharedSet.sharedSetName, campaignSharedSet.campaignId) - i = i + 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Return sharedSetIds - Catch e As Exception - Throw New Exception("Failed to get shared set ids for campaign.", e) - End Try - End Using - End Function - - ''' - ''' Gets the shared criteria in a shared set. - ''' - ''' The user that owns the shared set. - ''' The shared criteria IDs. - ''' The list of shared criteria. - Private Function GetSharedCriteria(ByVal user As AdWordsUser, ByVal sharedSetIds As _ - List(Of String)) As List(Of SharedCriterion) - Using sharedCriterionService As SharedCriterionService = DirectCast( - user.GetService( - AdWordsService.v201806.SharedCriterionService), - SharedCriterionService) - - Dim selector As New Selector() - selector.fields = New String() { _ - SharedSet.Fields.SharedSetId, - Criterion.Fields.Id, - Keyword.Fields.KeywordText, - Keyword.Fields.KeywordMatchType, - Placement.Fields.PlacementUrl - } - - selector.predicates = New Predicate() { _ - Predicate.In(SharedSet.Fields.SharedSetId, - sharedSetIds) - } - - selector.paging = Paging.Default - - Dim sharedCriteria As New List(Of SharedCriterion) - Dim page As New SharedCriterionPage() - - Try - Do - ' Get the criteria. - page = sharedCriterionService.get(selector) - - ' Display the results. - If (Not page Is Nothing) AndAlso (Not page.entries Is Nothing) Then - Dim i As Integer = selector.paging.startIndex - For Each sharedCriterion As SharedCriterion In page.entries - Select Case sharedCriterion.criterion.type - Case CriterionType.KEYWORD - Dim keyword As Keyword = - DirectCast(sharedCriterion.criterion, Keyword) - Console.WriteLine( - "Shared negative keyword with ID {0} and text '{1}' " & - "was found.", keyword.id, keyword.text) - Exit Select - - Case CriterionType.PLACEMENT - Dim placement As Placement = - DirectCast(sharedCriterion.criterion, Placement) - Console.WriteLine( - "{0}) Shared negative placement with ID {1} and " & - "URL '{2}' was found.", i + 1, placement.id, - placement.url) - Exit Select - - Case Else - Console.WriteLine( - "{0}) Shared criteria with ID {1} was found.", - i + 1, sharedCriterion.criterion.id) - End Select - - i = i + 1 - sharedCriteria.Add(sharedCriterion) - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - - Return sharedCriteria - Catch e As Exception - Throw New Exception("Failed to get shared criteria.", e) - End Try - End Using - End Function - - ''' - ''' Removes a list of shared criteria. - ''' - ''' The user that owns the shared criteria. - ''' The list shared criteria to be removed. - Private Sub RemoveSharedCriteria(ByVal user As AdWordsUser, ByVal sharedCriteria _ - As List(Of SharedCriterion)) - If sharedCriteria.Count = 0 Then - Console.WriteLine("No shared criteria to remove.") - Return - End If - - Using sharedCriterionService As SharedCriterionService = DirectCast( - user.GetService( - AdWordsService.v201806.SharedCriterionService), - SharedCriterionService) - - Dim operations As New List(Of SharedCriterionOperation) - - For Each sharedCriterion As SharedCriterion In sharedCriteria - - Dim operation As New SharedCriterionOperation() - operation.operator = [Operator].REMOVE - - Dim tempSharedCriterion As New SharedCriterion() - tempSharedCriterion.sharedSetId = sharedCriterion.sharedSetId - tempSharedCriterion.criterion = New Criterion() - tempSharedCriterion.criterion.id = sharedCriterion.criterion.id - - operation.operand = tempSharedCriterion - operations.Add(operation) - Next - Try - Dim sharedCriterionReturnValue As SharedCriterionReturnValue = - sharedCriterionService.mutate(operations.ToArray()) - - For Each removedCriterion As SharedCriterion In sharedCriterionReturnValue.value - Console.WriteLine( - "Shared criterion ID {0} was successfully removed from shared " & - "set ID {1}.", removedCriterion.criterion.id, - removedCriterion.sharedSetId) - Next - Catch e As Exception - Throw New Exception("Failed to remove shared criteria.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/GetAdGroupBidModifiers.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/GetAdGroupBidModifiers.vb deleted file mode 100755 index 2d1f74577c3..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/GetAdGroupBidModifiers.vb +++ /dev/null @@ -1,127 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to retrieve ad group level mobile bid - ''' modifiers for a campaign. - ''' - ''' AdGroupBidModifierService.get - ''' - Public Class GetAdGroupBidModifiers - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAdGroupBidModifiers - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to retrieve ad group level mobile bid" & - " modifiers for a campaign." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign for which adgroup bid - ''' modifiers are retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - ' Get the AdGroupBidModifierService. - Using adGroupBidModifierService As AdGroupBidModifierService = CType( - user.GetService( - AdWordsService.v201806.AdGroupBidModifierService), - AdGroupBidModifierService) - - ' Get all ad group bid modifiers for the campaign. - Dim selector As New Selector() - selector.fields = New String() { _ - AdGroupBidModifier.Fields.CampaignId, - AdGroupBidModifier.Fields.AdGroupId, - AdGroupBidModifier.Fields.BidModifier, - AdGroupBidModifier.Fields.BidModifierSource, - Criterion.Fields.CriteriaType, - Criterion.Fields.Id - } - - Dim predicate As New Predicate() - predicate.field = "CampaignId" - predicate.[operator] = PredicateOperator.EQUALS - predicate.values = New String() {campaignId.ToString()} - selector.predicates = New Predicate() { _ - Predicate.Equals( - AdGroupBidModifier.Fields.CampaignId, - campaignId) - } - selector.paging = Paging.Default - - Dim page As New AdGroupBidModifierPage() - - Try - Do - ' Get the ad group bids. - page = adGroupBidModifierService.get(selector) - - ' Display the results. - If (Not page Is Nothing) AndAlso (Not page.entries Is Nothing) Then - Dim i As Integer = selector.paging.startIndex - For Each adGroupBidModifier As AdGroupBidModifier In page.entries - Dim bidModifier As String = "" - If adGroupBidModifier.bidModifierSpecified Then - bidModifier = adGroupBidModifier.bidModifier.ToString() - Else - bidModifier = "UNSET" - End If - Console.WriteLine( - "{0}) Campaign ID {1}, AdGroup ID {2}, Criterion ID {3} has " & - "ad group level modifier: {4}, source = {5}.", - i + 1, adGroupBidModifier.campaignId, - adGroupBidModifier.adGroupId, adGroupBidModifier.criterion.id, - bidModifier, adGroupBidModifier.bidModifierSource) - i = i + 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While selector.paging.startIndex < page.totalNumEntries - Console.WriteLine("Number of adgroup bid modifiers found: {0}", - page.totalNumEntries) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to retrieve adgroup bid modifiers.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.vb b/examples/AdWords/Vb/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.vb deleted file mode 100755 index e7b766dac6c..00000000000 --- a/examples/AdWords/Vb/v201806/AdvancedOperations/UsePortfolioBiddingStrategy.vb +++ /dev/null @@ -1,233 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports System -Imports System.Collections.Generic -Imports System.IO - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a portfolio bidding strategy and uses it to - ''' construct a campaign. - ''' - Public Class UsePortfolioBiddingStrategy - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UsePortfolioBiddingStrategy - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a portfolio bidding strategy and uses it to " & - "construct a campaign." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Dim biddingStrategyName As String = "Maximize Clicks " & - ExampleUtilities.GetRandomString() - Dim bidCeiling As Long = 2000000 - Dim spendTarget As Long = 20000000 - - Dim budgetName As String = "Shared Interplanetary Budget #" & - ExampleUtilities.GetRandomString() - Dim budgetAmount As Long = 30000000 - - Dim campaignName As String = "Interplanetary Cruise #" + - ExampleUtilities.GetRandomString() - - Try - Dim portfolioBiddingStrategy As SharedBiddingStrategy = - CreateBiddingStrategy(user, - biddingStrategyName, - bidCeiling, - spendTarget) - Console.WriteLine( - "Portfolio bidding strategy with name '{0}' and ID {1} of type {2} " & - "was created.", portfolioBiddingStrategy.name, portfolioBiddingStrategy.id, - portfolioBiddingStrategy.biddingScheme.BiddingSchemeType) - - Dim sharedBudget As Budget = CreateSharedBudget(user, budgetName, budgetAmount) - - Dim newCampaign As Campaign = - CreateCampaignWithBiddingStrategy(user, - campaignName, - portfolioBiddingStrategy.id, - sharedBudget.budgetId) - - Console.WriteLine( - "Campaign with name '{0}', ID {1} and bidding scheme ID {2} was " & - "created.", newCampaign.name, newCampaign.id, - newCampaign.biddingStrategyConfiguration.biddingStrategyId) - - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to create campaign that uses portfolio " & - "bidding strategy.", e) - End Try - End Sub - - - ''' - ''' Creates the portfolio bidding strategy. - ''' - ''' The AdWords user. - ''' The bidding strategy name. - ''' The bid ceiling. - ''' The spend target. - ''' The bidding strategy object. - Private Function CreateBiddingStrategy(ByVal user As AdWordsUser, - ByVal name As String, ByVal bidCeiling As Long, - ByVal spendTarget As Long) _ - As SharedBiddingStrategy - Using biddingStrategyService As BiddingStrategyService = CType( - user.GetService( - AdWordsService.v201806.BiddingStrategyService), - BiddingStrategyService) - ' Create a portfolio bidding strategy. - Dim portfolioBiddingStrategy As New SharedBiddingStrategy() - portfolioBiddingStrategy.name = name - - Dim biddingScheme As New TargetSpendBiddingScheme() - ' Optionally set additional bidding scheme parameters. - biddingScheme.bidCeiling = New Money() - biddingScheme.bidCeiling.microAmount = bidCeiling - - biddingScheme.spendTarget = New Money() - biddingScheme.spendTarget.microAmount = spendTarget - - portfolioBiddingStrategy.biddingScheme = biddingScheme - - ' Create operation. - Dim operation As New BiddingStrategyOperation() - operation.operator = [Operator].ADD - operation.operand = portfolioBiddingStrategy - - Return _ - biddingStrategyService.mutate(New BiddingStrategyOperation() {operation}).value( - 0) - End Using - End Function - - ''' - ''' Creates an explicit budget to be used only to create the Campaign. - ''' - ''' The AdWords user. - ''' The budget name. - ''' The budget amount. - ''' The budget object. - Private Function CreateSharedBudget(ByVal user As AdWordsUser, - ByVal name As String, ByVal amount As Long) As Budget - Using budgetService As BudgetService = CType( - user.GetService( - AdWordsService.v201806.BudgetService), - BudgetService) - - ' Create a shared budget - Dim budget As New Budget() - budget.name = name - budget.amount = New Money() - budget.amount.microAmount = amount - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - budget.isExplicitlyShared = True - - ' Create operation. - Dim operation As New BudgetOperation() - operation.operand = budget - operation.operator = [Operator].ADD - - ' Make the mutate request. - Return budgetService.mutate(New BudgetOperation() {operation}).value(0) - End Using - End Function - - ''' - ''' Creates the campaign with a portfolio bidding strategy. - ''' - ''' The AdWords user. - ''' The campaign name. - ''' The bidding strategy id. - ''' The shared budget id. - ''' The campaign object. - Private Function CreateCampaignWithBiddingStrategy(ByVal user As AdWordsUser, - ByVal name As String, - ByVal biddingStrategyId As Long, - ByVal sharedBudgetId As Long) _ - As Campaign - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create campaign. - Dim campaign As New Campaign() - campaign.name = name - campaign.advertisingChannelType = AdvertisingChannelType.SEARCH - - ' 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. - campaign.status = CampaignStatus.PAUSED - - ' Set the budget. - campaign.budget = New Budget() - campaign.budget.budgetId = sharedBudgetId - - ' Set bidding strategy (required). - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.biddingStrategyId = biddingStrategyId - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration - - ' Set network targeting (recommended). - Dim networkSetting As New NetworkSetting() - networkSetting.targetGoogleSearch = True - networkSetting.targetSearchNetwork = True - networkSetting.targetContentNetwork = True - campaign.networkSetting = networkSetting - - ' Create operation. - Dim operation As New CampaignOperation() - operation.operand = campaign - operation.operator = [Operator].ADD - - Return campaignService.mutate(New CampaignOperation() {operation}).value(0) - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/AddAdGroupDemographicCriteria.vb b/examples/AdWords/Vb/v201806/BasicOperations/AddAdGroupDemographicCriteria.vb deleted file mode 100755 index ad520760e36..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/AddAdGroupDemographicCriteria.vb +++ /dev/null @@ -1,122 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds demographic target criteria to an ad group. To get - ''' ad groups, run AddAdGroup.vb. - ''' - Public Class AddAdGroupDemographicCriteria - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddAdGroupDemographicCriteria - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds demographic target criteria to an ad group. To get " & - "ad groups, run AddAdGroup.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which criteria are - ''' added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Create biddable ad group criterion for gender - Dim genderTarget As New Gender() - ' Criterion Id for male. The IDs can be found here - ' https://developers.google.com/adwords/api/docs/appendix/genders - genderTarget.id = 10 - - Dim genderBiddableAdGroupCriterion As New BiddableAdGroupCriterion() - genderBiddableAdGroupCriterion.adGroupId = adGroupId - genderBiddableAdGroupCriterion.criterion = genderTarget - - ' Create negative ad group criterion for age range - Dim ageRangeNegative As New AgeRange() - ' Criterion Id for age 18 to 24. The IDs can be found here - ' https://developers.google.com/adwords/api/docs/appendix/ages - - ageRangeNegative.id = 503001 - Dim ageRangeNegativeAdGroupCriterion As New NegativeAdGroupCriterion() - ageRangeNegativeAdGroupCriterion.adGroupId = adGroupId - ageRangeNegativeAdGroupCriterion.criterion = ageRangeNegative - - ' Create operations. - Dim genderBiddableAdGroupCriterionOperation As New AdGroupCriterionOperation() - genderBiddableAdGroupCriterionOperation.operand = genderBiddableAdGroupCriterion - genderBiddableAdGroupCriterionOperation.operator = [Operator].ADD - - Dim ageRangeNegativeAdGroupCriterionOperation As New AdGroupCriterionOperation() - ageRangeNegativeAdGroupCriterionOperation.operand = ageRangeNegativeAdGroupCriterion - ageRangeNegativeAdGroupCriterionOperation.operator = [Operator].ADD - - Dim operations As New List(Of Operation) - operations.Add(genderBiddableAdGroupCriterionOperation) - operations.Add(ageRangeNegativeAdGroupCriterionOperation) - - Try - ' Add ad group criteria. - Dim result As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - CType(operations.ToArray, AdGroupCriterionOperation())) - - ' Display ad group criteria. - If (Not result Is Nothing) AndAlso Not (result.value Is Nothing) Then - For Each adGroupCriterionResult As AdGroupCriterion In result.value - Console.WriteLine( - "Ad group criterion with ad group id '{0}', criterion id " & - "'{1}', and type '{2}' was added.", - adGroupCriterionResult.adGroupId, - adGroupCriterionResult.criterion.id, - adGroupCriterionResult.criterion.CriterionType) - Next - Else - Console.WriteLine("No ad group criteria were added.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create ad group criteria.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/AddAdGroups.vb b/examples/AdWords/Vb/v201806/BasicOperations/AddAdGroups.vb deleted file mode 100755 index 085034e37dc..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/AddAdGroups.vb +++ /dev/null @@ -1,149 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to create ad groups. To create - ''' campaigns, run AddCampaigns.vb. - ''' - Public Class AddAdGroups - Inherits ExampleBase - - ''' - ''' Number of items being added / updated in this code example. - ''' - Const NUM_ITEMS As Integer = 5 - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddAdGroups - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example illustrates how to create ad groups. To create campaigns," & - " run AddCampaigns.vb" - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to which ad groups are - ''' added. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - - Dim operations As New List(Of AdGroupOperation) - - For i As Integer = 1 To NUM_ITEMS - ' Create the ad group. - Dim adGroup As New AdGroup - adGroup.name = String.Format("Earth to Mars Cruises #{0}", - ExampleUtilities.GetRandomString) - adGroup.status = AdGroupStatus.ENABLED - adGroup.campaignId = campaignId - - ' Set the ad group bids. - Dim biddingConfig As New BiddingStrategyConfiguration() - - Dim cpcBid As New CpcBid() - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 10000000 - - biddingConfig.bids = New Bids() {cpcBid} - - adGroup.biddingStrategyConfiguration = biddingConfig - - ' Optional: Set targeting restrictions. - ' Depending on the criterionTypeGroup value, most TargetingSettingDetail - ' only affect Display campaigns. However, the USER_INTEREST_AND_LIST value - ' works for RLSA campaigns - Search campaigns targeting using a - ' remarketing list. - Dim targetingSetting As New TargetingSetting() - - ' Restricting to serve ads that match your ad group placements. - ' This is equivalent to choosing "Target and bid" in the UI. - Dim placementDetail As New TargetingSettingDetail() - placementDetail.criterionTypeGroup = CriterionTypeGroup.PLACEMENT - placementDetail.targetAll = False - - ' Using your ad group verticals only for bidding. This is equivalent - ' to choosing "Bid only" in the UI. - Dim verticalDetail As New TargetingSettingDetail() - verticalDetail.criterionTypeGroup = CriterionTypeGroup.VERTICAL - verticalDetail.targetAll = True - - targetingSetting.details = New TargetingSettingDetail() _ - {placementDetail, verticalDetail} - - adGroup.settings = New Setting() {targetingSetting} - - ' Set the rotation mode. - Dim rotationMode As New AdGroupAdRotationMode - rotationMode.adRotationMode = AdRotationMode.OPTIMIZE - adGroup.adGroupAdRotationMode = rotationMode - - ' Create the operation. - Dim operation As New AdGroupOperation - operation.operator = [Operator].ADD - operation.operand = adGroup - - operations.Add(operation) - Next - - Try - ' Create the ad group. - Dim retVal As AdGroupReturnValue = adGroupService.mutate(operations.ToArray()) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - For Each newAdGroup As AdGroup In retVal.value - Console.WriteLine( - "Ad group with id = '{0}' and name = '{1}' was created.", - newAdGroup.id, newAdGroup.name) - Next - Else - Console.WriteLine("No ad groups were created.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create ad groups.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/AddCampaigns.vb b/examples/AdWords/Vb/v201806/BasicOperations/AddCampaigns.vb deleted file mode 100755 index 1baa5b0a469..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/AddCampaigns.vb +++ /dev/null @@ -1,181 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds campaigns. To get campaigns, run GetCampaigns.vb. - ''' - Public Class AddCampaigns - Inherits ExampleBase - - ''' - ''' Number of items being added / updated in this code example. - ''' - Const NUM_ITEMS As Integer = 5 - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCampaigns - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds campaigns. To get campaigns, run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - Dim budget As Budget = CreateBudget(user) - - ' [START create_campaigns] MOE:strip_line - Dim operations As New List(Of CampaignOperation) - - For i As Integer = 1 To NUM_ITEMS - ' Create the campaign. - Dim campaign As New Campaign - campaign.name = "Interplanetary Cruise #" & ExampleUtilities.GetRandomString - campaign.advertisingChannelType = AdvertisingChannelType.SEARCH - - ' 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. - campaign.status = CampaignStatus.PAUSED - - Dim biddingConfig As New BiddingStrategyConfiguration() - biddingConfig.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - campaign.biddingStrategyConfiguration = biddingConfig - - ' Set the campaign budget. - campaign.budget = New Budget - campaign.budget.budgetId = budget.budgetId - - ' Set the campaign network options. - campaign.networkSetting = New NetworkSetting - campaign.networkSetting.targetGoogleSearch = True - campaign.networkSetting.targetSearchNetwork = True - campaign.networkSetting.targetContentNetwork = False - campaign.networkSetting.targetPartnerSearchNetwork = False - - ' Set the campaign geo target and keyword match settings. - Dim geoSetting As New GeoTargetTypeSetting - geoSetting.positiveGeoTargetType = - GeoTargetTypeSettingPositiveGeoTargetType.DONT_CARE - geoSetting.negativeGeoTargetType = - GeoTargetTypeSettingNegativeGeoTargetType.DONT_CARE - - campaign.settings = New Setting() {geoSetting} - - ' Optional: Set the start date. - campaign.startDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd") - - ' Optional: Set the end date. - campaign.endDate = DateTime.Now.AddYears(1).ToString("yyyyMMdd") - - ' Optional: Set the frequency cap. - Dim frequencyCap As New FrequencyCap - frequencyCap.impressions = 5 - frequencyCap.level = Level.ADGROUP - frequencyCap.timeUnit = TimeUnit.DAY - campaign.frequencyCap = frequencyCap - - ' Create the operation. - Dim operation As New CampaignOperation - operation.operator = [Operator].ADD - operation.operand = campaign - operations.Add(operation) - Next - - Try - ' Add the campaign. - Dim retVal As CampaignReturnValue = campaignService.mutate(operations.ToArray()) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - For Each newCampaign As Campaign In retVal.value - Console.WriteLine( - "Campaign with name = '{0}' and id = '{1}' was added.", - newCampaign.name, - newCampaign.id) - Next - Else - Console.WriteLine("No campaigns were added.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to add campaigns.", e) - End Try - End Using - ' [END create_campaigns] MOE:strip_line - End Sub - - ''' - ''' Creates the budget. - ''' - ''' The AdWords user. - ''' The budget instance. - Private Shared Function CreateBudget(user As AdWordsUser) As Budget - ' [START create_budget] MOE:strip_line - Using budgetService As BudgetService = CType( - user.GetService( - AdWordsService.v201806.BudgetService), - BudgetService) - - ' Create the campaign budget. - Dim budget As New Budget - budget.name = "Interplanetary Cruise Budget #" & ExampleUtilities.GetRandomString - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - budget.amount = New Money - budget.amount.microAmount = 50000000 - - Dim budgetOperation As New BudgetOperation - budgetOperation.operator = [Operator].ADD - budgetOperation.operand = budget - - Try - Dim budgetRetval As BudgetReturnValue = budgetService.mutate( - New BudgetOperation() {budgetOperation}) - Return budgetRetval.value(0) - Catch e As Exception - Throw New System.ApplicationException("Failed to add shared budget.", e) - End Try - End Using - ' [END create_budget] MOE:strip_line - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/AddExpandedTextAds.vb b/examples/AdWords/Vb/v201806/BasicOperations/AddExpandedTextAds.vb deleted file mode 100755 index d17d19b1bcd..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/AddExpandedTextAds.vb +++ /dev/null @@ -1,121 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds expanded text ads to a given ad group. To list - ''' ad groups, run GetAdGroups.vb. - ''' - Public Class AddExpandedTextAds - Inherits ExampleBase - - ''' - ''' Number of ads being added / updated in this code example. - ''' - Const NUMBER_OF_ADS As Integer = 5 - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddExpandedTextAds - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds expanded text ads to a given ad group. To list " & - "ad groups, run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which ads are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - ' [START addExpandedTextAds] MOE:strip_line - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - Dim operations As New List(Of AdGroupAdOperation) - - For i As Integer = 1 To NUMBER_OF_ADS - ' [START addExpandedTextAd] MOE:strip_line - ' Create the expanded text ad. - Dim expandedTextAd As New ExpandedTextAd - expandedTextAd.headlinePart1 = "Cruise #" & i.ToString() & " to Mars" - expandedTextAd.headlinePart2 = "Best Space Cruise Line" - expandedTextAd.description = "Buy your tickets now!" - expandedTextAd.finalUrls = New String() {"http://www.example.com/" & i} - - Dim expandedTextAdGroupAd As New AdGroupAd - expandedTextAdGroupAd.adGroupId = adGroupId - expandedTextAdGroupAd.ad = expandedTextAd - - ' Optional: Set the status. - expandedTextAdGroupAd.status = AdGroupAdStatus.PAUSED - ' [END addExpandedTextAd] MOE:strip_line - - ' Create the operations. - Dim operation As New AdGroupAdOperation - operation.operator = [Operator].ADD - operation.operand = expandedTextAdGroupAd - - operations.Add(operation) - Next - - Dim retVal As AdGroupAdReturnValue = Nothing - - Try - ' Create the ads. - retVal = service.mutate(operations.ToArray()) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing)) Then - For Each adGroupAd As AdGroupAd In retVal.value - Dim newAd As ExpandedTextAd = CType(adGroupAd.ad, ExpandedTextAd) - Console.WriteLine( - "Expanded text ad with ID '{0}' and headline '{1} - {2}' " + - "was added.", newAd.id, newAd.headlinePart1, newAd.headlinePart2) - Next - Else - Console.WriteLine("No expanded text ads were created.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create expanded text ads.", e) - End Try - ' [END addExpandedTextAds] MOE:strip_line - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/AddKeywords.vb b/examples/AdWords/Vb/v201806/BasicOperations/AddKeywords.vb deleted file mode 100755 index 1c4f57339fd..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/AddKeywords.vb +++ /dev/null @@ -1,131 +0,0 @@ -' Copyright 2018 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. - -Imports System.Web -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds keywords to an ad group. To get ad groups, run - ''' GetAdGroups.vb. - ''' - Public Class AddKeywords - Inherits ExampleBase - - ''' - ''' Items being added in this code example. - ''' - ReadOnly KEYWORDS As String() = New String() {"mars cruise", "space hotel"} - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddKeywords - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds keywords to an ad group. To get ad groups, run " & - "GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which keywords are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - Dim operations As New List(Of AdGroupCriterionOperation) - - For Each keywordText As String In KEYWORDS - ' Create the keyword. - Dim keyword As New Keyword - keyword.text = keywordText - keyword.matchType = KeywordMatchType.BROAD - - ' Create the biddable ad group criterion. - Dim keywordCriterion As New BiddableAdGroupCriterion - keywordCriterion.adGroupId = adGroupId - keywordCriterion.criterion = keyword - - ' Optional: Set the user status. - keywordCriterion.userStatus = UserStatus.PAUSED - - ' Optional: Set the keyword destination url. - keywordCriterion.finalUrls = New UrlList() - keywordCriterion.finalUrls.urls = New String() _ - {"http://example.com/mars/cruise/?kw=" & - HttpUtility.UrlEncode(keywordText)} - - ' Create the operations. - Dim operation As New AdGroupCriterionOperation - operation.operator = [Operator].ADD - operation.operand = keywordCriterion - - operations.Add(operation) - Next - - Try - ' Create the keywords. - Dim retVal As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - operations.ToArray()) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing)) Then - For Each adGroupCriterion As AdGroupCriterion In retVal.value - ' If you are adding multiple type of criteria, then you may need to - ' check for - ' - ' if (adGroupCriterion is Keyword) { ... } - ' - ' to identify the criterion type. - Console.WriteLine( - "Keyword with ad group id = '{0}, keyword id = '{1}, text = " & - "'{2}' and match type = '{3}' was created.", - adGroupCriterion.adGroupId, - adGroupCriterion.criterion.id, - TryCast(adGroupCriterion.criterion, Keyword).text, - TryCast(adGroupCriterion.criterion, Keyword).matchType) - Next - Else - Console.WriteLine("No keywords were added.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create keywords.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/AddResponsiveSearchAd.vb b/examples/AdWords/Vb/v201806/BasicOperations/AddResponsiveSearchAd.vb deleted file mode 100755 index 2ab28b885d5..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/AddResponsiveSearchAd.vb +++ /dev/null @@ -1,147 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a responsive search ad to a given ad group. To get ad groups, - ''' run GetAdGroups.vb. - ''' - Public Class AddResponsiveSearchAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddResponsiveSearchAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a responsive search ad to a given ad group. To get " + - "ad groups, run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which ads are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - ' [START AddResponsiveSearchAd] MOE:strip_line - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - ' [START addResponsiveSearchAd] MOE:strip_line - ' Create a responsive search ad. - Dim responsiveSearchAd As New ResponsiveSearchAd() - responsiveSearchAd.finalUrls = New String() {"http://www.example.com/cruise"} - responsiveSearchAd.path1 = "all-inclusive" - responsiveSearchAd.path2 = "deals" - - Dim textAsset1 As New TextAsset() - textAsset1.assetText = "Cruise to Mars #" + ExampleUtilities.GetShortRandomString() - - Dim headline1 As New AssetLink() - headline1.asset = textAsset1 - ' Set a pinning to always choose this asset for HEADLINE_1. - ' Pinning Is optional; if no pinning is set, then headlines - ' and descriptions will be rotated and the ones that perform - ' best will be used more often. - headline1.pinnedField = ServedAssetFieldType.HEADLINE_1 - - Dim textAsset2 As New TextAsset() - textAsset2.assetText = "Best Space Cruise Line" - - Dim headline2 As New AssetLink() - headline2.asset = textAsset2 - - Dim textAsset3 As New TextAsset() - textAsset3.assetText = "Experience the Stars" - - Dim headline3 As New AssetLink() - headline3.asset = textAsset3 - - responsiveSearchAd.headlines = New AssetLink() {headline1, headline2, headline3} - - ' Create ad group ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = responsiveSearchAd - - ' Optional: Set additional settings. - adGroupAd.status = AdGroupAdStatus.PAUSED - ' [END addResponsiveSearchAd] MOE:strip_line - - ' Create ad group ad operation and add it to the list. - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - - Try - ' Add the responsive search ad on the server. - Dim retval As AdGroupAdReturnValue = service.mutate( - New AdGroupAdOperation() _ - {operation}) - - ' Print out some information for the created ad. - For Each newAdGroupAd As AdGroupAd In retval.value - Dim newAd As ResponsiveSearchAd = CType(newAdGroupAd.ad, ResponsiveSearchAd) - Console.WriteLine("New responsive search ad with ID {0} was added.", - newAd.id) - Console.WriteLine("Headlines:") - - For Each headline As AssetLink In newAd.headlines - Dim textAsset As TextAsset = CType(headline.asset, TextAsset) - Console.WriteLine(" {0}", textAsset.assetText) - If headline.pinnedFieldSpecified Then - Console.WriteLine(" (pinned to {0})", headline.pinnedField) - End If - Next - Console.WriteLine("Descriptions:") - For Each description As AssetLink In newAd.descriptions - Dim textAsset As TextAsset = CType(description.asset, TextAsset) - Console.WriteLine(" {0}", textAsset.assetText) - If (description.pinnedFieldSpecified) Then - Console.WriteLine(" (pinned to {0})", description.pinnedField) - End If - Next - Next - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to create responsive search ad.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/GetAdGroups.vb b/examples/AdWords/Vb/v201806/BasicOperations/GetAdGroups.vb deleted file mode 100755 index 925bf943977..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/GetAdGroups.vb +++ /dev/null @@ -1,105 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to retrieve all the ad groups for a - ''' campaign. To create an ad group, run AddAdGroup.vb. - ''' - Public Class GetAdGroups - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAdGroups - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to retrieve all the ad groups for a " & - "campaign. To create an ad group, run AddAdGroup.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign for which ad groups are - ''' retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - AdGroup.Fields.Id, AdGroup.Fields.Name - } - - selector.predicates = New Predicate() { _ - Predicate.Equals( - AdGroup.Fields.CampaignId, - campaignId) - } - selector.ordering = New OrderBy() {OrderBy.Asc(AdGroup.Fields.Name)} - selector.paging = Paging.Default - - Dim page As New AdGroupPage - - Try - Do - ' Get the ad groups. - page = adGroupService.get(selector) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - Dim i As Integer = selector.paging.startIndex - For Each adGroup As AdGroup In page.entries - Console.WriteLine( - "{0}) Ad group name is ""{1}"" and id is ""{2}"".", - i + 1, - adGroup.name, adGroup.id) - i += 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of ad groups found: {0}", page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to retrieve ad group(s).", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/GetCampaigns.vb b/examples/AdWords/Vb/v201806/BasicOperations/GetCampaigns.vb deleted file mode 100755 index f4b0caf2eda..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/GetCampaigns.vb +++ /dev/null @@ -1,98 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example lists all campaigns. To add a campaign, run - ''' AddCampaign.vb. - ''' - Public Class GetCampaigns - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetCampaigns - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example lists all campaigns. To add a campaign, run AddCampaign.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' [START get_campaigns] MOE:strip_line - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - Campaign.Fields.Id, Campaign.Fields.Name, - Campaign.Fields.Status - } - selector.paging = Paging.Default - - Dim page As New CampaignPage - - Try - Do - ' Get the campaigns. - page = campaignService.get(selector) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - Dim i As Integer = selector.paging.startIndex - For Each campaign As Campaign In page.entries - Console.WriteLine( - "{0}) Campaign with id = '{1}', name = '{2}' and status = " & - "'{3}' was found.", i + 1, campaign.id, campaign.name, - campaign.status) - i += 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of campaigns found: {0}", page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to retrieve campaign(s).", e) - End Try - ' [END get_campaigns] MOE:strip_line - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/GetCampaignsWithAwql.vb b/examples/AdWords/Vb/v201806/BasicOperations/GetCampaignsWithAwql.vb deleted file mode 100755 index 1024297c48f..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/GetCampaignsWithAwql.vb +++ /dev/null @@ -1,102 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example lists all campaigns using an AWQL query. See - ''' https://developers.google.com/adwords/api/docs/guides/awql for AWQL - ''' documentation. To add a campaign, run AddCampaign.vb. - ''' - Public Class GetCampaignsWithAwql - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetCampaignsWithAwql - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example lists all campaigns using an AWQL query. See " & - "https://developers.google.com/adwords/api/docs/guides/awql for AWQL " & - "documentation. To add a campaign, run AddCampaign.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' [START create_query] MOE:strip_line - ' Create the query. - Dim query As SelectQuery = New SelectQueryBuilder() _ - .Select(Campaign.Fields.Name, Campaign.Fields.Id, Campaign.Fields.Status) _ - .OrderByAscending(Campaign.Fields.Name) _ - .DefaultLimit() _ - .Build() - ' [END create_query] MOE:strip_line - - ' [START execute_query] MOE:strip_line - Dim page As New CampaignPage() - Dim i As Integer = 0 - - Try - Do - ' Get the campaigns. - page = campaignService.query(query) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - For Each campaign As Campaign In page.entries - Console.WriteLine( - "{0}) Campaign with id = '{1}', name = '{2}' and status = " & - "'{3}' was found.", i, campaign.id, campaign.name, - campaign.status) - i += 1 - Next - End If - query.NextPage(page) - Loop While (query.HasNextPage(page)) - Console.WriteLine("Number of campaigns found: {0}", page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to retrieve campaign(s).", e) - End Try - ' [END execute_query] MOE:strip_line - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/GetExpandedTextAds.vb b/examples/AdWords/Vb/v201806/BasicOperations/GetExpandedTextAds.vb deleted file mode 100755 index 574bc7fdc4a..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/GetExpandedTextAds.vb +++ /dev/null @@ -1,131 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example retrieves all expanded text ads given an existing ad - ''' group. To add expanded text ads to an existing ad group, run - ''' AddExpandedTextAds.vb. - ''' - Public Class GetExpandedTextAds - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetExpandedTextAds - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example retrieves all expanded text ads given an existing ad " & - "group. To add expanded text ads to an existing ad group, run " & - "AddExpandedTextAds.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group from which expanded text ads - ''' are retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - ' [START getExpandedTextAds] MOE:strip_line - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create a selector. - Dim selector As New Selector - - selector.fields = New String() { _ - ExpandedTextAd.Fields.Id, - AdGroupAd.Fields.Status, - ExpandedTextAd.Fields.HeadlinePart1, - ExpandedTextAd.Fields.HeadlinePart2, - ExpandedTextAd.Fields.Description - } - - selector.ordering = New OrderBy() {OrderBy.Asc(TextAd.Fields.Id)} - - Dim fieldStatusStrings = New String() { _ - AdGroupAdStatus.ENABLED.ToString(), - AdGroupAdStatus.PAUSED.ToString(), - AdGroupAdStatus.DISABLED.ToString() - } - selector.predicates = New Predicate() { _ - Predicate.Equals( - AdGroupAd.Fields.AdGroupId, - adGroupId), - Predicate.Equals("AdType", - "EXPANDED_TEXT_AD"), - Predicate.In(AdGroupAd.Fields.Status, - fieldStatusStrings) - } - - ' Select the selector paging. - selector.paging = Paging.Default - - Dim page As New AdGroupAdPage - - Try - Do - ' Get the expanded text ads. - page = service.get(selector) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - Dim i As Integer = selector.paging.startIndex - - For Each adGroupAd As AdGroupAd In page.entries - Dim expandedTextAd As ExpandedTextAd = CType(adGroupAd.ad, - ExpandedTextAd) - Console.WriteLine( - "{0} : Expanded text ad with ID '{1}', headline '{2} - {3}' " & - "and description '{4} was found.", i + 1, expandedTextAd.id, - expandedTextAd.headlinePart1, expandedTextAd.headlinePart2, - expandedTextAd.description) - Next - i += 1 - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of expanded text ads found: {0}", - page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to get expanded text ads.", e) - End Try - End Using - ' [END getExpandedTextAds] MOE:strip_line - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/GetKeywords.vb b/examples/AdWords/Vb/v201806/BasicOperations/GetKeywords.vb deleted file mode 100755 index e0c1da9b62f..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/GetKeywords.vb +++ /dev/null @@ -1,126 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets all keywords in an ad group. To add keywords, run - ''' AddKeywords.vb. - ''' - Public Class GetKeywords - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetKeywords - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets all keywords in an ad group. To add keywords, run " & - "AddKeywords.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' ID of the ad group from which keywords are - ''' retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Create a selector. - Dim selector As New Selector - selector.fields = New String() { _ - Keyword.Fields.Id, - Keyword.Fields.KeywordMatchType, - Keyword.Fields.KeywordText, - Keyword.Fields.CriteriaType - } - - ' Select only keywords. - Dim criteriaPredicate As New Predicate - criteriaPredicate.field = "CriteriaType" - criteriaPredicate.operator = PredicateOperator.IN - criteriaPredicate.values = New String() {"KEYWORD"} - - ' Restrict search to an ad group. - Dim adGroupPredicate As New Predicate - adGroupPredicate.field = "AdGroupId" - adGroupPredicate.operator = PredicateOperator.EQUALS - adGroupPredicate.values = New String() {adGroupId.ToString()} - - selector.predicates = New Predicate() { _ - Predicate.In(Keyword.Fields.CriteriaType, - New String() {"KEYWORD"}), - Predicate.Equals( - AdGroupCriterion.Fields.AdGroupId, - adGroupId) - } - selector.ordering = New OrderBy() {OrderBy.Asc(Keyword.Fields.KeywordText)} - selector.paging = Paging.Default - - Dim page As New AdGroupCriterionPage - - Try - Do - ' Get the keywords. - page = adGroupCriterionService.get(selector) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - Dim i As Integer = selector.paging.startIndex - - For Each adGroupCriterion As AdGroupCriterion In page.entries - Dim keyword As Keyword = CType(adGroupCriterion.criterion, Keyword) - - Console.WriteLine( - "{0}) Keyword with text '{1}', match type '{2}', criteria " & - "type '{3}', and ID {4} was found.", i + 1, keyword.text, - keyword.matchType, - keyword.type, keyword.id) - i += 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of keywords found: {0}", page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to retrieve keywords.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/GetResponsiveSearchAds.vb b/examples/AdWords/Vb/v201806/BasicOperations/GetResponsiveSearchAds.vb deleted file mode 100755 index 3f721c18e97..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/GetResponsiveSearchAds.vb +++ /dev/null @@ -1,144 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets non-removed responsive search ads in an ad group. To add - ''' responsive search ads, run AddResponsiveSearchAd.vb. To get ad groups, run - ''' GetAdGroups.vb. - ''' - Public Class GetResponsiveSearchAds - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetResponsiveSearchAds - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets non-removed responsive search ads in an ad group. To " + - "add responsive search ads, run AddResponsiveSearchAd.vb. To get ad groups, " + - "run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group from which expanded text ads - ''' are retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - ' [START getResponsiveSearchAd] MOE:strip_line - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create a selector. - Dim selector As New Selector - - selector.fields = New String() { _ - ResponsiveSearchAd.Fields.Id, - AdGroupAd.Fields.Status, - ResponsiveSearchAd.Fields. - ResponsiveSearchAdHeadlines, - ResponsiveSearchAd.Fields. - ResponsiveSearchAdDescriptions - } - - selector.ordering = New OrderBy() {OrderBy.Asc(ResponsiveSearchAd.Fields.Id)} - - selector.predicates = - New Predicate() { _ - Predicate.Equals(AdGroupAd.Fields.AdGroupId, - adGroupId), - Predicate.Equals("AdType", - AdType.RESPONSIVE_SEARCH_AD.ToString()) - } - - ' Select the selector paging. - selector.paging = Paging.Default - - Dim page As New AdGroupAdPage - - Try - Do - ' Get the responsive search ads. - page = service.get(selector) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - Dim i As Integer = selector.paging.startIndex - - For Each adGroupAd As AdGroupAd In page.entries - Dim ad As ResponsiveSearchAd = CType(adGroupAd.ad, - ResponsiveSearchAd) - Console.WriteLine( - "{0} New responsive search ad with ID {1} and status " + - "{2} was found.", i + 1, ad.id, adGroupAd.status) - - Console.WriteLine("Headlines:") - - For Each headline As AssetLink In ad.headlines - Dim textAsset As TextAsset = CType(headline.asset, TextAsset) - Console.WriteLine(" {0}", textAsset.assetText) - If headline.pinnedFieldSpecified Then - Console.WriteLine(" (pinned to {0})", - headline.pinnedField) - End If - Next - Console.WriteLine("Descriptions:") - For Each description As AssetLink In ad.descriptions - Dim textAsset As TextAsset = CType(description.asset, TextAsset) - Console.WriteLine(" {0}", textAsset.assetText) - If (description.pinnedFieldSpecified) Then - Console.WriteLine(" (pinned to {0})", - description.pinnedField) - End If - Next - Next - i += 1 - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of responsive search ads found: {0}", - page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to get responsive search ads.", e) - End Try - End Using - ' [END getResponsiveSearchAd] MOE:strip_line - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/PauseAd.vb b/examples/AdWords/Vb/v201806/BasicOperations/PauseAd.vb deleted file mode 100755 index 6d4c4b39af8..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/PauseAd.vb +++ /dev/null @@ -1,99 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example pauses a given ad. To list all ads, run GetExpandedTextAds.vb. - ''' - Public Class PauseAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New PauseAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim adId As Long = Long.Parse("INSERT_AD_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId, adId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example pauses a given ad. To list all ads, run " & - "GetExpandedTextAds.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group that contains the ad. - ''' - ''' Id of the ad to be paused. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, ByVal adId As Long) - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - Dim status As AdGroupAdStatus = AdGroupAdStatus.PAUSED - - ' Create the ad group ad. - Dim adGroupAd As New AdGroupAd - adGroupAd.status = status - adGroupAd.adGroupId = adGroupId - - adGroupAd.ad = New Ad - adGroupAd.ad.id = adId - - ' Create the operation. - Dim adGroupAdOperation As New AdGroupAdOperation - adGroupAdOperation.operator = [Operator].SET - adGroupAdOperation.operand = adGroupAd - - Try - ' Update the ad. - Dim retVal As AdGroupAdReturnValue = service.mutate( - New AdGroupAdOperation() {adGroupAdOperation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim pausedAdGroupAd As AdGroupAd = retVal.value(0) - Console.WriteLine("Ad with id ""{0}"" was paused.", pausedAdGroupAd.ad.id) - Else - Console.WriteLine("No ads were paused.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to pause ad.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/RemoveAd.vb b/examples/AdWords/Vb/v201806/BasicOperations/RemoveAd.vb deleted file mode 100755 index a7441b27900..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/RemoveAd.vb +++ /dev/null @@ -1,101 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example removes an ad using the 'REMOVE' operator. To list ads, - ''' run GetTextAds.vb. - ''' - Public Class RemoveAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New RemoveAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim adId As Long = Long.Parse("INSERT_AD_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId, adId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example removes an ad using the 'REMOVE' operator. To list ads, " & - "run GetTextAds.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group that contains the ad. - ''' Id of the ad being removed. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, ByVal adId As Long) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Since we do not need to update any ad-specific fields, it is enough to - ' create the base type. - Dim ad As New Ad - ad.id = adId - - ' Create the ad group ad. - Dim adGroupAd As New AdGroupAd - adGroupAd.adGroupId = adGroupId - - adGroupAd.ad = ad - - ' Create the operation. - Dim operation As New AdGroupAdOperation - operation.operand = adGroupAd - operation.operator = [Operator].REMOVE - - Try - ' Remove the ad. - Dim retVal As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim removedAdGroupAd As AdGroupAd = retVal.value(0) - Console.WriteLine("Ad with id = ""{0}"" and type = ""{1}"" was removed.", - removedAdGroupAd.ad.id, removedAdGroupAd.ad.AdType) - Else - Console.WriteLine("No ads were removed.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to remove ad.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/RemoveAdGroup.vb b/examples/AdWords/Vb/v201806/BasicOperations/RemoveAdGroup.vb deleted file mode 100755 index e44b6670c67..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/RemoveAdGroup.vb +++ /dev/null @@ -1,95 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example removes an ad group by setting the status to 'REMOVED'. - ''' To get ad groups, run GetAdGroups.vb. - ''' - Public Class RemoveAdGroup - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New RemoveAdGroup - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example removes an ad group by setting the status to 'REMOVED'. " & - "To get ad groups, run GetAdGroups.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to be removed. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - - ' Create ad group with REMOVED status. - Dim adGroup As New AdGroup - adGroup.id = adGroupId - adGroup.status = AdGroupStatus.REMOVED - - ' Create the operation. - Dim operation As New AdGroupOperation - operation.operand = adGroup - operation.operator = [Operator].SET - - Try - ' Remove the ad group. - Dim retVal As AdGroupReturnValue = adGroupService.mutate( - New AdGroupOperation() {operation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim removedAdGroup As AdGroup = retVal.value(0) - Console.WriteLine( - "Ad group with id = ""{0}"" and name = ""{1}"" was removed.", - removedAdGroup.id, removedAdGroup.name) - Else - Console.WriteLine("No ad groups were removed.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to remove ad groups.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/RemoveCampaign.vb b/examples/AdWords/Vb/v201806/BasicOperations/RemoveCampaign.vb deleted file mode 100755 index b427db0e507..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/RemoveCampaign.vb +++ /dev/null @@ -1,95 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example removes a campaign by setting the status to 'REMOVED'. - ''' To get campaigns, run GetCampaigns.vb. - ''' - Public Class RemoveCampaign - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New RemoveCampaign - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example removes a campaign by setting the status to 'REMOVED'. To " & - "get campaigns, run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to be removed. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create campaign with REMOVED status. - Dim campaign As New Campaign - campaign.id = campaignId - campaign.status = CampaignStatus.REMOVED - - ' Create the operation. - Dim operation As New CampaignOperation - operation.operand = campaign - operation.operator = [Operator].SET - - Try - ' Remove the campaign. - Dim retVal As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {operation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim removedCampaign As Campaign = retVal.value(0) - Console.WriteLine( - "Campaign with id = ""{0}"" was renamed to ""{1}"" and removed.", - removedCampaign.id, removedCampaign.name) - Else - Console.WriteLine("No campaigns were removed.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to remove campaigns.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/RemoveKeyword.vb b/examples/AdWords/Vb/v201806/BasicOperations/RemoveKeyword.vb deleted file mode 100755 index d33c0e75bd3..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/RemoveKeyword.vb +++ /dev/null @@ -1,102 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example removes a keyword using the 'REMOVE' operator. To get - ''' keywords, run GetKeywords.vb. - ''' - Public Class RemoveKeyword - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New RemoveKeyword - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim keywordId As Long = Long.Parse("INSERT_KEYWORD_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId, keywordId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example removes a keyword using the 'REMOVE' operator. To get " & - "keywords, run GetKeywords.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group that contains the keyword. - ''' - ''' Id of the keyword to be removed. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, ByVal keywordId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Create base class criterion to avoid setting keyword-specific - ' fields. - Dim criterion As New Criterion - criterion.id = keywordId - - ' Create the ad group criterion. - Dim adGroupCriterion As New BiddableAdGroupCriterion - adGroupCriterion.adGroupId = adGroupId - adGroupCriterion.criterion = criterion - - ' Create the operation. - Dim operation As New AdGroupCriterionOperation - operation.operand = adGroupCriterion - operation.operator = [Operator].REMOVE - - Try - ' Remove the keyword. - Dim retVal As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - New AdGroupCriterionOperation() {operation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim removedKeyword As AdGroupCriterion = retVal.value(0) - Console.WriteLine( - "Keyword with ad group id = ""{0}"" and id = ""{1}"" was " & - "removed.", removedKeyword.adGroupId, removedKeyword.criterion.id) - Else - Console.WriteLine("No keywords were removed.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to remove keywords.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/UpdateAdGroup.vb b/examples/AdWords/Vb/v201806/BasicOperations/UpdateAdGroup.vb deleted file mode 100755 index 460573cbac1..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/UpdateAdGroup.vb +++ /dev/null @@ -1,136 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to update an ad group, setting its - ''' status to 'PAUSED', and its CPC bid to a new value if specified. - ''' To create an ad group, run AddAdGroup.vb. - ''' - Public Class UpdateAdGroup - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UpdateAdGroup - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim bidMicroAmount As Long? = Nothing - - ' Optional: Provide a cpc bid for the ad group, in micro amounts. - Dim tempVal As Long = 0 - If Long.TryParse("INSERT_CPC_BID_IN_MICROS_HERE", tempVal) Then - bidMicroAmount = New Nullable(Of Long)(tempVal) - End If - - codeExample.Run(New AdWordsUser, adGroupId, bidMicroAmount) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example illustrates how to update an ad group, setting its status " & - "to 'PAUSED', and its CPC bid to a new value if specified. To create an ad " & - "group, run AddAdGroup.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to be updated. - ''' The CPC bid amount in micros. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, - ByVal bidMicroAmount As Long?) - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - - ' [START updateAdGroup] MOE:strip_line - ' Create an ad group with the specified ID. - Dim adGroup As New AdGroup - adGroup.id = adGroupId - - ' Pause the ad group. - adGroup.status = AdGroupStatus.PAUSED - - ' Update the CPC bid if specified. - If bidMicroAmount.HasValue() Then - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - Dim cpcBidMoney = New Money() - cpcBidMoney.microAmount = bidMicroAmount.Value - Dim cpcBid As New CpcBid() - cpcBid.bid = cpcBidMoney - biddingStrategyConfiguration.bids = New Bids() {cpcBid} - adGroup.biddingStrategyConfiguration = biddingStrategyConfiguration - End If - - ' Create the operation. - Dim operation As New AdGroupOperation - operation.operator = [Operator].SET - operation.operand = adGroup - - Try - ' Update the ad group. - Dim retVal As AdGroupReturnValue = adGroupService.mutate( - New AdGroupOperation() {operation}) - ' [END updateAdGroup] MOE:strip_line - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim adGroupResult As AdGroup = retVal.value(0) - Dim bsConfig As BiddingStrategyConfiguration = - adGroupResult.biddingStrategyConfiguration - - ' Find the CpcBid in the bidding strategy configuration's bids collection. - Dim cpcBidMicros As Long = 0L - If (Not bsConfig Is Nothing) AndAlso (Not bsConfig.bids Is Nothing) Then - For Each Bid As Bids In bsConfig.bids - If TypeOf Bid Is CpcBid Then - cpcBidMicros = DirectCast(Bid, CpcBid).bid.microAmount - Exit For - End If - Next - End If - Console.WriteLine( - "Ad group with ID {0} and name '{1}' updated to have status '{2}'" & - " and CPC bid {3}", adGroupResult.id, adGroupResult.name, - adGroupResult.status, cpcBidMicros) - Else - Console.WriteLine("No ad groups were updated.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to update ad groups.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/UpdateCampaign.vb b/examples/AdWords/Vb/v201806/BasicOperations/UpdateCampaign.vb deleted file mode 100755 index b51c42d899a..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/UpdateCampaign.vb +++ /dev/null @@ -1,93 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example updates a campaign. To get campaigns, run - ''' GetCampaigns.vb. - ''' - Public Class UpdateCampaign - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UpdateCampaign - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example updates a campaign. To get campaigns, run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to be updated. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create campaign with updated budget. - Dim campaign As New Campaign - campaign.id = campaignId - campaign.status = CampaignStatus.PAUSED - - ' Create the operations. - Dim operation As New CampaignOperation - operation.operator = [Operator].SET - operation.operand = campaign - - Try - ' Update the campaign. - Dim retVal As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {operation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim updatedCampaign As Campaign = retVal.value(0) - Console.WriteLine("Campaign with name = '{0}' and id = '{1}' was updated.", - updatedCampaign.name, updatedCampaign.id) - Else - Console.WriteLine("No campaigns were updated.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to update campaigns.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/UpdateExpandedTextAd.vb b/examples/AdWords/Vb/v201806/BasicOperations/UpdateExpandedTextAd.vb deleted file mode 100755 index 69c8698bc0a..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/UpdateExpandedTextAd.vb +++ /dev/null @@ -1,100 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example updates an expanded text ad. To get expanded text ads, - ''' run GetExpandedTextAds.vb. - ''' - Public Class UpdateExpandedTextAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UpdateExpandedTextAd - Console.WriteLine(codeExample.Description) - Try - Dim adId As Long = Long.Parse("INSERT_AD_ID_HERE") - codeExample.Run(New AdWordsUser, adId) - - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example updates an expanded text ad. To get expanded text ads, run" + - " GetExpandedTextAds.cs." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad to be updated. - Public Sub Run(ByVal user As AdWordsUser, ByVal adId As Long) - Using service As AdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdService) - - ' Create an expanded text ad using the provided ad ID. - Dim expandedTextAd As New ExpandedTextAd() - expandedTextAd.id = adId - - ' Update some properties of the expanded text ad. - expandedTextAd.headlinePart1 = "Cruise to Pluto #" + - ExampleUtilities.GetShortRandomString() - expandedTextAd.headlinePart2 = "Tickets on sale now" - expandedTextAd.description = "Best space cruise ever." - expandedTextAd.finalUrls = New String() {"http://www.example.com/"} - expandedTextAd.finalMobileUrls = New String() {"http://www.example.com/mobile"} - - ' Create ad group ad operation And add it to the list. - Dim operation As New AdOperation - operation.operator = [Operator].SET - operation.operand = expandedTextAd - - Try - ' Update the ad on the server. - Dim result As AdReturnValue = service.mutate(New AdOperation() {operation}) - Dim updatedAd As ExpandedTextAd = CType(result.value(0), ExpandedTextAd) - - ' Print out some information. - Console.WriteLine("Expanded text ad with ID {0} was updated.", updatedAd.id) - Console.WriteLine( - "Headline part 1: {0}\nHeadline part 2: {1}\nDescription: {2}" + - "\nFinal URL: {3}\nFinal mobile URL: {4}", - updatedAd.headlinePart1, updatedAd.headlinePart2, updatedAd.description, - updatedAd.finalUrls(0), updatedAd.finalMobileUrls(0)) - Catch e As Exception - Throw New System.ApplicationException("Failed to update expanded text ad.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/BasicOperations/UpdateKeyword.vb b/examples/AdWords/Vb/v201806/BasicOperations/UpdateKeyword.vb deleted file mode 100755 index 6e909950799..00000000000 --- a/examples/AdWords/Vb/v201806/BasicOperations/UpdateKeyword.vb +++ /dev/null @@ -1,120 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example updates the bid of a keyword. To get keyword, run - ''' GetKeywords.vb. - ''' - Public Class UpdateKeyword - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UpdateKeyword - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim keywordId As Long = Long.Parse("INSERT_KEYWORD_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId, keywordId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example updates the bid of a keyword. To get keyword, run " + - "GetKeywords.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group that contains the keyword. - ''' - ''' Id of the keyword to be updated. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, ByVal keywordId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Since we are not updating any keyword-specific fields, it is enough to - ' create a criterion object. - Dim criterion As New Criterion - criterion.id = keywordId - - ' Create ad group criterion. - Dim biddableAdGroupCriterion As New BiddableAdGroupCriterion - biddableAdGroupCriterion.adGroupId = adGroupId - biddableAdGroupCriterion.criterion = criterion - - ' Create the bids. - Dim biddingConfig As New BiddingStrategyConfiguration() - Dim cpcBid As New CpcBid() - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 1000000 - biddingConfig.bids = New Bids() {cpcBid} - - biddableAdGroupCriterion.biddingStrategyConfiguration = biddingConfig - - ' Create the operation. - Dim operation As New AdGroupCriterionOperation - operation.operator = [Operator].SET - operation.operand = biddableAdGroupCriterion - - Try - ' Update the keyword. - Dim retVal As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - New AdGroupCriterionOperation() {operation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) AndAlso - (retVal.value.Length > 0)) Then - Dim adGroupCriterion As BiddableAdGroupCriterion = - CType(retVal.value(0), BiddableAdGroupCriterion) - Dim bidAmount As Long = 0L - For Each bids As Bids In adGroupCriterion.biddingStrategyConfiguration.bids - If TypeOf bids Is CpcBid Then - bidAmount = TryCast(bids, CpcBid).bid.microAmount - End If - Next - - Console.WriteLine( - "Keyword with ad group id = '{0}', id = '{1}' was updated with " & - "bid amount = '{2}' micros.", adGroupCriterion.adGroupId, - adGroupCriterion.criterion.id, bidAmount) - Else - Console.WriteLine("No keyword was updated.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to update keyword.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.vb deleted file mode 100755 index 2324487441b..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignGroupsAndPerformanceTargets.vb +++ /dev/null @@ -1,228 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a campaign group and sets a performance target for that group. To - ''' get campaigns, run GetCampaigns.vb. To download reports, run - ''' DownloadCriteriaReportWithAwql.vb. - ''' - Public Class AddCampaignGroupsAndPerformanceTargets - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCampaignGroupsAndPerformanceTargets - Console.WriteLine(codeExample.Description) - Try - Dim campaignId1 As Long = Long.Parse("INSERT_CAMPAIGN_ID1_HERE") - Dim campaignId2 As Long = Long.Parse("INSERT_CAMPAIGN_ID2_HERE") - - codeExample.Run(New AdWordsUser, campaignId1, campaignId2) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a campaign group and sets a performance target for " & - "that group. To get campaigns, run GetCampaigns.vb. To download reports, run" & - " DownloadCriteriaReportWithAwql.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to be added to the campaign group. - ''' Id of the campaign to be added to the campaign group. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId1 As Long, - ByVal campaignId2 As Long) - Dim campaignGroup As CampaignGroup = CreateCampaignGroup(user) - AddCampaignsToGroup(user, campaignGroup.id, New Long() {campaignId1, campaignId2}) - CreatePerformanceTarget(user, campaignGroup.id) - Console.WriteLine("Campaign group and its performance target were setup successfully.") - End Sub - - ''' - ''' Create a campaign group. - ''' - ''' The AdWords user. - ''' The campaign group. - Private Function CreateCampaignGroup(ByVal user As AdWordsUser) As CampaignGroup - ' [START createCampaignGroup] MOE:strip_line - Using campaignGroupService As CampaignGroupService = CType( - user.GetService( - AdWordsService.v201806.CampaignGroupService), - CampaignGroupService) - - ' Create the campaign group. - Dim campaignGroup As New CampaignGroup() - campaignGroup.name = "Mars campaign group - " + - ExampleUtilities.GetShortRandomString() - - ' Create the operation. - Dim operation As New CampaignGroupOperation() - operation.operand = campaignGroup - operation.operator = [Operator].ADD - - Try - Dim retval As CampaignGroupReturnValue = campaignGroupService.mutate( - New CampaignGroupOperation() {operation}) - - ' Display the results. - Dim newCampaignGroup As CampaignGroup = retval.value(0) - Console.WriteLine("Campaign group with ID = '{0}' and name = '{1}' was " & - "created.", newCampaignGroup.id, newCampaignGroup.name) - Return newCampaignGroup - Catch e As Exception - Throw New System.ApplicationException("Failed to add campaign group.", e) - End Try - End Using - ' [END createCampaignGroup] MOE:strip_line - End Function - - ''' - ''' Adds multiple campaigns to a campaign group. - ''' - ''' The AdWords user. - ''' The campaign group ID. - ''' IDs of the campaigns to be added to the campaign group. - ''' - Private Sub AddCampaignsToGroup(ByVal user As AdWordsUser, ByVal campaignGroupId As Long, - ByVal campaignIds() As Long) - ' [START addCampaignsToGroup] MOE:strip_line - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - Dim operations As New List(Of CampaignOperation) - - For i As Integer = 0 To campaignIds.Length - 1 - Dim campaign As New Campaign() - campaign.id = campaignIds(i) - campaign.campaignGroupId = campaignGroupId - - Dim operation As New CampaignOperation() - operation.operand = campaign - operation.operator = [Operator].SET - operations.Add(operation) - Next - - Try - Dim retval As CampaignReturnValue = campaignService.mutate(operations.ToArray()) - - Dim updatedCampaignIds As New List(Of Long)() - For Each updatedCampaign As Campaign In retval.value - updatedCampaignIds.Add(updatedCampaign.id) - Next - - ' Display the results. - Console.WriteLine( - "The following campaign IDs were added to the campaign group " + - "with ID '{0}':\n\t{1}'", campaignGroupId, String.Join(", ", campaignIds)) - Catch e As Exception - Throw New _ - System.ApplicationException("Failed to add campaigns to campaign group.", - e) - End Try - End Using - ' [END addCampaignsToGroup] MOE:strip_line - End Sub - - ''' - ''' Creates a performance target for the campaign group. - ''' - ''' The AdWords user. - ''' Campaign group ID. - ''' The newly created performance target. - Private Function CreatePerformanceTarget(ByVal user As AdWordsUser, - ByVal campaignGroupId As Long) _ - As CampaignGroupPerformanceTarget - ' [START createPerformanceTarget] MOE:strip_line - Using campaignGroupPerformanceTargetService As CampaignGroupPerformanceTargetService = - CType(user.GetService(AdWordsService.v201806.CampaignGroupPerformanceTargetService), - CampaignGroupPerformanceTargetService) - - ' Create the performance target. - Dim campaignGroupPerformanceTarget As New CampaignGroupPerformanceTarget() - campaignGroupPerformanceTarget.campaignGroupId = campaignGroupId - - Dim performanceTarget As New PerformanceTarget() - ' Keep the CPC for the campaigns <$3. - performanceTarget.efficiencyTargetType = - EfficiencyTargetType.CPC_LESS_THAN_OR_EQUAL_TO - performanceTarget.efficiencyTargetValue = 3000000 - - ' Keep the maximum spend under $50. - performanceTarget.spendTargetType = SpendTargetType.MAXIMUM - Dim maxSpend As New Money() - maxSpend.microAmount = 500000000 - performanceTarget.spendTarget = maxSpend - - ' Aim for at least 3000 clicks. - performanceTarget.volumeTargetValue = 3000 - performanceTarget.volumeGoalType = VolumeGoalType.MAXIMIZE_CLICKS - - ' Start the performance target today, And run it for the next 90 days. - Dim startDate As System.DateTime = System.DateTime.Now - Dim endDate As System.DateTime = startDate.AddDays(90) - - performanceTarget.startDate = startDate.ToString("yyyyMMdd") - performanceTarget.endDate = endDate.ToString("yyyyMMdd") - - campaignGroupPerformanceTarget.performanceTarget = performanceTarget - - ' Create the operation. - Dim operation As New CampaignGroupPerformanceTargetOperation() - operation.operand = campaignGroupPerformanceTarget - operation.operator = [Operator].ADD - - Try - Dim retval As CampaignGroupPerformanceTargetReturnValue = - campaignGroupPerformanceTargetService.mutate( - New CampaignGroupPerformanceTargetOperation() {operation}) - - ' Display the results. - Dim newCampaignPerfTarget As CampaignGroupPerformanceTarget = retval.value(0) - - Console.WriteLine("Campaign performance target with id = '{0}' was added for " + - "campaign group ID '{1}'.", newCampaignPerfTarget.id, - newCampaignPerfTarget.campaignGroupId) - Return newCampaignPerfTarget - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to create campaign performance target.", e) - End Try - End Using - End Function - - ' [END createPerformanceTarget] MOE:strip_line - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignLabels.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignLabels.vb deleted file mode 100755 index 4dfc529fe0a..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddCampaignLabels.vb +++ /dev/null @@ -1,103 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a label to multiple campaigns. - ''' - Public Class AddCampaignLabels - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCampaignLabels - Console.WriteLine(codeExample.Description) - Try - Dim campaignId1 As Long = Long.Parse("INSERT_CAMPAIGN_ID1_HERE") - Dim campaignId2 As Long = Long.Parse("INSERT_CAMPAIGN_ID2_HERE") - Dim labelId As Long = Long.Parse("INSERT_LABEL_ID_HERE") - - codeExample.Run(New AdWordsUser, campaignId1, campaignId2, labelId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a label to multiple campaigns." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to which labels are - ''' added. - ''' Id of the ad group to which labels are - ''' added. - ''' ID of the label to apply. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId1 As Long, - ByVal campaignId2 As Long, ByVal labelId As Long) - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - ' Create label operations. - Dim operations As New List(Of CampaignLabelOperation) - - For Each campaignId As Long In New Long() {campaignId1, campaignId2} - Dim campaignLabel As New CampaignLabel - campaignLabel.campaignId = campaignId - campaignLabel.labelId = labelId - - Dim operation As New CampaignLabelOperation - operation.operand = campaignLabel - operation.operator = [Operator].ADD - - operations.Add(operation) - Next - - Try - Dim retval As CampaignLabelReturnValue = campaignService.mutateLabel( - operations.ToArray()) - - ' Display campaign labels. - If Not (retval Is Nothing) AndAlso Not (retval.value Is Nothing) Then - For Each newCampaignLabel As CampaignLabel In retval.value - Console.WriteLine( - "Campaign label for campaign ID {0} and label ID {1} was added.\n", - newCampaignLabel.campaignId, newCampaignLabel.labelId) - Next - Else - Console.WriteLine("No campaign labels were added.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to add campaign labels.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.vb deleted file mode 100755 index 6506cbb1539..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingBatchJob.vb +++ /dev/null @@ -1,459 +0,0 @@ -' Copyright 2018 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. - -Imports System.Threading -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.BatchJob.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to use BatchJobService to create multiple - ''' complete campaigns, including ad groups and keywords. - ''' - Public Class AddCompleteCampaignsUsingBatchJob - Inherits ExampleBase - - ''' - ''' The last ID that was automatically generated. - ''' - Private Shared LAST_ID As Long = - 1 - - ''' - ''' The number of campaigns to be added. - ''' - Private Const NUMBER_OF_CAMPAIGNS_TO_ADD As Long = 2 - - ''' - ''' The number of ad groups to be added per campaign. - ''' - Private Const NUMBER_OF_ADGROUPS_TO_ADD As Long = 2 - - ''' - ''' The number of keywords to be added per campaign. - ''' - Private Const NUMBER_OF_KEYWORDS_TO_ADD As Long = 5 - - ''' - ''' The maximum milliseconds to wait for completion. - ''' - Private Const TIME_TO_WAIT_FOR_COMPLETION As Integer = 15*60*1000 ' 15 minutes - - ''' - ''' Create a temporary ID generator that will produce a sequence of descending - ''' negative numbers. - ''' - ''' - Private Shared Function NextId() As Long - Return Interlocked.Decrement(LAST_ID) - End Function - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCompleteCampaignsUsingBatchJob - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example illustrates how to use BatchJobService to create multiple" & - " complete campaigns, including ad groups and keywords." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using batchJobService As BatchJobService = CType( - user.GetService( - AdWordsService.v201806.BatchJobService), - BatchJobService) - - Try - ' Create a BatchJob. - Dim addOp As New BatchJobOperation() - addOp.operator = [Operator].ADD - addOp.operand = New BatchJob() - - Dim batchJob As BatchJob = batchJobService.mutate( - New BatchJobOperation() {addOp}).value(0) - - ' Get the upload URL from the new job. - Dim uploadUrl As String = batchJob.uploadUrl.url - - Console.WriteLine( - "Created BatchJob with ID {0}, status '{1}' and upload URL {2}.", - batchJob.id, batchJob.status, batchJob.uploadUrl.url) - - ' Create the mutate request that will be sent to the upload URL. - Dim operations As New List(Of Operation)() - - ' Create and add an operation to create a new budget. - Dim budgetOperation As BudgetOperation = BuildBudgetOperation() - operations.Add(budgetOperation) - - ' Create and add operations to create new campaigns. - Dim campaignOperations As List(Of CampaignOperation) = - BuildCampaignOperations(budgetOperation.operand.budgetId) - operations.AddRange(campaignOperations.ToArray()) - - Dim adGroupOperations As New List(Of AdGroupOperation)() - - ' Create and add operations to create new ad groups. - For Each campaignOperation As CampaignOperation In campaignOperations - adGroupOperations.AddRange( - BuildAdGroupOperations(campaignOperation.operand.id)) - Next - operations.AddRange(adGroupOperations.ToArray()) - - ' Create and add operations to create new ad group ads (expanded text ads). - For Each adGroupOperation As AdGroupOperation In adGroupOperations - operations.AddRange( - BuildAdGroupAdOperations(adGroupOperation.operand.id).ToArray()) - Next - - ' Create and add operations to create new ad group criteria (keywords). - For Each adGroupOperation As AdGroupOperation In adGroupOperations - operations.AddRange(BuildAdGroupCriterionOperations( - adGroupOperation.operand.id).ToArray()) - Next - - Dim batchJobUploadHelper As New BatchJobUtilities(user) - - ' Create a resumable Upload URL to upload the operations. - Dim resumableUploadUrl As String = - batchJobUploadHelper.GetResumableUploadUrl(uploadUrl) - - ' Use the BatchJobUploadHelper to upload all operations. - batchJobUploadHelper.Upload(resumableUploadUrl, operations.ToArray()) - - Dim waitHandler As WaitHandler - - ' Create a wait handler. - waitHandler = New WaitHandler(batchJob, False) - - Dim isComplete As Boolean = - batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - AddressOf _ - waitHandler. - OnJobWaitForCompletion) - - ' Restore the latest value for batchJob from waithandler. - batchJob = waitHandler.Job - - If Not isComplete Then - Throw _ - New TimeoutException( - "Job is still in pending state after waiting for " & - TIME_TO_WAIT_FOR_COMPLETION & " seconds.") - End If - - If Not (batchJob.processingErrors Is Nothing) Then - For Each processingError As BatchJobProcessingError In _ - batchJob.processingErrors - Console.WriteLine(" Processing error: {0}, {1}, {2}, {3}, {4}", - processingError.ApiErrorType, processingError.trigger, - processingError.errorString, - processingError.fieldPath, - processingError.reason) - Next - End If - - If (Not (batchJob.downloadUrl Is Nothing)) AndAlso - (Not (batchJob.downloadUrl.url Is Nothing)) Then - Dim mutateResponse As BatchJobMutateResponse = - batchJobUploadHelper.Download( - batchJob.downloadUrl.url) - Console.WriteLine("Downloaded results from {0}.", batchJob.downloadUrl.url) - For Each mutateResult As MutateResult In mutateResponse.rval - Dim outcome As String = "" - If mutateResult.errorList Is Nothing Then - outcome = "SUCCESS" - Else - outcome = "FAILURE" - End If - Console.WriteLine(" Operation [{0}] - {1}", mutateResult.index, - outcome) - Next - End If - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to add campaigns using batch job.", - e) - End Try - End Using - End Sub - - ''' - ''' A class that handles wait callbacks for the batch job. - ''' - Class WaitHandler - ''' - ''' The batch job to wait for. - ''' - Private batchJob As BatchJob - - ''' - ''' A flag to determine if the job was requested to be cancelled. This - ''' typically comes from the user. - ''' - Private cancelRequested As Boolean - - ''' - ''' Initializes a new instance of the class. - ''' - ''' The batch job to wait for. - ''' A flag to determine if the job was - ''' requested to be cancelled. This typically comes from the user. - Sub New(ByVal batchJob As BatchJob, ByVal wasCancelRequested As Boolean) - Me.batchJob = batchJob - Me.WasCancelRequested = wasCancelRequested - End Sub - - ''' - ''' Gets or sets the batch job to wait for. - ''' - Public Property Job As BatchJob - Get - Return Me.batchJob - End Get - Set(value As BatchJob) - Me.batchJob = value - End Set - End Property - - ''' - ''' Gets or sets a flag to determine if the job was requested to be - ''' cancelled. This typically comes from the user. - ''' - Public Property WasCancelRequested As Boolean - Get - Return Me.cancelRequested - End Get - Set(value As Boolean) - Me.cancelRequested = value - End Set - End Property - - ''' - ''' Callback method when the job is waiting for cancellation. - ''' - ''' The updated batch job being waited for. - ''' The time elapsed. - ''' True, if the wait loop should be cancelled, false otherwise. - ''' - Public Function OnJobWaitForCancellation(ByVal waitBatchJob As BatchJob, - ByVal timeElapsed As Long) As Boolean - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed/1000, waitBatchJob.id, waitBatchJob.status) - batchJob = waitBatchJob - Return False - End Function - - ''' - ''' Callback method when the job is waiting for completion. - ''' - ''' The updated batch job being waited for. - ''' The time elapsed. - ''' True, if the wait loop should be cancelled, false otherwise. - ''' - Public Function OnJobWaitForCompletion(ByVal waitBatchJob As BatchJob, - ByVal timeElapsed As Long) As Boolean - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed/1000, waitBatchJob.id, waitBatchJob.status) - batchJob = waitBatchJob - Return Me.WasCancelRequested - End Function - End Class - - ''' - ''' Builds the operation for creating an ad within an ad group. - ''' - ''' ID of the ad group for which ads are created. - ''' A list of operations for creating ads. - Private Shared Function BuildAdGroupAdOperations(ByVal adGroupId As Long) _ - As List(Of AdGroupAdOperation) - Dim operations As New List(Of AdGroupAdOperation)() - - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroupId - - Dim expandedTextAd As New ExpandedTextAd - expandedTextAd.headlinePart1 = "Luxury Cruise to Mars" - expandedTextAd.headlinePart2 = "Visit the Red Planet in style." - expandedTextAd.description = "Low-gravity fun for everyone!" - expandedTextAd.finalUrls = New String() {"http://www.example.com/1"} - adGroupAd.ad = expandedTextAd - - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - operations.Add(operation) - Return operations - End Function - - ''' - ''' Builds the operations for creating keywords within an ad group. - ''' - ''' ID of the ad group for which keywords are - ''' created. - ''' A list of operations for creating keywords. - Private Shared Function BuildAdGroupCriterionOperations(ByVal adGroupId As Long) _ - As List(Of AdGroupCriterionOperation) - Dim adGroupCriteriaOperations As New List(Of AdGroupCriterionOperation)() - - ' Create AdGroupCriterionOperations to add keywords. - - For i As Integer = 0 To NUMBER_OF_KEYWORDS_TO_ADD - ' Create Keyword. - Dim text As String = String.Format("mars{0}", i) - - ' Make 50% of keywords invalid to demonstrate error handling. - If (i Mod 2) = 0 Then - text = text & "!!!" - End If - - ' Create AdGroupCriterionOperation. - Dim operation As New AdGroupCriterionOperation() - operation.operand = New BiddableAdGroupCriterion() - operation.operand.adGroupId = adGroupId - - Dim keyword As New Keyword - keyword.text = text - keyword.matchType = KeywordMatchType.BROAD - operation.operand.criterion = keyword - - operation.operator = [Operator].ADD - ' Add to list. - adGroupCriteriaOperations.Add(operation) - Next - - Return adGroupCriteriaOperations - End Function - - ''' - ''' Builds the operations for creating ad groups within a campaign. - ''' - ''' ID of the campaign for which ad groups are - ''' created. - ''' A list of operations for creating ad groups. - Private Shared Function BuildAdGroupOperations(ByVal campaignId As Long) As _ - List(Of AdGroupOperation) - Dim operations As New List(Of AdGroupOperation)() - For i As Integer = 0 To NUMBER_OF_ADGROUPS_TO_ADD - Dim adGroup As New AdGroup() - adGroup.campaignId = campaignId - adGroup.id = NextId() - adGroup.name = "Batch Ad Group # " & ExampleUtilities.GetRandomString() - - Dim cpcBid As New CpcBid - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 10000000L - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.bids = New Bids() {cpcBid} - - adGroup.biddingStrategyConfiguration = biddingStrategyConfiguration - - Dim operation As New AdGroupOperation() - operation.operand = adGroup - operation.operator = [Operator].ADD - - operations.Add(operation) - Next - Return operations - End Function - - ''' - ''' Builds the operations for creating new campaigns. - ''' - ''' ID of the budget to be used for the campaign. - ''' - ''' A list of operations for creating campaigns. - Private Shared Function BuildCampaignOperations(ByVal budgetId As Long) _ - As List(Of CampaignOperation) - Dim operations As New List(Of CampaignOperation)() - - For i As Integer = 0 To NUMBER_OF_CAMPAIGNS_TO_ADD - Dim campaign As New Campaign() - campaign.name = "Batch Campaign " + ExampleUtilities.GetRandomString() - - ' 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. - campaign.status = CampaignStatus.PAUSED - - campaign.id = NextId() - campaign.advertisingChannelType = AdvertisingChannelType.SEARCH - - Dim budget As New Budget() - budget.budgetId = budgetId - campaign.budget = budget - - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - - ' You can optionally provide a bidding scheme in place of the type. - Dim biddingScheme As New ManualCpcBiddingScheme() - biddingStrategyConfiguration.biddingScheme = biddingScheme - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration - - Dim operation As New CampaignOperation() - operation.operand = campaign - operation.operator = [Operator].ADD - - operations.Add(operation) - Next - Return operations - End Function - - ''' - ''' Builds an operation for creating a budget. - ''' - ''' The operation for creating a budget. - Private Shared Function BuildBudgetOperation() As BudgetOperation - Dim budget As New Budget() - budget.budgetId = NextId() - budget.name = "Interplanetary Cruise #" & ExampleUtilities.GetRandomString() - - Dim amount As New Money() - amount.microAmount = 50000000L - budget.amount = amount - - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - - Dim budgetOperation As New BudgetOperation() - budgetOperation.operand = budget - budgetOperation.operator = [Operator].ADD - - Return budgetOperation - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.vb deleted file mode 100755 index 30367a98be2..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddCompleteCampaignsUsingStreamingBatchJob.vb +++ /dev/null @@ -1,469 +0,0 @@ -' Copyright 2018 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. - -Imports System.Threading -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.BatchJob -Imports Google.Api.Ads.AdWords.Util.BatchJob.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to use BatchJobService to create multiple - ''' complete campaigns, including ad groups and keywords. - ''' - Public Class AddCompleteCampaignsUsingStreamingBatchJob - Inherits ExampleBase - - ''' - ''' The last ID that was automatically generated. - ''' - Private Shared LAST_ID As Long = - 1 - - ''' - ''' The number of campaigns to be added. - ''' - Private Const NUMBER_OF_CAMPAIGNS_TO_ADD As Long = 2 - - ''' - ''' The number of ad groups to be added per campaign. - ''' - Private Const NUMBER_OF_ADGROUPS_TO_ADD As Long = 2 - - ''' - ''' The number of keywords to be added per campaign. - ''' - Private Const NUMBER_OF_KEYWORDS_TO_ADD As Long = 5 - - ''' - ''' The maximum milliseconds to wait for completion. - ''' - Private Const TIME_TO_WAIT_FOR_COMPLETION As Integer = 15*60*1000 ' 15 minutes - - ''' - ''' Create a temporary ID generator that will produce a sequence of descending - ''' negative numbers. - ''' - ''' - Private Shared Function NextId() As Long - Return Interlocked.Decrement(LAST_ID) - End Function - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCompleteCampaignsUsingStreamingBatchJob - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example illustrates how to use BatchJobService to create multiple" & - " complete campaigns, including ad groups and keywords." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using batchJobService As BatchJobService = CType( - user.GetService( - AdWordsService.v201806.BatchJobService), - BatchJobService) - - Try - ' Create a BatchJob. - Dim addOp As New BatchJobOperation() - addOp.operator = [Operator].ADD - addOp.operand = New BatchJob() - - Dim batchJob As BatchJob = batchJobService.mutate( - New BatchJobOperation() {addOp}).value(0) - - ' Get the upload URL from the new job. - Dim uploadUrl As String = batchJob.uploadUrl.url - - Console.WriteLine( - "Created BatchJob with ID {0}, status '{1}' and upload URL {2}.", - batchJob.id, batchJob.status, batchJob.uploadUrl.url) - - Dim batchJobUploadHelper As New BatchJobUtilities(user) - - ' Create a resumable Upload URL to upload the operations. - Dim resumableUploadUrl As String = - batchJobUploadHelper.GetResumableUploadUrl(uploadUrl) - - Dim uploadProgress As BatchUploadProgress = - batchJobUploadHelper.BeginStreamUpload(resumableUploadUrl) - - ' Create and add an operation to create a new budget. - Dim budgetOperation As BudgetOperation = BuildBudgetOperation() - uploadProgress = batchJobUploadHelper.StreamUpload(uploadProgress, - New Operation() _ - {budgetOperation}) - - ' Create and add operations to create new campaigns. - Dim campaignOperations As List(Of CampaignOperation) = - BuildCampaignOperations(budgetOperation.operand.budgetId) - uploadProgress = batchJobUploadHelper.StreamUpload(uploadProgress, - campaignOperations.ToArray()) - - ' Create and add operations to create new ad groups. - Dim adGroupOperations As New List(Of AdGroupOperation)() - For Each campaignOperation As CampaignOperation In campaignOperations - adGroupOperations.AddRange( - BuildAdGroupOperations(campaignOperation.operand.id)) - Next - uploadProgress = batchJobUploadHelper.StreamUpload(uploadProgress, - adGroupOperations.ToArray()) - - ' Create and add operations to create new ad group ads (expanded text ads). - Dim adOperations As New List(Of AdGroupAdOperation)() - For Each adGroupOperation As AdGroupOperation In adGroupOperations - adOperations.AddRange(BuildAdGroupAdOperations(adGroupOperation.operand.id)) - Next - uploadProgress = batchJobUploadHelper.StreamUpload(uploadProgress, - adOperations.ToArray()) - - ' Create and add operations to create new ad group criteria (keywords). - Dim keywordOperations As New List(Of AdGroupCriterionOperation)() - For Each adGroupOperation As AdGroupOperation In adGroupOperations - keywordOperations.AddRange( - BuildAdGroupCriterionOperations( - adGroupOperation.operand.id)) - Next - uploadProgress = batchJobUploadHelper.StreamUpload(uploadProgress, - keywordOperations.ToArray()) - - ' Mark the upload as complete. - batchJobUploadHelper.EndStreamUpload(uploadProgress) - - Dim waitHandler As WaitHandler - - ' Create a wait handler. - waitHandler = New WaitHandler(batchJob, False) - - Dim isComplete As Boolean = - batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - AddressOf _ - waitHandler. - OnJobWaitForCompletion) - - ' Restore the latest value for batchJob from waithandler. - batchJob = waitHandler.Job - - If Not isComplete Then - Throw _ - New TimeoutException( - "Job is still in pending state after waiting for " & - TIME_TO_WAIT_FOR_COMPLETION & " seconds.") - End If - - If Not (batchJob.processingErrors Is Nothing) Then - For Each processingError As BatchJobProcessingError In _ - batchJob.processingErrors - Console.WriteLine(" Processing error: {0}, {1}, {2}, {3}, {4}", - processingError.ApiErrorType, processingError.trigger, - processingError.errorString, - processingError.fieldPath, - processingError.reason) - Next - End If - - If (Not (batchJob.downloadUrl Is Nothing)) AndAlso - (Not (batchJob.downloadUrl.url Is Nothing)) Then - Dim mutateResponse As BatchJobMutateResponse = - batchJobUploadHelper.Download( - batchJob.downloadUrl.url) - Console.WriteLine("Downloaded results from {0}.", batchJob.downloadUrl.url) - For Each mutateResult As MutateResult In mutateResponse.rval - Dim outcome As String = "" - If mutateResult.errorList Is Nothing Then - outcome = "SUCCESS" - Else - outcome = "FAILURE" - End If - Console.WriteLine(" Operation [{0}] - {1}", mutateResult.index, - outcome) - Next - End If - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to add campaigns using batch job.", - e) - End Try - End Using - End Sub - - ''' - ''' A class that handles wait callbacks for the batch job. - ''' - Class WaitHandler - ''' - ''' The batch job to wait for. - ''' - Private batchJob As BatchJob - - ''' - ''' A flag to determine if the job was requested to be cancelled. This - ''' typically comes from the user. - ''' - Private cancelRequested As Boolean - - ''' - ''' Initializes a new instance of the class. - ''' - ''' The batch job to wait for. - ''' A flag to determine if the job was - ''' requested to be cancelled. This typically comes from the user. - Sub New(ByVal batchJob As BatchJob, ByVal wasCancelRequested As Boolean) - Me.batchJob = batchJob - Me.WasCancelRequested = wasCancelRequested - End Sub - - ''' - ''' Gets or sets the batch job to wait for. - ''' - Public Property Job As BatchJob - Get - Return Me.batchJob - End Get - Set(value As BatchJob) - Me.batchJob = value - End Set - End Property - - ''' - ''' Gets or sets a flag to determine if the job was requested to be - ''' cancelled. This typically comes from the user. - ''' - Public Property WasCancelRequested As Boolean - Get - Return Me.cancelRequested - End Get - Set(value As Boolean) - Me.cancelRequested = value - End Set - End Property - - ''' - ''' Callback method when the job is waiting for cancellation. - ''' - ''' The updated batch job being waited for. - ''' The time elapsed. - ''' True, if the wait loop should be cancelled, false otherwise. - ''' - Public Function OnJobWaitForCancellation(ByVal waitBatchJob As BatchJob, - ByVal timeElapsed As Long) As Boolean - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed/1000, waitBatchJob.id, waitBatchJob.status) - batchJob = waitBatchJob - Return False - End Function - - ''' - ''' Callback method when the job is waiting for completion. - ''' - ''' The updated batch job being waited for. - ''' The time elapsed. - ''' True, if the wait loop should be cancelled, false otherwise. - ''' - Public Function OnJobWaitForCompletion(ByVal waitBatchJob As BatchJob, - ByVal timeElapsed As Long) As Boolean - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed/1000, waitBatchJob.id, waitBatchJob.status) - batchJob = waitBatchJob - Return Me.WasCancelRequested - End Function - End Class - - ''' - ''' Builds the operation for creating an ad within an ad group. - ''' - ''' ID of the ad group for which ads are created. - ''' A list of operations for creating ads. - Private Shared Function BuildAdGroupAdOperations(ByVal adGroupId As Long) _ - As List(Of AdGroupAdOperation) - Dim operations As New List(Of AdGroupAdOperation)() - - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroupId - - Dim expandedTextAd As New ExpandedTextAd - expandedTextAd.headlinePart1 = "Luxury Cruise to Mars" - expandedTextAd.headlinePart2 = "Visit the Red Planet in style." - expandedTextAd.description = "Low-gravity fun for everyone!" - expandedTextAd.finalUrls = New String() {"http://www.example.com/1"} - adGroupAd.ad = expandedTextAd - - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - operations.Add(operation) - Return operations - End Function - - ''' - ''' Builds the operations for creating keywords within an ad group. - ''' - ''' ID of the ad group for which keywords are - ''' created. - ''' A list of operations for creating keywords. - Private Shared Function BuildAdGroupCriterionOperations(ByVal adGroupId As Long) _ - As List(Of AdGroupCriterionOperation) - Dim adGroupCriteriaOperations As New List(Of AdGroupCriterionOperation)() - - ' Create AdGroupCriterionOperations to add keywords. - - For i As Integer = 0 To NUMBER_OF_KEYWORDS_TO_ADD - ' Create Keyword. - Dim text As String = String.Format("mars{0}", i) - - ' Make 50% of keywords invalid to demonstrate error handling. - If (i Mod 2) = 0 Then - text = text & "!!!" - End If - - ' Create AdGroupCriterionOperation. - Dim operation As New AdGroupCriterionOperation() - operation.operand = New BiddableAdGroupCriterion() - operation.operand.adGroupId = adGroupId - - Dim keyword As New Keyword - keyword.text = text - keyword.matchType = KeywordMatchType.BROAD - operation.operand.criterion = keyword - - operation.operator = [Operator].ADD - ' Add to list. - adGroupCriteriaOperations.Add(operation) - Next - - Return adGroupCriteriaOperations - End Function - - ''' - ''' Builds the operations for creating ad groups within a campaign. - ''' - ''' ID of the campaign for which ad groups are - ''' created. - ''' A list of operations for creating ad groups. - Private Shared Function BuildAdGroupOperations(ByVal campaignId As Long) As _ - List(Of AdGroupOperation) - Dim operations As New List(Of AdGroupOperation)() - For i As Integer = 0 To NUMBER_OF_ADGROUPS_TO_ADD - Dim adGroup As New AdGroup() - adGroup.campaignId = campaignId - adGroup.id = NextId() - adGroup.name = "Batch Ad Group # " & ExampleUtilities.GetRandomString() - - Dim cpcBid As New CpcBid - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 10000000L - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.bids = New Bids() {cpcBid} - - adGroup.biddingStrategyConfiguration = biddingStrategyConfiguration - - Dim operation As New AdGroupOperation() - operation.operand = adGroup - operation.operator = [Operator].ADD - - operations.Add(operation) - Next - Return operations - End Function - - ''' - ''' Builds the operations for creating new campaigns. - ''' - ''' ID of the budget to be used for the campaign. - ''' - ''' A list of operations for creating campaigns. - Private Shared Function BuildCampaignOperations(ByVal budgetId As Long) _ - As List(Of CampaignOperation) - Dim operations As New List(Of CampaignOperation)() - - For i As Integer = 0 To NUMBER_OF_CAMPAIGNS_TO_ADD - Dim campaign As New Campaign() - campaign.name = "Batch Campaign " + ExampleUtilities.GetRandomString() - - ' 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. - campaign.status = CampaignStatus.PAUSED - - campaign.id = NextId() - campaign.advertisingChannelType = AdvertisingChannelType.SEARCH - - Dim budget As New Budget() - budget.budgetId = budgetId - campaign.budget = budget - - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - - ' You can optionally provide a bidding scheme in place of the type. - Dim biddingScheme As New ManualCpcBiddingScheme() - biddingStrategyConfiguration.biddingScheme = biddingScheme - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration - - Dim operation As New CampaignOperation() - operation.operand = campaign - operation.operator = [Operator].ADD - - operations.Add(operation) - Next - Return operations - End Function - - ''' - ''' Builds an operation for creating a budget. - ''' - ''' The operation for creating a budget. - Private Shared Function BuildBudgetOperation() As BudgetOperation - Dim budget As New Budget() - budget.budgetId = NextId() - budget.name = "Interplanetary Cruise #" & ExampleUtilities.GetRandomString() - - Dim amount As New Money() - amount.microAmount = 50000000L - budget.amount = amount - - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - - Dim budgetOperation As New BudgetOperation() - budgetOperation.operand = budget - budgetOperation.operator = [Operator].ADD - - Return budgetOperation - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddDraft.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddDraft.vb deleted file mode 100755 index 4ab1fe6055c..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddDraft.vb +++ /dev/null @@ -1,115 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to create a draft and access its - ''' associated draft campaign. See the Campaign Drafts and Experiments guide - ''' for more information: - ''' https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments - ''' - Public Class AddDraft - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddDraft - Console.WriteLine(codeExample.Description) - Try - Dim baseCampaignId As Long = Long.Parse("INSERT_BASE_CAMPAIGN_ID_HERE") - - codeExample.Run(New AdWordsUser, baseCampaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a label to multiple campaigns." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the base campaign for creating draft. - Public Sub Run(ByVal user As AdWordsUser, ByVal baseCampaignId As Long) - Using draftService As DraftService = CType( - user.GetService( - AdWordsService.v201806.DraftService), - DraftService) - ' [START createDraft] MOE:strip_line - Dim draft As New Draft() - draft.baseCampaignId = baseCampaignId - draft.draftName = "Test Draft #" + ExampleUtilities.GetRandomString() - - Dim draftOperation As New DraftOperation() - draftOperation.operator = [Operator].ADD - draftOperation.operand = draft - ' [END createDraft] MOE:strip_line - - Try - draft = draftService.mutate(New DraftOperation() {draftOperation}).value(0) - - Console.WriteLine( - "Draft with ID {0}, base campaign ID {1} and draft campaign ID " & - "{2} created.", draft.draftId, draft.baseCampaignId, draft.draftCampaignId) - - ' Once the draft is created, you can modify the draft campaign as if it - ' were a real campaign. For example, you may add criteria, adjust bids, - ' or even include additional ads. Adding a criterion is shown here. - Dim campaignCriterionService As CampaignCriterionService = - CType(user.GetService(AdWordsService.v201806.CampaignCriterionService), - CampaignCriterionService) - ' [START customizeDraft] MOE:strip_line - Dim language As New Language() - language.id = 1003L ' Spanish - - ' Make sure to use the draftCampaignId when modifying the virtual draft - ' campaign. - Dim campaignCriterion As New CampaignCriterion() - campaignCriterion.campaignId = draft.draftCampaignId - campaignCriterion.criterion = language - - Dim criterionOperation As New CampaignCriterionOperation() - criterionOperation.operator = [Operator].ADD - criterionOperation.operand = campaignCriterion - - campaignCriterion = campaignCriterionService.mutate( - New CampaignCriterionOperation() {criterionOperation}).value(0) - ' [END customizeDraft] MOE:strip_line - - Console.WriteLine("Draft updated to include criteria in draft campaign ID {0}.", - draft.draftCampaignId) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to create draft campaign and add " & - "criteria.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.vb deleted file mode 100755 index c6e8e5ddde3..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddKeywordsUsingIncrementalBatchJob.vb +++ /dev/null @@ -1,341 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.BatchJob.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code sample illustrates how to perform asynchronous requests using - ''' BatchJobService and incremental uploads of operations. It also - ''' demonstrates how to cancel a running batch job. - ''' - Public Class AddKeywordsUsingIncrementalBatchJob - Inherits ExampleBase - - Private Const NUMBER_OF_KEYWORDS_TO_ADD As Long = 100 - - ''' - ''' The chunk size to use when uploading operations. - ''' - Private Const CHUNK_SIZE As Integer = 4*1024*1024 - - ''' - ''' The maximum milliseconds to wait for completion. - ''' - Private Const TIME_TO_WAIT_FOR_COMPLETION As Integer = 15*60*1000 ' 15 minutes - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddKeywordsUsingIncrementalBatchJob - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code sample illustrates how to perform asynchronous requests using " & - "BatchJobService and incremental uploads of operations. It also " & - "demonstrates how to cancel a running batch job." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad groups to which keywords are - ''' added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using batchJobService As BatchJobService = CType( - user.GetService( - AdWordsService.v201806.BatchJobService), - BatchJobService) - - Dim addOp As New BatchJobOperation - addOp.operator = [Operator].ADD - addOp.operand = New BatchJob() - - Try - Dim batchJob As BatchJob = batchJobService.mutate( - New BatchJobOperation() {addOp}).value(0) - - Console.WriteLine( - "Created BatchJob with ID {0}, status '{1}' and upload URL {2}.", - batchJob.id, batchJob.status, batchJob.uploadUrl.url) - - Dim operations As List(Of AdGroupCriterionOperation) = - CreateOperations(adGroupId) - - ' Create a BatchJobUtilities instance for uploading operations. Use a - ' chunked upload. - Dim batchJobUploadHelper As New BatchJobUtilities(user, True, CHUNK_SIZE) - - ' Create a resumable Upload URL to upload the operations. - Dim resumableUploadUrl As String = batchJobUploadHelper.GetResumableUploadUrl( - batchJob.uploadUrl.url) - - ' Use the BatchJobUploadHelper to upload all operations. - batchJobUploadHelper.Upload(resumableUploadUrl, operations.ToArray()) - - Dim waitHandler As WaitHandler - Dim wasCancelRequested As Boolean = False - - ' Create a wait handler. - waitHandler = New WaitHandler(batchJob, wasCancelRequested) - - Dim isComplete As Boolean = - batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - AddressOf _ - waitHandler. - OnJobWaitForCompletion) - - ' Restore the latest value for batchJob from waithandler. - batchJob = waitHandler.Job - wasCancelRequested = waitHandler.WasCancelRequested - - ' Optional: Cancel the job if it has not completed after waiting for - ' TIME_TO_WAIT_FOR_COMPLETION. - Dim shouldWaitForCancellation As Boolean = False - If Not isComplete AndAlso wasCancelRequested Then - Dim cancellationError As BatchJobError = Nothing - Try - batchJobUploadHelper.TryToCancelJob(batchJob.id) - Catch e As AdWordsApiException - cancellationError = GetBatchJobError(e) - End Try - If cancellationError Is Nothing Then - Console.WriteLine("Successfully requested job cancellation.") - shouldWaitForCancellation = True - Else - Console.WriteLine("Job cancellation failed. Error says: {0}.", - cancellationError.reason) - End If - - If shouldWaitForCancellation Then - waitHandler = New WaitHandler(batchJob, wasCancelRequested) - - isComplete = - batchJobUploadHelper.WaitForPendingJob(batchJob.id, - TIME_TO_WAIT_FOR_COMPLETION, - AddressOf _ - waitHandler. - OnJobWaitForCancellation) - - batchJob = waitHandler.Job - wasCancelRequested = waitHandler.WasCancelRequested - End If - End If - - If Not isComplete Then - Throw _ - New TimeoutException( - "Job is still in pending state after waiting for " & - TIME_TO_WAIT_FOR_COMPLETION & " seconds.") - End If - - If Not batchJob.processingErrors Is Nothing Then - For Each processingError As BatchJobProcessingError In _ - batchJob.processingErrors - Console.WriteLine(" Processing error: {0}, {1}, {2}, {3}, {4}", - processingError.ApiErrorType, processingError.trigger, - processingError.errorString, - processingError.fieldPath, - processingError.reason) - Next - End If - - If (Not batchJob.downloadUrl Is Nothing) AndAlso - (Not batchJob.downloadUrl.url Is Nothing) Then - Dim mutateResponse As BatchJobMutateResponse = - batchJobUploadHelper.Download( - batchJob.downloadUrl.url) - Console.WriteLine("Downloaded results from {0}.", batchJob.downloadUrl.url) - For Each mutateResult As MutateResult In mutateResponse.rval - Dim outcome As String - If mutateResult.errorList Is Nothing Then - outcome = "SUCCESS" - Else - outcome = "FAILURE" - End If - Console.WriteLine(" Operation [{0}] - {1}", mutateResult.index, - outcome) - Next - Else - Console.WriteLine("No results available for download.") - End If - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to create keywords using batch job.", - e) - End Try - End Using - End Sub - - ''' - ''' A class that handles wait callbacks for the batch job. - ''' - Class WaitHandler - ''' - ''' The batch job to wait for. - ''' - Private batchJob As BatchJob - - ''' - ''' A flag to determine if the job was requested to be cancelled. This - ''' typically comes from the user. - ''' - Private cancelRequested As Boolean - - ''' - ''' Initializes a new instance of the class. - ''' - ''' The batch job to wait for. - ''' A flag to determine if the job was - ''' requested to be cancelled. This typically comes from the user. - Sub New(ByVal batchJob As BatchJob, ByVal wasCancelRequested As Boolean) - Me.batchJob = batchJob - Me.WasCancelRequested = wasCancelRequested - End Sub - - ''' - ''' Gets or sets the batch job to wait for. - ''' - Public Property Job As BatchJob - Get - Return Me.batchJob - End Get - Set(value As BatchJob) - Me.batchJob = value - End Set - End Property - - ''' - ''' Gets or sets a flag to determine if the job was requested to be - ''' cancelled. This typically comes from the user. - ''' - Public Property WasCancelRequested As Boolean - Get - Return Me.cancelRequested - End Get - Set(value As Boolean) - Me.cancelRequested = value - End Set - End Property - - ''' - ''' Callback method when the job is waiting for cancellation. - ''' - ''' The updated batch job being waited for. - ''' The time elapsed. - ''' True, if the wait loop should be cancelled, false otherwise. - ''' - Public Function OnJobWaitForCancellation(ByVal waitBatchJob As BatchJob, - ByVal timeElapsed As Long) As Boolean - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed/1000, waitBatchJob.id, waitBatchJob.status) - batchJob = waitBatchJob - Return False - End Function - - ''' - ''' Callback method when the job is waiting for completion. - ''' - ''' The updated batch job being waited for. - ''' The time elapsed. - ''' True, if the wait loop should be cancelled, false otherwise. - ''' - Public Function OnJobWaitForCompletion(ByVal waitBatchJob As BatchJob, - ByVal timeElapsed As Long) As Boolean - Console.WriteLine("[{0} seconds]: Batch job ID {1} has status '{2}'.", - timeElapsed/1000, waitBatchJob.id, waitBatchJob.status) - batchJob = waitBatchJob - Return Me.WasCancelRequested - End Function - End Class - - ''' - ''' Gets the batch job error. - ''' - ''' The AdWords API Exception. - ''' The underlying batch job error if available, null otherwise. - Private Function GetBatchJobError(ByVal e As AdWordsApiException) As BatchJobError - Dim temp As List(Of BatchJobError) = TryCast(e.ApiException, ApiException). - GetAllErrorsByType (Of BatchJobError)() - ' MOE:begin_strip - ' Reinvent FirstOrDefault since you cannot use FirstOrDefault with Mono and VBNC. It - ' works in C# though. - ' MOE:end_strip - If temp.Count = 0 Then - Return Nothing - Else - Return temp(0) - End If - End Function - - ''' - ''' Creates the operations for uploading via batch job. - ''' - ''' The ad group ID. - ''' The list of operations. - Private Shared Function CreateOperations(ByVal adGroupId As Long) _ - As List(Of AdGroupCriterionOperation) - Dim operations As New List(Of AdGroupCriterionOperation) - - ' Create AdGroupCriterionOperations to add keywords, and upload every 10 operations - ' incrementally. - For i As Integer = 0 To NUMBER_OF_KEYWORDS_TO_ADD - ' Create Keyword. - Dim text As String = String.Format("mars{0}", i) - - ' Make 10% of keywords invalid to demonstrate error handling. - If (i Mod 10) = 0 Then - text = text + "!!!" - End If - - ' Create BiddableAdGroupCriterion. - Dim bagc As New BiddableAdGroupCriterion() - bagc.adGroupId = adGroupId - Dim keyword As New Keyword() - keyword.text = text - keyword.matchType = KeywordMatchType.BROAD - bagc.criterion = keyword - - ' Create AdGroupCriterionOperation. - Dim agco As New AdGroupCriterionOperation() - agco.operand = bagc - agco.operator = [Operator].ADD - - ' Add to the list of operations. - operations.Add(agco) - Next - Return operations - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/AddTrial.vb b/examples/AdWords/Vb/v201806/CampaignManagement/AddTrial.vb deleted file mode 100755 index cf5c99e7ffa..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/AddTrial.vb +++ /dev/null @@ -1,196 +0,0 @@ -' Copyright 2018 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. - -Imports System.Threading -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to create a trial and wait for it to - ''' complete. See the Campaign Drafts and Experiments guide for more - ''' information: - ''' https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments - ''' - Public Class AddTrial - Inherits ExampleBase - - ''' - ''' The polling interval base to be used for exponential backoff. - ''' - Private Const POLL_INTERVAL_SECONDS_BASE As Integer = 30 - - ''' - ''' The maximum number of retries. - ''' - Private Const MAX_RETRIES As Long = 5 - - ''' - ''' Main method, to run this code example As a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddTrial - Console.WriteLine(codeExample.Description) - Try - Dim draftId As Long = Long.Parse("INSERT_DRAFT_ID_HERE") - Dim baseCampaignId As Long = Long.Parse("INSERT_BASE_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser(), draftId, baseCampaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to create a trial and wait for it to " & - "complete. See the Campaign Drafts and Experiments guide for more " & - "information: " & - "https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments" - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to use as base of the - ''' trial. - ''' Id of the draft. - Public Sub Run(ByVal user As AdWordsUser, ByVal draftId As Long, - ByVal baseCampaignId As Long) - Using trialService As TrialService = CType( - user.GetService( - AdWordsService.v201806.TrialService), - TrialService) - Using trialAsyncErrorService As TrialAsyncErrorService = - CType(user.GetService(AdWordsService.v201806.TrialAsyncErrorService), - TrialAsyncErrorService) - - ' [START createTrial] MOE:strip_line - Dim newTrial As New Trial - newTrial.draftId = draftId - newTrial.baseCampaignId = baseCampaignId - newTrial.name = "Test Trial #" & ExampleUtilities.GetRandomString() - newTrial.trafficSplitPercent = 50 - - Dim trialOperation As New TrialOperation() - trialOperation.operator = [Operator].ADD - trialOperation.operand = newTrial - ' [END createTrial] MOE:strip_line - Try - Dim trialId As Long = trialService.mutate( - New TrialOperation() {trialOperation}).value(0).id - - ' [START pollForTrialCompletion] MOE:strip_line - ' Since creating a trial is asynchronous, we have to poll it to wait - ' for it to finish. - Dim trialSelector As New Selector() - trialSelector.fields = - New String() { _ - Trial.Fields.Id, Trial.Fields.Status, - Trial.Fields.BaseCampaignId, - Trial.Fields.TrialCampaignId - } - trialSelector.predicates = New Predicate() { _ - Predicate.Equals( - Trial.Fields.Id, trialId) - } - newTrial = Nothing - Dim isPending As Boolean = True - Dim pollAttempts As Integer = 0 - - Do - Dim sleepMillis As Integer = CType(Math.Pow(2, pollAttempts)* - POLL_INTERVAL_SECONDS_BASE*1000, - Integer) - Console.WriteLine("Sleeping {0} millis...", sleepMillis) - Thread.Sleep(sleepMillis) - - newTrial = trialService.get(trialSelector).entries(0) - - Console.WriteLine("Trial ID {0} has status '{1}'.", newTrial.id, - newTrial.status) - pollAttempts = pollAttempts + 1 - isPending = (newTrial.status = TrialStatus.CREATING) - Loop While isPending AndAlso (pollAttempts <= MAX_RETRIES) - - If newTrial.status = TrialStatus.ACTIVE Then - ' The trial creation was successful. - Console.WriteLine( - "Trial created with ID {0} and trial campaign ID {1}.", - newTrial.id, newTrial.trialCampaignId) - ' [START retrieveTrialErrors] MOE:strip_line - ElseIf newTrial.status = TrialStatus.CREATION_FAILED Then - ' The trial creation failed, and errors can be fetched from the - ' TrialAsyncErrorService. - Dim errorsSelector As New Selector() - errorsSelector.fields = New String() { _ - TrialAsyncError.Fields.TrialId, - TrialAsyncError.Fields. - AsyncError - } - errorsSelector.predicates = - New Predicate() { _ - Predicate.Equals( - TrialAsyncError.Fields.TrialId, - newTrial.id) - } - - Dim trialAsyncErrorPage As TrialAsyncErrorPage = trialAsyncErrorService. - get( - errorsSelector) - If trialAsyncErrorPage.entries Is Nothing OrElse - trialAsyncErrorPage.entries.Length = 0 Then - Console.WriteLine("Could not retrieve errors for trial {0}.", - newTrial.id) - Else - Console.WriteLine( - "Could not create trial ID {0} for draft ID {1} due to the " & - "following errors:", trialId, draftId) - Dim i As Integer = 1 - For Each err As TrialAsyncError In trialAsyncErrorPage.entries - Dim asyncError As ApiError = err.asyncError - Console.WriteLine( - "Error #{0}: errorType='{1}', errorString='{2}', " & - "trigger='{3}', fieldPath='{4}'", i, - asyncError.ApiErrorType, - asyncError.errorString, asyncError.trigger, - asyncError.fieldPath) - i += 1 - Next - End If - ' [END retrieveTrialErrors] MOE:strip_line - Else - ' Most likely, the trial is still being created. You can continue - ' polling, but we have limited the number of attempts in the - ' example. - Console.WriteLine( - "Timed out waiting to create trial from draft ID {0} with " + - "base campaign ID {1}.", draftId, baseCampaignId) - End If - ' [END pollForTrialCompletion] MOE:strip_line - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to create trial from draft.", e) - End Try - End Using - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAds.vb b/examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAds.vb deleted file mode 100755 index a797e3b3865..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAds.vb +++ /dev/null @@ -1,134 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example retrieves all the disapproved ads in a given campaign. - ''' - Public Class GetAllDisapprovedAds - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAllDisapprovedAds - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example retrieves all the disapproved ads in a given campaign." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign for which disapproved ads - ''' are retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - Ad.Fields.Id, AdGroupAd.Fields.PolicySummary - } - - ' Set the filters. - selector.predicates = - New Predicate() { _ - Predicate.Equals(AdGroup.Fields.CampaignId, campaignId), - Predicate.Equals( - AdGroupAdPolicySummary.Fields.CombinedApprovalStatus, - PolicyApprovalStatus.DISAPPROVED.ToString()) - } - - ' Set the selector paging. - selector.paging = Paging.Default - - Dim page As New AdGroupAdPage - Dim disapprovedAdsCount As Integer = 0 - - Try - Do - ' Get the disapproved ads. - page = service.get(selector) - - ' Display the results. - If Not (page Is Nothing) AndAlso Not (page.entries Is Nothing) Then - For Each AdGroupAd As AdGroupAd In page.entries - Dim policySummary As AdGroupAdPolicySummary = - AdGroupAd.policySummary - disapprovedAdsCount += 1 - Console.WriteLine( - "Ad with ID {0} and type '{1}' was disapproved with the " + - "following policy topic entries: ", AdGroupAd.ad.id, - AdGroupAd.ad.AdType) - ' Display the policy topic entries related to the ad disapproval. - For Each PolicyTopicEntry As PolicyTopicEntry In _ - policySummary.policyTopicEntries - Console.WriteLine(" topic id: {0}, topic name: '{1}'", - PolicyTopicEntry.policyTopicId, - PolicyTopicEntry.policyTopicName) - ' Display the attributes And values that triggered the policy - ' topic. - If Not PolicyTopicEntry.policyTopicEvidences Is Nothing Then - For Each evidence As PolicyTopicEvidence In _ - PolicyTopicEntry.policyTopicEvidences - Console.WriteLine(" evidence type: {0}", - evidence.policyTopicEvidenceType) - If Not evidence.evidenceTextList Is Nothing Then - For i As Integer = 0 To _ - evidence.evidenceTextList.Length - Console.WriteLine( - " evidence text[{0}]: {1}", - i, evidence.evidenceTextList(i)) - Next - End If - Next - End If - Next - Next - End If - - selector.paging.IncreaseOffset() - Loop While selector.paging.startIndex < page.totalNumEntries - Console.WriteLine("Number of disapproved ads found: {0}", disapprovedAdsCount) - Catch e As Exception - Throw New System.ApplicationException("Failed to get disapproved ads.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.vb b/examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.vb deleted file mode 100755 index 4487ba4d3b7..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/GetAllDisapprovedAdsWithAwql.vb +++ /dev/null @@ -1,134 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example retrieves all the disapproved ads in a given campaign - ''' using an AWQL query. See - ''' https://developers.google.com/adwords/api/docs/guides/awql for AWQL - ''' documentation. - ''' - Public Class GetAllDisapprovedAdsWithAwql - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAllDisapprovedAdsWithAwql - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example retrieves all the disapproved ads in a given campaign " & - "using an AWQL query. " & - "See https://developers.google.com/adwords/api/docs/guides/awql " & - "for AWQL documentation." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign for which disapproved ads - ''' are retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Get all the disapproved ads for this campaign. - Dim query As SelectQuery = New SelectQueryBuilder() _ - .Select(Ad.Fields.Id, AdGroupAd.Fields.PolicySummary) _ - .Where(AdGroup.Fields.CampaignId).Equals(campaignId) _ - .Where(AdGroupAdPolicySummary.Fields.CombinedApprovalStatus) _ - .Equals(ApprovalStatus.DISAPPROVED.ToString()) _ - .OrderByAscending(Ad.Fields.Id) _ - .DefaultLimit() _ - .Build() - - Dim page As New AdGroupAdPage() - Dim disapprovedAdsCount As Integer = 0 - - Try - Do - ' Get the disapproved ads. - page = service.query(query) - - ' Display the results. - If Not (page Is Nothing) AndAlso Not (page.entries Is Nothing) Then - For Each AdGroupAd As AdGroupAd In page.entries - Dim policySummary As AdGroupAdPolicySummary = - AdGroupAd.policySummary - disapprovedAdsCount += 1 - Console.WriteLine( - "Ad with ID {0} and type '{1}' was disapproved with the " + - "following policy topic entries: ", AdGroupAd.ad.id, - AdGroupAd.ad.AdType) - ' Display the policy topic entries related to the ad disapproval. - For Each PolicyTopicEntry As PolicyTopicEntry In _ - policySummary.policyTopicEntries - Console.WriteLine(" topic id: {0}, topic name: '{1}'", - PolicyTopicEntry.policyTopicId, - PolicyTopicEntry.policyTopicName) - ' Display the attributes And values that triggered the policy - ' topic. - If Not PolicyTopicEntry.policyTopicEvidences Is Nothing Then - For Each evidence As PolicyTopicEvidence In _ - PolicyTopicEntry.policyTopicEvidences - Console.WriteLine(" evidence type: {0}", - evidence.policyTopicEvidenceType) - If Not evidence.evidenceTextList Is Nothing Then - For i As Integer = 0 To _ - evidence.evidenceTextList.Length - Console.WriteLine( - " evidence text[{0}]: {1}", - i, evidence.evidenceTextList(i)) - Next - End If - Next - End If - Next - Next - End If - - query.NextPage(page) - Loop While (query.HasNextPage(page)) - Console.WriteLine("Number of disapproved ads found: {0}", disapprovedAdsCount) - Catch e As Exception - Throw New System.ApplicationException("Failed to get disapproved ads.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/GetCampaignsByLabel.vb b/examples/AdWords/Vb/v201806/CampaignManagement/GetCampaignsByLabel.vb deleted file mode 100755 index 54e7236073d..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/GetCampaignsByLabel.vb +++ /dev/null @@ -1,117 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets all campaigns with a specific label. To add a - ''' label to campaigns, run AddCampaignLabels.vb. - ''' - Public Class GetCampaignsByLabel - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetCampaignsByLabel - Console.WriteLine(codeExample.Description) - Dim labelId As Long = Long.Parse("INSERT_LABEL_ID_HERE") - - Try - codeExample.Run(New AdWordsUser, labelId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets all campaigns with a specific label. To add a" & - " label to campaigns, run AddCampaignLabels.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' ID of the label. - Public Sub Run(ByVal user As AdWordsUser, ByVal labelId As Long) - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - Campaign.Fields.Id, Campaign.Fields.Name, - Campaign.Fields.Labels - } - - ' Labels filtering is performed by ID. You can use CONTAINS_ANY to - ' select campaigns with any of the label IDs, CONTAINS_ALL to select - ' campaigns with all of the label IDs, or CONTAINS_NONE to select - ' campaigns with none of the label IDs. - selector.predicates = New Predicate() { _ - Predicate.ContainsAny( - Campaign.Fields.Labels, - New String() {labelId.ToString()}) - } - - ' Set the selector paging. - selector.paging = Paging.Default - - Dim page As New CampaignPage - - Try - Do - ' Get the campaigns. - page = campaignService.get(selector) - - ' Display the results. - If Not (page Is Nothing) AndAlso Not (page.entries Is Nothing) Then - Dim i As Integer = selector.paging.startIndex - For Each campaign As Campaign In page.entries - Dim labelNames As New List(Of String) - For Each label As Label In campaign.labels - labelNames.Add(label.name) - Next - - Console.WriteLine( - "{0}) Campaign with id = '{1}', name = '{2}' and labels = " & - "'{3}' was found.", i + 1, campaign.id, campaign.name, - String.Join(", ", labelNames.ToArray())) - i = i + 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While selector.paging.startIndex < page.totalNumEntries - Console.WriteLine("Number of campaigns found: {0}", page.totalNumEntries) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to retrieve campaigns by label.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/GraduateTrial.vb b/examples/AdWords/Vb/v201806/CampaignManagement/GraduateTrial.vb deleted file mode 100755 index 240c2e37214..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/GraduateTrial.vb +++ /dev/null @@ -1,124 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to graduate a trial. See the Campaign - ''' Drafts and Experiments guide for more information: - ''' https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments - ''' - Public Class GraduateTrial - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GraduateTrial - Console.WriteLine(codeExample.Description) - Try - Dim trialId As Long = Long.Parse("INSERT_TRIAL_ID_HERE") - codeExample.Run(New AdWordsUser(), trialId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to graduate a trial. See the Campaign " & - "Drafts and Experiments guide for more information: " & - "https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments" - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the trial to be graduated. - Public Sub Run(ByVal user As AdWordsUser, ByVal trialId As Long) - Using trialService As TrialService = CType( - user.GetService( - AdWordsService.v201806.TrialService), - TrialService) - - ' To graduate a trial, you must specify a different budget from the - ' base campaign. The base campaign (in order to have had a trial based - ' on it) must have a non-shared budget, so it cannot be shared with - ' the new independent campaign created by graduation. - Dim budget As Budget = CreateBudget(user) - - Dim trial As New Trial() - trial.id = trialId - trial.budgetId = budget.budgetId - trial.status = TrialStatus.GRADUATED - - Dim trialOperation As New TrialOperation() - trialOperation.operator = [Operator].SET - trialOperation.operand = trial - - Try - ' Update the trial. - trial = trialService.mutate(New TrialOperation() {trialOperation}).value(0) - - ' Graduation is a synchronous operation, so the campaign is already - ' ready. If you promote instead, make sure to see the polling scheme - ' demonstrated in AddTrial.cs to wait for the asynchronous operation - ' to finish. - Console.WriteLine( - "Trial ID {0} graduated. Campaign ID {1} was given a new budget " & - "ID {2} and is no Longer dependent on this trial.", trial.id, - trial.trialCampaignId, - budget.budgetId) - Catch e As Exception - Throw New System.ApplicationException("Failed to graduate trial.", e) - End Try - End Using - End Sub - - ''' - ''' Creates the budget. - ''' - ''' The user. - ''' The new budget. - Private Shared Function CreateBudget(user As AdWordsUser) As Budget - Using budgetService As BudgetService = CType( - user.GetService( - AdWordsService.v201806.BudgetService), - BudgetService) - Dim budget As New Budget() - budget.name = "Budget #" + ExampleUtilities.GetRandomString() - budget.amount = New Money() - budget.amount.microAmount = 50000000L - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - - Dim budgetOperation As New BudgetOperation() - budgetOperation.operator = [Operator].ADD - budgetOperation.operand = budget - - ' Add budget. - Return budgetService.mutate(New BudgetOperation() {budgetOperation}).value(0) - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/SetAdParameters.vb b/examples/AdWords/Vb/v201806/CampaignManagement/SetAdParameters.vb deleted file mode 100755 index 07fd4bf7737..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/SetAdParameters.vb +++ /dev/null @@ -1,150 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to create a text ad with ad parameters. - ''' To add an ad group, run AddAdGroup.vb. To add a keyword, run - ''' AddKeyword.vb. - ''' - Public Class SetAdParameters - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New SetAdParameters - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim criterionId As Long = Long.Parse("INSERT_CRITERION_ID_HERE") - - codeExample.Run(New AdWordsUser, adGroupId, criterionId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example illustrates how to create a text ad with ad parameters. To" & - " add an ad group, run AddAdGroup.vb. To add a keyword, run AddKeyword.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group that contains the criterion. - ''' - ''' Id of the keyword for which the ad - ''' parameters are set. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, - ByVal criterionId As Long) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - Using adParamService As AdParamService = CType( - user.GetService( - AdWordsService.v201806.AdParamService), - AdParamService) - - ' Create the expanded text ad. - Dim expandedTextAd As New ExpandedTextAd() - expandedTextAd.headlinePart1 = "Mars Cruises" - expandedTextAd.headlinePart2 = "Low-gravity fun for {param1:cheap}." - expandedTextAd.description = "Only {param2:a few} seats left!" - expandedTextAd.finalUrls = New String() {"http://www.example.com"} - - Dim adOperand As New AdGroupAd - adOperand.adGroupId = adGroupId - adOperand.status = AdGroupAdStatus.ENABLED - adOperand.ad = expandedTextAd - - ' Create the operation. - Dim adOperation As New AdGroupAdOperation - adOperation.operand = adOperand - adOperation.operator = [Operator].ADD - - ' Create the expanded text ad. - Dim retVal As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {adOperation}) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) _ - AndAlso (retVal.value.Length > 0)) Then - Console.WriteLine( - "Expanded text ad with id = ""{0}"" was successfully added.", - retVal.value(0).ad.id) - Else - Throw New System.ApplicationException("Failed to create expanded text ads.") - Return - End If - - ' Create the ad param for price. - Dim priceParam As New AdParam - priceParam.adGroupId = adGroupId - priceParam.criterionId = criterionId - priceParam.paramIndex = 1 - priceParam.insertionText = "$100" - - ' Create the ad param for seats. - Dim seatParam As New AdParam - seatParam.adGroupId = adGroupId - seatParam.criterionId = criterionId - seatParam.paramIndex = 2 - seatParam.insertionText = "50" - - ' Create the operations. - Dim priceOperation As New AdParamOperation - priceOperation.operator = [Operator].SET - priceOperation.operand = priceParam - - Dim seatOperation As New AdParamOperation - seatOperation.operator = [Operator].SET - seatOperation.operand = seatParam - - Try - ' Set the ad parameters. - Dim newAdParams As AdParam() = adParamService.mutate( - New AdParamOperation() _ - {priceOperation, - seatOperation}) - - 'Display the results. - If (Not newAdParams Is Nothing) Then - Console.WriteLine("Ad parameters were successfully updated.") - Else - Console.WriteLine("No ad parameters were set.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to set ad parameter(s).", e) - End Try - End Using - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/SetBidModifier.vb b/examples/AdWords/Vb/v201806/CampaignManagement/SetBidModifier.vb deleted file mode 100755 index 52d4ffcdeea..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/SetBidModifier.vb +++ /dev/null @@ -1,112 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example sets a bid modifier for the mobile platform on given - ''' campaign. The campaign must be an enhanced type of campaign. To get - ''' campaigns, run GetCampaigns.vb. To enhance a campaign, run - ''' SetCampaignEnhanced.vb. - ''' - Public Class SetBidModifier - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New SetBidModifier - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - Dim bidModifier As Double = Double.Parse("INSERT_BID_MODIFIER_HERE") - codeExample.Run(New AdWordsUser, campaignId, bidModifier) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example sets a bid modifier for the mobile platform on given " & - "campaign. The campaign must be an enhanced type of campaign. To get " & - "campaigns, run GetCampaigns.vb. To enhance a campaign, run " & - "SetCampaignEnhanced.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign whose bid should be modified. - ''' - ''' The bid modifier. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long, - ByVal bidModifier As Double) - Using campaignCriterionService As CampaignCriterionService = CType( - user.GetService( - AdWordsService.v201806.CampaignCriterionService), - CampaignCriterionService) - - ' Create mobile platform. The ID can be found in the documentation. - ' https://developers.google.com/adwords/api/docs/appendix/platforms - Dim mobile As New Platform() - mobile.id = 30001 - - ' Create criterion with modified bid. - Dim criterion As New CampaignCriterion() - criterion.campaignId = campaignId - criterion.criterion = mobile - criterion.bidModifier = bidModifier - - ' Create SET operation. - Dim operation As New CampaignCriterionOperation() - operation.operator = [Operator].SET - operation.operand = criterion - - Try - ' Update campaign criteria. - Dim result As CampaignCriterionReturnValue = campaignCriterionService.mutate( - New CampaignCriterionOperation() {operation}) - - ' Display campaign criteria. - If Not result.value Is Nothing Then - For Each newCriterion As CampaignCriterion In result.value - Console.WriteLine( - "Campaign criterion with campaign id '{0}', criterion id '{1}' " & - "and type '{2}' was modified with bid {3:F2}.", - newCriterion.campaignId, - newCriterion.criterion.id, newCriterion.criterion.type, - newCriterion.bidModifier) - Next - Else - Console.WriteLine("No campaigns were modified.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to set bid modifier.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/CampaignManagement/ValidateTextAd.vb b/examples/AdWords/Vb/v201806/CampaignManagement/ValidateTextAd.vb deleted file mode 100755 index a46e090f903..00000000000 --- a/examples/AdWords/Vb/v201806/CampaignManagement/ValidateTextAd.vb +++ /dev/null @@ -1,108 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example shows how to use the validateOnly header to validate - ''' an expanded text ad. No objects will be created, but exceptions will - ''' still be thrown. - ''' - Public Class ValidateTextAd - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New ValidateTextAd - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example shows how to use the validateOnly header to validate an " & - "expanded text ad. No objects will be created, but exceptions will still be " & - "thrown." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which text ads are - ''' added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Set the validateOnly headers. - adGroupAdService.RequestHeader.validateOnly = True - - ' Create your expanded text ad. - Dim expandedTextAd As New ExpandedTextAd() - expandedTextAd.headlinePart1 = "Luxury Cruise to Mars" - expandedTextAd.headlinePart2 = "Visit the Red Planet in style." - expandedTextAd.description = "Low-gravity fun for everyone!!" - expandedTextAd.finalUrls = New String() {"http://www.example.com"} - - Dim adGroupAd As New AdGroupAd - adGroupAd.adGroupId = adGroupId - adGroupAd.ad = expandedTextAd - - Dim operation As New AdGroupAdOperation - operation.operator = [Operator].ADD - operation.operand = adGroupAd - Try - Dim retVal As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - ' Since validation is ON, result will be null. - Console.WriteLine("Expanded text ad validated successfully.") - Catch e As AdWordsApiException - ' This block will be hit if there is a validation error from the server. - Console.WriteLine( - "There were validation error(s) while adding expanded text ad.") - - If (Not e.ApiException Is Nothing) Then - For Each apiError As ApiError In _ - DirectCast(e.ApiException, ApiException).errors - Console.WriteLine(" Error type is '{0}' and fieldPath is '{1}'.", - apiError.ApiErrorType, apiError.fieldPath) - Next - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to validate expanded text ad.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ErrorHandling/HandlePartialFailures.vb b/examples/AdWords/Vb/v201806/ErrorHandling/HandlePartialFailures.vb deleted file mode 100755 index f9312823751..00000000000 --- a/examples/AdWords/Vb/v201806/ErrorHandling/HandlePartialFailures.vb +++ /dev/null @@ -1,151 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example demonstrates how to handle partial failures. - ''' - Public Class HandlePartialFailures - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New HandlePartialFailures - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example demonstrates how to handle partial failures." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which keywords are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' [START enablePartialFailure] MOE:strip_line - ' Set partial failure mode for the service. - adGroupCriterionService.RequestHeader.partialFailure = True - ' [END enablePartialFailure] MOE:strip_line - - Try - ' [START addKeywords] MOE:strip_line - Dim operations As New List(Of AdGroupCriterionOperation) - - ' Create the keywords. - Dim keywords As String() = New String() { _ - "mars cruise", "inv@lid cruise", - "venus cruise", - "b(a)d keyword cruise"} - - For Each keywordText As String In keywords - Dim keyword As New Keyword - keyword.text = keywordText - keyword.matchType = KeywordMatchType.BROAD - - ' Create biddable ad group criterion. - Dim keywordBiddableAdGroupCriterion As New BiddableAdGroupCriterion - keywordBiddableAdGroupCriterion.adGroupId = adGroupId - keywordBiddableAdGroupCriterion.criterion = keyword - - ' Create the operation. - Dim keywordAdGroupCriterionOperation As New AdGroupCriterionOperation - keywordAdGroupCriterionOperation.operand = keywordBiddableAdGroupCriterion - keywordAdGroupCriterionOperation.operator = [Operator].ADD - operations.Add(keywordAdGroupCriterionOperation) - Next - - ' Create the keywords. - Dim result As AdGroupCriterionReturnValue = adGroupCriterionService.mutate( - operations.ToArray) - ' [END addKeywords] MOE:strip_line - - ' [START handleSuccessfulOperations] MOE:strip_line - ' Display the results. - If ((Not result Is Nothing) AndAlso (Not result.value Is Nothing)) Then - For Each adGroupCriterionResult As AdGroupCriterion In result.value - If (Not adGroupCriterionResult.criterion Is Nothing) Then - Console.WriteLine( - "Keyword with ad group id '{0}', and criterion id " & - "'{1}', and text '{2}' was added.\n", - adGroupCriterionResult.adGroupId, - adGroupCriterionResult.criterion.id, - DirectCast(adGroupCriterionResult.criterion, Keyword).text) - End If - Next - Else - Console.WriteLine("No keywords were added.") - End If - ' [END handleSuccessfulOperations] MOE:strip_line - - ' [START handleFailedOperations] MOE:strip_line - ' Display the partial failure errors. - If _ - ((Not result Is Nothing) AndAlso - (Not result.partialFailureErrors Is Nothing)) Then - For Each apiError As ApiError In result.partialFailureErrors - Dim operationIndex As Integer = apiError.GetOperationIndex() - If (operationIndex <> - 1) Then - Dim adGroupCriterion As AdGroupCriterion = - operations(operationIndex).operand - Console.WriteLine("Keyword with ad group id '{0}' and text '{1}' " & - "triggered a failure for the following reason: " & - "'{2}'.\n", - adGroupCriterion.adGroupId, - DirectCast(adGroupCriterion.criterion, Keyword). - text, - apiError.errorString) - Else - Console.WriteLine( - "A failure for the following reason: '{0}' has occurred.\n", - apiError.errorString) - End If - Next - End If - ' [END handleFailedOperations] MOE:strip_line - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to add keyword(s) in partial failure " + - "mode.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ErrorHandling/HandlePolicyViolationError.vb b/examples/AdWords/Vb/v201806/ErrorHandling/HandlePolicyViolationError.vb deleted file mode 100755 index 8b09c4dfd1f..00000000000 --- a/examples/AdWords/Vb/v201806/ErrorHandling/HandlePolicyViolationError.vb +++ /dev/null @@ -1,182 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a text ad, and shows how to handle a policy - ''' violation. - ''' - Public Class HandlePolicyViolationError - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New HandlePolicyViolationError - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a text ad, and shows how to handle a policy violation." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which ads are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using service As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create the text ad. - Dim textAd As New TextAd - textAd.headline = "Luxury Cruise to Mars" - textAd.description1 = "Visit the Red Planet in style." - textAd.description2 = "Low-gravity fun for everyone!!" - textAd.displayUrl = "www.example.com" - textAd.url = "http://www.example.com" - - Dim textadGroupAd As New AdGroupAd - textadGroupAd.adGroupId = adGroupId - textadGroupAd.ad = textAd - - ' Create the operations. - Dim textAdOperation As New AdGroupAdOperation - textAdOperation.operator = [Operator].ADD - textAdOperation.operand = textadGroupAd - - Try - Dim retVal As AdGroupAdReturnValue = Nothing - - ' Setup two arrays, one to hold the list of all operations to be - ' validated, and another to hold the list of operations that cannot be - ' fixed after validation. - Dim allOperations As New List(Of AdGroupAdOperation) - Dim operationsToBeRemoved As New List(Of AdGroupAdOperation) - - allOperations.Add(textAdOperation) - - Try - ' Validate the operations. - service.RequestHeader.validateOnly = True - retVal = service.mutate(allOperations.ToArray) - Catch e As AdWordsApiException - ' [START processApiErrors] MOE:strip_line - Dim innerException As ApiException = TryCast(e.ApiException, ApiException) - If (innerException Is Nothing) Then - Throw _ - New Exception( - "Failed to retrieve ApiError. See inner exception for more " & - "details.", e) - End If - - ' Examine each ApiError received from the server. - For Each apiError As ApiError In innerException.errors - Dim index As Integer = apiError.GetOperationIndex() - If (index = - 1) Then - ' This API error is not associated with an operand, so we cannot - ' recover from this error by removing one or more operations. - ' Rethrow the exception for manual inspection. - Throw - End If - - ' [START handleApiError] MOE:strip_line - ' Handle policy violation errors. - If TypeOf apiError Is PolicyViolationError Then - Dim policyError As PolicyViolationError = - CType(apiError, PolicyViolationError) - - If policyError.isExemptable Then - ' If the policy violation error is exemptable, add an exemption - ' request. - Dim exemptionRequests As New List(Of ExemptionRequest) - If (Not allOperations.Item(index).exemptionRequests Is - Nothing) Then - exemptionRequests.AddRange( - allOperations.Item(index).exemptionRequests) - End If - - Dim exemptionRequest As New ExemptionRequest - exemptionRequest.key = policyError.key - exemptionRequests.Add(exemptionRequest) - allOperations.Item(index).exemptionRequests = - exemptionRequests.ToArray - Else - ' Policy violation error is not exemptable, remove this - ' operation from the list of operations. - operationsToBeRemoved.Add(allOperations.Item(index)) - End If - Else - ' This is not a policy violation error, remove this operation - ' from the list of operations. - operationsToBeRemoved.Add(allOperations.Item(index)) - End If - ' [END handleApiError] MOE:strip_line - Next - ' [END processApiErrors] MOE:strip_line - - ' Remove all operations that aren't exemptable. - For Each operation As AdGroupAdOperation In operationsToBeRemoved - allOperations.Remove(operation) - Next - End Try - If (allOperations.Count > 0) Then - ' Perform the operations exemptible of a policy violation. - service.RequestHeader.validateOnly = False - retVal = service.mutate(allOperations.ToArray) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing) _ - AndAlso (retVal.value.Length > 0)) Then - For Each newAdGroupAd As AdGroupAd In retVal.value - Console.WriteLine("New ad with id = ""{0}"" and " & - "displayUrl = ""{1}"" was created.", - newAdGroupAd.ad.id, newAdGroupAd.ad.displayUrl) - Next - Else - Console.WriteLine("No ads were created.") - End If - Else - Console.WriteLine( - "There are no ads to create after policy violation checks.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create Ad(s).", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ErrorHandling/HandleRateExceededError.vb b/examples/AdWords/Vb/v201806/ErrorHandling/HandleRateExceededError.vb deleted file mode 100755 index f311ae176cc..00000000000 --- a/examples/AdWords/Vb/v201806/ErrorHandling/HandleRateExceededError.vb +++ /dev/null @@ -1,216 +0,0 @@ -' Copyright 2018 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. - -Imports System.Net -Imports System.Threading -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example shows how to handle RateExceededError in your - ''' application. To trigger the rate exceeded error, this code example runs - ''' 100 threads in parallel, each thread attempting to validate 100 keywords - ''' in a single request. Note that spawning 100 parallel threads is for - ''' illustrative purposes only, you shouldn't do this in your application. - ''' - Public Class HandleRateExceededError - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New HandleRateExceededError - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example shows how to handle RateExceededError in your application." & - " To trigger the rate exceeded error, this code example runs 100 threads in " & - "parallel, each thread attempting to validate 100 keywords in a single " & - "request. Note that spawning 100 parallel threads is for illustrative " & - "purposes only, you shouldn't do this in your application." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group to which keywords are added. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Const NUM_THREADS As Integer = 100 - - ' Increase the maximum number of parallel HTTP connections that .NET - ' framework allows. By default, this is set to 2 by the .NET framework. - ServicePointManager.DefaultConnectionLimit = NUM_THREADS - - Dim threads As New List(Of Thread) - - For i As Integer = 0 To NUM_THREADS - Dim thread As New Thread(AddressOf New KeywordThread(user, i, adGroupId).Run) - threads.Add(thread) - Next i - - For i As Integer = 0 To threads.Count - 1 - threads.Item(i).Start(i) - Next i - - For i As Integer = 0 To threads.Count - 1 - threads.Item(i).Join() - Next i - End Sub - - ''' - ''' Thread class for validating keywords. - ''' - Public Class KeywordThread - ''' - ''' Index of this thread, for identifying and debugging. - ''' - Dim threadIndex As Integer - - ''' - ''' The ad group id to which keywords are added. - ''' - Dim adGroupId As Long - - ''' - ''' The AdWords user who owns this ad group. - ''' - Dim user As AdWordsUser - - ''' - ''' Number of keywords to be validated in each API call. - ''' - Const NUM_KEYWORDS As Integer = 100 - - ''' - ''' Initializes a new instance of the class. - ''' - ''' Index of the thread. - ''' The ad group id. - ''' The AdWords user who owns the ad group. - Public Sub New(ByVal user As AdWordsUser, ByVal threadIndex As Integer, - ByVal adGroupId As Long) - Me.user = user - Me.threadIndex = threadIndex - Me.adGroupId = adGroupId - End Sub - - ''' - ''' Main method for the thread. - ''' - ''' The thread parameter. - Public Sub Run(ByVal obj As Object) - ' Get the AdGroupCriterionService. This should be done within the - ' thread, since a service can only handle one outgoing HTTP request - ' at a time. - Using service As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - service.RequestHeader.validateOnly = True - - ' Create the operations. - Dim operations As New List(Of AdGroupCriterionOperation) - For j As Integer = 0 To NUM_KEYWORDS - ' Create the keyword. - Dim keyword As New Keyword - keyword.text = "mars cruise thread " & threadIndex.ToString & " seed " & - j.ToString - keyword.matchType = KeywordMatchType.BROAD - - ' Create the biddable ad group criterion. - Dim keywordCriterion As AdGroupCriterion = New BiddableAdGroupCriterion - keywordCriterion.adGroupId = adGroupId - keywordCriterion.criterion = keyword - - ' Create the operations. - Dim keywordOperation As New AdGroupCriterionOperation - keywordOperation.operator = [Operator].ADD - keywordOperation.operand = keywordCriterion - - operations.Add(keywordOperation) - Next j - - Dim retryCount As Integer = 0 - Const NUM_RETRIES As Integer = 3 - Try - While (retryCount < NUM_RETRIES) - Try - ' Validate the keywords. - Dim retval As AdGroupCriterionReturnValue = - service.mutate(operations.ToArray) - Exit While - Catch e As AdWordsApiException - ' Handle API errors. - Dim innerException As ApiException = TryCast(e.ApiException, - ApiException) - If (innerException Is Nothing) Then - Throw _ - New Exception( - "Failed to retrieve ApiError. See inner exception for" & - " more details.", e) - End If - For Each apiError As ApiError In innerException.errors - If Not TypeOf apiError Is RateExceededError Then - ' Rethrow any errors other than RateExceededError. - Throw - End If - ' Handle rate exceeded errors. - Dim rateExceededError As RateExceededError = - DirectCast(apiError, RateExceededError) - Console.WriteLine( - "Got Rate exceeded error - rate name = '{0}', " & - "scope = '{1}', retry After {2} seconds.", - rateExceededError.rateScope, - rateExceededError.rateName, - rateExceededError.retryAfterSeconds) - Thread.Sleep(rateExceededError.retryAfterSeconds) - retryCount = retryCount + 1 - Next - Finally - If (retryCount = NUM_RETRIES) Then - Throw _ - New Exception( - String.Format( - "Could not recover after making {0} attempts.", - retryCount)) - End If - End Try - End While - Catch e As Exception - Throw New System.ApplicationException("Failed to validate keywords.", e) - End Try - End Using - End Sub - End Class - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.vb b/examples/AdWords/Vb/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.vb deleted file mode 100755 index 16c0520130d..00000000000 --- a/examples/AdWords/Vb/v201806/Extensions/AddGoogleMyBusinessLocationExtensions.vb +++ /dev/null @@ -1,262 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Lib - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a feed that syncs feed items from a Google - ''' My Business (GMB) account and associates the feed with a customer. - ''' - Public Class AddGoogleMyBusinessLocationExtensions - Inherits ExampleBase - - ''' - ''' The placeholder type for location extensions. See the Placeholder - ''' reference page for a list of all the placeholder types and fields. - ''' - ''' https://developers.google.com/adwords/api/docs/appendix/placeholders - ''' - Private Const PLACEHOLDER_LOCATION As Integer = 7 - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddGoogleMyBusinessLocationExtensions - Console.WriteLine(codeExample.Description) - - Dim user As New AdWordsUser - - Try - ' The email address of either an owner or a manager of the GMB account. - Dim gmbEmailAddress As String = "INSERT_GMB_EMAIL_ADDRESS_HERE" - - ' Refresh the access token so that there's a valid access token. - user.OAuthProvider.RefreshAccessToken() - - ' If the gmbEmailAddress above is the same user you used to generate - ' your AdWords API refresh token, leave the assignment below unchanged. - ' Otherwise, to obtain an access token for your GMB account, run the - ' OAuth Token generator utility while logged in as the same user as - ' gmbEmailAddress. Copy and paste the AccessToken value into the - ' assignment below. - Dim gmbAccessToken As String = user.Config.OAuth2AccessToken - - ' If the gmbEmailAddress above is for a GMB manager instead of the GMB - ' account owner, then set businessAccountIdentifier to the +Page ID of - ' a location for which the manager has access. See the location - ' extensions guide at - ' https://developers.google.com/adwords/api/docs/guides/feed-services-locations - ' for details. - Dim businessAccountIdentifier As String = Nothing - codeExample.Run(user, gmbEmailAddress, gmbAccessToken, - businessAccountIdentifier) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a feed that syncs feed items from a Google my Business " & - "(GMB) account and associates the feed with a customer." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The email address for Google My Business - ''' account. - ''' The OAuth2 access token for Google - ''' My Business account. - ''' The account identifier for - ''' Google My Business account. - Public Sub Run(ByVal user As AdWordsUser, ByVal gmbEmailAddress As String, - ByVal gmbAccessToken As String, ByVal businessAccountIdentifier As String) - Dim gmbFeed As Feed = CreateGmbFeed(user, gmbEmailAddress, gmbAccessToken, - businessAccountIdentifier) - AddCustomerFeed(user, gmbFeed) - End Sub - - ''' - ''' Create a feed that will sync to the Google My Business account - ''' specified by gmbEmailAddress. - ''' - ''' The user. - ''' The GMB email address. - ''' The GMB access token. - ''' The GMB account identifier. - ''' The newly created GMB feed. - Private Shared Function CreateGmbFeed(ByVal user As AdWordsUser, - ByVal gmbEmailAddress As String, - ByVal gmbAccessToken As String, - ByVal businessAccountIdentifier As String) As Feed - Using feedService As FeedService = CType( - user.GetService( - AdWordsService.v201806.FeedService), - FeedService) - - ' Create a feed that will sync to the Google My Business account - ' specified by gmbEmailAddress. Do not add FeedAttributes to this object, - ' as AdWords will add them automatically because this will be a - ' system generated feed. - Dim gmbFeed As New Feed() - gmbFeed.name = String.Format("Google My Business feed #{0}", - ExampleUtilities.GetRandomString()) - - Dim feedData As New PlacesLocationFeedData() - feedData.emailAddress = gmbEmailAddress - feedData.businessAccountIdentifier = businessAccountIdentifier - - ' Optional: specify labels to filter Google My Business listings. If - ' specified, only listings that have any of the labels set are - ' synchronized into FeedItems. - feedData.labelFilters = New String() {"Stores in New York City"} - - Dim oAuthInfo As New OAuthInfo() - oAuthInfo.httpMethod = "GET" - - ' Permissions for the AdWords API scope will also cover GMB. - oAuthInfo.httpRequestUrl = user.Config.GetDefaultOAuth2Scope() - oAuthInfo.httpAuthorizationHeader = String.Format("Bearer {0}", gmbAccessToken) - feedData.oAuthInfo = oAuthInfo - - gmbFeed.systemFeedGenerationData = feedData - - ' Since this feed's feed items will be managed by AdWords, - ' you must set its origin to ADWORDS. - gmbFeed.origin = FeedOrigin.ADWORDS - - ' Create an operation to add the feed. - Dim feedOperation As New FeedOperation() - feedOperation.operand = gmbFeed - feedOperation.operator = [Operator].ADD - - Try - ' Add the feed. Since it is a system generated feed, AdWords will - ' automatically: - ' 1. Set up the FeedAttributes on the feed. - ' 2. Set up a FeedMapping that associates the FeedAttributes of the - ' Feed with the placeholder fields of the LOCATION placeholder type. - Dim addFeedResult As FeedReturnValue = feedService.mutate( - New FeedOperation() {feedOperation}) - Dim addedFeed As Feed = addFeedResult.value(0) - Console.WriteLine("Added GMB feed with ID {0}", addedFeed.id) - Return addedFeed - Catch e As Exception - Throw New System.ApplicationException("Failed to create GMB feed.", e) - End Try - End Using - End Function - - ''' - ''' Add a CustomerFeed that associates the feed with this customer for - ''' the LOCATION placeholder type. - ''' - ''' The AdWords user. - ''' The GMB feed. - Sub AddCustomerFeed(ByVal user As AdWordsUser, ByVal feed As Feed) - Using customerFeedService As CustomerFeedService = CType( - user.GetService( - AdWordsService.v201806.CustomerFeedService), - CustomerFeedService) - - ' Add a CustomerFeed that associates the feed with this customer for - ' the LOCATION placeholder type. - Dim customerFeed As New CustomerFeed() - customerFeed.feedId = feed.id - customerFeed.placeholderTypes = New Integer() {PLACEHOLDER_LOCATION} - - ' Create a matching function that will always evaluate to true. - Dim customerMatchingFunction As New [Function]() - Dim constOperand As New ConstantOperand() - constOperand.type = ConstantOperandConstantType.BOOLEAN - constOperand.booleanValue = True - customerMatchingFunction.lhsOperand = New FunctionArgumentOperand() {constOperand} - customerMatchingFunction.operator = FunctionOperator.IDENTITY - customerFeed.matchingFunction = customerMatchingFunction - - ' Create an operation to add the customer feed. - Dim customerFeedOperation As New CustomerFeedOperation() - customerFeedOperation.operand = customerFeed - customerFeedOperation.operator = [Operator].ADD - - ' After the completion of the Feed ADD operation above the added feed - ' will not be available for usage in a CustomerFeed until the sync - ' between the AdWords and GMB accounts completes. The loop below - ' will retry adding the CustomerFeed up to ten times with an - ' exponential back-off policy. - Dim addedCustomerFeed As CustomerFeed = Nothing - - Dim config As New AdWordsAppConfig() - config.RetryCount = 10 - - Dim errorHandler As New ErrorHandler(config) - Try - Do - Try - Dim customerFeedResult As CustomerFeedReturnValue = - customerFeedService.mutate( - New CustomerFeedOperation() _ - {customerFeedOperation}) - addedCustomerFeed = customerFeedResult.value(0) - - Console.WriteLine( - "Added CustomerFeed for feed ID {0} and placeholder type {1}", - addedCustomerFeed.feedId, addedCustomerFeed.placeholderTypes(0)) - Exit Do - Catch e As AdWordsApiException - Dim apiException As ApiException = CType(e.ApiException, ApiException) - For Each apiError As ApiError In apiException.errors - If TypeOf apiError Is CustomerFeedError Then - If (DirectCast(apiError, CustomerFeedError).reason = - CustomerFeedErrorReason. - MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE) Then - errorHandler.DoExponentialBackoff() - errorHandler.IncrementRetriedAttempts() - Else - Throw - End If - End If - Next - - End Try - Loop While (errorHandler.HaveMoreRetryAttemptsLeft()) - - ' OPTIONAL: Create a CampaignFeed to specify which FeedItems to use at - ' the Campaign level. This will be similar to the CampaignFeed in the - ' AddSiteLinks example, except you can also filter based on the - ' business name and category of each FeedItem by using a - ' FeedAttributeOperand in your matching function. - - ' OPTIONAL: Create an AdGroupFeed for even more fine grained control - ' over which feed items are used at the AdGroup level. - Catch e As Exception - Throw New System.ApplicationException("Failed to create customer feed.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Extensions/AddPrices.vb b/examples/AdWords/Vb/v201806/Extensions/AddPrices.vb deleted file mode 100755 index 0db2ec3e4d5..00000000000 --- a/examples/AdWords/Vb/v201806/Extensions/AddPrices.vb +++ /dev/null @@ -1,209 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports DayOfWeek = Google.Api.Ads.AdWords.v201806.DayOfWeek - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a price extension and associates it with an - ''' account. Campaign targeting is also set using the specified campaign ID. - ''' To get campaigns, run AddCampaigns.vb. - ''' - Public Class AddPrices - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddPrices - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds a price extension and associates it with an account. " & - "Campaign targeting is also set using the specified campaign ID. To get " & - "campaigns, run AddCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign with which sitelinks are associated. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using customerExtensionSettingService As CustomerExtensionSettingService = - DirectCast(user.GetService(AdWordsService.v201806.CustomerExtensionSettingService), - CustomerExtensionSettingService) - - ' [START createFeedItems] MOE:strip_line - ' Create the price extension feed item. - Dim priceFeedItem As New PriceFeedItem - priceFeedItem.priceExtensionType = PriceExtensionType.SERVICES - - ' Price qualifier is optional. - priceFeedItem.priceQualifier = PriceExtensionPriceQualifier.FROM - priceFeedItem.trackingUrlTemplate = "http://tracker.example.com/?u={lpurl}" - priceFeedItem.language = "en" - - priceFeedItem.campaignTargeting = New FeedItemCampaignTargeting() - priceFeedItem.campaignTargeting.TargetingCampaignId = campaignId - - Dim saturdaySchedule As New FeedItemSchedule - saturdaySchedule.dayOfWeek = DayOfWeek.SATURDAY - saturdaySchedule.startHour = 10 - saturdaySchedule.startMinute = MinuteOfHour.ZERO - saturdaySchedule.endHour = 22 - saturdaySchedule.endMinute = MinuteOfHour.ZERO - - Dim sundaySchedule As New FeedItemSchedule - sundaySchedule.dayOfWeek = DayOfWeek.SUNDAY - sundaySchedule.startHour = 10 - sundaySchedule.startMinute = MinuteOfHour.ZERO - sundaySchedule.endHour = 18 - sundaySchedule.endMinute = MinuteOfHour.ZERO - - priceFeedItem.scheduling = New FeedItemSchedule() {saturdaySchedule, sundaySchedule} - - ' To create a price extension, at least three table rows are needed. - Dim priceTableRows As New List(Of PriceTableRow) - - Dim currencyCode As String = "USD" - - priceTableRows.Add( - CreatePriceTableRow( - "Scrubs", - "Body Scrub, Salt Scrub", - "http://www.example.com/scrubs", - "http://m.example.com/scrubs", - 60000000, - currencyCode, - PriceExtensionPriceUnit.PER_HOUR)) - priceTableRows.Add( - CreatePriceTableRow( - "Hair Cuts", - "Once a month", - "http://www.example.com/haircuts", - "http://m.example.com/haircuts", - 75000000, - currencyCode, - PriceExtensionPriceUnit.PER_MONTH)) - priceTableRows.Add( - CreatePriceTableRow( - "Skin Care Package", - "Four times a month", - "http://www.example.com/skincarepackage", - Nothing, - 250000000, - currencyCode, - PriceExtensionPriceUnit.PER_MONTH)) - - priceFeedItem.tableRows = priceTableRows.ToArray() - - ' Create your campaign extension settings. This associates the sitelinks - ' to your campaign. - Dim customerExtensionSetting As New CustomerExtensionSetting - customerExtensionSetting.extensionType = FeedType.PRICE - customerExtensionSetting.extensionSetting = New ExtensionSetting - customerExtensionSetting.extensionSetting.extensions = - New ExtensionFeedItem() {priceFeedItem} - ' [END createFeedItems] MOE:strip_line - - Dim operation As New CustomerExtensionSettingOperation - operation.operand = customerExtensionSetting - operation.operator = [Operator].ADD - - Try - ' Add the extensions. - Dim retVal As CustomerExtensionSettingReturnValue = - customerExtensionSettingService.mutate( - New CustomerExtensionSettingOperation() {operation}) - If Not (retVal.value Is Nothing) AndAlso retVal.value.Length > 0 Then - Dim newExtensionSetting As CustomerExtensionSetting = retVal.value(0) - Console.WriteLine("Extension setting with type '{0}' was added.", - newExtensionSetting.extensionType) - Else - Console.WriteLine("No extension settings were created.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create extension settings.", e) - End Try - End Using - End Sub - - ' [START createPriceTableRow] MOE:strip_line - ''' - ''' Creates a price table row. - ''' - ''' The row header. - ''' The description text. - ''' The final URL. - ''' The mobile final URL, or null if this field - ''' should not be set. - ''' The price in micros. - ''' The currency code. - ''' The price unit. - ''' A price table row for creating price extension. - Private Shared Function CreatePriceTableRow(ByVal header As String, - ByVal description As String, - ByVal finalUrl As String, - ByVal finalMobileUrl As String, - ByVal priceInMicros As Long, - ByVal currencyCode As String, - ByVal priceUnit As PriceExtensionPriceUnit) _ - As PriceTableRow - - Dim retval As New PriceTableRow - retval.header = header - retval.description = description - retval.finalUrls = New UrlList() - retval.finalUrls.urls = New String() {finalUrl} - - Dim moneyWithCurrency As New MoneyWithCurrency - moneyWithCurrency.currencyCode = currencyCode - moneyWithCurrency.money = New Money - moneyWithCurrency.money.microAmount = priceInMicros - - retval.price = moneyWithCurrency - retval.priceUnit = priceUnit - - ' Optional: Set the mobile final URLs. - If Not String.IsNullOrEmpty(finalMobileUrl) Then - retval.finalMobileUrls = New UrlList() - retval.finalMobileUrls.urls = New String() {finalMobileUrl} - End If - - Return retval - End Function - ' [END createPriceTableRow] MOE:strip_line - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Extensions/AddSitelinks.vb b/examples/AdWords/Vb/v201806/Extensions/AddSitelinks.vb deleted file mode 100755 index 7962ac91258..00000000000 --- a/examples/AdWords/Vb/v201806/Extensions/AddSitelinks.vb +++ /dev/null @@ -1,215 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports DayOfWeek = Google.Api.Ads.AdWords.v201806.DayOfWeek - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds sitelinks to a campaign. To create a campaign, - ''' run AddCampaign.vb. - ''' - Public Class AddSitelinks - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddSitelinks - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds sitelinks to a campaign. To create a campaign, run " & - "AddCampaign.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign with which sitelinks are associated. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - ' [START createExtSetting] MOE:strip_line - Using campaignExtensionSettingService As CampaignExtensionSettingService = - DirectCast(user.GetService(AdWordsService.v201806.CampaignExtensionSettingService), - CampaignExtensionSettingService) - - Dim customerService As CustomerService = - DirectCast(user.GetService(AdWordsService.v201806.CustomerService), - CustomerService) - - ' Find the matching customer and its time zone. The getCustomers method - ' will return a single Customer object corresponding to the session's - ' clientCustomerId. - Dim customer As Customer = customerService.getCustomers()(0) - Console.WriteLine("Found customer ID {0:###-###-####} with time zone '{1}'.", - customer.customerId, customer.dateTimeZone) - - Dim extensions As New List(Of ExtensionFeedItem) - - ' Create your sitelinks. - Dim sitelink1 As New SitelinkFeedItem() - sitelink1.sitelinkText = "Store Hours" - sitelink1.sitelinkFinalUrls = New UrlList() - sitelink1.sitelinkFinalUrls.urls = New String() _ - {"http://www.example.com/storehours"} - extensions.Add(sitelink1) - - Dim startOfThanksGiving As New DateTime(DateTime.Now.Year, 11, 20, 0, 0, 0) - Dim endOfThanksGiving As New DateTime(DateTime.Now.Year, 11, 27, 23, 59, 59) - - ' Add check to make sure we don't create a sitelink with end date in the - ' past. - If DateTime.Now < endOfThanksGiving Then - ' Show the Thanksgiving specials link only from 20 - 27 Nov. - Dim sitelink2 As New SitelinkFeedItem() - sitelink2.sitelinkText = "Thanksgiving Specials" - sitelink2.sitelinkFinalUrls = New UrlList() - sitelink2.sitelinkFinalUrls.urls = New String() _ - {"http://www.example.com/thanksgiving"} - - sitelink2.startTime = String.Format("{0}1120 000000 {1}", DateTime.Now.Year, - customer.dateTimeZone) - sitelink2.endTime = String.Format("{0}1127 235959 {1}", DateTime.Now.Year, - customer.dateTimeZone) - - ' Target this sitelink for United States only. See - ' https://developers.google.com/adwords/api/docs/appendix/geotargeting - ' for valid geolocation codes. - sitelink2.geoTargeting = New Location() - sitelink2.geoTargeting.id = 2840 - - ' Restrict targeting only to people physically within the United States. - ' Otherwise, this could also show to people interested in the United States - ' but not physically located there. - Dim geoTargetingRestriction As New FeedItemGeoRestriction() - geoTargetingRestriction.geoRestriction = GeoRestriction.LOCATION_OF_PRESENCE - sitelink2.geoTargetingRestriction = geoTargetingRestriction - - extensions.Add(sitelink2) - End If - - ' Show the wifi details primarily for high end mobile users. - Dim sitelink3 As New SitelinkFeedItem() - sitelink3.sitelinkText = "Wifi available" - sitelink3.sitelinkFinalUrls = New UrlList() - sitelink3.sitelinkFinalUrls.urls = New String() _ - {"http://www.example.com/mobile/wifi"} - sitelink3.devicePreference = New FeedItemDevicePreference() - sitelink3.devicePreference.devicePreference = 30001 - extensions.Add(sitelink3) - - ' Show the happy hours link only during Mon - Fri 6PM to 9PM. - Dim sitelink4 As New SitelinkFeedItem() - sitelink4.sitelinkText = "Happy hours" - sitelink4.sitelinkFinalUrls = New UrlList() - sitelink4.sitelinkFinalUrls.urls = New String() _ - {"http://www.example.com/happyhours"} - extensions.Add(sitelink4) - - Dim schedule1 As New FeedItemSchedule() - schedule1.dayOfWeek = DayOfWeek.MONDAY - schedule1.startHour = 18 - schedule1.startMinute = MinuteOfHour.ZERO - schedule1.endHour = 21 - schedule1.endMinute = MinuteOfHour.ZERO - - Dim schedule2 As New FeedItemSchedule() - schedule2.dayOfWeek = DayOfWeek.TUESDAY - schedule2.startHour = 18 - schedule2.startMinute = MinuteOfHour.ZERO - schedule2.endHour = 21 - schedule2.endMinute = MinuteOfHour.ZERO - - Dim schedule3 As New FeedItemSchedule() - schedule3.dayOfWeek = DayOfWeek.WEDNESDAY - schedule3.startHour = 18 - schedule3.startMinute = MinuteOfHour.ZERO - schedule3.endHour = 21 - schedule3.endMinute = MinuteOfHour.ZERO - - Dim schedule4 As New FeedItemSchedule() - schedule4.dayOfWeek = DayOfWeek.THURSDAY - schedule4.startHour = 18 - schedule4.startMinute = MinuteOfHour.ZERO - schedule4.endHour = 21 - schedule4.endMinute = MinuteOfHour.ZERO - - Dim schedule5 As New FeedItemSchedule() - schedule5.dayOfWeek = DayOfWeek.FRIDAY - schedule5.startHour = 18 - schedule5.startMinute = MinuteOfHour.ZERO - schedule5.endHour = 21 - schedule5.endMinute = MinuteOfHour.ZERO - - sitelink4.scheduling = New FeedItemSchedule() { _ - schedule1, schedule2, schedule3, - schedule4, schedule5 - } - - ' Create your campaign extension settings. This associates the sitelinks - ' to your campaign. - Dim campaignExtensionSetting As New CampaignExtensionSetting() - campaignExtensionSetting.campaignId = campaignId - campaignExtensionSetting.extensionType = FeedType.SITELINK - campaignExtensionSetting.extensionSetting = New ExtensionSetting() - campaignExtensionSetting.extensionSetting.extensions = extensions.ToArray - - Dim extensionOperation As New CampaignExtensionSettingOperation() - extensionOperation.operand = campaignExtensionSetting - extensionOperation.operator = [Operator].ADD - - Try - ' Add the extensions. - Dim retVal As CampaignExtensionSettingReturnValue = - campaignExtensionSettingService.mutate( - New CampaignExtensionSettingOperation() _ - {extensionOperation}) - - ' Display the results. - If Not (retVal.value Is Nothing) AndAlso retVal.value.Length > 0 Then - Dim newExtensionSetting As CampaignExtensionSetting = retVal.value(0) - Console.WriteLine( - "Extension setting with type = {0} was added to campaign ID {1}.", - newExtensionSetting.extensionType, newExtensionSetting.campaignId) - Else - Console.WriteLine("No extension settings were created.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to create extension settings.", e) - End Try - End Using - ' [END createExtSetting] MOE:strip_line - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Extensions/AddSitelinksUsingFeeds.vb b/examples/AdWords/Vb/v201806/Extensions/AddSitelinksUsingFeeds.vb deleted file mode 100755 index 6ebc5575682..00000000000 --- a/examples/AdWords/Vb/v201806/Extensions/AddSitelinksUsingFeeds.vb +++ /dev/null @@ -1,506 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' Holds data about sitelinks in a feed. - ''' - Public Class SitelinksDataHolder - Dim feedIdField As Long - Dim feedItemIdsField As New List(Of Long) - - Dim linkTextFeedAttributeIdField As Long - Dim linkFinalUrlFeedAttributeIdField As Long - Dim line2FeedAttributeIdField As Long - Dim line3FeedAttributeIdField As Long - - ''' - ''' Gets or sets the feed ID. - ''' - Public Property FeedId As Long - Get - Return feedIdField - End Get - Set(ByVal value As Long) - feedIdField = value - End Set - End Property - - ''' - ''' Gets the sitelink feed item IDs. - ''' - Public ReadOnly Property FeedItemIds As List(Of Long) - Get - Return feedItemIdsField - End Get - End Property - - ''' - ''' Gets or sets the link text feed attribute ID. - ''' - Public Property LinkTextFeedAttributeId As Long - Get - Return linkTextFeedAttributeIdField - End Get - Set(ByVal value As Long) - linkTextFeedAttributeIdField = value - End Set - End Property - - ''' - ''' Gets or sets the link URL feed attribute ID. - ''' - Public Property LinkFinalUrlFeedAttributeId As Long - Get - Return linkFinalUrlFeedAttributeIdField - End Get - Set(ByVal value As Long) - linkFinalUrlFeedAttributeIdField = value - End Set - End Property - - ''' - ''' Gets or sets the line 2 feed attribute ID. - ''' - Public Property Line2FeedAttributeId As Long - Get - Return line2FeedAttributeIdField - End Get - Set(ByVal value As Long) - line2FeedAttributeIdField = value - End Set - End Property - - ''' - ''' Gets or sets the line 3 feed attribute ID. - ''' - Public Property Line3FeedAttributeId As Long - Get - Return line3FeedAttributeIdField - End Get - Set(ByVal value As Long) - line3FeedAttributeIdField = value - End Set - End Property - End Class - - ''' - ''' This code example adds a sitelinks feed and associates it with a campaign. - ''' To create a campaign, run AddCampaign.cs. - ''' - Public Class AddSitelinksUsingFeeds - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddSitelinksUsingFeeds - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim feedName As String = "INSERT_FEED_NAME_HERE" - codeExample.Run(New AdWordsUser, campaignId, feedName, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a sitelinks feed and associates it with a campaign." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign with which sitelinks are associated. - ''' - ''' Id of the adgroup to restrict targeting to. - ''' Name of the feed. - Public Sub Run(ByVal user As AdWordsUser, - ByVal campaignId As Long, - ByVal feedName As String, - ByVal adGroupId As Long?) - Dim siteLinksData As New SitelinksDataHolder - CreateSitelinksFeed(user, siteLinksData, feedName) - CreateSitelinksFeedItems(user, siteLinksData) - CreateSitelinksFeedMapping(user, siteLinksData) - CreateSitelinksCampaignFeed(user, siteLinksData, campaignId) - RestrictFeedItemToAdGroup(user, siteLinksData, adGroupId) - End Sub - - Private Sub RestrictFeedItemToAdGroup(user As AdWordsUser, - siteLinksData As SitelinksDataHolder, - adGroupId As Long?) - - Dim adGroupTarget As New FeedItemAdGroupTarget() - adGroupTarget.feedId = siteLinksData.FeedId - adGroupTarget.feedItemId = siteLinksData.FeedItemIds(0) - adGroupTarget.adGroupId = adGroupId.Value - - Using feedItemTargetService As FeedItemTargetService = CType( - user.GetService( - AdWordsService.v201806.FeedItemTargetService), - FeedItemTargetService) - Dim operation As New FeedItemTargetOperation() - operation.operator = [Operator].ADD - operation.operand = adGroupTarget - - Dim retval As FeedItemTargetReturnValue = feedItemTargetService.mutate( - New FeedItemTargetOperation() {operation}) - Dim newAdGroupTarget As FeedItemAdGroupTarget = - CType(retval.value(0), FeedItemAdGroupTarget) - Console.WriteLine("Feed item target for feed ID {0} and feed item ID {1}" + - " was created to restrict serving to ad group ID {2}", - newAdGroupTarget.feedId, newAdGroupTarget.feedItemId, - newAdGroupTarget.adGroupId) - End Using - End Sub - - Private Shared Sub RestrictFeedItemToGeoTarget(ByVal user As AdWordsUser, - ByVal feedItem As FeedItem, - ByVal locationId As Long) - ' Optional: Restrict the first feed item to only serve with ads for the - ' specified geo target. - Dim criterionTarget As New FeedItemCriterionTarget() - criterionTarget.feedId = feedItem.feedId - criterionTarget.feedItemId = feedItem.feedItemId - ' The IDs can be found in the documentation or retrieved with the - ' LocationCriterionService. - Dim location As New Location() - location.id = locationId - criterionTarget.criterion = location - - Using feedItemTargetService As FeedItemTargetService = CType( - user.GetService( - AdWordsService.v201806.FeedItemTargetService), - FeedItemTargetService) - Dim operation As New FeedItemTargetOperation() - operation.operator = [Operator].ADD - operation.operand = criterionTarget - - Dim retval As FeedItemTargetReturnValue = feedItemTargetService.mutate( - New FeedItemTargetOperation() {operation}) - Dim newLocationTarget As FeedItemCriterionTarget = CType(retval.value(0), - FeedItemCriterionTarget) - Console.WriteLine("Feed item target for feed ID {0} and feed item ID {1}" & - " was created to restrict serving to location ID {2}", - newLocationTarget.feedId, newLocationTarget.feedItemId, - newLocationTarget.criterion.id) - End Using - End Sub - - Private Sub CreateSitelinksFeed( - ByVal user As AdWordsUser, - ByVal sitelinksData As SitelinksDataHolder, - ByVal feedName As String) - Using feedService As FeedService = CType( - user.GetService( - AdWordsService.v201806.FeedService), - FeedService) - - ' Create attributes. - Dim textAttribute As New FeedAttribute - textAttribute.type = FeedAttributeType.STRING - textAttribute.name = "Link Text" - - Dim finalUrlAttribute As New FeedAttribute - finalUrlAttribute.type = FeedAttributeType.URL_LIST - finalUrlAttribute.name = "Link Final URLs" - - Dim line2Attribute As New FeedAttribute - line2Attribute.type = FeedAttributeType.STRING - line2Attribute.name = "Line 2" - - Dim line3Attribute As New FeedAttribute - line3Attribute.type = FeedAttributeType.STRING - line3Attribute.name = "Line 3" - - ' Create the feed. - Dim sitelinksFeed As New Feed - sitelinksFeed.name = feedName - sitelinksFeed.attributes = New FeedAttribute() { _ - textAttribute, finalUrlAttribute, - line2Attribute, line3Attribute} - sitelinksFeed.origin = FeedOrigin.USER - - ' Create operation. - Dim operation As New FeedOperation - operation.operand = sitelinksFeed - operation.operator = [Operator].ADD - - ' Add the feed. - Dim result As FeedReturnValue = feedService.mutate(New FeedOperation() {operation}) - - Dim savedFeed As Feed = result.value(0) - - sitelinksData.FeedId = savedFeed.id - - Dim savedAttributes As FeedAttribute() = savedFeed.attributes - sitelinksData.LinkTextFeedAttributeId = savedAttributes(0).id - sitelinksData.LinkFinalUrlFeedAttributeId = savedAttributes(1).id - sitelinksData.Line2FeedAttributeId = savedAttributes(2).id - sitelinksData.Line3FeedAttributeId = savedAttributes(3).id - - Console.WriteLine("Feed with name {0}, ID {1} with linkTextAttributeId {2}, " & - "linkFinalUrlAttributeId {3}, line2AttributeId {4}, " & - "line3AttributeId {5} was created.", - savedFeed.name, savedFeed.id, savedAttributes(0).id, - savedAttributes(1).id, - savedAttributes(2).id, savedAttributes(3).id) - End Using - End Sub - - Private Sub CreateSitelinksFeedItems( - ByVal user As AdWordsUser, - ByVal sitelinksData As SitelinksDataHolder) - Using feedItemService As FeedItemService = CType( - user.GetService( - AdWordsService.v201806.FeedItemService), - FeedItemService) - - ' Create operations to add FeedItems. - Dim home As FeedItemOperation = - NewSitelinkFeedItemAddOperation(sitelinksData, - "Home", - "http://www.example.com", - "Home line 2", - "Home line 3") - Dim stores As FeedItemOperation = - NewSitelinkFeedItemAddOperation(sitelinksData, - "Stores", - "http://www.example.com/stores", - "Stores line 2", - "Stores line 3") - Dim onSale As FeedItemOperation = - NewSitelinkFeedItemAddOperation(sitelinksData, - "On Sale", - "http://www.example.com/sale", - "On Sale line 2", - "On sale line 3") - Dim support As FeedItemOperation = - NewSitelinkFeedItemAddOperation(sitelinksData, - "Support", - "http://www.example.com/support", - "Support line 2", - "Support line 3") - Dim products As FeedItemOperation = - NewSitelinkFeedItemAddOperation(sitelinksData, - "Products", - "http://www.example.com/prods", - "Products line 2", - "Products line 3") - - ' This site link is using geographical targeting to use LOCATION_OF_PRESENCE. - Dim aboutUs As FeedItemOperation = - NewSitelinkFeedItemAddOperation(sitelinksData, - "About Us", - "http://www.example.com/about", - "About Us line 2", - "About Us line 3", - True) - - Dim operations As FeedItemOperation() = - New FeedItemOperation() {home, stores, onSale, support, products, aboutUs} - - Dim result As FeedItemReturnValue = feedItemService.mutate(operations) - - For Each item As FeedItem In result.value - Console.WriteLine("FeedItem with feedItemId {0} was added.", item.feedItemId) - sitelinksData.FeedItemIds.Add(item.feedItemId) - Next - - ' Target the "aboutUs" sitelink to geographically target California. - RestrictFeedItemToGeoTarget(user, result.value(5), 21137) - - End Using - End Sub - - ' See the Placeholder reference page for a list of all the placeholder types and fields. - ' https://developers.google.com/adwords/api/docs/appendix/placeholders.html - Private Const PLACEHOLDER_SITELINKS As Integer = 1 - - ' See the Placeholder reference page for a list of all the placeholder types and fields. - Private Const PLACEHOLDER_FIELD_SITELINK_LINK_TEXT As Integer = 1 - - Private Const PLACEHOLDER_FIELD_SITELINK_FINAL_URL As Integer = 5 - Private Const PLACEHOLDER_FIELD_SITELINK_LINE_2_TEXT As Integer = 3 - Private Const PLACEHOLDER_FIELD_SITELINK_LINE_3_TEXT As Integer = 4 - - Private Sub CreateSitelinksFeedMapping( - ByVal user As AdWordsUser, - ByVal sitelinksData As SitelinksDataHolder) - Using feedMappingService As FeedMappingService = CType( - user.GetService( - AdWordsService.v201806.FeedMappingService), - FeedMappingService) - - ' Map the FeedAttributeIds to the fieldId constants. - Dim linkTextFieldMapping As New AttributeFieldMapping - linkTextFieldMapping.feedAttributeId = sitelinksData.LinkTextFeedAttributeId - linkTextFieldMapping.fieldId = PLACEHOLDER_FIELD_SITELINK_LINK_TEXT - - Dim linkFinalUrlFieldMapping As New AttributeFieldMapping - linkFinalUrlFieldMapping.feedAttributeId = sitelinksData.LinkFinalUrlFeedAttributeId - linkFinalUrlFieldMapping.fieldId = PLACEHOLDER_FIELD_SITELINK_FINAL_URL - - Dim line2FieldMapping As New AttributeFieldMapping - line2FieldMapping.feedAttributeId = sitelinksData.Line2FeedAttributeId - line2FieldMapping.fieldId = PLACEHOLDER_FIELD_SITELINK_LINE_2_TEXT - - Dim line3FieldMapping As New AttributeFieldMapping - line3FieldMapping.feedAttributeId = sitelinksData.Line3FeedAttributeId - line3FieldMapping.fieldId = PLACEHOLDER_FIELD_SITELINK_LINE_3_TEXT - - ' Create the FieldMapping and operation. - Dim feedMapping As New FeedMapping - feedMapping.placeholderType = PLACEHOLDER_SITELINKS - feedMapping.feedId = sitelinksData.FeedId - feedMapping.attributeFieldMappings = - New AttributeFieldMapping() { _ - linkTextFieldMapping, - linkFinalUrlFieldMapping, - line2FieldMapping, - line3FieldMapping} - - Dim operation As New FeedMappingOperation - operation.operand = feedMapping - operation.operator = [Operator].ADD - - ' Save the field mapping. - Dim result As FeedMappingReturnValue = - feedMappingService.mutate(New FeedMappingOperation() {operation}) - - For Each savedFeedMapping As FeedMapping In result.value - Console.WriteLine( - "Feed mapping with ID {0} and placeholderType {1} was saved for " & - "feed with ID {2}.", savedFeedMapping.feedMappingId, - savedFeedMapping.placeholderType, - savedFeedMapping.feedId) - Next - End Using - End Sub - - Private Sub CreateSitelinksCampaignFeed(ByVal user As AdWordsUser, - ByVal sitelinksData As SitelinksDataHolder, - ByVal campaignId As Long) - Using campaignFeedService As CampaignFeedService = CType( - user.GetService( - AdWordsService.v201806.CampaignFeedService), - CampaignFeedService) - - ' Construct a matching function that associates the sitelink feeditems to - ' the campaign, and set the device preference to Mobile. See the matching - ' function guide at - ' https://developers.google.com/adwords/api/docs/guides/feed-matching-functions - ' for more details. - Dim matchingFunctionString As String = String.Format( - "AND(" & - " IN(FEED_ITEM_ID, {{{0}}})," & - " EQUALS(CONTEXT.DEVICE, 'Mobile')" & - ")", - String.Join(",", sitelinksData.FeedItemIds)) - - Dim campaignFeed As New CampaignFeed() - campaignFeed.feedId = sitelinksData.FeedId - campaignFeed.campaignId = campaignId - campaignFeed.matchingFunction = New [Function]() - campaignFeed.matchingFunction.functionString = matchingFunctionString - - ' Specifying placeholder types on the CampaignFeed allows the same feed - ' to be used for different placeholders in different Campaigns. - campaignFeed.placeholderTypes = New Integer() {PLACEHOLDER_SITELINKS} - - Dim operation As New CampaignFeedOperation - operation.operand = campaignFeed - operation.operator = [Operator].ADD - - Dim result As CampaignFeedReturnValue = - campaignFeedService.mutate(New CampaignFeedOperation() {operation}) - - For Each savedCampaignFeed As CampaignFeed In result.value - Console.WriteLine("Campaign with ID {0} was associated with feed with ID {1}", - savedCampaignFeed.campaignId, savedCampaignFeed.feedId) - Next - End Using - End Sub - - Function NewSitelinkFeedItemAddOperation(ByVal sitelinksData As SitelinksDataHolder, - ByVal text As String, ByVal finalUrl As String, - ByVal line2 As String, - ByVal line3 As String) As FeedItemOperation - Return _ - NewSitelinkFeedItemAddOperation(sitelinksData, text, finalUrl, line2, line3, False) - End Function - - Function NewSitelinkFeedItemAddOperation(ByVal sitelinksData As SitelinksDataHolder, - ByVal text As String, - ByVal finalUrl As String, - ByVal line2 As String, - ByVal line3 As String, - ByVal targetLop As Boolean) _ - As FeedItemOperation - ' Create the FeedItemAttributeValues for our text values. - Dim linkTextAttributeValue As New FeedItemAttributeValue - linkTextAttributeValue.feedAttributeId = sitelinksData.LinkTextFeedAttributeId - linkTextAttributeValue.stringValue = text - - Dim linkFinalUrlAttributeValue As New FeedItemAttributeValue - linkFinalUrlAttributeValue.feedAttributeId = sitelinksData.LinkFinalUrlFeedAttributeId - linkFinalUrlAttributeValue.stringValues = New String() {finalUrl} - - Dim line2AttributeValue As New FeedItemAttributeValue - line2AttributeValue.feedAttributeId = sitelinksData.Line2FeedAttributeId - line2AttributeValue.stringValue = line2 - - Dim line3AttributeValue As New FeedItemAttributeValue - line3AttributeValue.feedAttributeId = sitelinksData.Line3FeedAttributeId - line3AttributeValue.stringValue = line3 - - ' Create the feed item and operation. - Dim item As New FeedItem - item.feedId = sitelinksData.FeedId - - ' OPTIONAL: Restrict targeting only to people physically within the location. - If targetLop Then - Dim geoTargetingRestriction As New FeedItemGeoRestriction() - geoTargetingRestriction.geoRestriction = GeoRestriction.LOCATION_OF_PRESENCE - item.geoTargetingRestriction = geoTargetingRestriction - End If - - item.attributeValues = New FeedItemAttributeValue() { _ - linkTextAttributeValue, - linkFinalUrlAttributeValue, - line2AttributeValue, - line3AttributeValue} - - Dim operation As New FeedItemOperation - operation.operand = item - operation.operator = [Operator].ADD - Return operation - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Migration/MigrateToExtensionSettings.vb b/examples/AdWords/Vb/v201806/Migration/MigrateToExtensionSettings.vb deleted file mode 100755 index 7aa562e2464..00000000000 --- a/examples/AdWords/Vb/v201806/Migration/MigrateToExtensionSettings.vb +++ /dev/null @@ -1,693 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example migrates your feed based sitelinks at campaign level to - ''' use extension settings. To learn more about extensionsettings, see - ''' https://developers.google.com/adwords/api/docs/guides/extension-settings. - ''' To learn more about migrating Feed based extensions to extension - ''' settings, see - ''' https://developers.google.com/adwords/api/docs/guides/migrate-to-extension-settings. - ''' - ''' This code example doesn't migrate scheduling or feeditem-level campaign, adgroup, - ''' keyword, Or geo targeting settings. - Public Class MigrateToExtensionSettings - Inherits ExampleBase - - ''' - ''' The placeholder type for sitelinks. See - ''' https://developers.google.com/adwords/api/docs/appendix/placeholders for - ''' the list of all supported placeholder types. - ''' - Private Const PLACEHOLDER_TYPE_SITELINKS As Integer = 1 - - ' [START defineSitelinkConstants] MOE:strip_line - ''' - ''' Holds the placeholder field IDs for sitelinks. See - ''' https://developers.google.com/adwords/api/docs/appendix/placeholders for - ''' the list of all supported placeholder types. - ''' - Private Class SiteLinkFields - Public Const TEXT As Long = 1 - Public Const URL As Long = 2 - Public Const LINE2 As Long = 3 - Public Const LINE3 As Long = 4 - Public Const FINAL_URLS As Long = 5 - Public Const FINAL_MOBILE_URLS As Long = 6 - Public Const TRACKING_URL_TEMPLATE As Long = 7 - End Class - ' [END defineSitelinkConstants] MOE:strip_line - - ' [START defineSitelinkHolder] MOE:strip_line - ''' - ''' A sitelink object read from a feed. - ''' - Private Class SiteLinkFromFeed - ''' - ''' The feed ID. - ''' - Private feedIdField As Long - - ''' - ''' The feed item ID. - ''' - Private feedItemIdField As Long - - ''' - ''' The sitelink text. - ''' - Private textField As String - - ''' - ''' The sitelink URL. - ''' - Private urlField As String - - ''' - ''' The sitelink final URLs. - ''' - Private finalUrlsField As String() - - ''' - ''' The sitelink final Mobile URLs. - ''' - Private finalMobileUrlsField As String() - - ''' - ''' The sitelink tracking URL template. - ''' - Private trackingUrlTemplateField As String - - ''' - ''' The sitelink line2 details. - ''' - Private line2Field As String - - ''' - ''' The sitelink line3 details. - ''' - Private line3Field As String - - ''' - ''' Gets or sets the feed ID. - ''' - Public Property FeedId As Long - Get - Return feedIdField - End Get - Set(ByVal value As Long) - feedIdField = value - End Set - End Property - - ''' - ''' Gets or sets the feed item ID. - ''' - Public Property FeedItemId As Long - Get - Return feedItemIdField - End Get - Set(ByVal value As Long) - feedItemIdField = value - End Set - End Property - - ''' - ''' Gets or sets the sitelink text. - ''' - Public Property Text As String - Get - Return textField - End Get - Set(ByVal value As String) - textField = value - End Set - End Property - - ''' - ''' Gets or sets the sitelink URL. - ''' - Public Property Url As String - Get - Return urlField - End Get - Set(ByVal value As String) - urlField = value - End Set - End Property - - ''' - ''' Gets or sets the sitelink final URLs. - ''' - Public Property FinalUrls As String() - Get - Return finalUrlsField - End Get - Set(ByVal value As String()) - finalUrlsField = value - End Set - End Property - - ''' - ''' Gets or sets the sitelink final Mobile URLs. - ''' - Public Property FinalMobileUrls As String() - Get - Return finalMobileUrlsField - End Get - Set(ByVal value As String()) - finalMobileUrlsField = value - End Set - End Property - - ''' - ''' Gets or sets the tracking URL template. - ''' - Public Property TrackingUrlTemplate As String - Get - Return trackingUrlTemplateField - End Get - Set(ByVal value As String) - trackingUrlTemplateField = value - End Set - End Property - - ''' - ''' Gets or sets the sitelink line2 details. - ''' - Public Property Line2 As String - Get - Return line2Field - End Get - Set(ByVal value As String) - line2Field = value - End Set - End Property - - ''' - ''' Gets or sets the sitelink line3 details. - ''' - Public Property Line3 As String - Get - Return line3Field - End Get - Set(ByVal value As String) - line3Field = value - End Set - End Property - End Class - ' [END defineSitelinkHolder] MOE:strip_line - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New MigrateToExtensionSettings - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example migrates your feed based sitelinks at campaign level to " & - "use extension settings. To learn more about extensionsettings, see " & - "https://developers.google.com/adwords/api/docs/guides/extension-settings. To " & - "learn more about migrating Feed based extensions to extension settings, see " & - "https://developers.google.com/adwords/api/docs/guides/migrate-to-extension-settings." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' [START mainLoop] MOE:strip_line - ' Get all the feeds from the user account. - Dim feeds As Feed() = GetFeeds(user) - - For Each feed As Feed In feeds - ' Retrieve all the sitelinks from the current feed. - Dim feedItems As Dictionary(Of Long, SiteLinkFromFeed) = GetSiteLinksFromFeed(user, - feed. - id) - - ' Get all the instances where a sitelink from this feed has been added - ' to a campaign. - Dim campaignFeeds As CampaignFeed() = GetCampaignFeeds(user, feed, - PLACEHOLDER_TYPE_SITELINKS) - - If Not campaignFeeds Is Nothing Then - Dim allFeedItemsToDelete As New HashSet(Of Long)() - - For Each campaignFeed As CampaignFeed In campaignFeeds - ' Retrieve the sitelinks that have been associated with this - ' campaign. - Dim feedItemIds As List(Of Long) = GetFeedItemsForCampaign(campaignFeed) - Dim platformRestrictions As ExtensionSettingPlatform = - GetPlatformRestrictionsForCampaign(campaignFeed) - - If feedItemIds.Count = 0 Then - Console.WriteLine( - "Migration skipped for campaign feed with campaign ID {0} " & - "and feed ID {1} because no mapped feed item IDs were found in the campaign " & - "feed's matching function.", campaignFeed.campaignId, - campaignFeed.feedId) - Else - ' Delete the campaign feed that associates the sitelinks from the - ' feed to the campaign. - DeleteCampaignFeed(user, campaignFeed) - - ' Create extension settings instead of sitelinks. - CreateExtensionSetting(user, feedItems, campaignFeed.campaignId, - feedItemIds, - platformRestrictions) - - ' Mark the sitelinks from the feed for deletion. - allFeedItemsToDelete.UnionWith(feedItemIds) - End If - Next - ' Delete all the sitelinks from the feed. - DeleteOldFeedItems(user, New List(Of Long)(allFeedItemsToDelete), feed.id) - End If - Next - ' [END mainLoop] MOE:strip_line - End Sub - - ' [START getSitelinksFromFeed] MOE:strip_line - ''' - ''' Gets the site links from a feed. - ''' - ''' The user that owns the feed. - ''' The feed ID. - ''' A dictionary of sitelinks from the feed, with key as the feed - ''' item ID, and value as the sitelink. - Private Function GetSiteLinksFromFeed(ByVal user As AdWordsUser, ByVal feedId As Long) As _ - Dictionary(Of Long, SiteLinkFromFeed) - Dim siteLinks As New Dictionary(Of Long, SiteLinkFromFeed)() - - ' Retrieve all the feed items from the feed. - Dim feedItems As FeedItem() = GetFeedItems(user, feedId) - - ' Retrieve the feed's attribute mapping. - Dim feedMappings As Dictionary(Of Long, HashSet(Of Long)) = GetFeedMapping(user, feedId, - PLACEHOLDER_TYPE_SITELINKS) - - If Not feedItems Is Nothing Then - For Each feedItem As FeedItem In feedItems - Dim sitelinkFromFeed As New SiteLinkFromFeed() - sitelinkFromFeed.FeedId = feedItem.feedId - sitelinkFromFeed.FeedItemId = feedItem.feedItemId - - For Each attributeValue As FeedItemAttributeValue In feedItem.attributeValues - ' This attribute hasn't been mapped to a field. - If Not feedMappings.ContainsKey(attributeValue.feedAttributeId) Then - Continue For - End If - ' Get the list of all the fields to which this attribute has been mapped. - For Each fieldId As Long In feedMappings(attributeValue.feedAttributeId) - ' Read the appropriate value depending on the ID of the mapped - ' field. - Select Case fieldId - Case SiteLinkFields.TEXT - sitelinkFromFeed.Text = attributeValue.stringValue - - Case SiteLinkFields.URL - sitelinkFromFeed.Url = attributeValue.stringValue - - Case SiteLinkFields.FINAL_URLS - sitelinkFromFeed.FinalUrls = attributeValue.stringValues - - Case SiteLinkFields.FINAL_MOBILE_URLS - sitelinkFromFeed.FinalMobileUrls = attributeValue.stringValues - - Case SiteLinkFields.TRACKING_URL_TEMPLATE - sitelinkFromFeed.TrackingUrlTemplate = - attributeValue.stringValue - - Case SiteLinkFields.LINE2 - sitelinkFromFeed.Line2 = attributeValue.stringValue - - Case SiteLinkFields.LINE3 - sitelinkFromFeed.Line3 = attributeValue.stringValue - End Select - Next - Next - siteLinks.Add(feedItem.feedItemId, sitelinkFromFeed) - Next - End If - Return siteLinks - End Function - ' [END getSitelinksFromFeed] MOE:strip_line - - ' [START getFeedMapping] MOE:strip_line - ''' - ''' Gets the feed mapping for a feed. - ''' - ''' The user that owns the feed. - ''' The feed ID. - ''' Type of the place holder for which feed - ''' mappings should be retrieved. - ''' A dictionary, with key as the feed attribute ID, and value as - ''' the set of all fields which the attribute has a mapping to. - Private Function GetFeedMapping(ByVal user As AdWordsUser, ByVal feedId As Long, - ByVal placeHolderType As Long) _ - As Dictionary(Of Long, HashSet(Of Long)) - Using feedMappingService As FeedMappingService = DirectCast( - user.GetService( - AdWordsService.v201806.FeedMappingService), - FeedMappingService) - Dim page As FeedMappingPage = feedMappingService.query( - String.Format( - "SELECT FeedMappingId, AttributeFieldMappings where FeedId='{0}' and " & - "PlaceholderType={1} and Status='ENABLED'", feedId, placeHolderType)) - - Dim attributeMappings As New Dictionary(Of Long, HashSet(Of Long))() - - If Not (page.entries Is Nothing) Then - ' Normally, a feed attribute is mapped only to one field. However, - ' you may map it to more than one field if needed. - For Each feedMapping As FeedMapping In page.entries - For Each attributeMapping As AttributeFieldMapping In _ - feedMapping.attributeFieldMappings - If Not attributeMappings.ContainsKey(attributeMapping.feedAttributeId) _ - Then - attributeMappings(attributeMapping.feedAttributeId) = - New HashSet(Of Long)() - End If - attributeMappings(attributeMapping.feedAttributeId).Add( - attributeMapping.fieldId) - Next - Next - End If - Return attributeMappings - End Using - End Function - ' [END getFeedMapping] MOE:strip_line - - ''' - ''' Gets the feeds. - ''' - ''' The user for which feeds are retrieved. - ''' The list of feeds. - Private Function GetFeeds(ByVal user As AdWordsUser) As Feed() - ' TODO(b/67949201): This needs to handle paging - ' [START getFeeds] MOE:strip_line - Using feedService As FeedService = DirectCast( - user.GetService( - AdWordsService.v201806.FeedService), - FeedService) - Dim page As FeedPage = feedService.query("SELECT Id, Name, Attributes where " & - "Origin='USER' and FeedStatus='ENABLED'") - Return page.entries - End Using - ' [END getFeeds] MOE:strip_line - End Function - - ''' - ''' Gets the feed items in a feed. - ''' - ''' The user that owns the feed. - ''' The feed ID. - ''' The list of feed items in the feed. - Private Function GetFeedItems(ByVal user As AdWordsUser, ByVal feedId As Long) As FeedItem() - ' TODO(b/67949201): This needs to handle paging - ' [START getFeedItems] MOE:strip_line] - Using FeedItemService As FeedItemService = DirectCast( - user.GetService( - AdWordsService.v201806.FeedItemService), - FeedItemService) - Dim page As FeedItemPage = - FeedItemService.query(String.Format("Select FeedItemId, " & - "AttributeValues where Status = 'ENABLED' and FeedId = '{0}'", - feedId)) - Return page.entries - End Using - ' [END getFeedItems] MOE:strip_line - End Function - - ' [START deleteOldFeedItems] MOE:strip_line - ''' - ''' Deletes the old feed items for which extension settings have been - ''' created. - ''' - ''' The user that owns the feed items. - ''' IDs of the feed items to be removed. - ''' ID of the feed that holds the feed items. - Private Sub DeleteOldFeedItems(ByVal user As AdWordsUser, ByVal feedItemIds As List(Of Long), - ByVal feedId As Long) - If feedItemIds.Count = 0 Then - Return - End If - Dim operations As New List(Of FeedItemOperation)() - For Each feedItemId As Long In feedItemIds - Dim operation As New FeedItemOperation() - operation.operator = [Operator].REMOVE - - operation.operand = New FeedItem() - operation.operand.feedItemId = feedItemId - operation.operand.feedId = feedId - - operations.Add(operation) - Next - Using feedItemService As FeedItemService = DirectCast( - user.GetService( - AdWordsService.v201806.FeedItemService), - FeedItemService) - feedItemService.mutate(operations.ToArray()) - Return - End Using - End Sub - ' [END deleteOldFeedItems] MOE:strip_line - - ' [START createExtensionSetting] MOE:strip_line - ''' - ''' Creates the extension setting fo a list of feed items. - ''' - ''' The user for which extension settings are created. - ''' - ''' The list of all feed items. - ''' ID of the campaign to which extension settings - ''' are added. - ''' IDs of the feed items for which extension - ''' settings should be created. - ''' The platform restrictions for the - ''' extension setting. - Private Sub CreateExtensionSetting(ByVal user As AdWordsUser, ByVal feedItems As _ - Dictionary(Of Long, SiteLinkFromFeed), - ByVal campaignId As Long, - ByVal feedItemIds As List(Of Long), - ByVal platformRestrictions As ExtensionSettingPlatform) - Dim extensionSetting As New CampaignExtensionSetting() - extensionSetting.campaignId = campaignId - extensionSetting.extensionType = FeedType.SITELINK - extensionSetting.extensionSetting = New ExtensionSetting() - - Dim extensionFeedItems As New List(Of ExtensionFeedItem)() - - For Each feedItemId As Long In feedItemIds - Dim feedItem As SiteLinkFromFeed = feedItems(feedItemId) - - Dim newFeedItem As New SitelinkFeedItem() - newFeedItem.sitelinkText = feedItem.Text - newFeedItem.sitelinkUrl = feedItem.Url - newFeedItem.sitelinkFinalUrls = New UrlList() - newFeedItem.sitelinkFinalUrls.urls = feedItem.FinalUrls - newFeedItem.sitelinkFinalMobileUrls = New UrlList() - newFeedItem.sitelinkFinalMobileUrls.urls = feedItem.FinalMobileUrls - newFeedItem.sitelinkTrackingUrlTemplate = feedItem.TrackingUrlTemplate - newFeedItem.sitelinkLine2 = feedItem.Line2 - newFeedItem.sitelinkLine3 = feedItem.Line3 - - extensionFeedItems.Add(newFeedItem) - Next - extensionSetting.extensionSetting.extensions = extensionFeedItems.ToArray() - extensionSetting.extensionSetting.platformRestrictions = platformRestrictions - extensionSetting.extensionType = FeedType.SITELINK - - Using campaignExtensionSettingService As CampaignExtensionSettingService = - DirectCast(user.GetService(AdWordsService.v201806.CampaignExtensionSettingService), - CampaignExtensionSettingService) - - Dim operation As New CampaignExtensionSettingOperation() - operation.operand = extensionSetting - operation.operator = [Operator].ADD - - campaignExtensionSettingService.mutate( - New CampaignExtensionSettingOperation() _ - {operation}) - - Return - End Using - End Sub - ' [END createExtensionSetting] MOE:strip_line - - ' [START deleteCampaignFeed] MOE:strip_line - ''' - ''' Deletes a campaign feed. - ''' - ''' The AdWords user. - ''' The campaign feed. - ''' - Private Function DeleteCampaignFeed(ByVal user As AdWordsUser, - ByVal campaignFeed As CampaignFeed) As CampaignFeed - Using campaignFeedService As CampaignFeedService = DirectCast( - user.GetService( - AdWordsService.v201806.CampaignFeedService), - CampaignFeedService) - - Dim operation As New CampaignFeedOperation() - operation.operand = campaignFeed - operation.operator = [Operator].REMOVE - - Return campaignFeedService.mutate(New CampaignFeedOperation() {operation}).value(0) - End Using - End Function - ' [END deleteCampaignFeed] MOE:strip_line - - ''' - ''' Gets the platform restrictions for sitelinks in a campaign. - ''' - ''' The campaign feed. - ''' The platform restrictions. - Private Function GetPlatformRestrictionsForCampaign(ByVal campaignFeed As CampaignFeed) As _ - ExtensionSettingPlatform - Dim platformRestrictions As String = "NONE" - - If campaignFeed.matchingFunction.operator = FunctionOperator.AND Then - - For Each argument As FunctionArgumentOperand In _ - campaignFeed.matchingFunction.lhsOperand - ' Check if matchingFunction is of the form EQUALS(CONTEXT.DEVICE, 'Mobile'). - If TypeOf argument Is FunctionOperand Then - Dim operand As FunctionOperand = CType(argument, FunctionOperand) - If operand.value.operator = FunctionOperator.EQUALS Then - Dim requestContextOperand As RequestContextOperand = - CType(operand.value.lhsOperand(0), RequestContextOperand) - If (Not requestContextOperand Is Nothing) AndAlso - (requestContextOperand.contextType = - RequestContextOperandContextType.DEVICE_PLATFORM) Then - platformRestrictions = DirectCast(operand.value.rhsOperand(0), - ConstantOperand).stringValue - End If - End If - End If - Next - End If - - Return _ - CType([Enum].Parse(GetType(ExtensionSettingPlatform), platformRestrictions, True), - ExtensionSettingPlatform) - End Function - - ' [START getFeedItemIdsForCampaign] MOE:strip_line - ''' - ''' Gets the list of feed items that are used by a campaign through a given - ''' campaign feed. - ''' - ''' The campaign feed. - ''' The list of feed items. - Private Function GetFeedItemsForCampaign(ByVal campaignFeed As CampaignFeed) _ - As List(Of Long) - Dim feedItems As New List(Of Long)() - - Select Case campaignFeed.matchingFunction.operator - Case FunctionOperator.IN - ' Check if matchingFunction is of the form IN(FEED_ITEM_ID,{xxx,xxx}). - ' Extract feedItems if applicable. - feedItems.AddRange(GetFeedItemsFromArgument(campaignFeed.matchingFunction)) - - Case FunctionOperator.AND - ' Check each condition. - - For Each argument As FunctionArgumentOperand In _ - campaignFeed.matchingFunction.lhsOperand - ' Check if matchingFunction is of the form IN(FEED_ITEM_ID,{xxx,xxx}). - ' Extract feedItems if applicable. - If TypeOf argument Is FunctionOperand Then - Dim operand As FunctionOperand = CType(argument, FunctionOperand) - If operand.value.operator = FunctionOperator.IN Then - feedItems.AddRange(GetFeedItemsFromArgument(operand.value)) - End If - End If - Next - - Case Else - ' There are no other matching functions involving feeditem ids. - End Select - - Return feedItems - End Function - - Private Function GetFeedItemsFromArgument(ByVal func As [Function]) As List(Of Long) - Dim feedItems As New List(Of Long)() - - If func.lhsOperand.Length = 1 Then - Dim requestContextOperand As RequestContextOperand = - CType(func.lhsOperand(0), RequestContextOperand) - If Not (requestContextOperand Is Nothing) AndAlso - (requestContextOperand.contextType = - RequestContextOperandContextType.FEED_ITEM_ID) Then - For Each argument As ConstantOperand In func.rhsOperand - feedItems.Add(argument.longValue) - Next - End If - End If - - Return feedItems - End Function - ' [END getFeedItemIdsForCampaign] MOE:strip_line - - ' [START getCampaignFeeds] MOE:strip_line - ''' - ''' Gets the campaignfeeds that use a particular feed. - ''' - ''' The user that owns the feed. - ''' The feed for which campaign feeds should be - ''' retrieved. - ''' The type of placeholder to restrict - ''' search. - ''' The list of campaignfeeds. - Private Function GetCampaignFeeds(ByVal user As AdWordsUser, ByVal feed As Feed, - ByVal placeholderType As Integer) As CampaignFeed() - Using campaignFeedService As CampaignFeedService = DirectCast( - user.GetService( - AdWordsService.v201806.CampaignFeedService), - CampaignFeedService) - - Dim page As CampaignFeedPage = campaignFeedService.query( - String.Format( - "SELECT CampaignId, MatchingFunction, PlaceholderTypes where Status='ENABLED' " & - "and FeedId = '{0}' and PlaceholderTypes CONTAINS_ANY[{1}]", feed.id, - placeholderType)) - Return page.entries - End Using - End Function - ' [END getCampaignFeeds] MOE:strip_line - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Miscellaneous/GetAllImageAssets.vb b/examples/AdWords/Vb/v201806/Miscellaneous/GetAllImageAssets.vb deleted file mode 100755 index a9e3231b203..00000000000 --- a/examples/AdWords/Vb/v201806/Miscellaneous/GetAllImageAssets.vb +++ /dev/null @@ -1,109 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets all image assets. To upload an image asset, run UploadImageAsset.vb. - ''' - Public Class GetAllImageAssets - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAllImageAssets - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets all image assets. To upload an image asset, run " + - "UploadImageAsset.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' [START get_all_image_assets] MOE:strip_line - Using assetService As AssetService = CType( - user.GetService( - AdWordsService.v201806.AssetService), - AssetService) - - ' Create the selector. - Dim selector As New Selector() - selector.fields = New String() { _ - Asset.Fields.AssetName, Asset.Fields.AssetStatus, - ImageAsset.Fields.ImageFileSize, - ImageDimensionInfo.Fields.ImageWidth, - ImageDimensionInfo.Fields.ImageHeight, - ImageDimensionInfo.Fields.ImageFullSizeUrl - } - ' Filter for image assets only. - selector.predicates = New Predicate() { _ - Predicate.Equals(Asset.Fields.AssetSubtype, - AssetType.IMAGE.ToString()) - } - selector.paging = Paging.Default - - Dim page As New AssetPage() - - Try - Do - ' Get the image assets. - page = assetService.get(selector) - - ' Display the results. - If Not (page Is Nothing) AndAlso Not (page.entries Is Nothing) Then - Dim i As Integer = selector.paging.startIndex - For Each imageAsset As ImageAsset In page.entries - Console.WriteLine( - "{0}) Image asset with id = '{1}', name = '{2}' and " + - "status = '{3}' was found.", i + 1, imageAsset.assetId, - imageAsset.assetName, imageAsset.assetStatus) - Console.WriteLine(" Size is {0}x{1} and asset URL is {2}.", - imageAsset.fullSizeInfo.imageWidth, - imageAsset.fullSizeInfo.imageHeight, - imageAsset.fullSizeInfo.imageUrl) - i = i + 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of image assets found: {0}", page.totalNumEntries) - ' [END get_all_image_assets] MOE:strip_line - Catch e As Exception - Throw New System.ApplicationException("Failed to retrieve image assets.", e) - End Try - End Using - End Sub - End Class -End Namespace \ No newline at end of file diff --git a/examples/AdWords/Vb/v201806/Miscellaneous/GetAllVideosAndImages.vb b/examples/AdWords/Vb/v201806/Miscellaneous/GetAllVideosAndImages.vb deleted file mode 100755 index b2361e749b5..00000000000 --- a/examples/AdWords/Vb/v201806/Miscellaneous/GetAllVideosAndImages.vb +++ /dev/null @@ -1,125 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets all videos and images. To upload video, see - ''' http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=39454. - ''' To upload image, run UploadImage.vb. - ''' - Public Class GetAllVideosAndImages - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAllVideosAndImages - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets all videos and images. Use the Google Ads " & - "website to upload new videos. To upload image, run UploadImage.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using mediaService As MediaService = CType( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - - ' Create the video selector. - Dim selector As New Selector - selector.fields = New String() { _ - Media.Fields.MediaId, Dimensions.Fields.Width, - Dimensions.Fields.Height, Media.Fields.MimeType - } - - ' Set the filter. - Dim mediaTypes = New String() { _ - MediaMediaType.VIDEO.ToString(), - MediaMediaType.IMAGE.ToString() - } - selector.predicates = New Predicate() { _ - Predicate.In(Media.Fields.Type, - mediaTypes) - } - - selector.paging = Paging.Default - - Dim page As New MediaPage - - Try - Do - page = mediaService.get(selector) - - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - Dim i As Integer = selector.paging.startIndex - - For Each media As Media In page.entries - If TypeOf media Is Video Then - Dim video As Video = CType(media, [Video]) - Console.WriteLine( - "{0}) Video with id '{1}' and name '{2}' was found.", - i + 1, video.mediaId, video.name) - ElseIf TypeOf media Is Image Then - Dim image As Image = CType(media, [Image]) - - ' Preferred: Use image.dimensions.ToDict() if you are not on - ' Mono. - Dim dimensions As Dictionary(Of MediaSize, Dimensions) = - MapEntryExtensions.ToDict (Of MediaSize, Dimensions)( - image.dimensions) - - Console.WriteLine( - "{0}) Image with id '{1}', dimensions '{2}x{3}', and " & - "MIME type '{4}' was found.", i + 1, image.mediaId, - dimensions(MediaSize.FULL).width, - dimensions(MediaSize.FULL).height, image.mimeType) - End If - i = i + 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of images and videos found: {0}", - page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to get images and videos.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Miscellaneous/UploadImage.vb b/examples/AdWords/Vb/v201806/Miscellaneous/UploadImage.vb deleted file mode 100755 index a503968d7fb..00000000000 --- a/examples/AdWords/Vb/v201806/Miscellaneous/UploadImage.vb +++ /dev/null @@ -1,95 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example uploads an image. To get images, run GetAllVideosAndImages.vb. - ''' - Public Class UploadImage - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UploadImage - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example uploads an image. To get images, run " & - "GetAllVideosAndImages.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using mediaService As MediaService = CType( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - - ' Create the image. - Dim image As New Image - image.data = MediaUtilities.GetAssetDataFromUrl("https://goo.gl/3b9Wfh", - user.Config) - image.type = MediaMediaType.IMAGE - - Try - ' Upload the image. - Dim result As Media() = mediaService.upload(New Media() {image}) - - ' Display the results. - If ((Not result Is Nothing) AndAlso (result.Length > 0)) Then - Dim newImage As Media = result(0) - - ' Preferred: Use newImage.dimensions.ToDict() if you are not on Mono. - Dim dimensions As Dictionary(Of MediaSize, Dimensions) = - MapEntryExtensions.ToDict (Of MediaSize, Dimensions)( - newImage.dimensions) - - Console.WriteLine( - "Image with id '{0}', dimensions '{1}x{2}', and MIME type '{3}'" & - " was uploaded.", newImage.mediaId, - dimensions.Item(MediaSize.FULL).width, - dimensions.Item(MediaSize.FULL).height, newImage.mimeType) - Else - Console.WriteLine("No images were uploaded.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to upload images.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Miscellaneous/UploadImageAsset.vb b/examples/AdWords/Vb/v201806/Miscellaneous/UploadImageAsset.vb deleted file mode 100755 index 66a5218c373..00000000000 --- a/examples/AdWords/Vb/v201806/Miscellaneous/UploadImageAsset.vb +++ /dev/null @@ -1,99 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example uploads an image asset. To get images, run GetAllImageAssets.vb. - ''' - Public Class UploadImageAsset - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UploadImageAsset - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example uploads an image asset. To get images, run " + - "GetAllImageAssets.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' [START upload_image_asset] MOE:strip_line - Using assetService As AssetService = CType( - user.GetService( - AdWordsService.v201806.AssetService), - AssetService) - - ' Create the image asset. - Dim imageAsset As New ImageAsset() - ' Optional: Provide a unique friendly name to identify your asset. If you specify - ' the assetName field, then both the asset name and the image being uploaded should be - ' unique, and should not match another ACTIVE asset in this customer account. - ' imageAsset.assetName = "Jupiter Trip " + ExampleUtilities.GetRandomString() - imageAsset.imageData = MediaUtilities.GetAssetDataFromUrl("https://goo.gl/3b9Wfh", - user.Config) - - ' Create the operation. - Dim operation As New AssetOperation() - operation.operator = [Operator].ADD - operation.operand = imageAsset - - Try - ' Create the asset. - Dim result As AssetReturnValue = assetService.mutate( - New AssetOperation() _ - {operation}) - ' [END upload_image_asset] MOE:strip_line - - ' Display the results. - If Not (result Is Nothing) AndAlso Not (result.value Is Nothing) _ - AndAlso result.value.Length > 0 Then - Dim newAsset As Asset = result.value(0) - - Console.WriteLine("Image asset with id = '{0}' and name = {1} was created.", - newAsset.assetId, newAsset.assetName) - Else - Console.WriteLine("No image asset was created.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to upload image assets.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Miscellaneous/UploadMediaBundle.vb b/examples/AdWords/Vb/v201806/Miscellaneous/UploadMediaBundle.vb deleted file mode 100755 index b71dd1eb5fb..00000000000 --- a/examples/AdWords/Vb/v201806/Miscellaneous/UploadMediaBundle.vb +++ /dev/null @@ -1,100 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example uploads an HTML5 zip file. - ''' - Public Class UploadMediaBundle - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UploadMediaBundle - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example uploads an HTML5 zip file." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using mediaService As MediaService = CType( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - - Try - ' Create HTML5 media. - Dim html5Zip As Byte() = - MediaUtilities.GetAssetDataFromUrl("https://goo.gl/9Y7qI2", - user.Config) - ' Create a media bundle containing the zip file with all the HTML5 components. - Dim mediaBundleArray(1) As Media - - Dim mediaBundle As New MediaBundle() - mediaBundle.data = html5Zip - mediaBundle.type = MediaMediaType.MEDIA_BUNDLE - - mediaBundleArray(0) = mediaBundle - - ' Upload HTML5 zip. - mediaBundleArray = mediaService.upload(mediaBundleArray) - - ' Display HTML5 zip. - If (Not mediaBundleArray Is Nothing) AndAlso (mediaBundleArray.Length > 0) Then - Dim newBundle As Media = mediaBundleArray(0) - - ' Preferred: Use newBundle.dimensions.ToDict() if you are not on Mono. - Dim dimensions As Dictionary(Of MediaSize, Dimensions) = - MapEntryExtensions.ToDict (Of MediaSize, Dimensions)( - newBundle.dimensions) - - Console.WriteLine("HTML5 media with id '{0}', dimensions '{1}x{2}', and " & - "MIME type '{3}' was uploaded.", newBundle.mediaId, - dimensions(MediaSize.FULL).width, - dimensions(MediaSize.FULL).height, - newBundle.mimeType) - Else - Console.WriteLine("No HTML5 zip was uploaded.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to upload HTML5 zip file.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Optimization/EstimateKeywordTraffic.vb b/examples/AdWords/Vb/v201806/Optimization/EstimateKeywordTraffic.vb deleted file mode 100755 index 4410ea8e158..00000000000 --- a/examples/AdWords/Vb/v201806/Optimization/EstimateKeywordTraffic.vb +++ /dev/null @@ -1,238 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets keyword traffic estimates. - ''' - Public Class EstimateKeywordTraffic - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New EstimateKeywordTraffic - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets keyword traffic estimates." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using trafficEstimatorService As TrafficEstimatorService = CType( - user.GetService( - AdWordsService.v201806.TrafficEstimatorService), - TrafficEstimatorService) - - ' [START createKeywordEstimateRequest] MOE:strip_line - ' Create keywords. Up to 2000 keywords can be passed in a single request. - Dim keyword1 As New Keyword - keyword1.text = "mars cruise" - keyword1.matchType = KeywordMatchType.BROAD - - Dim keyword2 As New Keyword - keyword2.text = "cheap cruise" - keyword2.matchType = KeywordMatchType.PHRASE - - Dim keyword3 As New Keyword - keyword3.text = "cruise" - keyword3.matchType = KeywordMatchType.EXACT - - Dim keywords As Keyword() = New Keyword() {keyword1, keyword2, keyword3} - - ' Create a keyword estimate request for each keyword. - Dim keywordEstimateRequests As New List(Of KeywordEstimateRequest) - - For Each keyword As Keyword In keywords - Dim keywordEstimateRequest As New KeywordEstimateRequest - keywordEstimateRequest.keyword = keyword - keywordEstimateRequests.Add(keywordEstimateRequest) - Next - - ' Create negative keywords. - Dim negativeKeyword1 As New Keyword - negativeKeyword1.text = "moon walk" - negativeKeyword1.matchType = KeywordMatchType.BROAD - - Dim negativeKeywordEstimateRequest As New KeywordEstimateRequest - negativeKeywordEstimateRequest.keyword = negativeKeyword1 - negativeKeywordEstimateRequest.isNegative = True - keywordEstimateRequests.Add(negativeKeywordEstimateRequest) - ' [END createKeywordEstimateRequest] MOE:strip_line - - ' [START createAdGroupEstimateRequest] MOE:strip_line - ' Create ad group estimate requests. - Dim adGroupEstimateRequest As New AdGroupEstimateRequest - adGroupEstimateRequest.keywordEstimateRequests = keywordEstimateRequests.ToArray - adGroupEstimateRequest.maxCpc = New Money - adGroupEstimateRequest.maxCpc.microAmount = 1000000 - ' [END createAdGroupEstimateRequest] MOE:strip_line - - ' [START createCampaignEstimateRequest] MOE:strip_line - ' Create campaign estimate requests. - Dim campaignEstimateRequest As New CampaignEstimateRequest - campaignEstimateRequest.adGroupEstimateRequests = New AdGroupEstimateRequest() _ - {adGroupEstimateRequest} - - ' See http://code.google.com/apis/adwords/docs/appendix/countrycodes.html - ' for a detailed list of country codes. - Dim countryCriterion As New Location - countryCriterion.id = 2840 'US - - ' See http://code.google.com/apis/adwords/docs/appendix/languagecodes.html - ' for a detailed list of language codes. - Dim languageCriterion As New Language - languageCriterion.id = 1000 'en - - campaignEstimateRequest.criteria = New Criterion() _ - {countryCriterion, languageCriterion} - ' [END createCampaignEstimateRequest] MOE:strip_line - - Try - ' [START makeRequest] MOE:strip_line - ' Create the selector. - Dim selector As New TrafficEstimatorSelector - selector.campaignEstimateRequests = - New CampaignEstimateRequest() {campaignEstimateRequest} - - ' Optional: Request a list of campaign level estimates segmented by platform. - selector.platformEstimateRequested = True - - ' Get traffic estimates. - Dim result As TrafficEstimatorResult = trafficEstimatorService.get(selector) - ' [END makeRequest] MOE:strip_line - - ' [START displayEstimates] MOE:strip_line - ' Display the results. - If ((Not result Is Nothing) AndAlso (Not result.campaignEstimates Is Nothing) _ - AndAlso (result.campaignEstimates.Length > 0)) Then - Dim campaignEstimate As CampaignEstimate = result.campaignEstimates(0) - - ' Display the campaign level estimates segmented by platform. - If Not campaignEstimate.platformEstimates Is Nothing Then - For Each platformEstimate As PlatformCampaignEstimate In _ - campaignEstimate.platformEstimates - Dim platformMessage As String = - String.Format("Results for the platform with ID:" & - " {0} and name : {1}.", - platformEstimate.platform.id, - platformEstimate.platform.platformName) - - DisplayMeanEstimates(platformMessage, platformEstimate.minEstimate, - platformEstimate.maxEstimate) - Next - End If - - If ((Not campaignEstimate.adGroupEstimates Is Nothing) AndAlso - (campaignEstimate.adGroupEstimates.Length > 0)) Then - Dim adGroupEstimate As AdGroupEstimate = - campaignEstimate.adGroupEstimates(0) - - If (Not adGroupEstimate.keywordEstimates Is Nothing) Then - For i As Integer = 0 To adGroupEstimate.keywordEstimates.Length - 1 - Dim keyword As Keyword = keywordEstimateRequests.Item(i).keyword - Dim keywordEstimate As KeywordEstimate = - adGroupEstimate.keywordEstimates(i) - - If keywordEstimateRequests.Item(i).isNegative Then - Continue For - End If - - Dim kwdMessage As String = - String.Format("Results for the keyword with" & - " text = '{0}' and match type = '{1}':", - keyword.text, keyword.matchType) - DisplayMeanEstimates(kwdMessage, keywordEstimate.min, - keywordEstimate.max) - Next i - End If - End If - Else - Console.WriteLine("No traffic estimates were returned.") - End If - ' [END displayEstimates] MOE:strip_line - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to retrieve traffic estimates.", e) - End Try - End Using - End Sub - - ''' - ''' Displays the mean estimates. - ''' - ''' The message to display. - ''' The minimum stats estimate. - ''' The maximum stats estimate. - Private Sub DisplayMeanEstimates(ByVal message As String, - ByVal minEstimate As StatsEstimate, - ByVal maxEstimate As StatsEstimate) - ' Find the mean of the min and max values. - Dim meanAverageCpc As Long = 0L - Dim meanAveragePosition As Double = 0 - Dim meanClicks As Single = 0 - Dim meanTotalCost As Single = 0 - - If (Not (minEstimate Is Nothing) AndAlso Not (maxEstimate Is Nothing)) Then - If (Not (minEstimate.averageCpc Is Nothing) AndAlso - Not (maxEstimate.averageCpc Is Nothing)) Then - meanAverageCpc = CLng((minEstimate.averageCpc.microAmount + - maxEstimate.averageCpc.microAmount)/2) - End If - - If minEstimate.averagePositionSpecified AndAlso - maxEstimate.averagePositionSpecified Then - meanAveragePosition = - (minEstimate.averagePosition + maxEstimate.averagePosition)/2 - End If - - If minEstimate.clicksPerDaySpecified AndAlso maxEstimate.clicksPerDaySpecified Then - meanClicks = (minEstimate.clicksPerDay + maxEstimate.clicksPerDay)/2 - End If - If (Not (minEstimate.totalCost Is Nothing) AndAlso - Not (maxEstimate.totalCost Is Nothing)) Then - meanTotalCost = CLng((minEstimate.totalCost.microAmount + - maxEstimate.totalCost.microAmount)/2) - End If - End If - - Console.WriteLine(message) - Console.WriteLine(" Estimated average CPC: {0}", meanAverageCpc) - Console.WriteLine(" Estimated ad position: {0:0.00}", meanAveragePosition) - Console.WriteLine(" Estimated daily clicks: {0}", meanClicks) - Console.WriteLine(" Estimated daily cost: {0}", meanTotalCost) - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Optimization/GetAdGroupBidSimulations.vb b/examples/AdWords/Vb/v201806/Optimization/GetAdGroupBidSimulations.vb deleted file mode 100755 index 25aa9611f17..00000000000 --- a/examples/AdWords/Vb/v201806/Optimization/GetAdGroupBidSimulations.vb +++ /dev/null @@ -1,123 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets bid landscapes for an ad group. To get ad groups, - ''' run GetAdGroups.vb. - ''' - Public Class GetAdGroupBidSimulations - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetAdGroupBidSimulations - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets bid landscapes for an ad group. To get ad groups, " & - "run GetAdGroups.vb" - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group for which bid simulations are - ''' retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using dataService As DataService = CType( - user.GetService( - AdWordsService.v201806.DataService), - DataService) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - AdGroupBidLandscape.Fields.AdGroupId, - AdGroupBidLandscape.Fields.LandscapeType, - AdGroupBidLandscape.Fields.LandscapeCurrent, - AdGroupBidLandscape.Fields.StartDate, - AdGroupBidLandscape.Fields.EndDate, - BidLandscapeLandscapePoint.Fields.Bid, - BidLandscapeLandscapePoint.Fields.LocalClicks, - BidLandscapeLandscapePoint.Fields.LocalCost, - BidLandscapeLandscapePoint.Fields. - LocalImpressions - } - - ' Set the filters. - Dim adGroupPredicate As New Predicate - adGroupPredicate.field = "AdGroupId" - adGroupPredicate.operator = PredicateOperator.IN - adGroupPredicate.values = New String() {adGroupId.ToString} - - selector.predicates = New Predicate() { _ - Predicate.Equals( - AdGroupBidLandscape.Fields.AdGroupId, - adGroupId) - } - - Try - ' Get bid landscape for ad group. - Dim page As AdGroupBidLandscapePage = - dataService.getAdGroupBidLandscape(selector) - If (((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) AndAlso - (page.entries.Length > 0)) Then - For Each bidLandscape As AdGroupBidLandscape In page.entries - Console.WriteLine( - "Found ad group bid landscape with ad group id '{0}', " & - "type '{1}', current: '{2}', start date '{3}', end date '{4}', " & - "and landscape points", bidLandscape.adGroupId, bidLandscape.type, - bidLandscape.landscapeCurrent, bidLandscape.startDate, - bidLandscape.endDate) - Dim point As BidLandscapeLandscapePoint - For Each point In bidLandscape.landscapePoints - Console.WriteLine( - "- bid: {0} => clicks: {1}, cost: {2}, impressions: {3}", - point.bid.microAmount, point.bid.microAmount, - point.clicks, point.cost.microAmount, point.impressions) - Next - Next - Else - Console.WriteLine("No ad group bid landscapes were found.\n") - End If - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to get ad group bid landscapes.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.vb b/examples/AdWords/Vb/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.vb deleted file mode 100755 index 26bdceee11d..00000000000 --- a/examples/AdWords/Vb/v201806/Optimization/GetCampaignCriterionBidModifierSimulations.vb +++ /dev/null @@ -1,153 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets all available campaign mobile bid modifier - ''' landscapes for a given campaign. To get campaigns, run GetCampaigns.cs. - ''' - Public Class GetCampaignCriterionBidModifierSimulations - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetCampaignCriterionBidModifierSimulations - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets all available campaign mobile bid modifier landscapes" & - " for a given campaign. To get campaigns, run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign for which bid simulations are - ''' retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - ' [START prepareRequest] MOE:strip_line - Using _ - dataService As DataService = - CType(user.GetService(AdWordsService.v201806.DataService), - DataService) - - ' Create selector. - Dim selector As New Selector() - selector.fields = New String() { _ - CriterionBidLandscape.Fields.CampaignId, - CriterionBidLandscape.Fields.CriterionId, - CriterionBidLandscape.Fields.StartDate, - CriterionBidLandscape.Fields.EndDate, - BidLandscapeLandscapePoint.Fields.LocalClicks, - BidLandscapeLandscapePoint.Fields.LocalCost, - BidLandscapeLandscapePoint.Fields. - LocalImpressions, - BidLandscapeLandscapePoint.Fields. - TotalLocalClicks, - BidLandscapeLandscapePoint.Fields.TotalLocalCost, - BidLandscapeLandscapePoint.Fields. - TotalLocalImpressions, - BidLandscapeLandscapePoint.Fields.RequiredBudget, - BidLandscapeLandscapePoint.Fields.BidModifier - } - selector.predicates = - New Predicate() { _ - Predicate.Equals( - CriterionBidLandscape.Fields. - CampaignId, campaignId) - } - selector.paging = Paging.Default - ' [END prepareRequest] MOE:strip_line - - Dim landscapePointsInLastResponse As Integer = 0 - Dim landscapePointsFound As Integer = 0 - - Try - Dim page As CriterionBidLandscapePage = Nothing - - Do - ' When retrieving bid landscape, page.totalNumEntities cannot be used to - ' determine if there are more entries, since it shows only the total number - ' of bid landscapes and not the number of bid landscape points. So you need - ' to iterate until you no longer get back any bid landscapes. - - ' Get bid landscape for campaign. - ' [START sendRequest] MOE:strip_line - page = dataService.getCampaignCriterionBidLandscape(selector) - ' [END sendRequest] MOE:strip_line - landscapePointsInLastResponse = 0 - - If (Not page Is Nothing) AndAlso (Not page.entries Is Nothing) Then - For Each bidLandscape As CriterionBidLandscape In page.entries - Console.WriteLine( - "Found campaign-level criterion bid modifier landscapes for" & - " criterion with ID {0}, start date '{1}', end date '{2}', " & - "and landscape points:", - bidLandscape.criterionId, - bidLandscape.startDate, - bidLandscape.endDate - ) - - For Each point As BidLandscapeLandscapePoint In _ - bidLandscape.landscapePoints - Console.WriteLine( - "- bid modifier: {0:0.00} => clicks: {1}, cost: {2}, " & - "impressions: {3}, total clicks: {4}, total cost: {5}, " & - "total impressions: {6}, and required budget: {7}", - point.bidModifier, point.clicks, point.cost.microAmount, - point.impressions, point.totalLocalClicks, - point.totalLocalCost.microAmount, - point.totalLocalImpressions, - point.requiredBudget.microAmount) - landscapePointsInLastResponse += 1 - landscapePointsFound += 1 - Next - Next - End If - ' Offset by the number of landscape points, NOT the number - ' of entries (bid landscapes) in the last response. - selector.paging.IncreaseOffsetBy(landscapePointsInLastResponse) - Loop While landscapePointsInLastResponse > 0 - Console.WriteLine("Number of bid landscape points found: {0}", - landscapePointsFound) - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to retrieve campaign bid landscapes.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Optimization/GetKeywordBidSimulations.vb b/examples/AdWords/Vb/v201806/Optimization/GetKeywordBidSimulations.vb deleted file mode 100755 index d69529cdbe0..00000000000 --- a/examples/AdWords/Vb/v201806/Optimization/GetKeywordBidSimulations.vb +++ /dev/null @@ -1,139 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets a bid landscape for an ad group and a keyword. - ''' To get ad groups, run GetAdGroups.vb. To get keywords, run - ''' GetKeywords.vb. - ''' - Public Class GetKeywordBidSimulations - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetKeywordBidSimulations - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - Dim keywordId As Long = Long.Parse("INSERT_KEYWORD_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId, keywordId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets a bid landscape for an ad group and a keyword. To " & - "get ad groups, run GetAdGroups.vb. To get keywords, run GetKeywords.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the ad group for which keyword bid - ''' simulations are retrieved. - ''' Id of the keyword for which bid simulations are - ''' retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long, ByVal keywordId As Long) - ' [START prepareRequest] MOE:strip_line - Using dataService As DataService = CType( - user.GetService( - AdWordsService.v201806.DataService), - DataService) - - ' Create the query. - Dim query As SelectQuery = New SelectQueryBuilder().Select( - CriterionBidLandscape.Fields.AdGroupId, - CriterionBidLandscape.Fields.CriterionId, - CriterionBidLandscape.Fields.StartDate, - CriterionBidLandscape.Fields.EndDate, - BidLandscapeLandscapePoint.Fields.Bid, - BidLandscapeLandscapePoint.Fields.LocalClicks, - BidLandscapeLandscapePoint.Fields.LocalCost, - BidLandscapeLandscapePoint.Fields.LocalImpressions, - BidLandscapeLandscapePoint.Fields.BiddableConversions, - BidLandscapeLandscapePoint.Fields.BiddableConversionsValue - ) _ - .Where(CriterionBidLandscape.Fields.AdGroupId).Equals(adGroupId) _ - .Where(CriterionBidLandscape.Fields.CriterionId).Equals(keywordId) _ - .DefaultLimit() _ - .Build() - ' [END prepareRequest] MOE:strip_line - - ' [START requestPages] MOE:strip_line - Dim page As New CriterionBidLandscapePage - - Dim landscapePointsFound As Integer = 0 - - Try - Do - ' Get bid landscape for keywords. - ' [START sendRequest] MOE:strip_line - page = dataService.queryCriterionBidLandscape(query) - ' [END sendRequest] MOE:strip_line - - ' Display bid landscapes. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - - For Each bidLandscape As CriterionBidLandscape In page.entries - Console.WriteLine( - "Found keyword bid landscape with ad group id ""{0}"", " & - "keyword id ""{1}"", start date ""{2}"", end date ""{3}"", " & - "and landscape points:", bidLandscape.adGroupId, - bidLandscape.criterionId, bidLandscape.startDate, - bidLandscape.endDate) - For Each bidLandscapePoint As BidLandscapeLandscapePoint _ - In bidLandscape.landscapePoints - Console.WriteLine( - "- bid: {0} => clicks: {1}, cost: {2}, impressions: {3}, " & - "biddable conversions: {4:0.00}, biddable conversions " & - "value:{5:0.00}", - bidLandscapePoint.bid.microAmount, bidLandscapePoint.clicks, - bidLandscapePoint.cost.microAmount, - bidLandscapePoint.impressions, - bidLandscapePoint.biddableConversions, - bidLandscapePoint.biddableConversionsValue) - landscapePointsFound += 1 - Next - Next - End If - query.NextPage(page) - Loop While (query.HasNextPage(page)) - ' [END requestPages] MOE:strip_line - Console.WriteLine("Number of keyword bid landscape points found: {0}", - landscapePointsFound) - Catch e As Exception - Throw New _ - System.ApplicationException("Failed to retrieve keyword bid landscapes.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Optimization/GetKeywordIdeas.vb b/examples/AdWords/Vb/v201806/Optimization/GetKeywordIdeas.vb deleted file mode 100755 index 3560f3ab4b1..00000000000 --- a/examples/AdWords/Vb/v201806/Optimization/GetKeywordIdeas.vb +++ /dev/null @@ -1,201 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Attribute = Google.Api.Ads.AdWords.v201806.Attribute - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example retrieves keywords that are related to a given keyword. - ''' - Public Class GetKeywordIdeas - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetKeywordIdeas - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example retrieves keywords that are related to a given keyword." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' ID of the ad group to use for generating ideas. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long?) - Using targetingIdeaService As TargetingIdeaService = CType( - user.GetService( - AdWordsService.v201806.TargetingIdeaService), - TargetingIdeaService) - - ' Create selector. - ' [START prepareRequestTypes] MOE:strip_line - Dim selector As New TargetingIdeaSelector() - selector.requestType = RequestType.IDEAS - selector.ideaType = IdeaType.KEYWORD - ' [END prepareRequestTypes] MOE:strip_line - ' [START prepareRequestAttributeTypes] MOE:strip_line - selector.requestedAttributeTypes = - New AttributeType() { _ - AttributeType.KEYWORD_TEXT, - AttributeType.SEARCH_VOLUME, - AttributeType.CATEGORY_PRODUCTS_AND_SERVICES - } - ' [END prepareRequestAttributeTypes] MOE:strip_line - - Dim searchParameters As New List(Of SearchParameter) - - ' [START prepareRequestQueryParameter] MOE:strip_line - ' Create related to query search parameter. - Dim relatedToQuerySearchParameter As New RelatedToQuerySearchParameter() - relatedToQuerySearchParameter.queries = New String() { _ - "bakery", "pastries", - "birthday cake" - } - searchParameters.Add(relatedToQuerySearchParameter) - ' [END prepareRequestQueryParameter] MOE:strip_line - - ' Add a language search parameter (optional). - ' The ID can be found in the documentation: - ' https://developers.google.com/adwords/api/docs/appendix/languagecodes - Dim languageParameter As New LanguageSearchParameter() - Dim english As New Language() - english.id = 1000 - languageParameter.languages = New Language() {english} - searchParameters.Add(languageParameter) - - ' [START prepareRequestNetworkSetting] MOE:strip_line - ' Add network search parameter (optional). - Dim networkSetting As New NetworkSetting() - networkSetting.targetGoogleSearch = True - networkSetting.targetSearchNetwork = False - networkSetting.targetContentNetwork = False - networkSetting.targetPartnerSearchNetwork = False - - Dim networkSearchParameter As New NetworkSearchParameter() - networkSearchParameter.networkSetting = networkSetting - searchParameters.Add(networkSearchParameter) - ' [END prepareRequestNetworkSetting] MOE:strip_line - - ' Optional: Use an existing ad group to generate ideas. - If adGroupId.HasValue() Then - ' [START setSeedAdGroupId] MOE:strip_line - Dim seedAdGroupIdSearchParameter As New SeedAdGroupIdSearchParameter() - seedAdGroupIdSearchParameter.adGroupId = adGroupId.Value - searchParameters.Add(seedAdGroupIdSearchParameter) - ' [END setSeedAdGroupId] MOE:strip_line - End If - - ' Set the search parameters. - selector.searchParameters = searchParameters.ToArray() - - ' [START preparePaging] MOE:strip_line - - ' Set selector paging (required for targeting idea service). - selector.paging = Paging.Default - ' [END preparePaging] MOE:strip_line - - Dim page As New TargetingIdeaPage() - - Try - Dim i As Integer = 0 - Do - ' [START getKeywordIdeas] MOE:strip_line - ' Get related keywords. - page = targetingIdeaService.get(selector) - ' [END getKeywordIdeas] MOE:strip_line - - ' [START displayKeywordIdeas] MOE:strip_line - 'Display the results. - If Not page.entries Is Nothing AndAlso page.entries.Length > 0 Then - For Each targetingIdea As TargetingIdea In page.entries - For Each entry As Type_AttributeMapEntry In targetingIdea.data - ' Preferred: Use targetingIdea.data.ToDict() if you are not on - ' Mono. - Dim ideas As Dictionary(Of AttributeType, Attribute) = - MapEntryExtensions.ToDict (Of AttributeType, Attribute)( - targetingIdea.data) - - Dim keyword As String = - DirectCast(ideas(AttributeType.KEYWORD_TEXT), - StringAttribute).value - Dim categorySet As IntegerSetAttribute = - DirectCast( - ideas(AttributeType.CATEGORY_PRODUCTS_AND_SERVICES), - IntegerSetAttribute) - - Dim categories As String = "" - - If _ - (Not categorySet Is Nothing) AndAlso - (Not categorySet.value Is Nothing) Then - categories = String.Join(", ", categorySet.value) - End If - - Dim averageMonthlySearches As Long = - DirectCast(ideas(AttributeType.SEARCH_VOLUME), - LongAttribute).value - - - Dim averageCpcMoney As Money = - DirectCast(ideas(AttributeType.AVERAGE_CPC), - MoneyAttribute).value - Dim averageCpc As Long - If (Not averageCpcMoney Is Nothing) Then - averageCpc = averageCpcMoney.microAmount - End If - - Dim competition As Double = - DirectCast(ideas(AttributeType.COMPETITION), - DoubleAttribute).value - Console.WriteLine( - "Keyword with text '{0}', average monthly search " + - "volume {1}, average CPC {2}, and competition {3:F2} was " & - "found with categories: {4}", keyword, - averageMonthlySearches, averageCpc, - competition, categories) - Next - i = i + 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of related keywords found: {0}", page.totalNumEntries) - Catch e As Exception - Throw New System.ApplicationException("Failed to retrieve related keywords.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/AddAudience.vb b/examples/AdWords/Vb/v201806/Remarketing/AddAudience.vb deleted file mode 100755 index d2f372dcd26..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/AddAudience.vb +++ /dev/null @@ -1,136 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to create a user list a.k.a. audience. - ''' - Public Class AddAudience - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddAudience - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to create a user list a.k.a. audience." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using userListService As AdwordsUserListService = CType( - user.GetService( - AdWordsService.v201806.AdwordsUserListService), - AdwordsUserListService) - - Using conversionTrackerService As ConversionTrackerService = CType( - user.GetService( - AdWordsService.v201806.ConversionTrackerService), - ConversionTrackerService) - - Dim userList As New BasicUserList - - userList.name = ("Mars cruise customers #" & ExampleUtilities.GetRandomString) - userList.description = "A list of mars cruise customers in the last year." - userList.status = UserListMembershipStatus.OPEN - userList.membershipLifeSpan = 365 - - Dim conversionType As New UserListConversionType - conversionType.name = userList.name - userList.conversionTypes = New UserListConversionType() {conversionType} - - ' Optional: Set the user list status. - userList.status = UserListMembershipStatus.OPEN - - ' Create the operation. - Dim operation As New UserListOperation - operation.operand = userList - operation.operator = [Operator].ADD - - Try - ' Add the user list. - Dim retval As UserListReturnValue = userListService.mutate( - New UserListOperation() {operation}) - - Dim newUserList As UserList = retval.value(0) - - Console.WriteLine("User list with name '{0}' and id '{1}' was added.", - newUserList.name, newUserList.id) - - Dim conversionIds As New List(Of String)() - For Each item As UserListConversionType In userList.conversionTypes - conversionIds.Add(item.id.ToString()) - Next - - If (conversionIds.Count > 0) Then - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - ConversionTracker.Fields.Id, - ConversionTracker.Fields. - GoogleGlobalSiteTag, - ConversionTracker.Fields. - GoogleEventSnippet - } - - selector.predicates = New Predicate() { _ - Predicate.In( - ConversionTracker.Fields. - Id, - conversionIds) - } - - ' Get all conversion trackers. - Dim page As ConversionTrackerPage = - conversionTrackerService.get(selector) - - If (Not page Is Nothing) AndAlso (Not page.entries Is Nothing) Then - For Each tracker As ConversionTracker In page.entries - Console.WriteLine( - "Google global site tag:\n{0}\nGoogle event snippet:\n{1}", - tracker.googleGlobalSiteTag, tracker.googleGlobalSiteTag) - Next - End If - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to add user lists (a.k.a. " + - "audiences).", e) - End Try - End Using - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/AddConversionTrackers.vb b/examples/AdWords/Vb/v201806/Remarketing/AddConversionTrackers.vb deleted file mode 100755 index a6e50467433..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/AddConversionTrackers.vb +++ /dev/null @@ -1,159 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds an AdWords conversion tracker and an upload conversion tracker. - ''' - Public Class AddConversionTrackers - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddConversionTrackers - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds an AdWords conversion tracker and an upload " & - "conversion tracker." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' Get the ConversionTrackerService. - Using conversionTrackerService As ConversionTrackerService = CType( - user.GetService( - AdWordsService.v201806.ConversionTrackerService), - ConversionTrackerService) - - Dim conversionTrackers As New List(Of ConversionTracker) - - ' [START createAdWordsConversion] MOE:strip_line - ' Create an Adwords conversion tracker. - Dim adWordsConversionTracker As New AdWordsConversionTracker() - adWordsConversionTracker.name = "Earth to Mars Cruises Conversion #" & - ExampleUtilities.GetRandomString() - adWordsConversionTracker.category = ConversionTrackerCategory.DEFAULT - - ' Set optional fields. - adWordsConversionTracker.status = ConversionTrackerStatus.ENABLED - adWordsConversionTracker.viewthroughLookbackWindow = 15 - adWordsConversionTracker.defaultRevenueValue = 23.41 - adWordsConversionTracker.alwaysUseDefaultRevenueValue = True - conversionTrackers.Add(adWordsConversionTracker) - ' [END createAdWordsConversion] MOE:strip_line - - ' [START createUploadConversion] MOE:strip_line - ' Create an upload conversion for offline conversion imports. - Dim uploadConversion As New UploadConversion() - ' Set an appropriate category. This field is optional, and will be set to - ' DEFAULT if not mentioned. - uploadConversion.category = ConversionTrackerCategory.LEAD - uploadConversion.name = "Upload Conversion #" + ExampleUtilities.GetRandomString() - uploadConversion.viewthroughLookbackWindow = 30 - uploadConversion.ctcLookbackWindow = 90 - - ' Optional: Set the default currency code to use for conversions - ' that do not specify a conversion currency. This must be an ISO 4217 - ' 3-character currency code such as "EUR" or "USD". - ' If this field is not set on this UploadConversion, AdWords will use - ' the account's currency. - uploadConversion.defaultRevenueCurrencyCode = "EUR" - - ' Optional: Set the default revenue value to use for conversions - ' that do not specify a conversion value. Note that this value - ' should NOT be in micros. - uploadConversion.defaultRevenueValue = 2.5 - - ' Optional: To upload fractional conversion credits, mark the upload conversion - ' as externally attributed. See - ' https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions - ' to learn more about importing externally attributed conversions. - - ' uploadConversion.isExternallyAttributed = True - - conversionTrackers.Add(uploadConversion) - ' [END createUploadConversion] MOE:strip_line - - Try - ' [START mutateRequest] MOE:strip_line - ' Create operations. - Dim operations As New List(Of ConversionTrackerOperation) - For Each conversionTracker As ConversionTracker In conversionTrackers - Dim operation As New ConversionTrackerOperation() - operation.operator = [Operator].ADD - operation.operand = conversionTracker - operations.Add(operation) - Next - - ' Add conversion tracker. - Dim retval As ConversionTrackerReturnValue = conversionTrackerService.mutate( - operations.ToArray()) - ' [END mutateRequest] MOE:strip_line - - ' Display the results. - If (Not retval Is Nothing) AndAlso (Not retval.value Is Nothing) AndAlso - retval.value.Length > 0 Then - For Each conversionTracker As ConversionTracker In retval.value - Console.WriteLine( - "Conversion with ID {0}, name '{1}', status '{2}' and " & - "category '{3}' was added.", conversionTracker.id, - conversionTracker.name, - conversionTracker.status, conversionTracker.category) - - If TypeOf conversionTracker Is AdWordsConversionTracker Then - Dim newAdWordsConversionTracker As AdWordsConversionTracker = - CType(conversionTracker, AdWordsConversionTracker) - - Console.WriteLine( - "Google global site tag:\n{0}\nGoogle event snippet:\n{1}", - newAdWordsConversionTracker.googleGlobalSiteTag, - newAdWordsConversionTracker.googleEventSnippet - ) - Else - End If - Next - Else - Console.WriteLine("No conversion trackers were added.") - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to add conversion trackers.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/AddCrmBasedUserList.vb b/examples/AdWords/Vb/v201806/Remarketing/AddCrmBasedUserList.vb deleted file mode 100755 index 7b2451f4d0c..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/AddCrmBasedUserList.vb +++ /dev/null @@ -1,189 +0,0 @@ -' Copyright 2018 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. - -Imports System.Security.Cryptography -Imports System.Text -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a user list (a.k.a. audience) and uploads hashed - ''' email addresses to populate the list. - ''' - '''

- ''' Note: It may take up to several hours for the list to be - ''' populated with members. Email addresses must be associated with a Google - ''' account. For privacy purposes, the user list size will show as zero until - ''' the list has at least 1000 members. After that, the size will be rounded - ''' to the two most significant digits. - '''

- '''
- Public Class AddCrmBasedUserList - Inherits ExampleBase - - Private Shared ReadOnly EMAILS As String() = New String() { _ - "customer1@example.com", - "customer2@example.com", - " Customer3@example.com " - } - - Private Const FIRST_NAME As String = "John" - Private Const LAST_NAME As String = "Doe" - Private Const COUNTRY_CODE As String = "US" - Private Const ZIP_CODE As String = "10001" - - Private Shared digest As SHA256 = SHA256.Create() - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCrmBasedUserList - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code " & - "example. {0}", ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a user list (a.k.a. audience) and " & - "uploads hashed email addresses to populate the list." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using userListService As AdwordsUserListService = CType( - user.GetService( - AdWordsService.v201806.AdwordsUserListService), - AdwordsUserListService) - - ' Create a user list. - Dim userList As New CrmBasedUserList - userList.name = "Customer relationship management list #" & - ExampleUtilities.GetRandomString() - userList.description = "A list of customers that originated from email addresses" - - ' CRM-based user lists can use a membershipLifeSpan of 10000 to indicate - ' unlimited; otherwise normal values apply. - userList.membershipLifeSpan = 30L - userList.uploadKeyType = CustomerMatchUploadKeyType.CONTACT_INFO - - ' Create operation. - Dim operation As New UserListOperation - operation.operand = userList - operation.operator = [Operator].ADD - - Try - ' Add user list. - Dim result As UserListReturnValue = userListService.mutate( - New UserListOperation() {operation}) - - Console.WriteLine("Created new user list with name = '{0}' and " & - "id = '{1}'.", result.value(0).name, result.value(0).id) - - ' Get user list ID. - Dim userListId As Long = result.value(0).id - - ' Prepare the emails for upload. - Dim memberList As New List(Of Member)() - - ' Hash normalized email addresses based on SHA-256 hashing algorithm. - For i As Integer = 0 To EMAILS.Length - 1 - Dim member As New Member() - member.hashedEmail = ToSha256String(digest, ToNormalizedEmail(EMAILS(i))) - memberList.Add(member) - Next - - ' Add a user by first and last name. - Dim addressInfo As New AddressInfo() - ' First and last name must be normalized and hashed. - - addressInfo.hashedFirstName = ToSha256String(digest, FIRST_NAME) - addressInfo.hashedLastName = ToSha256String(digest, LAST_NAME) - ' Country code and zip code are sent in plaintext. - - addressInfo.zipCode = ZIP_CODE - addressInfo.countryCode = COUNTRY_CODE - - Dim memberByAddress As New Member() - memberByAddress.addressInfo = addressInfo - memberList.Add(memberByAddress) - - ' Create operation to add members to the user list based on email - ' addresses. - Dim mutateMembersOperation As New MutateMembersOperation - mutateMembersOperation.operand = New MutateMembersOperand() - mutateMembersOperation.operand.userListId = userListId - mutateMembersOperation.operand.membersList = memberList.ToArray() - mutateMembersOperation.operator = [Operator].ADD - - ' Add members to the user list based on email addresses. - Dim mutateMembersResult As MutateMembersReturnValue = - userListService.mutateMembers( - New MutateMembersOperation() {mutateMembersOperation}) - - ' Display results. - ' Reminder: it may take several hours for the list to be populated with - ' members. - For Each userListResult As UserList In mutateMembersResult.userLists - Console.WriteLine("Email addresses were added to user list with " & - "name '{0}' and id '{1}'.", - userListResult.name, userListResult.id) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to add user lists " & - "(a.k.a. audiences) and upload email " & - "addresses.", - e) - End Try - End Using - End Sub - - ''' - ''' Hash email address using SHA-256 hashing algorithm. - ''' - ''' Provides the algorithm for SHA-256. - ''' The email address to hash. - ''' Hash email address using SHA-256 hashing algorithm. - Private Shared Function ToSha256String(ByVal digest As SHA256, - ByVal email As String) As String - Dim digestBytes As Byte() = digest.ComputeHash(Encoding.UTF8.GetBytes(email)) - ' Convert the byte array into an unhyphenated hexadecimal string. - Return BitConverter.ToString(digestBytes).Replace("-", String.Empty) - End Function - - ''' - ''' Removes leading and trailing whitespace and converts all characters to - ''' lower case. - ''' - ''' The email address to normalize. - ''' A normalized copy of the string. - Private Shared Function ToNormalizedEmail(ByVal email As String) As String - Return email.Trim().ToLower() - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/AddRuleBasedRemarketingList.vb b/examples/AdWords/Vb/v201806/Remarketing/AddRuleBasedRemarketingList.vb deleted file mode 100755 index 1d178e93449..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/AddRuleBasedRemarketingList.vb +++ /dev/null @@ -1,248 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds two rule-based remarketing user lists: one with no - ''' site visit date restrictions, and another that will only include users - ''' who visit your site in the next six months. See - ''' https://developers.google.com/adwords/api/docs/guides/rule-based-remarketing - ''' to learn more about rule based remarketing. - ''' - Public Class AddRuleBasedRemarketingList - Inherits ExampleBase - Private Const DATE_FORMAT_STRING As String = "yyyyMMdd" - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddRuleBasedRemarketingList - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds two rule-based remarketing user lists: one with no " & - "site visit date restrictions, and another that will only include users who " & - "visit your site in the next six months. See " & - "https://developers.google.com/adwords/api/docs/guides/rule-based-remarketing" & - " to learn more about rule based remarketing." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using userListService As AdwordsUserListService = CType( - user.GetService( - AdWordsService.v201806.AdwordsUserListService), - AdwordsUserListService) - - ' First rule item group - users who visited the checkout page and had - ' more than one item in their shopping cart. - Dim checkoutStringRuleItem As New StringRuleItem() - checkoutStringRuleItem.key = New StringKey() - checkoutStringRuleItem.key.name = "ecomm_pagetype" - checkoutStringRuleItem.op = StringRuleItemStringOperator.EQUALS - checkoutStringRuleItem.value = "checkout" - - Dim checkoutRuleItem As New RuleItem() - checkoutRuleItem.Item = checkoutStringRuleItem - - Dim cartSizeNumberRuleItem As New NumberRuleItem() - cartSizeNumberRuleItem.key = New NumberKey() - cartSizeNumberRuleItem.key.name = "cartsize" - cartSizeNumberRuleItem.op = NumberRuleItemNumberOperator.GREATER_THAN - cartSizeNumberRuleItem.value = 1 - - Dim cartSizeRuleItem As New RuleItem() - cartSizeRuleItem.Item = cartSizeNumberRuleItem - - ' Combine the two rule items into a RuleItemGroup so AdWords will AND - ' their(rules) together. - Dim checkoutMultipleItemGroup As New RuleItemGroup() - checkoutMultipleItemGroup.items = New RuleItem() _ - {checkoutRuleItem, cartSizeRuleItem} - - ' Second rule item group - users who check out within the next 3 months. - Dim startDateDateRuleItem As New DateRuleItem() - startDateDateRuleItem.key = New DateKey() - startDateDateRuleItem.key.name = "checkoutdate" - startDateDateRuleItem.op = DateRuleItemDateOperator.AFTER - startDateDateRuleItem.value = DateTime.Now.ToString(DATE_FORMAT_STRING) - Dim startDateRuleItem As New RuleItem() - startDateRuleItem.Item = startDateDateRuleItem - - Dim endDateDateRuleItem As New DateRuleItem() - endDateDateRuleItem.key = New DateKey() - endDateDateRuleItem.key.name = "checkoutdate" - endDateDateRuleItem.op = DateRuleItemDateOperator.BEFORE - endDateDateRuleItem.value = DateTime.Now.AddMonths(3).ToString(DATE_FORMAT_STRING) - Dim endDateRuleItem As New RuleItem() - endDateRuleItem.Item = endDateDateRuleItem - - ' Combine the date rule items into a RuleItemGroup. - Dim checkedOutNextThreeMonthsItemGroup As New RuleItemGroup() - checkedOutNextThreeMonthsItemGroup.items = - New RuleItem() {startDateRuleItem, endDateRuleItem} - - ' Combine the rule item groups into a Rule so AdWords knows how to apply the rules. - Dim rule As New Rule() - rule.groups = New RuleItemGroup() { _ - checkoutMultipleItemGroup, - checkedOutNextThreeMonthsItemGroup - } - - ' ExpressionRuleUserLists can use either CNF Or DNF For matching. CNF means - ' 'at least one item in each rule item group must match', and DNF means 'at - ' least one entire rule item group must match'. - ' DateSpecificRuleUserList only supports DNF. You can also omit the rule - ' type altogether To Default To DNF. - rule.ruleType = UserListRuleTypeEnumsEnum.DNF - - - ' Third And fourth rule item groups. - ' [START createRules] MOE:strip_line - ' Visitors of a page who visited another page. See - ' https//developers.google.com/adwords/api/docs/reference/latest/AdwordsUserListService.StringKey - ' for more details. - Dim urlStringKey As New StringKey() - urlStringKey.name = "url__" - - Dim site1StringRuleItem As New StringRuleItem() - site1StringRuleItem.key = urlStringKey - site1StringRuleItem.op = StringRuleItemStringOperator.EQUALS - site1StringRuleItem.value = "example.com/example1" - Dim site1RuleItem As New RuleItem() - site1RuleItem.Item = site1StringRuleItem - - Dim site2StringRuleItem As New StringRuleItem() - site2StringRuleItem.key = urlStringKey - site2StringRuleItem.op = StringRuleItemStringOperator.EQUALS - site2StringRuleItem.value = "example.com/example2" - Dim site2RuleItem As New RuleItem() - site2RuleItem.Item = site2StringRuleItem - - ' Create two RuleItemGroups to show that a visitor browsed two sites. - Dim site1RuleItemGroup As New RuleItemGroup() - site1RuleItemGroup.items = New RuleItem() {site1RuleItem} - Dim site2RuleItemGroup As New RuleItemGroup() - site2RuleItemGroup.items = New RuleItem() {site2RuleItem} - - ' Create two rules to show that a visitor browsed two sites. - Dim userVisitedSite1Rule As New Rule() - userVisitedSite1Rule.groups = New RuleItemGroup() {site1RuleItemGroup} - - Dim userVisitedSite2Rule As New Rule() - userVisitedSite2Rule.groups = New RuleItemGroup() {site2RuleItemGroup} - ' [END createRules] MOE:strip_line - - ' Create the user list with no restrictions on site visit date. - Dim expressionUserList As New ExpressionRuleUserList() - Dim creationTimeString As String = DateTime.Now.ToString("yyyyMMdd_HHmmss") - - expressionUserList.name = "Expression based user list created at " + - creationTimeString - expressionUserList.description = "Users who checked out in three month window OR " & - "visited the checkout page with more than one " & - "item in their cart." - expressionUserList.rule = rule - - ' Optional: Set the prepopulationStatus to REQUESTED to include past users - ' in the user list. - expressionUserList.prepopulationStatus = - RuleBasedUserListPrepopulationStatus.REQUESTED - - ' Create the user list restricted to users who visit your site within - ' the next six months. - Dim startDate As DateTime = DateTime.Now - Dim endDate As DateTime = startDate.AddMonths(6) - - Dim dateUserList As New DateSpecificRuleUserList() - dateUserList.name = "Date rule user list created at " + creationTimeString - dateUserList.description = - String.Format("Users who visited the site between {0} and " & - "{1} and checked out in three month window OR visited the " & - "checkout page with more than one item in their cart.", - startDate.ToString(DATE_FORMAT_STRING), - endDate.ToString(DATE_FORMAT_STRING)) - dateUserList.rule = rule - - ' Set the start and end dates of the user list. - dateUserList.startDate = startDate.ToString(DATE_FORMAT_STRING) - dateUserList.endDate = endDate.ToString(DATE_FORMAT_STRING) - - ' [START createCombinedRuleUserList] MOE:strip_line - ' Create the user list where "Visitors of a page who did visit another page". - ' To create a user list where "Visitors of a page who did not visit another - ' page", change the ruleOperator from And to AND_NOT. - Dim CombinedRuleUserList As New CombinedRuleUserList() - CombinedRuleUserList.name = "Combined rule user list created at " + - creationTimeString - CombinedRuleUserList.description = "Users who visited two sites." - CombinedRuleUserList.leftOperand = userVisitedSite1Rule - CombinedRuleUserList.rightOperand = userVisitedSite2Rule - CombinedRuleUserList.ruleOperator = CombinedRuleUserListRuleOperator.AND - ' [END createCombinedRuleUserList] MOE:strip_line - - ' Create operations to add the user lists. - Dim operations As New List(Of UserListOperation) - For Each userList As UserList In New UserList() {expressionUserList, dateUserList, - CombinedRuleUserList} - Dim operation As New UserListOperation() - operation.operand = userList - operation.operator = [Operator].ADD - operations.Add(operation) - Next - - Try - ' Submit the operations. - Dim result As UserListReturnValue = userListService.mutate(operations.ToArray()) - - ' Display the results. - For Each userListResult As UserList In result.value - Console.WriteLine( - "User list added with ID {0}, name '{1}', status '{2}', " + - "list type '{3}', accountUserListStatus '{4}', description '{5}'.", - userListResult.id, - userListResult.name, - userListResult.status, - userListResult.listType, - userListResult.accountUserListStatus, - userListResult.description) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to add rule based user lists.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineCallConversions.vb b/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineCallConversions.vb deleted file mode 100755 index 6c922eb6ae1..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineCallConversions.vb +++ /dev/null @@ -1,122 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example imports offline call conversion values for calls related - ''' to the ads in your account. - ''' - Public Class UploadOfflineCallConversions - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim conversionName As String = "INSERT_CONVERSION_NAME_HERE" - - ' For times use the format yyyyMMdd HHmmss tz. For more details on formats, see: - ' https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats - ' For time zones, see: - ' https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids - - ' The conversion time should be after the call start time. - Dim conversionTime As String = "INSERT_CONVERSION_TIME_HERE" - Dim callStartTime As String = "INSERT_CALL_START_TIME_HERE" - - Dim conversionValue As Double = Double.Parse("INSERT_CONVERSION_VALUE_HERE") - Dim callerId As String = "INSERT_CALLER_ID_HERE" - - Dim codeExample As New UploadOfflineCallConversions - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser, conversionName, callStartTime, callerId, - conversionTime, conversionValue) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example imports offline call conversion values for calls related " & - " to the ads in your account." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The name of the call conversion to be updated. - ''' The call start time. - ''' The conversion value to be uploaded. - ''' The caller ID to be uploaded. - ''' The conversion time, in yyyymmdd hhmmss format. - Public Sub Run(ByVal user As AdWordsUser, ByVal conversionName As String, - ByVal callStartTime As String, ByVal callerId As String, - ByVal conversionTime As String, ByVal conversionValue As Double) - ' [START uploadOfflineCallConversions] MOE:strip_line - Using offlineCallConversionFeedService As OfflineCallConversionFeedService = - CType(user.GetService(AdWordsService.v201806.OfflineCallConversionFeedService), - OfflineCallConversionFeedService) - - ' Associate offline call conversions with the existing named conversion tracker. If - ' this tracker was newly created, it may be a few hours before it can accept - ' conversions. - Dim feed As New OfflineCallConversionFeed() - feed.callerId = callerId - feed.callStartTime = callStartTime - feed.conversionName = conversionName - feed.conversionTime = conversionTime - feed.conversionValue = conversionValue - - Dim feedOperation As New OfflineCallConversionFeedOperation() - feedOperation.operator = [Operator].ADD - feedOperation.operand = feed - - Try - ' This example uploads only one call conversion, but you can upload - ' multiple call conversions by passing additional operations. - Dim offlineCallConversionReturnValue As OfflineCallConversionFeedReturnValue = - offlineCallConversionFeedService.mutate( - New OfflineCallConversionFeedOperation() _ - {feedOperation}) - - ' Display results. - For Each feedResult As OfflineCallConversionFeed In _ - offlineCallConversionReturnValue.value - Console.WriteLine( - "Uploaded offline call conversion value of {0} for caller ID '{1}'.", - feedResult.conversionValue, feedResult.callerId) - Next - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to upload offline call conversions.", - e) - End Try - End Using - ' [END uploadOfflineCallConversions] MOE:strip_line - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversionAdjustments.vb b/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversionAdjustments.vb deleted file mode 100755 index 472756d00d6..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversionAdjustments.vb +++ /dev/null @@ -1,117 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example demonstrates adjusting one conversion, but you can add more than one - ''' operation in a single mutate request. - ''' - Public Class UploadOfflineConversionAdjustments - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New UploadOfflineConversionAdjustments - Console.WriteLine(codeExample.Description) - Try - Dim conversionName As String = "INSERT_CONVERSION_NAME_HERE" - Dim gclid As String = "INSERT_GOOGLE_CLICK_ID_HERE" - Dim conversionTime As String = "INSERT_CONVERSION_TIME_HERE" - Dim adjustmentType As OfflineConversionAdjustmentType = - DirectCast([Enum].Parse(GetType(OfflineConversionAdjustmentType), - "INSERT_ADJUSTMENT_TYPE_HERE"), - OfflineConversionAdjustmentType) - Dim adjustmentTime As String = "INSERT_ADGROUP_ID_HERE" - Dim adjustedValue As Double = Double.Parse("INSERT_ADGROUP_ID_HERE") - - codeExample.Run(New AdWordsUser, conversionName, gclid, conversionTime, - adjustmentType, - adjustmentTime, adjustedValue) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example demonstrates adjusting one conversion, but you can add more " + - "than one operation in a single mutate request." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Name of the conversion to make adjustments. - ''' The google click ID for the adjustment. - ''' The conversion time. - ''' The type of conversion adjustment. - ''' The conversion adjustment time. - ''' The conversion adjustment value. - Public Sub Run(ByVal user As AdWordsUser, ByVal conversionName As String, - ByVal gclid As String, ByVal conversionTime As String, - ByVal adjustmentType As OfflineConversionAdjustmentType, - ByVal adjustmentTime As String, - ByVal adjustedValue As Double) - Using service As OfflineConversionAdjustmentFeedService = CType( - user.GetService( - AdWordsService.v201806.OfflineConversionAdjustmentFeedService), - OfflineConversionAdjustmentFeedService) - - ' Associate conversion adjustments with the existing named conversion - ' tracker. The GCLID should have been uploaded before with a - ' conversion. - Dim feed As New GclidOfflineConversionAdjustmentFeed() - feed.conversionName = conversionName - feed.googleClickId = gclid - feed.conversionTime = conversionTime - feed.adjustmentType = adjustmentType - feed.adjustmentTime = adjustmentTime - feed.adjustedValue = adjustedValue - - ' Create the operation. - Dim operation As New OfflineConversionAdjustmentFeedOperation() - operation.operator = [Operator].ADD - operation.operand = feed - - Try - ' Issue a request to the servers for adjustments of the conversion. - Dim retval As OfflineConversionAdjustmentFeedReturnValue = service.mutate( - New OfflineConversionAdjustmentFeedOperation() {operation}) - Dim updatedFeed As GclidOfflineConversionAdjustmentFeed = - CType(retval.value(0), GclidOfflineConversionAdjustmentFeed) - - Console.WriteLine("Uploaded conversion adjustment value of '{0}' for Google " + - "Click ID '{1}'.", updatedFeed.conversionName, - updatedFeed.googleClickId) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to update conversion adjustment.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversions.vb b/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversions.vb deleted file mode 100755 index 3029d52413c..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineConversions.vb +++ /dev/null @@ -1,128 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example imports offline conversion values for specific clicks to - ''' your account. To get Google Click ID for a click, run - ''' CLICK_PERFORMANCE_REPORT. To set up a conversion tracker, run the - ''' AddConversionTrackers.vb example. - ''' - Public Class UploadOfflineConversions - Inherits ExampleBase - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example imports offline conversion values for specific clicks to " & - "your account. To get Google Click ID for a click, run " & - "CLICK_PERFORMANCE_REPORT. To set up a conversion tracker, run the " & - "AddConversionTrackers.vb example." - End Get - End Property - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim conversionName As String = "INSERT_CONVERSION_NAME_HERE" - ' GCLID needs to be newer than 30 days. - Dim gClId As String = "INSERT_GOOGLE_CLICK_ID_HERE" - ' The conversion time should be higher than the click time. - Dim conversionTime As String = "INSERT_CONVERSION_TIME_HERE" - Dim conversionValue As Double = Double.Parse("INSERT_CONVERSION_VALUE_HERE") - - Dim codeExample As New UploadOfflineConversions - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser, conversionName, gClId, conversionTime, - conversionValue) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ' [START uploadOfflineConversions] MOE:strip_line - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The name of the upload conversion to be - ''' created. - ''' The Google Click ID of the click for which offline - ''' conversions are uploaded. - ''' The conversion value to be uploaded. - ''' - ''' The conversion time, in yyyymmdd hhmmss - ''' format. - Public Sub Run(ByVal user As AdWordsUser, ByVal conversionName As String, - ByVal gClid As String, ByVal conversionTime As String, - ByVal conversionValue As Double) - Using _ - offlineConversionFeedService As OfflineConversionFeedService = - CType( - user.GetService( - AdWordsService.v201806.OfflineConversionFeedService), - OfflineConversionFeedService) - - Try - ' Associate offline conversions with the existing named conversion tracker. If - ' this tracker was newly created, it may be a few hours before it can accept - ' conversions. - Dim feed As New OfflineConversionFeed() - feed.conversionName = conversionName - feed.conversionTime = conversionTime - feed.conversionValue = conversionValue - feed.googleClickId = gClid - - ' Optional: To upload fractional conversion credits, set the external - ' attribution model and credit. To use this feature, your conversion tracker - ' should be marked as externally attributed. See - ' https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions - ' to learn more about importing externally attributed conversions. - - ' feed.externalAttributionModel = "Linear" - ' feed.externalAttributionCredit = 0.3 - - Dim offlineConversionOperation As New OfflineConversionFeedOperation() - offlineConversionOperation.operator = [Operator].ADD - offlineConversionOperation.operand = feed - - Dim offlineConversionRetval As OfflineConversionFeedReturnValue = - offlineConversionFeedService.mutate( - New OfflineConversionFeedOperation() {offlineConversionOperation}) - - Dim newFeed As OfflineConversionFeed = offlineConversionRetval.value(0) - - Console.WriteLine( - "Uploaded offline conversion value of {0} for Google Click ID = " & - "'{1}' to '{2}'.", newFeed.conversionValue, newFeed.googleClickId, - newFeed.conversionName) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to upload offline conversions.", e) - End Try - End Using - End Sub - ' [END uploadOfflineConversions] MOE:strip_line - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineData.vb b/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineData.vb deleted file mode 100755 index ba86ceda6cb..00000000000 --- a/examples/AdWords/Vb/v201806/Remarketing/UploadOfflineData.vb +++ /dev/null @@ -1,323 +0,0 @@ -' Copyright 2018 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. - -Imports System.Security.Cryptography -Imports System.Text -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example shows how to upload offline data for store sales transactions. - ''' - Public Class UploadOfflineData - Inherits ExampleBase - - Private digest As SHA256 = SHA256.Create() - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - ' The external upload ID can be any number that you use to keep track of your uploads. - Dim externalUploadId As Long = Long.Parse("INSERT_EXTERNAL_UPLOAD_ID") - - ' Insert the conversion type name that you'd like to attribute this upload to. - Dim conversionName As String = "INSERT_CONVERSION_NAME" - - ' Insert email addresses below for creating user identifiers. - Dim emailAddresses As String() = {"EMAIL_ADDRESS_1", "EMAIL_ADDRESS_2"} - - ' Insert advertiser upload time. // For times, use the format yyyyMMdd HHmmss tz. For - ' more details on formats, see: - ' https//developers.google.com/adwords/api/docs/appendix/codes-formats#date-And-time-formats - ' For time zones, see: - ' https//developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids - Dim advertiserUploadTime As String = "INSERT_ADVERTISER_UPLOAD_TIME" - - ' Insert bridge map version ID. - Dim bridgeMapVersionId As String = "INSERT_BRIDGEMAP_VERSION_ID" - - ' Specify the upload type (STORE_SALES_UPLOAD_FIRST_PARTY or - ' STORE_SALES_UPLOAD_THIRD_PARTY) - Dim uploadType As OfflineDataUploadType = DirectCast( - [Enum].Parse( - GetType(OfflineDataUploadType), "INSERT_UPLOAD_TYPE"), - OfflineDataUploadType) - - ' Insert partner ID. - Dim partnerId As Integer = Integer.Parse("INSERT_PARTNER_ID") - - Dim codeExample As New UploadOfflineData - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser, conversionName, externalUploadId, emailAddresses, - advertiserUploadTime, bridgeMapVersionId, uploadType, partnerId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example shows how to upload offline data for store sales " & - "transactions." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The conversion type name that you'd like to attribute this - ''' upload to. - ''' The external upload ID can be any number that you use to - ''' keep track of your uploads. - ''' The email addresses for creating user identifiers. - ''' The advertiser upload time. For times, use the format - ''' yyyyMMdd HHmmss tz. For more details on formats, see - ''' https//developers.google.com/adwords/api/docs/appendix/codes-formats#date-And-time-formats - ''' For time zones, see: - ''' https//developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids - ''' - ''' The version ID of the bridge map. - ''' The offline data upload type. - ''' The partner ID - Public Sub Run(ByVal user As AdWordsUser, ByVal conversionName As String, - ByVal externalUploadId As Long, ByVal emailAddresses As String(), - ByVal advertiserUploadTime As String, ByVal bridgeMapVersionId As String, - ByVal uploadType As OfflineDataUploadType, ByVal partnerId As Integer) - Using offlineDataUploadService As OfflineDataUploadService = CType( - user.GetService( - AdWordsService.v201806.OfflineDataUploadService), - OfflineDataUploadService) - - offlineDataUploadService.RequestHeader.partialFailure = True - - ' Create the first offline data row for upload. - ' This transaction occurred 7 days ago with amount of 200 USD. - Dim transactionTime1 As DateTime = DateTime.Now - transactionTime1.AddDays(- 7) - Dim transactionAmount1 As Long = 200000000 - Dim transactionCurrencyCode1 As String = "USD" - Dim userIdentifierList1 As UserIdentifier() = - { _ - CreateUserIdentifier( - OfflineDataUploadUserIdentifierType.HASHED_EMAIL, - emailAddresses(0)), - CreateUserIdentifier( - OfflineDataUploadUserIdentifierType.STATE, - "New York") - } - - Dim offlineData1 As OfflineData = CreateOfflineDataRow(transactionTime1, - transactionAmount1, - transactionCurrencyCode1, - conversionName, - userIdentifierList1) - - ' Create the second offline data row for upload. - ' This transaction occurred 14 days ago with amount of 450 EUR. - Dim transactionTime2 As DateTime = DateTime.Now - transactionTime2.AddDays(- 14) - Dim transactionAmount2 As Long = 450000000 - Dim transactionCurrencyCode2 As String = "EUR" - Dim userIdentifierList2 As UserIdentifier() = - { _ - CreateUserIdentifier( - OfflineDataUploadUserIdentifierType.HASHED_EMAIL, - emailAddresses(1) - ), - CreateUserIdentifier( - OfflineDataUploadUserIdentifierType.STATE, - "California") - } - Dim offlineData2 As OfflineData = CreateOfflineDataRow(transactionTime2, - transactionAmount2, - transactionCurrencyCode2, - conversionName, - userIdentifierList2) - - ' Create offline data upload object. - Dim offlineDataUpload As New OfflineDataUpload() - offlineDataUpload.externalUploadId = externalUploadId - offlineDataUpload.offlineDataList = New OfflineData() {offlineData1, offlineData2} - - ' Set the type And metadata of this upload. - offlineDataUpload.uploadType = uploadType - Dim uploadMetadata As New UploadMetadata() - - Select Case uploadType - Case OfflineDataUploadType.STORE_SALES_UPLOAD_FIRST_PARTY - Dim firstPartyMetaData As New FirstPartyUploadMetadata() - firstPartyMetaData.loyaltyRate = 1 - firstPartyMetaData.transactionUploadRate = 1 - uploadMetadata.Item = firstPartyMetaData - - Case OfflineDataUploadType.STORE_SALES_UPLOAD_THIRD_PARTY - Dim thirdPartyMetadata As New ThirdPartyUploadMetadata() - thirdPartyMetadata.loyaltyRate = 1.0 - thirdPartyMetadata.transactionUploadRate = 1.0 - thirdPartyMetadata.advertiserUploadTime = advertiserUploadTime - thirdPartyMetadata.validTransactionRate = 1.0 - thirdPartyMetadata.partnerMatchRate = 1.0 - thirdPartyMetadata.partnerUploadRate = 1.0 - thirdPartyMetadata.bridgeMapVersionId = bridgeMapVersionId - thirdPartyMetadata.partnerId = partnerId - uploadMetadata.Item = thirdPartyMetadata - End Select - - offlineDataUpload.uploadMetadata = uploadMetadata - - ' Create an offline data upload operation. - Dim offlineDataUploadOperation As New OfflineDataUploadOperation() - offlineDataUploadOperation.operator = [Operator].ADD - offlineDataUploadOperation.operand = offlineDataUpload - - ' Keep the operations in an array, so it may be reused later for error processing. - Dim operations As New List(Of OfflineDataUploadOperation) - operations.Add(offlineDataUploadOperation) - - Try - ' Upload offline data to the server. - Dim result As OfflineDataUploadReturnValue = offlineDataUploadService.mutate( - New OfflineDataUploadOperation() {offlineDataUploadOperation}) - offlineDataUpload = result.value(0) - - ' Print any partial failure errors from the response. - If Not result.partialFailureErrors Is Nothing Then - For Each apiError As ApiError In result.partialFailureErrors - ' Get the index of the failed operation from the error's field path - ' elements. - Dim operationIndex As Integer = apiError.GetOperationIndex() - If operationIndex <> - 1 Then - Dim failedOfflineDataUpload As OfflineDataUpload = - operations(operationIndex).operand - ' Get the index of the entry in the offline data list from the - ' error's field path - ' elements. - Dim offlineDataListIndex As Integer = - apiError.GetFieldPathIndex("offlineDataList") - Console.WriteLine( - "Offline data list entry {0} in operation {1} with external " & - "upload ID {2} and type '{3}' has triggered a failure for the" & - " following reason: '{4}'.", - offlineDataListIndex, - operationIndex, - failedOfflineDataUpload.externalUploadId, - failedOfflineDataUpload.uploadType, - apiError.errorString) - Else - Console.WriteLine( - "A failure has occurred for the following reason: {0}", - apiError.errorString) - End If - Next - End If - - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to upload offline conversions.", e) - End Try - End Using - End Sub - - ''' - ''' Creates the offline data row from the specified transaction time, transaction micro - ''' amount, transaction currency, conversion name And user identifier list. - ''' - ''' The transaction time. - ''' The transaction micro amount. - ''' The transaction currency. - ''' Name of the conversion. - ''' The user identifier list. - ''' The offline data. - Function CreateOfflineDataRow(ByVal transactionTime As DateTime, - ByVal transactionMicroAmount As Long, - ByVal transactionCurrency As String, - ByVal conversionName As String, - ByVal userIdentifierList As UserIdentifier()) _ - As OfflineData - Dim storeSalesTransaction As New StoreSalesTransaction() - - ' For times use the format yyyyMMdd HHmmss [tz]. - ' For details, see - ' https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-And-time-formats - storeSalesTransaction.transactionTime = transactionTime.ToString("yyyyMMdd HHmmss") - storeSalesTransaction.conversionName = conversionName - storeSalesTransaction.userIdentifiers = userIdentifierList - - Dim money As New Money() - money.microAmount = transactionMicroAmount - Dim moneyWithCurrency As New RemarketingMoneyWithCurrency() - moneyWithCurrency.money = money - moneyWithCurrency.currencyCode = transactionCurrency - storeSalesTransaction.transactionAmount = moneyWithCurrency - - Dim offlineData As New OfflineData() - offlineData.Item = storeSalesTransaction - - Return offlineData - End Function - - ''' - ''' Hash a string value using SHA-256 hashing algorithm. - ''' - ''' Provides the algorithm for SHA-256. - ''' The string value (e.g. an email address) to hash. - ''' The hashed value. - Private Shared Function ToSha256String(ByVal digest As SHA256, - ByVal value As String) As String - Dim digestBytes As Byte() = digest.ComputeHash(Encoding.UTF8.GetBytes(value)) - ' Convert the byte array into an unhyphenated hexadecimal string. - Return BitConverter.ToString(digestBytes).Replace("-", String.Empty) - End Function - - ''' - ''' Creates the user identifier. - ''' - ''' The user identifier type. - ''' The user identifier value. - ''' - Function CreateUserIdentifier(ByVal type As OfflineDataUploadUserIdentifierType, - ByVal value As String) As UserIdentifier - ' If the user identifier type Is a hashed type, also call hash function - ' on the value. - If type.ToString().StartsWith("HASHED_") Then - value = ToSha256String(digest, ToNormalizedValue(value)) - End If - Dim userIdentifier As New UserIdentifier() - userIdentifier.userIdentifierType = type - userIdentifier.value = value - - Return userIdentifier - End Function - - ''' - ''' Removes leading And trailing whitespace And converts all characters to - ''' lower case. - ''' - ''' The value to normalize. - ''' The normalized value. - Private Shared Function ToNormalizedValue(ByVal value As String) As String - Return value.Trim().ToLower() - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithAwql.vb b/examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithAwql.vb deleted file mode 100755 index b8ec29b8e03..00000000000 --- a/examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithAwql.vb +++ /dev/null @@ -1,90 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util.Reports - -Imports System.IO - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets and downloads a criteria Ad Hoc report from an AWQL - ''' query. See https://developers.google.com/adwords/api/docs/guides/awql for - ''' AWQL documentation. - ''' - Public Class DownloadCriteriaReportWithAwql - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New DownloadCriteriaReportWithAwql - Console.WriteLine(codeExample.Description) - Try - Dim fileName As String = "INSERT_OUTPUT_FILE_NAME" - codeExample.Run(New AdWordsUser, fileName) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets and downloads a criteria Ad Hoc report from an AWQL" & - " query. See https://developers.google.com/adwords/api/docs/guides/awql for" & - " AWQL documentation." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The file to which the report is downloaded. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal fileName As String) - Dim query As ReportQuery = New ReportQueryBuilder() _ - .Select("CampaignId", "AdGroupId", "Id", "Criteria", "CriteriaType", - "Impressions", "Clicks", "Cost") _ - .From(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT) _ - .Where("Status").In("ENABLED", "PAUSED") _ - .During(ReportDefinitionDateRangeType.LAST_7_DAYS) _ - .Build() - - Dim filePath As String = ExampleUtilities.GetHomeDir() + Path.DirectorySeparatorChar & - fileName - - Try - Dim utilities As New ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_CSV.ToString()) - Using reportResponse As ReportResponse = utilities.GetResponse() - reportResponse.Save(filePath) - End Using - Console.WriteLine("Report was downloaded to '{0}'.", filePath) - Catch e As Exception - Throw New System.ApplicationException("Failed to download report.", e) - End Try - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithSelector.vb b/examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithSelector.vb deleted file mode 100755 index f832890f1c3..00000000000 --- a/examples/AdWords/Vb/v201806/Reporting/DownloadCriteriaReportWithSelector.vb +++ /dev/null @@ -1,108 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util.Reports - -Imports System.IO - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets and downloads a criteria Ad Hoc report from an XML - ''' report definition. - ''' - Public Class DownloadCriteriaReportWithSelector - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New DownloadCriteriaReportWithSelector - Console.WriteLine(codeExample.Description) - Try - Dim fileName As String = "INSERT_OUTPUT_FILE_NAME" - codeExample.Run(New AdWordsUser, fileName) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets and downloads a criteria Ad Hoc report from an XML " & - "report definition." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The file to which the report is downloaded. - ''' - Public Sub Run(ByVal user As AdWordsUser, ByVal fileName As String) - Dim definition As New ReportDefinition - - definition.reportName = "Last 7 days CRITERIA_PERFORMANCE_REPORT" - definition.reportType = ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT - definition.downloadFormat = DownloadFormat.GZIPPED_CSV - definition.dateRangeType = ReportDefinitionDateRangeType.LAST_7_DAYS - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() _ - {"CampaignId", "AdGroupId", "Id", "CriteriaType", "Criteria", - "FinalUrls", "Clicks", "Impressions", "Cost"} - - selector.predicates = New Predicate() { _ - Predicate.In("Status", - New String() _ - {"ENABLED", "PAUSED"}) - } - - definition.selector = selector - - ' Optional: Include zero impression rows. - DirectCast(user.Config, AdWordsAppConfig).IncludeZeroImpressions = True - - ' Optional: You can also skip the report headers, column headers and - ' report summary etc. to make the report parsing simpler. - ' DirectCast(user.Config, AdWordsAppConfig).SkipColumnHeader = True - ' DirectCast(user.Config, AdWordsAppConfig).SkipReportHeader = True - ' DirectCast(user.Config, AdWordsAppConfig).SkipReportSummary = True - - Dim filePath As String = ExampleUtilities.GetHomeDir() & Path.DirectorySeparatorChar & - fileName - - Try - Dim utilities As New ReportUtilities(user, "v201806", definition) - Using reportResponse As ReportResponse = utilities.GetResponse() - reportResponse.Save(filePath) - End Using - Console.WriteLine("Report was downloaded to '{0}'.", filePath) - Catch e As Exception - Throw New System.ApplicationException("Failed to download report.", e) - End Try - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Reporting/GetReportFields.vb b/examples/AdWords/Vb/v201806/Reporting/GetReportFields.vb deleted file mode 100755 index fc075b9d58d..00000000000 --- a/examples/AdWords/Vb/v201806/Reporting/GetReportFields.vb +++ /dev/null @@ -1,98 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets report fields. - ''' - Public Class GetReportFields - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetReportFields - Console.WriteLine(codeExample.Description) - Try - Dim reportType As ReportDefinitionReportType = CType( - [Enum].Parse(GetType(ReportDefinitionReportType), "INSERT_REPORT_TYPE_HERE"), - ReportDefinitionReportType) - codeExample.Run(New AdWordsUser, reportType) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets report fields." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The report type to be run. - Public Sub Run(ByVal user As AdWordsUser, ByVal reportType As ReportDefinitionReportType) - Using reportDefinitionService As ReportDefinitionService = CType( - user.GetService( - AdWordsService.v201806.ReportDefinitionService), - ReportDefinitionService) - - ' The type of the report to get fields for. - ' E.g.: KEYWORDS_PERFORMANCE_REPORT - - Try - ' Get the report fields. - Dim reportDefinitionFields As ReportDefinitionField() = - reportDefinitionService.getReportFields(reportType) - - If ((Not reportDefinitionFields Is Nothing) AndAlso - (reportDefinitionFields.Length > 0)) Then - ' Display report fields. - Console.WriteLine("The report type '{0}' contains the following fields:", - reportType) - - For Each reportDefinitionField As ReportDefinitionField In _ - reportDefinitionFields - Console.Write("- {0} ({1})", reportDefinitionField.fieldName, - reportDefinitionField.fieldType) - If (Not reportDefinitionField.enumValues Is Nothing) Then - Console.Write(" := [{0}]", - String.Join(", ", reportDefinitionField.enumValues)) - End If - Console.WriteLine() - Next - Else - Console.WriteLine("This report type has no fields.") - End If - Catch e As Exception - Throw New _ - System.ApplicationException("Failed to retrieve fields for report type.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportResults.vb b/examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportResults.vb deleted file mode 100755 index e11984fbeab..00000000000 --- a/examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportResults.vb +++ /dev/null @@ -1,134 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util.Reports - -Imports System.IO.Compression -Imports System.Xml - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example streams the results of an ad hoc report, collecting - ''' total impressions by network from each line. This demonstrates how you - ''' can extract data from a large report without holding the entire result - ''' set in memory or using files. - ''' - Public Class StreamCriteriaReportResults - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New StreamCriteriaReportResults - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example streams the results of an ad hoc report, collecting" & - " total impressions by network from each line. This demonstrates how you" & - " can extract data from a large report without holding the entire result" & - " set in memory or using files." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' Create the query. - Dim query As ReportQuery = New ReportQueryBuilder() _ - .Select("Id", "AdNetworkType1", "Impressions") _ - .From(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT) _ - .Where("Status").In("ENABLED", "PAUSED") _ - .During(ReportDefinitionDateRangeType.LAST_7_DAYS) _ - .Build() - - Dim reportUtilities As New ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_XML.ToString()) - - Dim impressionsByAdNetworkType1 As New Dictionary(Of String, Long) - - Try - Using response As ReportResponse = reportUtilities.GetResponse - Using gzipStream As GZipStream = New GZipStream(response.Stream, - CompressionMode.Decompress) - Using reader As XmlTextReader = New XmlTextReader(gzipStream) - While reader.Read - Select Case reader.NodeType - Case XmlNodeType.Element ' The node is an Element. - If reader.Name = "row" Then - ParseRow(impressionsByAdNetworkType1, reader) - End If - End Select - End While - End Using - End Using - End Using - - Console.WriteLine("Network, Impressions") - For Each network As String In impressionsByAdNetworkType1.Keys - Console.WriteLine("{0}, {1}", network, impressionsByAdNetworkType1(network)) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to download report.", e) - End Try - End Sub - - ''' - ''' Parses a report row. - ''' - ''' The map that keeps track of - ''' the impressions grouped by by ad network type1. - ''' The XML reader that parses the report. - Private Sub ParseRow(ByVal impressionsByAdNetworkType1 As Dictionary(Of String, Long), - ByVal reader As XmlTextReader) - Dim network As String = Nothing - Dim impressions As Long = 0 - - While reader.MoveToNextAttribute - Select Case reader.Name - Case "network" - network = reader.Value - - Case "impressions" - impressions = Long.Parse(reader.Value) - End Select - End While - - If Not (network Is Nothing) Then - If Not (impressionsByAdNetworkType1.ContainsKey(network)) Then - impressionsByAdNetworkType1(network) = 0 - End If - impressionsByAdNetworkType1(network) += impressions - End If - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportToPoco.vb b/examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportToPoco.vb deleted file mode 100755 index f405095fbb3..00000000000 --- a/examples/AdWords/Vb/v201806/Reporting/StreamCriteriaReportToPoco.vb +++ /dev/null @@ -1,145 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util.Reports - -Imports System.IO.Compression - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example streams the results of an ad hoc report, collecting - ''' total impressions by network from each line. This demonstrates how you - ''' can extract data from a large report without holding the entire result - ''' set in memory or using files. - ''' - Public Class StreamCriteriaReportToPoco - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New StreamCriteriaReportToPoco - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example streams the results of an ad hoc report, collecting" & - " total impressions by network from each line. This demonstrates how you" & - " can extract data from a large report without holding the entire result" & - " set in memory or using files." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' Create the query. - Dim query As ReportQuery = New ReportQueryBuilder() _ - .Select("Id", "AdNetworkType1", "Impressions") _ - .From(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT) _ - .Where("Status").In("ENABLED", "PAUSED") _ - .During(ReportDefinitionDateRangeType.LAST_7_DAYS) _ - .Build() - - Dim reportUtilities As New ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_XML.ToString()) - - Dim impressionsByAdNetworkType1 As New Dictionary(Of String, Long) - - Try - Using response As ReportResponse = reportUtilities.GetResponse - Using gzipStream As GZipStream = New GZipStream(response.Stream, - CompressionMode.Decompress) - - ' Deserialize the report into a list of CriteriaReportRow. - ' You can also deserialize the list into your own POCOs as follows. - ' 1. Annotate your class properties with ReportRow annotation. - ' - ' Public Class MyCriteriaReportRow - ' - ' - ' Public Property KeywordID as Long - ' - ' - ' Public Property Impressions as Long - ' End Class - ' - ' 2. Deserialize into your own report rows. - ' - ' Dim report As New AwReport(Of CriteriaReportRow) _ - ' (New AwXmlTextReader(gzipStream), "Example") - Using report As New AwReport(Of CriteriaReportRow) _ - (New AwXmlTextReader(gzipStream), "Example") - While report.MoveNext() - Console.WriteLine(report.Current.Impressions) - Console.Write(" ") - Console.Write(report.Current.KeywordId) - End While - End Using - End Using - End Using - - Console.WriteLine("Network, Impressions") - For Each network As String In impressionsByAdNetworkType1.Keys - Console.WriteLine("{0}, {1}", network, impressionsByAdNetworkType1(network)) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to download report.", e) - End Try - End Sub - End Class - - Public Class CriteriaReportRow - Private _KeywordId As Long - Private _Impressions As Long - - - Public Property KeywordId As Long - Get - Return _KeywordId - End Get - Set(value As Long) - _KeywordId = value - End Set - End Property - - - Public Property Impressions As Long - Get - Return _Impressions - End Get - Set(value As Long) - _Impressions = value - End Set - End Property - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Reporting/StreamReportToPredefinedReportRowType.vb b/examples/AdWords/Vb/v201806/Reporting/StreamReportToPredefinedReportRowType.vb deleted file mode 100755 index c3d46677612..00000000000 --- a/examples/AdWords/Vb/v201806/Reporting/StreamReportToPredefinedReportRowType.vb +++ /dev/null @@ -1,95 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Reports -Imports Google.Api.Ads.AdWords.Util.Reports.v201806 -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util.Reports - -Imports System.IO.Compression - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example streams the results of an ad hoc report, and - ''' returns the data in the report as objects of a predefined report row type. - ''' - Public Class StreamReportToPredefinedReportRowType - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New StreamReportToPredefinedReportRowType - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example streams the results of an ad hoc report, and " & - "returns the data in the report as objects of a predefined report row type." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' Create the query. - Dim query As String = "SELECT AccountCurrencyCode, AccountDescriptiveName" & - " FROM FINAL_URL_REPORT DURING LAST_7_DAYS" - - Dim reportUtilities As New ReportUtilities(user, "v201806", query, - DownloadFormat.GZIPPED_XML.ToString()) - - Dim impressionsByAdNetworkType1 As New Dictionary(Of String, Long) - - Try - Using response As ReportResponse = reportUtilities.GetResponse - Using gzipStream As GZipStream = New GZipStream(response.Stream, - CompressionMode.Decompress) - - Using report As New AwReport(Of FinalUrlReportReportRow) _ - (New AwXmlTextReader(gzipStream), "Example") - While report.MoveNext() - Console.WriteLine(report.Current.accountCurrencyCode) - Console.Write(" ") - Console.Write(report.Current.accountDescriptiveName) - End While - End Using - End Using - End Using - - Console.WriteLine("Network, Impressions") - For Each network As String In impressionsByAdNetworkType1.Keys - Console.WriteLine("{0}, {1}", network, impressionsByAdNetworkType1(network)) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to download report.", e) - End Try - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductPartitionTree.vb b/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductPartitionTree.vb deleted file mode 100755 index 02a3fe1adf9..00000000000 --- a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductPartitionTree.vb +++ /dev/null @@ -1,151 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.AdWords.Util.Shopping.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example creates a ProductPartition tree. - ''' - Public Class AddProductPartitionTree - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddProductPartitionTree - Console.WriteLine(codeExample.Description) - Try - Dim adGroupId As Long = Long.Parse("INSERT_ADGROUP_ID_HERE") - codeExample.Run(New AdWordsUser, adGroupId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example creates a ProductPartition tree." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The ad group to which product partition is - ''' added. - Public Sub Run(ByVal user As AdWordsUser, ByVal adGroupId As Long) - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Build a new ProductPartitionTree using the ad group's current set of criteria. - Dim partitionTree As ProductPartitionTree = - ProductPartitionTree.DownloadAdGroupTree(user, adGroupId) - - Console.WriteLine("Original tree: {0}", partitionTree) - - ' Clear out any existing criteria. - Dim rootNode As ProductPartitionNode = partitionTree.Root.RemoveAllChildren() - - ' Make the root node a subdivision. - rootNode = rootNode.AsSubdivision() - - ' Add a unit node for condition = NEW. - Dim newConditionNode As ProductPartitionNode = rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition( - ProductCanonicalConditionCondition.NEW)) - newConditionNode.AsBiddableUnit().CpcBid = 200000 - - Dim usedConditionNode As ProductPartitionNode = rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition( - ProductCanonicalConditionCondition.USED)) - usedConditionNode.AsBiddableUnit().CpcBid = 100000 - - ' Add a subdivision node for condition = null (everything else). - Dim otherConditionNode As ProductPartitionNode = - rootNode.AddChild(ProductDimensions.CreateCanonicalCondition()). - AsSubdivision() - - ' Add a unit node under condition = null for brand = "CoolBrand". - Dim coolBrandNode As ProductPartitionNode = otherConditionNode.AddChild( - ProductDimensions.CreateBrand("CoolBrand")) - coolBrandNode.AsBiddableUnit().CpcBid = 900000L - - ' Add a unit node under condition = null for brand = "CheapBrand". - Dim cheapBrandNode As ProductPartitionNode = otherConditionNode.AddChild( - ProductDimensions.CreateBrand("CheapBrand")) - cheapBrandNode.AsBiddableUnit().CpcBid = 10000L - - ' Add a subdivision node under condition = null for brand = null (everything else). - Dim otherBrandNode As ProductPartitionNode = otherConditionNode.AddChild( - ProductDimensions.CreateBrand()).AsSubdivision() - - ' Add unit nodes under condition = null/brand = null. - ' The value for each bidding category is a fixed ID for a specific - ' category. You can retrieve IDs for categories from the ConstantDataService. - ' See the 'GetProductCategoryTaxonomy' example for more details. - - ' Add a unit node under condition = null/brand = null for product type - ' level 1 = 'Luggage & Bags'. - Dim luggageAndBagNode As ProductPartitionNode = otherBrandNode.AddChild( - ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L1, - - 5914235892932915235L)) - luggageAndBagNode.AsBiddableUnit().CpcBid = 750000L - - ' Add a unit node under condition = null/brand = null for product type - ' level 1 = null (everything else). - Dim everythingElseNode As ProductPartitionNode = otherBrandNode.AddChild( - ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L1)) - everythingElseNode.AsBiddableUnit().CpcBid = 110000L - - Try - ' Make the mutate request, using the operations returned by the - ' ProductPartitionTree. - Dim mutateOperations As AdGroupCriterionOperation() = - partitionTree.GetMutateOperations() - - If mutateOperations.Length = 0 Then - Console.WriteLine( - "Skipping the mutate call because the original tree and the " & - "current tree are logically identical.") - Else - adGroupCriterionService.mutate(mutateOperations) - End If - - ' The request was successful, so create a new ProductPartitionTree based on the - ' updated state of the ad group. - partitionTree = ProductPartitionTree.DownloadAdGroupTree(user, adGroupId) - - Console.WriteLine("Final tree: {0}", partitionTree) - Catch e As Exception - Throw New System.ApplicationException("Failed to add bid modifiers to adgroup.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductScope.vb b/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductScope.vb deleted file mode 100755 index 26f50d549a1..00000000000 --- a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddProductScope.vb +++ /dev/null @@ -1,129 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports System -Imports System.Collections.Generic -Imports System.IO - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example restricts the products that will be included in the - ''' campaign by setting a ProductScope. - ''' - Public Class AddProductScope - Inherits ExampleBase - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example restricts the products that will be included in the " & - "campaign by setting a ProductScope." - End Get - End Property - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddProductScope - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The campaign id to add product scope. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using campaignCriterionService As CampaignCriterionService = CType( - user.GetService( - AdWordsService.v201806.CampaignCriterionService), - CampaignCriterionService) - - Dim productScope As New ProductScope() - ' This set of dimensions is for demonstration purposes only. It would be - ' extremely unlikely that you want to include so many dimensions in your - ' product scope. - Dim nexusBrand As New ProductBrand() - nexusBrand.value = "Nexus" - - Dim newProducts As New ProductCanonicalCondition() - newProducts.condition = ProductCanonicalConditionCondition.NEW - - Dim customAttribute As New ProductCustomAttribute() - customAttribute.type = ProductDimensionType.CUSTOM_ATTRIBUTE_0 - customAttribute.value = "my attribute value" - - Dim bookOffer As New ProductOfferId() - bookOffer.value = "book1" - - Dim mediaProducts As New ProductType() - mediaProducts.type = ProductDimensionType.PRODUCT_TYPE_L1 - mediaProducts.value = "Media" - - Dim bookProducts As New ProductType() - bookProducts.type = ProductDimensionType.PRODUCT_TYPE_L2 - bookProducts.value = "Books" - - ' The value for the bidding category is a fixed ID for the - ' 'Luggage & Bags' category. You can retrieve IDs for categories from - ' the ConstantDataService. See the 'GetProductCategoryTaxonomy' example - ' for more details. - Dim luggageBiddingCategory As New ProductBiddingCategory() - luggageBiddingCategory.type = ProductDimensionType.BIDDING_CATEGORY_L1 - luggageBiddingCategory.value = - 5914235892932915235 - - productScope.dimensions = New ProductDimension() { _ - nexusBrand, newProducts, - bookOffer, mediaProducts, - luggageBiddingCategory - } - - Dim campaignCriterion As New CampaignCriterion() - campaignCriterion.campaignId = campaignId - campaignCriterion.criterion = productScope - - ' Create operation. - Dim operation As New CampaignCriterionOperation() - operation.operand = campaignCriterion - operation.operator = [Operator].ADD - - Try - ' Make the mutate request. - Dim result As CampaignCriterionReturnValue = campaignCriterionService.mutate( - New CampaignCriterionOperation() {operation}) - - Console.WriteLine("Created a ProductScope criterion with ID '{0}'", - result.value(0).criterion.id) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to set shopping product scope.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaign.vb b/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaign.vb deleted file mode 100755 index cdd16ad4ee0..00000000000 --- a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaign.vb +++ /dev/null @@ -1,253 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Shopping.v201806 -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a Shopping campaign. - ''' - Public Class AddShoppingCampaign - Inherits ExampleBase - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a Shopping campaign." - End Get - End Property - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddShoppingCampaign - Console.WriteLine(codeExample.Description) - Try - Dim budgetId As Long = Long.Parse("INSERT_BUDGET_ID_HERE") - Dim merchantId As Long = Long.Parse("INSERT_MERCHANT_ID_HERE") - Dim createDefaultPartition As Boolean = False - codeExample.Run(New AdWordsUser, budgetId, merchantId, createDefaultPartition) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The budget id. - ''' The Merchant Center account id. - ''' If set to true, a default - ''' partition will be created. If running the AddProductPartition.cs - ''' example right after this example, make sure this stays set to - ''' false. - Public Sub Run(ByVal user As AdWordsUser, ByVal budgetId As Long, ByVal merchantId As Long, - ByVal createDefaultPartition As Boolean) - Try - Dim campaign As Campaign = CreateCampaign(user, budgetId, merchantId) - Console.WriteLine("Campaign with name '{0}' and ID '{1}' was added.", campaign.name, - campaign.id) - - Dim adGroup As AdGroup = CreateAdGroup(user, campaign) - Console.WriteLine("Ad group with name '{0}' and ID '{1}' was added.", adGroup.name, - adGroup.id) - - Dim adGroupAd As AdGroupAd = CreateProductAd(user, adGroup) - Console.WriteLine("Product ad with ID {0}' was added.", adGroupAd.ad.id) - - If (createDefaultPartition) Then - CreateDefaultPartitionTree(user, adGroup.id) - End If - - Catch e As Exception - Throw New System.ApplicationException("Failed to create shopping campaign.", e) - End Try - End Sub - - ''' - ''' Creates the default partition. - ''' - ''' The AdWords user. - ''' The ad group ID. - Private Sub CreateDefaultPartitionTree(ByVal user As AdWordsUser, ByVal adGroupId As Long) - ' Get the AdGroupCriterionService. - Dim adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Build a New ProductPartitionTree using an empty set of criteria. - Dim partitionTree As ProductPartitionTree = - ProductPartitionTree.CreateAdGroupTree(adGroupId, - New List(Of AdGroupCriterion)()) - partitionTree.Root.AsBiddableUnit().CpcBid = 1000000 - - Try - ' Make the mutate request, using the operations returned by the - ' ProductPartitionTree. - Dim mutateOperations As AdGroupCriterionOperation() = - partitionTree.GetMutateOperations() - - If mutateOperations.Length = 0 Then - Console.WriteLine( - "Skipping the mutate call because the original tree and the current " + - "tree are logically identical.") - Else - adGroupCriterionService.mutate(mutateOperations) - End If - - ' The request was successful, so create a New ProductPartitionTree based on the - ' updated state of the ad group. - partitionTree = ProductPartitionTree.DownloadAdGroupTree(user, adGroupId) - - Console.WriteLine("Final tree: {0}", partitionTree) - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to set shopping product partition.", e) - End Try - End Sub - - ''' - ''' Creates the Product Ad. - ''' - ''' The AdWords user. - ''' The ad group. - ''' The Product Ad. - Private Function CreateProductAd(ByVal user As AdWordsUser, - ByVal adGroup As AdGroup) As AdGroupAd - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create product ad. - Dim productAd As New ProductAd() - - ' Create ad group ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroup.id - adGroupAd.ad = productAd - - ' Create operation. - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - - ' Make the mutate request. - Dim retval As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - Return retval.value(0) - End Using - End Function - - ''' - ''' Creates the ad group in a Shopping campaign. - ''' - ''' The AdWords user. - ''' The Shopping campaign. - ''' The ad group. - Private Function CreateAdGroup(ByVal user As AdWordsUser, - ByVal campaign As Campaign) As AdGroup - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - ' Create ad group. - Dim adGroup As New AdGroup() - adGroup.campaignId = campaign.id - adGroup.name = "Ad Group #" & ExampleUtilities.GetRandomString() - - ' Create operation. - Dim operation As New AdGroupOperation() - operation.operand = adGroup - operation.operator = [Operator].ADD - - ' Make the mutate request. - Dim retval As AdGroupReturnValue = adGroupService.mutate( - New AdGroupOperation() {operation}) - Return retval.value(0) - End Using - End Function - - ' [START createCampaign] MOE:strip_line - ''' - ''' Creates the shopping campaign. - ''' - ''' The AdWords user. - ''' The budget id. - ''' The Merchant Center id. - ''' The Shopping campaign. - Private Function CreateCampaign(ByVal user As AdWordsUser, ByVal budgetId As Long, - ByVal merchantId As Long) As Campaign - ' Get the required services. - Dim campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create campaign. - Dim campaign As New Campaign() - campaign.name = "Shopping campaign #" & ExampleUtilities.GetRandomString() - - ' The advertisingChannelType is what makes this a Shopping campaign. - campaign.advertisingChannelType = AdvertisingChannelType.SHOPPING - - ' 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. - campaign.status = CampaignStatus.PAUSED - - ' Set shared budget (required). - campaign.budget = New Budget() - campaign.budget.budgetId = budgetId - - ' Set bidding strategy (required). - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - biddingStrategyConfiguration.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration - - ' All Shopping campaigns need a ShoppingSetting. - Dim shoppingSetting As New ShoppingSetting() - shoppingSetting.salesCountry = "US" - shoppingSetting.campaignPriority = 0 - shoppingSetting.merchantId = merchantId - - ' Enable Local Inventory Ads in your campaign. - shoppingSetting.enableLocal = True - campaign.settings = New Setting() {shoppingSetting} - - ' Create operation. - Dim campaignOperation As New CampaignOperation() - campaignOperation.operand = campaign - campaignOperation.operator = [Operator].ADD - - ' Make the mutate request. - Dim retval As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {campaignOperation}) - - Return retval.value(0) - End Function - ' [END createCampaign] MOE:strip_line - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.vb b/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.vb deleted file mode 100755 index 8663fe973c2..00000000000 --- a/examples/AdWords/Vb/v201806/ShoppingCampaigns/AddShoppingCampaignForShowcaseAds.vb +++ /dev/null @@ -1,321 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.Util.Shopping.v201806 -Imports Google.Api.Ads.AdWords.v201806 -Imports Google.Api.Ads.Common.Util - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds a Shopping campaign for Showcase ads. - ''' - Public Class AddShoppingCampaignForShowcaseAds - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddShoppingCampaignForShowcaseAds - Console.WriteLine(codeExample.Description) - Try - Dim budgetId As Long = Long.Parse("INSERT_BUDGET_ID_HERE") - Dim merchantId As Long = Long.Parse("INSERT_MERCHANT_ID_HERE") - codeExample.Run(New AdWordsUser(), budgetId, merchantId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds a Shopping campaign for Showcase ads." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' The budget id. - ''' The Merchant Center account ID. - Public Sub Run(ByVal user As AdWordsUser, ByVal budgetId As Long, ByVal merchantId As Long) - Try - Dim campaign As Campaign = CreateCampaign(user, budgetId, merchantId) - Console.WriteLine("Campaign with name '{0}' and ID '{1}' was added.", campaign.name, - campaign.id) - - Dim adGroup As AdGroup = CreateAdGroup(user, campaign) - Console.WriteLine("Ad group with name '{0}' and ID '{1}' was added.", adGroup.name, - adGroup.id) - - Dim adGroupAd As AdGroupAd = CreateShowcaseAd(user, adGroup) - Console.WriteLine("Showcase ad with ID '{0}' was added.", adGroupAd.ad.id) - - Dim partitionTree As ProductPartitionTree = CreateProductPartition(user, adGroup.id) - Console.WriteLine("Final tree: {0}", partitionTree) - Catch e As Exception - Throw New System.ApplicationException("Failed to create shopping campaign for " & - "showcase ads", e) - End Try - End Sub - - ''' - ''' Creates the Shopping campaign. - ''' - ''' The AdWords user for which the campaign is created. - ''' The budget ID. - ''' The Merchant Center ID. - ''' The newly created Shopping campaign. - Private Shared Function CreateCampaign(ByVal user As AdWordsUser, ByVal budgetId As Long, - ByVal merchantId As Long) As Campaign - Using campaignService As CampaignService = CType( - user.GetService( - AdWordsService.v201806.CampaignService), - CampaignService) - - ' Create the campaign. - Dim campaign As New Campaign() - campaign.name = "Shopping campaign #" & ExampleUtilities.GetRandomString() - - ' The advertisingChannelType is what makes this a Shopping campaign. - campaign.advertisingChannelType = AdvertisingChannelType.SHOPPING - - ' 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. - campaign.status = CampaignStatus.PAUSED - - ' Set shared budget (required). - campaign.budget = New Budget() - campaign.budget.budgetId = budgetId - - ' Set bidding strategy (required). - Dim biddingStrategyConfiguration As New BiddingStrategyConfiguration() - - ' Note: Showcase Ads require that the campaign has a ManualCpc - ' BiddingStrategyConfiguration. - biddingStrategyConfiguration.biddingStrategyType = BiddingStrategyType.MANUAL_CPC - - campaign.biddingStrategyConfiguration = biddingStrategyConfiguration - - ' All Shopping campaigns need a ShoppingSetting. - Dim shoppingSetting As New ShoppingSetting() - shoppingSetting.salesCountry = "US" - shoppingSetting.campaignPriority = 0 - shoppingSetting.merchantId = merchantId - - ' Set to "true" to enable Local Inventory Ads in your campaign. - shoppingSetting.enableLocal = True - campaign.settings = New Setting() {shoppingSetting} - - ' Create operation. - Dim campaignOperation As New CampaignOperation() - campaignOperation.operand = campaign - campaignOperation.operator = [Operator].ADD - - ' Make the mutate request. - Dim retval As CampaignReturnValue = campaignService.mutate( - New CampaignOperation() {campaignOperation}) - - Return retval.value(0) - End Using - End Function - - ''' - ''' Creates the ad group in a Shopping campaign. - ''' - ''' The AdWords user for which the ad group is created. - ''' The Shopping campaign. - ''' The newly created ad group. - Private Shared Function CreateAdGroup(ByVal user As AdWordsUser, - ByVal campaign As Campaign) _ - As AdGroup - Using adGroupService As AdGroupService = CType( - user.GetService( - AdWordsService.v201806.AdGroupService), - AdGroupService) - - ' Create ad group. - Dim adGroup As New AdGroup() - adGroup.campaignId = campaign.id - adGroup.name = "Ad Group #" & ExampleUtilities.GetRandomString() - - ' Required: Set the ad group type to SHOPPING_SHOWCASE_ADS. - adGroup.adGroupType = AdGroupType.SHOPPING_SHOWCASE_ADS - - ' Required: Set the ad group's bidding strategy configuration. - Dim biddingConfiguration As New BiddingStrategyConfiguration() - - ' Optional: Set the bids. - Dim cpcBid As New CpcBid() - cpcBid.bid = New Money() - cpcBid.bid.microAmount = 100000 - - biddingConfiguration.bids = New Bids() {cpcBid} - - adGroup.biddingStrategyConfiguration = biddingConfiguration - - ' Create the operation. - Dim operation As New AdGroupOperation() - operation.operand = adGroup - operation.operator = [Operator].ADD - - ' Make the mutate request. - Dim retval As AdGroupReturnValue = adGroupService.mutate( - New AdGroupOperation() {operation}) - Return retval.value(0) - End Using - End Function - - ''' - ''' Creates the Showcase ad. - ''' - ''' The AdWords user for which the ad is created. - ''' The ad group in which the ad is created. - ''' The newly created Showcase ad. - Private Shared Function CreateShowcaseAd(ByVal user As AdWordsUser, - ByVal adGroup As AdGroup) _ - As AdGroupAd - Using adGroupAdService As AdGroupAdService = CType( - user.GetService( - AdWordsService.v201806.AdGroupAdService), - AdGroupAdService) - - ' Create the Showcase ad. - Dim showcaseAd As New ShowcaseAd() - - ' Required: set the ad's name, final URLs and display URL. - showcaseAd.name = "Showcase ad " & ExampleUtilities.GetShortRandomString() - showcaseAd.finalUrls = New String() {"http://example.com/showcase"} - showcaseAd.displayUrl = "example.com" - - ' Required: Set the ad's expanded image. - Dim expandedImage As New Image() - expandedImage.mediaId = UploadImage(user, "https://goo.gl/IfVlpF") - showcaseAd.expandedImage = expandedImage - - ' Optional: Set the collapsed image. - Dim collapsedImage As New Image() - collapsedImage.mediaId = UploadImage(user, "https://goo.gl/NqTxAE") - showcaseAd.collapsedImage = collapsedImage - - ' Create ad group ad. - Dim adGroupAd As New AdGroupAd() - adGroupAd.adGroupId = adGroup.id - adGroupAd.ad = showcaseAd - - ' Create operation. - Dim operation As New AdGroupAdOperation() - operation.operand = adGroupAd - operation.operator = [Operator].ADD - - ' Make the mutate request. - Dim retval As AdGroupAdReturnValue = adGroupAdService.mutate( - New AdGroupAdOperation() {operation}) - - Return retval.value(0) - End Using - End Function - - ''' - ''' Creates a product partition tree. - ''' - ''' The AdWords user for which the product partition is created. - ''' Ad group ID. - ''' The product partition. - Private Shared Function CreateProductPartition(ByVal user As AdWordsUser, - ByVal adGroupId As Long) _ - As ProductPartitionTree - - Using adGroupCriterionService As AdGroupCriterionService = CType( - user.GetService( - AdWordsService.v201806.AdGroupCriterionService), - AdGroupCriterionService) - - ' Build a new ProductPartitionTree using the ad group's current set of criteria. - Dim partitionTree As ProductPartitionTree = - ProductPartitionTree.DownloadAdGroupTree(user, adGroupId) - - Console.WriteLine("Original tree: {0}", partitionTree) - - ' Clear out any existing criteria. - Dim rootNode As ProductPartitionNode = partitionTree.Root.RemoveAllChildren() - - ' Make the root node a subdivision. - rootNode = rootNode.AsSubdivision() - - ' Add a unit node for condition = NEW to include it. - rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition( - ProductCanonicalConditionCondition.NEW)) - - ' Add a unit node for condition = USED to include it. - rootNode.AddChild( - ProductDimensions.CreateCanonicalCondition( - ProductCanonicalConditionCondition.USED)) - - ' Exclude everything else. - rootNode.AddChild(ProductDimensions.CreateCanonicalCondition()).AsExcludedUnit() - - ' Make the mutate request, using the operations returned by the - ' ProductPartitionTree. - Dim mutateOperations As AdGroupCriterionOperation() = - partitionTree.GetMutateOperations() - - If mutateOperations.Length = 0 Then - Console.WriteLine( - "Skipping the mutate call because the original tree and the current " & - "tree are logically identical.") - Else - adGroupCriterionService.mutate(mutateOperations) - End If - - ' The request was successful, so create a new ProductPartitionTree based on the - ' updated state of the ad group. - partitionTree = ProductPartitionTree.DownloadAdGroupTree(user, adGroupId) - Return partitionTree - End Using - End Function - - ''' - ''' Uploads an image. - ''' - ''' The AdWords user for which the image is uploaded. - ''' The image URL. - ''' The uploaded image. - Private Shared Function UploadImage(ByVal user As AdWordsUser, ByVal url As String) As Long - Using mediaService As MediaService = CType( - user.GetService( - AdWordsService.v201806.MediaService), - MediaService) - - ' Create the image. - Dim image As New Image() - image.data = MediaUtilities.GetAssetDataFromUrl(url, user.Config) - image.type = MediaMediaType.IMAGE - - ' Upload the image. - Dim result As Media() = mediaService.upload(New Media() {image}) - Return result(0).mediaId - End Using - End Function - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.vb b/examples/AdWords/Vb/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.vb deleted file mode 100755 index 13821a22ede..00000000000 --- a/examples/AdWords/Vb/v201806/ShoppingCampaigns/GetProductCategoryTaxonomy.vb +++ /dev/null @@ -1,181 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports System -Imports System.Collections.Generic -Imports System.IO - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example fetches the set of valid ProductBiddingCategories. - ''' - Public Class GetProductCategoryTaxonomy - Inherits ExampleBase - - ''' - ''' Stores details about a product category and its hierarchy. - ''' - Class ProductCategory - ''' - ''' The product category id. - ''' - Private idField As Long - - ''' - ''' The product category name. - ''' - Private nameField As String - - ''' - ''' The product category children. - ''' - Private childrenField As New List(Of ProductCategory) - - ''' - ''' Gets or sets the product category id. - ''' - Public Property Id() As Long - Get - Return idField - End Get - Set(ByVal value As Long) - idField = value - End Set - End Property - - ''' - ''' Gets or sets the product category name. - ''' - Public Property Name() As String - Get - Return nameField - End Get - Set(ByVal value As String) - nameField = value - End Set - End Property - - ''' - ''' Gets or sets the product category children. - ''' - Public ReadOnly Property Children() As List(Of ProductCategory) - Get - Return childrenField - End Get - End Property - End Class - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example fetches the set of valid ProductBiddingCategories." - End Get - End Property - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetProductCategoryTaxonomy - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using constantDataService As ConstantDataService = CType( - user.GetService( - AdWordsService.v201806.ConstantDataService), - ConstantDataService) - - Dim selector As New Selector() - selector.predicates = New Predicate() { _ - Predicate.In( - ProductBiddingCategoryData.Fields. - Country, - New String() {"US"}) - } - - Try - Dim results As ProductBiddingCategoryData() = - constantDataService.getProductBiddingCategoryData(selector) - - Dim biddingCategories As New Dictionary(Of Long, ProductCategory)() - Dim rootCategories As New List(Of ProductCategory)() - - For Each productBiddingCategory As ProductBiddingCategoryData In results - Dim id As Long = productBiddingCategory.dimensionValue.value - Dim parentId As Long = 0 - Dim name As String = productBiddingCategory.displayValue(0).value - - If Not (productBiddingCategory.parentDimensionValue Is Nothing) Then - parentId = productBiddingCategory.parentDimensionValue.value - End If - - If Not biddingCategories.ContainsKey(id) Then - biddingCategories.Add(id, New ProductCategory()) - End If - - Dim category As ProductCategory = biddingCategories(id) - - If (parentId <> 0) Then - If Not biddingCategories.ContainsKey(parentId) Then - biddingCategories.Add(parentId, New ProductCategory()) - End If - Dim parent As ProductCategory = biddingCategories(parentId) - parent.Children.Add(category) - Else - rootCategories.Add(category) - End If - - category.Id = id - category.Name = name - Next - - DisplayProductCategories(rootCategories, "") - Catch e As Exception - Throw New System.ApplicationException("Failed to create shopping campaign.", e) - End Try - End Using - End Sub - - ''' - ''' Displays the product categories. - ''' - ''' The product categories. - ''' The prefix for display purposes. - Sub DisplayProductCategories(ByVal categories As List(Of ProductCategory), - ByVal prefix As String) - For Each category As ProductCategory In categories - Console.WriteLine("{0}{1} [{2}]", prefix, category.Name, category.Id) - DisplayProductCategories(category.Children, String.Format("{0}{1} > ", - prefix, category.Name)) - Next - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Targeting/AddCampaignTargetingCriteria.vb b/examples/AdWords/Vb/v201806/Targeting/AddCampaignTargetingCriteria.vb deleted file mode 100755 index 8591e1805b1..00000000000 --- a/examples/AdWords/Vb/v201806/Targeting/AddCampaignTargetingCriteria.vb +++ /dev/null @@ -1,170 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds various types of targeting criteria to a campaign. - ''' To get a list of campaigns, run GetCampaigns.vb. - ''' - Public Class AddCampaignTargetingCriteria - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCampaignTargetingCriteria - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - Dim feedIdText As String = "INSERT_LOCATION_FEED_ID_HERE" - - Dim feedId As Long? = Nothing - Dim temp As Long = 0 - - If Long.TryParse(feedIdText, temp) Then - feedId = temp - End If - - codeExample.Run(New AdWordsUser(), campaignId, feedId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example adds various types of targeting criteria to a campaign. " & - "To get a list of campaigns, run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign to which targeting criteria - ''' are added. - ''' ID of a feed that has been configured for location - ''' targeting, meaning it has an ENABLED FeedMapping with criterionType of - ''' 77. Feeds linked to a GMB account automatically have this FeedMapping. - ''' If you don't have such a feed, set this value to Nothing. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long, ByVal feedId As Long?) - Using campaignCriterionService As CampaignCriterionService = CType( - user.GetService( - AdWordsService.v201806.CampaignCriterionService), - CampaignCriterionService) - - ' Create locations. The IDs can be found in the documentation or - ' retrieved with the LocationCriterionService. - Dim california As New Location - california.id = 21137L - - Dim mexico As New Location - mexico.id = 2484L - - ' Create languages. The IDs can be found in the documentation or - ' retrieved with the ConstantDataService. - Dim english As New Language - english.id = 1000L - - Dim spanish As New Language - spanish.id = 1003L - - Dim criteria As New List(Of Criterion)() - criteria.AddRange(New Criterion() { _ - california, mexico, english, spanish - }) - - ' Distance targeting. Area of 10 miles around the locations in the location feed. - If feedId.HasValue Then - Dim radiusLocationGroup As New LocationGroups - radiusLocationGroup.feedId = feedId.Value - - Dim radiusMatchingFunction As New [Function] - radiusMatchingFunction.operator = FunctionOperator.IDENTITY - - Dim radiusOperand As New LocationExtensionOperand - radiusOperand.radius = New ConstantOperand - radiusOperand.radius.type = ConstantOperandConstantType.DOUBLE - radiusOperand.radius.unit = ConstantOperandUnit.MILES - radiusOperand.radius.doubleValue = 10 - - radiusMatchingFunction.lhsOperand = New FunctionArgumentOperand() _ - {radiusOperand} - - criteria.Add(radiusLocationGroup) - End If - - ' Create operations to add each of the criteria above. - Dim operations As New List(Of CampaignCriterionOperation) - - For Each criterion As Criterion In criteria - Dim campaignCriterion As New CampaignCriterion - campaignCriterion.campaignId = campaignId - campaignCriterion.criterion = criterion - - Dim operation As New CampaignCriterionOperation - operation.operator = [Operator].ADD - operation.operand = campaignCriterion - - operations.Add(operation) - Next - - ' Add a negative campaign criterion. - - Dim negativeCriterion As New NegativeCampaignCriterion - negativeCriterion.campaignId = campaignId - - Dim keyword As New Keyword - keyword.text = "jupiter cruise" - keyword.matchType = KeywordMatchType.BROAD - - negativeCriterion.criterion = keyword - - Dim negativeCriterionOperation As New CampaignCriterionOperation - negativeCriterionOperation.operand = negativeCriterion - negativeCriterionOperation.operator = [Operator].ADD - - operations.Add(negativeCriterionOperation) - - Try - ' Set the campaign targets. - Dim retVal As CampaignCriterionReturnValue = campaignCriterionService.mutate( - operations.ToArray()) - - ' Display the results. - If ((Not retVal Is Nothing) AndAlso (Not retVal.value Is Nothing)) Then - For Each criterion As CampaignCriterion In retVal.value - Console.WriteLine( - "Campaign criterion of type '{0}' was set to campaign with id " & - "= '{1}'.", criterion.criterion.CriterionType, criterion.campaignId) - Next - End If - Catch e As Exception - Throw New System.ApplicationException("Failed to set campaign criteria.", e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Targeting/AddCustomerNegativeCriteria.vb b/examples/AdWords/Vb/v201806/Targeting/AddCustomerNegativeCriteria.vb deleted file mode 100755 index f78906d372b..00000000000 --- a/examples/AdWords/Vb/v201806/Targeting/AddCustomerNegativeCriteria.vb +++ /dev/null @@ -1,110 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example adds various types of negative criteria to a customer. These criteria - ''' will be applied to all campaigns for the customer. - ''' - Public Class AddCustomerNegativeCriteria - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New AddCustomerNegativeCriteria - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser()) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example adds various types of negative criteria to a customer. " + - "These criteria will be applied to all campaigns for the customer." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - ' [START addNegativeCriteria] MOE:strip_line - Using customerNegativeCriterionService As CustomerNegativeCriterionService = - CType(user.GetService(AdWordsService.v201806.CustomerNegativeCriterionService), - CustomerNegativeCriterionService) - - Dim criteria As New List(Of Criterion) - - ' Exclude tragedy & conflict content. - Dim tragedyContentLabel As New ContentLabel() - tragedyContentLabel.contentLabelType = ContentLabelType.TRAGEDY - criteria.Add(tragedyContentLabel) - - ' Exclude a specific placement. - Dim placement As New Placement() - placement.url = "http://www.example.com" - criteria.Add(placement) - - ' Additional criteria types are available for this service. See the types listed - ' under Criterion here: - ' https://developers.google.com/adwords/api/docs/reference/latest/CustomerNegativeCriterionService.Criterion - - ' Create operations to add each of the criteria above. - Dim operations As New List(Of CustomerNegativeCriterionOperation) - For Each criterion As Criterion In criteria - Dim negativeCriterion As New CustomerNegativeCriterion() - negativeCriterion.criterion = criterion - Dim operation As New CustomerNegativeCriterionOperation() - operation.operator = [Operator].ADD - operation.operand = negativeCriterion - operations.Add(operation) - Next - - Try - ' Send the request to add the criteria. - Dim result As CustomerNegativeCriterionReturnValue = - customerNegativeCriterionService.mutate(operations.ToArray()) - - ' Display the results. - For Each negativeCriterion As CustomerNegativeCriterion In result.value - Console.WriteLine( - "Customer negative criterion with criterion ID {0} and type '{1}' " + - "was added.", negativeCriterion.criterion.id, - negativeCriterion.criterion.type) - Next - Catch e As Exception - Throw _ - New System.ApplicationException("Failed to set customer negative criteria.", - e) - End Try - - End Using - ' [END addNegativeCriteria] MOE:strip_line - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Targeting/GetCampaignTargetingCriteria.vb b/examples/AdWords/Vb/v201806/Targeting/GetCampaignTargetingCriteria.vb deleted file mode 100755 index 33024f177f0..00000000000 --- a/examples/AdWords/Vb/v201806/Targeting/GetCampaignTargetingCriteria.vb +++ /dev/null @@ -1,125 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Imports System -Imports System.Collections.Generic -Imports System.IO - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets all targeting criteria for a campaign. To set - ''' campaign targeting criteria, run AddCampaignTargetingCriteria.vb. To get - ''' campaigns, run GetCampaigns.vb. - ''' - Public Class GetCampaignTargetingCriteria - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetCampaignTargetingCriteria - Console.WriteLine(codeExample.Description) - Try - Dim campaignId As Long = Long.Parse("INSERT_CAMPAIGN_ID_HERE") - codeExample.Run(New AdWordsUser, campaignId) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return _ - "This code example gets all targeting criteria for a campaign. To set " & - "campaign targeting criteria, run AddCampaignTargetingCriteria.vb. To get " & - "campaigns, run GetCampaigns.vb." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - ''' Id of the campaign from which targeting - ''' criteria are retrieved. - Public Sub Run(ByVal user As AdWordsUser, ByVal campaignId As Long) - Using campaignCriterionService As CampaignCriterionService = CType( - user.GetService( - AdWordsService.v201806.CampaignCriterionService), - CampaignCriterionService) - - ' Create the selector. - Dim selector As New Selector - selector.fields = New String() { _ - Criterion.Fields.Id, - Criterion.Fields.CriteriaType, - CampaignCriterion.Fields.CampaignId - } - - ' Set the filters. - Dim predicate As New Predicate - predicate.field = "CampaignId" - predicate.operator = PredicateOperator.EQUALS - predicate.values = New String() {campaignId.ToString} - - selector.predicates = New Predicate() {predicate} - - ' Set the selector paging. - selector.paging = Paging.Default - Dim page As New CampaignCriterionPage - - Try - Dim i As Integer = 0 - Do - ' Get all campaign targets. - page = campaignCriterionService.get(selector) - - ' Display the results. - If ((Not page Is Nothing) AndAlso (Not page.entries Is Nothing)) Then - For Each campaignCriterion As CampaignCriterion In page.entries - Dim negative As String = "" - If (TypeOf campaignCriterion Is NegativeCampaignCriterion) Then - negative = "Negative " - End If - Console.WriteLine( - "{0}) {1}Campaign targeting criterion with id = '{2}' and " & - "Type = {3} was found for campaign id '{4}'", i, negative, - campaignCriterion.criterion.id, - campaignCriterion.criterion.type, - campaignCriterion.campaignId) - i += 1 - Next - End If - selector.paging.IncreaseOffset() - Loop While (selector.paging.startIndex < page.totalNumEntries) - Console.WriteLine("Number of campaign targeting criteria found: {0}", - page.totalNumEntries) - Catch e As Exception - Throw New _ - System.ApplicationException("Failed to get campaign targeting criteria.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Targeting/GetTargetableLanguagesAndCarriers.vb b/examples/AdWords/Vb/v201806/Targeting/GetTargetableLanguagesAndCarriers.vb deleted file mode 100755 index b2b76212d63..00000000000 --- a/examples/AdWords/Vb/v201806/Targeting/GetTargetableLanguagesAndCarriers.vb +++ /dev/null @@ -1,98 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example illustrates how to retrieve all carriers and languages - ''' available for targeting. - ''' - Public Class GetTargetableLanguagesAndCarriers - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New GetTargetableLanguagesAndCarriers - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example illustrates how to retrieve all carriers and languages" & - "available for targeting." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using constantDataService As ConstantDataService = CType( - user.GetService( - AdWordsService.v201806.ConstantDataService), - ConstantDataService) - - Try - ' Get all carriers. - Dim carriers As Carrier() = constantDataService.getCarrierCriterion - - ' Display the results. - If (Not carriers Is Nothing) Then - For Each carrier As Carrier In carriers - Console.WriteLine( - "Carrier name is '{0}', ID is {1} and country code is '{2}'.", - carrier.name, carrier.id, carrier.countryCode) - Next - Else - Console.WriteLine("No carriers were retrieved.") - End If - - ' Get all languages. - Dim languages As Language() = constantDataService.getLanguageCriterion - - ' Display the results. - If (Not languages Is Nothing) Then - For Each language As Language In languages - Console.WriteLine("Language name is '{0}', ID is {1} and code " & - "is '{2}'.", language.name, language.id, - language.code) - Next - Else - Console.WriteLine("No languages were found.") - End If - Catch e As Exception - Throw _ - New System.ApplicationException( - "Failed to get targetable carriers and languages.", - e) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/examples/AdWords/Vb/v201806/Targeting/LookupLocation.vb b/examples/AdWords/Vb/v201806/Targeting/LookupLocation.vb deleted file mode 100755 index c0ca3d8ab1b..00000000000 --- a/examples/AdWords/Vb/v201806/Targeting/LookupLocation.vb +++ /dev/null @@ -1,121 +0,0 @@ -' Copyright 2018 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. - -Imports Google.Api.Ads.AdWords.Lib -Imports Google.Api.Ads.AdWords.v201806 - -Namespace Google.Api.Ads.AdWords.Examples.VB.v201806 - ''' - ''' This code example gets location criteria by name. - ''' - Public Class LookupLocation - Inherits ExampleBase - - ''' - ''' Main method, to run this code example as a standalone application. - ''' - ''' The command line arguments. - Public Shared Sub Main(ByVal args As String()) - Dim codeExample As New LookupLocation - Console.WriteLine(codeExample.Description) - Try - codeExample.Run(New AdWordsUser) - Catch e As Exception - Console.WriteLine("An exception occurred while running this code example. {0}", - ExampleUtilities.FormatException(e)) - End Try - End Sub - - ''' - ''' Returns a description about the code example. - ''' - Public Overrides ReadOnly Property Description() As String - Get - Return "This code example gets location criteria by name." - End Get - End Property - - ''' - ''' Runs the code example. - ''' - ''' The AdWords user. - Public Sub Run(ByVal user As AdWordsUser) - Using locationCriterionService As LocationCriterionService = CType( - user.GetService( - AdWordsService.v201806.LocationCriterionService), - LocationCriterionService) - - Dim locationNames As String() = New String() _ - {"Paris", "Quebec", "Spain", "Deutschland"} - - Dim selector As New Selector - selector.fields = New String() { _ - Location.Fields.Id, Location.Fields.LocationName, - LocationCriterion.Fields.CanonicalName, - Location.Fields.DisplayType, - Location.Fields.ParentLocations, - LocationCriterion.Fields.Reach, - Location.Fields.TargetingStatus - } - - selector.predicates = New Predicate() { _ - Predicate.In(Location.Fields.LocationName, - locationNames), - Predicate.Equals( - LocationCriterion.Fields.Locale, "en") - } - - Try - ' Make the get request. - Dim locationCriteria As LocationCriterion() = - locationCriterionService.get(selector) - - ' Display the resulting location criteria. - For Each locationCriterion As LocationCriterion In locationCriteria - Dim parentLocations As String = "N/A" - - If ((Not locationCriterion.location Is Nothing) AndAlso - (Not locationCriterion.location.parentLocations Is Nothing)) Then - Dim parentLocationList As New List(Of String) - For Each location As Location In _ - locationCriterion.location.parentLocations - parentLocationList.Add(GetLocationString(location)) - Next - parentLocations = String.Join(", ", parentLocationList) - End If - - Console.WriteLine( - "The search term '{0}' returned the location '{1}' of type '{2}' " & - "with parent locations '{3}', reach '{4}' and targeting status '{5}.", - locationCriterion.searchTerm, locationCriterion.location.locationName, - locationCriterion.location.displayType, parentLocations, - locationCriterion.reach, - locationCriterion.location.targetingStatus) - Next - Catch e As Exception - Throw New System.ApplicationException("Failed to get location criteria.", e) - End Try - End Using - End Sub - - ''' - ''' Gets a string representation for a location. - ''' - ''' The location - ''' - Public Function GetLocationString(ByVal location As Location) As String - Return String.Format("{0} ({1})", location.locationName, location.displayType) - End Function - End Class -End Namespace diff --git a/src/AdManager/AdManager.csproj b/src/AdManager/AdManager.csproj index c5db0b1576b..526541d7b94 100755 --- a/src/AdManager/AdManager.csproj +++ b/src/AdManager/AdManager.csproj @@ -3,7 +3,7 @@ Google's Ad Manager API Dotnet Client Library Google.Dfp - 24.5.0 + 24.6.0 This library provides you with functionality to access the Google's Ad Manager API. See https://github.com/googleads/googleads-dotnet-lib/blob/master/ChangeLog DFP Google diff --git a/src/AdManager/app.config.transform b/src/AdManager/app.config.transform deleted file mode 100755 index ffd753e184e..00000000000 --- a/src/AdManager/app.config.transform +++ /dev/null @@ -1,161 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AdManager/web.config.transform b/src/AdManager/web.config.transform deleted file mode 100755 index ffd753e184e..00000000000 --- a/src/AdManager/web.config.transform +++ /dev/null @@ -1,161 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AdWords/AdWords.csproj b/src/AdWords/AdWords.csproj index 0cc293d1ad1..23852a4ba12 100755 --- a/src/AdWords/AdWords.csproj +++ b/src/AdWords/AdWords.csproj @@ -3,7 +3,7 @@ AdWords API Dotnet Client Library Google.AdWords - 24.5.0 + 24.6.0 This library provides you with functionality to access the AdWords API. See https://github.com/googleads/googleads-dotnet-lib/blob/master/ChangeLog AdWords Google diff --git a/src/AdWords/App.config b/src/AdWords/App.config index a105b874bbc..87d0ce37f55 100755 --- a/src/AdWords/App.config +++ b/src/AdWords/App.config @@ -2,6 +2,7 @@
+
- - - - - - /// Utility methods to upload operations for a batch job, and download the - /// results. - /// - public class BatchJobUtilities : BatchJobUtilitiesBase - { - /// - /// Wait callback to be used when calling - /// method. - /// - /// The batchjob instance that was retrieved by - /// the method when polling for job - /// status. - /// The time in milliseconds for which the - /// method has waited so far. - /// true, if the method should - /// be cancelled, false otherwise. - public delegate bool WaitCallback(ApiBatchJob batchJob, long waitedMilliseconds); - - /// - /// The list of batch job statuses that corresponds to the job being in a - /// pending state. - /// - private readonly HashSet PENDING_STATUSES = new HashSet() - { - BatchJobStatus.ACTIVE, - BatchJobStatus.AWAITING_FILE, - BatchJobStatus.CANCELING - }; - - /// - /// Initializes a new instance of the - /// class. - /// - /// AdWords user to be used along with this - /// utilities object. - public BatchJobUtilities(AdsUser user) : base(user) - { - } - - /// - /// Initializes a new instance of the - /// class. - /// - /// AdWords user to be used along with this - /// utilities object. - /// if the operations should be broken into - /// smaller chunks before uploading to the server. - /// The chunk size to use for resumable upload. - /// Thrown if - /// is not a multiple of 256KB. - /// Use chunking if your network is spotty for uploads, or if it - /// has restrictions such as speed limits or timeouts. Chunking makes your - /// upload reliable when the network is unreliable, but it is inefficient - /// over a good connection, since an HTTPs request has to be made for every - /// chunk being uploaded. - public BatchJobUtilities(AdsUser user, bool useChunking, int chunkSize) : base(user, - useChunking, chunkSize) - { - } - - /// - /// Gets the post body for sending a request. - /// - /// The list of operations. - /// The POST body, for using in the web request. - protected string GetPostBody(IEnumerable operations) - { - BatchJobMutateRequest request = new BatchJobMutateRequest() - { - operations = operations.ToArray() - }; - return SerializationUtilities.SerializeAsXmlText(request); - } - - /// - /// Uploads the operations to a specified URL. - /// - /// The temporary URL returned by a batch job. - /// The list of operations. - public void Upload(string url, IEnumerable operations) - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - Upload(url, operations, false); - } - - /// - /// Uploads the operations to a specified URL. - /// - /// The temporary URL returned by a batch job. - /// The list of operations. - /// True, if a previously interrupted - /// upload should be resumed. - public void Upload(string url, IEnumerable operations, bool resumePreviousUpload) - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - long totalUploaded = 0; - - byte[] postBody = Encoding.UTF8.GetBytes(GetPostBody(operations)); - long totalUploadSize = postBody.Length; - - // If this file has been uploaded partially, just upload the remaining - // part. - if (resumePreviousUpload) - { - totalUploaded = GetUploadProgress(url); - byte[] temp = new byte[totalUploadSize - totalUploaded]; - Array.Copy(postBody, totalUploaded, temp, 0, totalUploadSize - totalUploaded); - postBody = temp; - } - - Upload(url, postBody, totalUploaded, totalUploadSize); - } - - /// - /// Uploads the operations to a specified URL in a streamed manner. - /// - /// The upload progress tracker. - /// The list of operations. - /// The updated progress tracker. - public BatchUploadProgress StreamUpload(BatchUploadProgress uploadProgress, - IEnumerable operations) - { - String postBody = GetPostBody(operations); - return StreamUpload(uploadProgress, postBody); - } - - /// - /// Downloads the batch job results from a specified URL. - /// - /// The download URL from a batch job. - /// The results from the batch job. - public BatchJobMutateResponse Download(string url) - { - return ParseResponse(DownloadResults(url)); - } - - /// - /// Parses the response from Google Cloud Storage servers. - /// - /// The response body. - /// A BatchJobMutateResponse object, generated by parsing the - /// response from the server. - private BatchJobMutateResponse ParseResponse(string contents) - { - return ParseResponse(contents).mutateResponse; - } - - /// - /// Wait for the job to complete. - /// - /// ID of the job to wait for completion. - /// false, if the job is still pending, false otherwise. - public bool WaitForPendingJob(long batchJobId) - { - return WaitForPendingJob(batchJobId, int.MaxValue, null); - } - - /// - /// Wait for the job to complete. - /// - /// ID of the job to wait for completion. - /// The number of milliseconds to wait for job - /// completion. - /// false, if the job is still pending, false otherwise. - public bool WaitForPendingJob(long batchJobId, int numMilliSecondsToWait) - { - return WaitForPendingJob(batchJobId, numMilliSecondsToWait, null); - } - - /// - /// Wait for the job to complete. - /// - /// ID of the job to wait for completion. - /// The number of milliseconds to wait for job - /// completion. - /// The callback to be called whenever the method polls the - /// server for job status. - /// false, if the job is still pending, true otherwise. - public bool WaitForPendingJob(long batchJobId, int numMilliSecondsToWait, - WaitCallback callback) - { - BatchJobService batchJobService = - (BatchJobService) User.GetService(AdWordsService.v201806.BatchJobService); - - long totalMillisecondsWaited = 0; - long pollAttempts = 0; - bool cancelWait = false; - bool isPending = true; - do - { - int sleepMillis = (int) Math.Pow(2, pollAttempts) * POLL_INTERVAL_SECONDS_BASE * - 1000; - - if (totalMillisecondsWaited + sleepMillis > numMilliSecondsToWait) - { - sleepMillis = (int) (numMilliSecondsToWait - totalMillisecondsWaited); - } - - Thread.Sleep(sleepMillis); - totalMillisecondsWaited += sleepMillis; - pollAttempts++; - - Selector selector = new Selector() - { - fields = new string[] - { - ApiBatchJob.Fields.Id, - ApiBatchJob.Fields.Status, - ApiBatchJob.Fields.DownloadUrl, - ApiBatchJob.Fields.ProcessingErrors, - ApiBatchJob.Fields.ProgressStats - }, - predicates = new Predicate[] - { - Predicate.Equals(ApiBatchJob.Fields.Id, batchJobId) - } - }; - - ApiBatchJob batchJob = batchJobService.get(selector).entries[0]; - isPending = PENDING_STATUSES.Contains(batchJob.status); - - if (callback != null) - { - cancelWait = callback(batchJob, totalMillisecondsWaited); - } - } while (isPending && totalMillisecondsWaited < numMilliSecondsToWait && !cancelWait); - - return !isPending; - } - - /// - /// Try to cancel a job. - /// - /// ID of the batch job to cancel. - /// Thrown if an API error occurred - /// when cancelling the job. - public void TryToCancelJob(long batchJobId) - { - BatchJobService batchJobService = - (BatchJobService) User.GetService(AdWordsService.v201806.BatchJobService); - try - { - BatchJobOperation batchJobSetOperation = new BatchJobOperation() - { - @operator = Operator.SET, - operand = new ApiBatchJob() - { - id = batchJobId, - status = BatchJobStatus.CANCELING - } - }; - - batchJobService.mutate(new BatchJobOperation[] - { - batchJobSetOperation - }); - } - catch (AdWordsApiException) - { - // Rethrow the API exception. - throw; - } - } - - #region mono_vbnc_bug_40793_workaround - - /* Mono VBNC compiler has issues calling generic methods whose signatures contain generic - * type. These methods are provided as workaround for Mono users on VB.NET. - * See https://bugzilla.xamarin.com/show_bug.cgi?id=40793 for details. - */ - - /// - /// Uploads the operations to a specified URL. - /// - /// The temporary URL returned by a batch job. - /// The list of operations. - /// Use this method as a workaround for - /// https://bugzilla.xamarin.com/show_bug.cgi?id=40793 if you are using VB.NET on Mono. - /// Otherwise use method. - public void Upload(string url, Operation[] operations) - { - Upload(url, (IEnumerable) operations); - } - - /// - /// Uploads the operations to a specified URL. - /// - /// The temporary URL returned by a batch job. - /// The list of operations. - /// True, if a previously interrupted - /// upload should be resumed. - /// Use this method as a workaround for - /// https://bugzilla.xamarin.com/show_bug.cgi?id=40793 if you are using VB.NET on Mono. - /// Otherwise use method. - public void Upload(string url, Operation[] operations, bool resumePreviousUpload) - { - Upload(url, (IEnumerable) operations, resumePreviousUpload); - } - - /// - /// Uploads the operations to a specified URL in a streamed manner. - /// - /// The upload progress tracker. - /// The list of operations. - /// The updated progress tracker. - /// Use this method as a workaround for - /// https://bugzilla.xamarin.com/show_bug.cgi?id=40793 if you are using VB.NET on Mono. - /// Otherwise use - /// method. - public BatchUploadProgress StreamUpload(BatchUploadProgress uploadProgress, - Operation[] operations) - { - return StreamUpload(uploadProgress, (IEnumerable) operations); - } - - #endregion - } -} diff --git a/src/AdWords/Util/Reports/Parser/v201806/PredefinedReportTypes.cs b/src/AdWords/Util/Reports/Parser/v201806/PredefinedReportTypes.cs deleted file mode 100755 index db014c44cb7..00000000000 --- a/src/AdWords/Util/Reports/Parser/v201806/PredefinedReportTypes.cs +++ /dev/null @@ -1,14412 +0,0 @@ -// Copyright 2018 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. - -#pragma warning disable 1591 - -namespace Google.Api.Ads.AdWords.Util.Reports.v201806 -{ - public class KeywordsPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum ApprovalStatus - { - APPROVED, - DISAPPROVED, - PENDING_REVIEW, - UNDER_REVIEW - } - - public enum BiddingStrategySource - { - ADGROUP, - CAMPAIGN, - CRITERION - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CreativeQualityScore - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum HistoricalCreativeQualityScore - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum HistoricalLandingPageQualityScore - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum HistoricalSearchPredictedCtr - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum KeywordMatchType - { - BROAD, - EXACT, - PHRASE - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum PostClickQualityScore - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum SearchPredictedCtr - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - public enum SystemServingStatus - { - ELIGIBLE, - RARELY_SERVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("approvalStatus")] - public ApprovalStatus approvalStatus { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("pagesSession")] - public double averagePageviews { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("avgSessionDurationSeconds")] - public double averageTimeOnSite { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("biddingStrategySource")] - public BiddingStrategySource biddingStrategySource { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bounceRate")] - public double bounceRate { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clickAssistedConv")] - public long clickAssistedConversions { get; set; } - - [ReportColumn("clickAssistedConvLastClickConv")] - public double clickAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("clickAssistedConvValue")] - public double clickAssistedConversionValue { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("adRelevance")] - public CreativeQualityScore creativeQualityScore { get; set; } - - [ReportColumn("keyword")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("enhancedCPCEnabled")] - public bool enhancedCpcEnabled { get; set; } - - [ReportColumn("estAddClicksWkFirstPositionBid")] - public long estimatedAddClicksAtFirstPositionCpc { get; set; } - - [ReportColumn("estAddCostWkFirstPositionBid")] - public decimal estimatedAddCostAtFirstPositionCpc { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("finalURLSuffix")] - public string finalUrlSuffix { get; set; } - - [ReportColumn("firstPageCPC")] - public string firstPageCpc { get; set; } - - [ReportColumn("firstPositionCPC")] - public string firstPositionCpc { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("hasQualityScore")] - public bool hasQualityScore { get; set; } - - [ReportColumn("adRelevanceHist")] - public HistoricalCreativeQualityScore historicalCreativeQualityScore { get; set; } - - [ReportColumn("landingPageExperienceHist")] - public HistoricalLandingPageQualityScore historicalLandingPageQualityScore { get; set; } - - [ReportColumn("qualScoreHist")] - public long historicalQualityScore { get; set; } - - [ReportColumn("expectedClickthroughRateHist")] - public HistoricalSearchPredictedCtr historicalSearchPredictedCtr { get; set; } - - [ReportColumn("keywordID")] - public long id { get; set; } - - [ReportColumn("imprAssistedConv")] - public long impressionAssistedConversions { get; set; } - - [ReportColumn("imprAssistedConvLastClickConv")] - public double impressionAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("imprAssistedConvValue")] - public double impressionAssistedConversionValue { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("matchType")] - public KeywordMatchType keywordMatchType { get; set; } - - [ReportColumn("labelIDs")] - public string labelIds { get; set; } - - [ReportColumn("labels")] - public string labels { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("newSessions")] - public double percentNewVisitors { get; set; } - - [ReportColumn("landingPageExperience")] - public PostClickQualityScore postClickQualityScore { get; set; } - - [ReportColumn("qualityScore")] - public long qualityScore { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("searchExactMatchIS")] - public double searchExactMatchImpressionShare { get; set; } - - [ReportColumn("searchImprShare")] - public double searchImpressionShare { get; set; } - - [ReportColumn("expectedClickthroughRate")] - public SearchPredictedCtr searchPredictedCtr { get; set; } - - [ReportColumn("searchLostISRank")] - public double searchRankLostImpressionShare { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("keywordState")] - public Status status { get; set; } - - [ReportColumn("criterionServingStatus")] - public SystemServingStatus systemServingStatus { get; set; } - - [ReportColumn("topOfPageCPC")] - public string topOfPageCpc { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("verticalID")] - public long verticalId { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AdPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdType - { - CALL_ONLY_AD, - DEPRECATED_AD, - DYNAMIC_SEARCH_AD, - EXPANDED_DYNAMIC_SEARCH_AD, - EXPANDED_TEXT_AD, - GMAIL_AD, - GOAL_OPTIMIZED_SHOPPING_AD, - IMAGE_AD, - MULTI_ASSET_RESPONSIVE_DISPLAY_AD, - PRODUCT_AD, - RESPONSIVE_DISPLAY_AD, - RESPONSIVE_SEARCH_AD, - SHOWCASE_AD, - TEMPLATE_AD, - TEXT_AD, - THIRD_PARTY_REDIRECT_AD, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CombinedApprovalStatus - { - APPROVED, - APPROVED_LIMITED, - DISAPPROVED, - ELIGIBLE, - SITE_SUSPENDED, - UNDER_REVIEW, - UNKNOWN - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum CriterionType - { - AD_SCHEDULE, - AGE_RANGE, - APP_PAYMENT_MODEL, - CARRIER, - CONTENT_LABEL, - CUSTOM_AFFINITY, - CUSTOM_IN_MARKET, - GENDER, - IP_BLOCK, - KEYWORD, - LANGUAGE, - LOCATION, - LOCATION_GROUPS, - MOBILE_APP_CATEGORY, - MOBILE_APPLICATION, - MOBILE_DEVICE, - OPERATING_SYSTEM_VERSION, - PARENT, - PLACEMENT, - PLATFORM, - PREFERRED_CONTENT, - PRODUCT_PARTITION, - PRODUCT_SCOPE, - PROXIMITY, - UNKNOWN, - USER_INTEREST, - USER_LIST, - VERTICAL, - WEBPAGE, - YOUTUBE_CHANNEL, - YOUTUBE_VIDEO - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum FormatSetting - { - ALL_FORMATS, - NATIVE, - NON_NATIVE, - UNKNOWN - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum MultiAssetResponsiveDisplayAdFormatSetting - { - ALL_FORMATS, - NATIVE, - NON_NATIVE, - UNKNOWN - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - public enum Status - { - DISABLED, - ENABLED, - PAUSED - } - - public enum SystemManagedEntitySource - { - AD_VARIATIONS, - UNKNOWN - } - - [ReportColumn("callOnlyAdPhoneNumber")] - public string callOnlyPhoneNumber { get; set; } - - [ReportColumn("imageAdURL")] - public string imageAdUrl { get; set; } - - [ReportColumn("descriptionsMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdDescriptions { get; set; } - - [ReportColumn("headlinesMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdHeadlines { get; set; } - - [ReportColumn("landscapeLogosMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdLandscapeLogoImages { get; set; } - - [ReportColumn("logosMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdLogoImages { get; set; } - - [ReportColumn("longHeadlineMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdLongHeadline { get; set; } - - [ReportColumn("imagesMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdMarketingImages { get; set; } - - [ReportColumn("squareImagesMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdSquareMarketingImages { get; set; } - - [ReportColumn("policy")] - public string policySummary { get; set; } - - [ReportColumn("responsiveSearchAdDescriptions")] - public string responsiveSearchAdDescriptions { get; set; } - - [ReportColumn("responsiveSearchAdHeadlines")] - public string responsiveSearchAdHeadlines { get; set; } - - [ReportColumn("accentColorResponsive")] - public string accentColor { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("adType")] - public AdType adType { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("allowFlexibleColorResponsive")] - public bool allowFlexibleColor { get; set; } - - [ReportColumn("autoAppliedAdSuggestion")] - public bool automated { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("pagesSession")] - public double averagePageviews { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("avgSessionDurationSeconds")] - public double averageTimeOnSite { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bounceRate")] - public double bounceRate { get; set; } - - [ReportColumn("businessName")] - public string businessName { get; set; } - - [ReportColumn("callToActionTextResponsive")] - public string callToActionText { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clickAssistedConv")] - public long clickAssistedConversions { get; set; } - - [ReportColumn("clickAssistedConvLastClickConv")] - public double clickAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("clickAssistedConvValue")] - public double clickAssistedConversionValue { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("approvalStatus")] - public CombinedApprovalStatus combinedApprovalStatus { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("destinationURL")] - public string creativeDestinationUrl { get; set; } - - [ReportColumn("appFinalURL")] - public string creativeFinalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string creativeFinalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string creativeFinalUrls { get; set; } - - [ReportColumn("finalURLSuffix")] - public string creativeFinalUrlSuffix { get; set; } - - [ReportColumn("trackingTemplate")] - public string creativeTrackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string creativeUrlCustomParameters { get; set; } - - [ReportColumn("keywordID")] - public long criterionId { get; set; } - - [ReportColumn("criteriaType")] - public CriterionType criterionType { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("description")] - public string description { get; set; } - - [ReportColumn("descriptionLine1")] - public string description1 { get; set; } - - [ReportColumn("descriptionLine2")] - public string description2 { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("devicePreference")] - public long devicePreference { get; set; } - - [ReportColumn("displayURL")] - public string displayUrl { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("landscapeLogoIDResponsive")] - public long enhancedDisplayCreativeLandscapeLogoImageMediaId { get; set; } - - [ReportColumn("logoIDResponsive")] - public long enhancedDisplayCreativeLogoImageMediaId { get; set; } - - [ReportColumn("imageIDResponsive")] - public long enhancedDisplayCreativeMarketingImageMediaId { get; set; } - - [ReportColumn("squareImageIDResponsive")] - public long enhancedDisplayCreativeMarketingImageSquareMediaId { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("adFormatPreferenceResponsive")] - public FormatSetting formatSetting { get; set; } - - [ReportColumn("gmailAdHeaderImageMediaId")] - public long gmailCreativeHeaderImageMediaId { get; set; } - - [ReportColumn("gmailAdLogoImageMediaId")] - public long gmailCreativeLogoImageMediaId { get; set; } - - [ReportColumn("gmailAdMarketingImageMediaId")] - public long gmailCreativeMarketingImageMediaId { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("gmailAdBusinessName")] - public string gmailTeaserBusinessName { get; set; } - - [ReportColumn("gmailAdDescription")] - public string gmailTeaserDescription { get; set; } - - [ReportColumn("gmailAdHeadline")] - public string gmailTeaserHeadline { get; set; } - - [ReportColumn("ad")] - public string headline { get; set; } - - [ReportColumn("headline1")] - public string headlinePart1 { get; set; } - - [ReportColumn("headline2")] - public string headlinePart2 { get; set; } - - [ReportColumn("adID")] - public long id { get; set; } - - [ReportColumn("imageHeight")] - public long imageCreativeImageHeight { get; set; } - - [ReportColumn("imageWidth")] - public long imageCreativeImageWidth { get; set; } - - [ReportColumn("imageMimeType")] - public long imageCreativeMimeType { get; set; } - - [ReportColumn("imageAdName")] - public string imageCreativeName { get; set; } - - [ReportColumn("imprAssistedConv")] - public long impressionAssistedConversions { get; set; } - - [ReportColumn("imprAssistedConvLastClickConv")] - public double impressionAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("imprAssistedConvValue")] - public double impressionAssistedConversionValue { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("labelIDs")] - public string labelIds { get; set; } - - [ReportColumn("labels")] - public string labels { get; set; } - - [ReportColumn("longHeadline")] - public string longHeadline { get; set; } - - [ReportColumn("mainColorResponsive")] - public string mainColor { get; set; } - - [ReportColumn("gmailAdMarketingImageCallToActionText")] - public string marketingImageCallToActionText { get; set; } - - [ReportColumn("gmailAdMarketingImageCallToActionTextColor")] - public string marketingImageCallToActionTextColor { get; set; } - - [ReportColumn("gmailAdMarketingImageDescription")] - public string marketingImageDescription { get; set; } - - [ReportColumn("gmailAdMarketingImageHeadline")] - public string marketingImageHeadline { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("accentColorMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdAccentColor { get; set; } - - [ReportColumn("allowFlexibleColorMultiAssetResponsiveDisplay")] - public bool multiAssetResponsiveDisplayAdAllowFlexibleColor { get; set; } - - [ReportColumn("businessNameMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdBusinessName { get; set; } - - [ReportColumn("callToActionTextMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdCallToActionText { get; set; } - - [ReportColumn("pricePrefixMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdDynamicSettingsPricePrefix { get; set; } - - [ReportColumn("promotionTextMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdDynamicSettingsPromoText { get; set; } - - [ReportColumn("adFormatPreferenceMultiAssetResponsiveDisplay")] - public MultiAssetResponsiveDisplayAdFormatSetting multiAssetResponsiveDisplayAdFormatSetting - { - get; - set; - } - - [ReportColumn("mainColorMultiAssetResponsiveDisplay")] - public string multiAssetResponsiveDisplayAdMainColor { get; set; } - - [ReportColumn("path1")] - public string path1 { get; set; } - - [ReportColumn("path2")] - public string path2 { get; set; } - - [ReportColumn("newSessions")] - public double percentNewVisitors { get; set; } - - [ReportColumn("pricePrefixResponsive")] - public string pricePrefix { get; set; } - - [ReportColumn("promotionTextResponsive")] - public string promoText { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("responsiveSearchAdPath1")] - public string responsiveSearchAdPath1 { get; set; } - - [ReportColumn("responsiveSearchAdPath2")] - public string responsiveSearchAdPath2 { get; set; } - - [ReportColumn("shortHeadline")] - public string shortHeadline { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("adState")] - public Status status { get; set; } - - [ReportColumn("systemManagedEntitySource")] - public SystemManagedEntitySource systemManagedEntitySource { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class UrlPerformanceReportReportRow - { - public enum AdFormat - { - AUDIO, - COMPOSITE, - DYNAMIC_IMAGE, - FLASH, - HTML, - IMAGE, - PRINT, - TEXT, - UNKNOWN, - VIDEO - } - - public enum AdGroupCriterionStatus - { - ENABLED, - PAUSED, - REMOVED - } - - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("criteriaDisplayName")] - public string displayName { get; set; } - - [ReportColumn("added")] - public string isBidOnPath { get; set; } - - [ReportColumn("excluded")] - public string isPathExcluded { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adType")] - public AdFormat adFormat { get; set; } - - [ReportColumn("keywordPlacementState")] - public AdGroupCriterionStatus adGroupCriterionStatus { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("keywordPlacement")] - public string criteriaParameters { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("domain")] - public string domain { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("targetingMode")] - public bool isAutoOptimized { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("url")] - public string url { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AdgroupPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdGroupType - { - DISPLAY_ENGAGEMENT, - DISPLAY_STANDARD, - HOTEL_ADS, - SEARCH_DYNAMIC_ADS, - SEARCH_STANDARD, - SHOPPING_GOAL_OPTIMIZED_ADS, - SHOPPING_PRODUCT_ADS, - SHOPPING_SHOWCASE_ADS, - UNKNOWN, - VIDEO_BUMPER, - VIDEO_NON_SKIPPABLE_IN_STREAM, - VIDEO_TRUE_VIEW_IN_DISPLAY, - VIDEO_TRUE_VIEW_IN_STREAM - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdRotationMode - { - OPTIMIZE, - ROTATE_FOREVER, - UNKNOWN - } - - public enum BiddingStrategySource - { - ADGROUP, - CAMPAIGN, - CRITERION - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum ContentBidCriterionTypeGroup - { - AGE_RANGE, - GENDER, - INCOME_RANGE, - KEYWORD, - NONE, - PARENT, - PLACEMENT, - UNKNOWN, - USER_INTEREST_AND_LIST, - VERTICAL - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum EffectiveTargetRoasSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - ADGROUP_CRITERION, - CAMPAIGN_BIDDING_STRATEGY, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - public enum TargetCpaBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("desktopBidAdj")] - public double adGroupDesktopBidModifier { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("mobileBidAdj")] - public double adGroupMobileBidModifier { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("tabletBidAdj")] - public double adGroupTabletBidModifier { get; set; } - - [ReportColumn("adGroupType")] - public AdGroupType adGroupType { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("adRotationMode")] - public AdRotationMode adRotationMode { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("pagesSession")] - public double averagePageviews { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("avgSessionDurationSeconds")] - public double averageTimeOnSite { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("biddingStrategySource")] - public BiddingStrategySource biddingStrategySource { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bounceRate")] - public double bounceRate { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clickAssistedConv")] - public long clickAssistedConversions { get; set; } - - [ReportColumn("clickAssistedConvLastClickConv")] - public double clickAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("clickAssistedConvValue")] - public double clickAssistedConversionValue { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("contentNetworkBidDimension")] - public ContentBidCriterionTypeGroup contentBidCriterionTypeGroup { get; set; } - - [ReportColumn("contentImprShare")] - public double contentImpressionShare { get; set; } - - [ReportColumn("contentLostISRank")] - public double contentRankLostImpressionShare { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("defaultMaxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPV")] - public decimal cpvBid { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("targetROAS")] - public double effectiveTargetRoas { get; set; } - - [ReportColumn("targetROASSource")] - public EffectiveTargetRoasSource effectiveTargetRoasSource { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("enhancedCPCEnabled")] - public bool enhancedCpcEnabled { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("finalURLSuffix")] - public string finalUrlSuffix { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("hourOfDay")] - public long hourOfDay { get; set; } - - [ReportColumn("imprAssistedConv")] - public long impressionAssistedConversions { get; set; } - - [ReportColumn("imprAssistedConvLastClickConv")] - public double impressionAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("imprAssistedConvValue")] - public double impressionAssistedConversionValue { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("labelIDs")] - public string labelIds { get; set; } - - [ReportColumn("labels")] - public string labels { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("phoneImpressions")] - public long numOfflineImpressions { get; set; } - - [ReportColumn("phoneCalls")] - public long numOfflineInteractions { get; set; } - - [ReportColumn("ptr")] - public double offlineInteractionRate { get; set; } - - [ReportColumn("newSessions")] - public double percentNewVisitors { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("relativeCTR")] - public double relativeCtr { get; set; } - - [ReportColumn("searchAbsTopIS")] - public double searchAbsoluteTopImpressionShare { get; set; } - - [ReportColumn("searchExactMatchIS")] - public double searchExactMatchImpressionShare { get; set; } - - [ReportColumn("searchImprShare")] - public double searchImpressionShare { get; set; } - - [ReportColumn("searchLostISRank")] - public double searchRankLostImpressionShare { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("targetCPA")] - public decimal targetCpa { get; set; } - - [ReportColumn("targetCPASource")] - public TargetCpaBidSource targetCpaBidSource { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CampaignPerformanceReportReportRow - { - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdvertisingChannelSubType - { - DISPLAY_EXPRESS, - DISPLAY_GMAIL_AD, - DISPLAY_MOBILE_APP, - DISPLAY_SMART_CAMPAIGN, - SEARCH_EXPRESS, - SEARCH_MOBILE_APP, - SHOPPING_GOAL_OPTIMIZED_ADS, - UNIVERSAL_APP_CAMPAIGN, - UNKNOWN - } - - public enum AdvertisingChannelType - { - DISPLAY, - EXPRESS, - MULTI_CHANNEL, - SEARCH, - SHOPPING, - UNKNOWN, - VIDEO - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum CampaignTrialType - { - BASE, - DRAFT, - TRIAL, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum ServingStatus - { - ENDED, - NONE, - PENDING, - SERVING, - SUSPENDED - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("budgetPeriod")] - public string period { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("advertisingSubChannel")] - public AdvertisingChannelSubType advertisingChannelSubType { get; set; } - - [ReportColumn("advertisingChannel")] - public AdvertisingChannelType advertisingChannelType { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("budget")] - public decimal amount { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgImprFreqPerCookie")] - public double averageFrequency { get; set; } - - [ReportColumn("pagesSession")] - public double averagePageviews { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("avgSessionDurationSeconds")] - public double averageTimeOnSite { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bounceRate")] - public double bounceRate { get; set; } - - [ReportColumn("budgetID")] - public long budgetId { get; set; } - - [ReportColumn("desktopBidAdj")] - public double campaignDesktopBidModifier { get; set; } - - [ReportColumn("campaignGroupID")] - public long campaignGroupId { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("mobileBidAdj")] - public double campaignMobileBidModifier { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("tabletBidAdj")] - public double campaignTabletBidModifier { get; set; } - - [ReportColumn("campaignTrialType")] - public CampaignTrialType campaignTrialType { get; set; } - - [ReportColumn("clickAssistedConv")] - public long clickAssistedConversions { get; set; } - - [ReportColumn("clickAssistedConvLastClickConv")] - public double clickAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("clickAssistedConvValue")] - public double clickAssistedConversionValue { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("contentLostISBudget")] - public double contentBudgetLostImpressionShare { get; set; } - - [ReportColumn("contentImprShare")] - public double contentImpressionShare { get; set; } - - [ReportColumn("contentLostISRank")] - public double contentRankLostImpressionShare { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("endDate")] - public string endDate { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("enhancedCPCEnabled")] - public bool enhancedCpcEnabled { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("finalURLSuffix")] - public string finalUrlSuffix { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("hourOfDay")] - public long hourOfDay { get; set; } - - [ReportColumn("imprAssistedConv")] - public long impressionAssistedConversions { get; set; } - - [ReportColumn("imprAssistedConvLastClickConv")] - public double impressionAssistedConversionsOverLastClickConversions { get; set; } - - [ReportColumn("imprAssistedConvValue")] - public double impressionAssistedConversionValue { get; set; } - - [ReportColumn("uniqueCookies")] - public long impressionReach { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("invalidClickRate")] - public double invalidClickRate { get; set; } - - [ReportColumn("invalidClicks")] - public long invalidClicks { get; set; } - - [ReportColumn("budgetExplicitlyShared")] - public bool isBudgetExplicitlyShared { get; set; } - - [ReportColumn("labelIDs")] - public string labelIds { get; set; } - - [ReportColumn("labels")] - public string labels { get; set; } - - [ReportColumn("targetROASMaximizeConversionValue")] - public double maximizeConversionValueTargetRoas { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("phoneImpressions")] - public long numOfflineImpressions { get; set; } - - [ReportColumn("phoneCalls")] - public long numOfflineInteractions { get; set; } - - [ReportColumn("ptr")] - public double offlineInteractionRate { get; set; } - - [ReportColumn("newSessions")] - public double percentNewVisitors { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("relativeCTR")] - public double relativeCtr { get; set; } - - [ReportColumn("searchAbsTopIS")] - public double searchAbsoluteTopImpressionShare { get; set; } - - [ReportColumn("searchLostISBudget")] - public double searchBudgetLostImpressionShare { get; set; } - - [ReportColumn("clickShare")] - public double searchClickShare { get; set; } - - [ReportColumn("searchExactMatchIS")] - public double searchExactMatchImpressionShare { get; set; } - - [ReportColumn("searchImprShare")] - public double searchImpressionShare { get; set; } - - [ReportColumn("searchLostISRank")] - public double searchRankLostImpressionShare { get; set; } - - [ReportColumn("campaignServingStatus")] - public ServingStatus servingStatus { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("startDate")] - public string startDate { get; set; } - - [ReportColumn("totalBudgetAmount")] - public decimal totalAmount { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AccountPerformanceReportReportRow - { - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("canManageClients")] - public bool canManageClients { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("contentLostISBudget")] - public double contentBudgetLostImpressionShare { get; set; } - - [ReportColumn("contentImprShare")] - public double contentImpressionShare { get; set; } - - [ReportColumn("contentLostISRank")] - public double contentRankLostImpressionShare { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("hourOfDay")] - public long hourOfDay { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("invalidClickRate")] - public double invalidClickRate { get; set; } - - [ReportColumn("invalidClicks")] - public long invalidClicks { get; set; } - - [ReportColumn("autoTaggingEnabled")] - public bool isAutoTaggingEnabled { get; set; } - - [ReportColumn("testAccount")] - public bool isTestAccount { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("searchLostISBudget")] - public double searchBudgetLostImpressionShare { get; set; } - - [ReportColumn("searchExactMatchIS")] - public double searchExactMatchImpressionShare { get; set; } - - [ReportColumn("searchImprShare")] - public double searchImpressionShare { get; set; } - - [ReportColumn("searchLostISRank")] - public double searchRankLostImpressionShare { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class GeoPerformanceReportReportRow - { - public enum AdFormat - { - AUDIO, - COMPOSITE, - DYNAMIC_IMAGE, - FLASH, - HTML, - IMAGE, - PRINT, - TEXT, - UNKNOWN, - VIDEO - } - - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum LocationType - { - AREA_OF_INTEREST, - LOCATION_OF_PRESENCE, - UNKNOWN - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adType")] - public AdFormat adFormat { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("city")] - public long cityCriteriaId { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("countryTerritory")] - public long countryCriteriaId { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isTargetable")] - public bool isTargetingLocation { get; set; } - - [ReportColumn("locationType")] - public LocationType locationType { get; set; } - - [ReportColumn("metroArea")] - public long metroCriteriaId { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("mostSpecificLocation")] - public long mostSpecificCriteriaId { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("region")] - public long regionCriteriaId { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class SearchQueryPerformanceReportReportRow - { - public enum AdFormat - { - AUDIO, - COMPOSITE, - DYNAMIC_IMAGE, - FLASH, - HTML, - IMAGE, - PRINT, - TEXT, - UNKNOWN, - VIDEO - } - - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum QueryMatchTypeWithVariant - { - AUTO, - BROAD, - EXACT, - EXPANDED, - NEAR_EXACT, - NEAR_PHRASE, - PHRASE - } - - public enum QueryTargetingStatus - { - ADDED, - BOTH, - EXCLUDED, - NONE - } - - [ReportColumn("keywordID")] - public string keywordId { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adType")] - public AdFormat adFormat { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("adID")] - public long creativeId { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("destinationURL")] - public string destinationUrl { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("finalURL")] - public string finalUrl { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("keyword")] - public string keywordTextMatchingQuery { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("searchTerm")] - public string query { get; set; } - - [ReportColumn("matchType")] - public QueryMatchTypeWithVariant queryMatchTypeWithVariant { get; set; } - - [ReportColumn("addedExcluded")] - public QueryTargetingStatus queryTargetingStatus { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AutomaticPlacementsPerformanceReportReportRow - { - public enum AdFormat - { - AUDIO, - COMPOSITE, - DYNAMIC_IMAGE, - FLASH, - HTML, - IMAGE, - PRINT, - TEXT, - UNKNOWN, - VIDEO - } - - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("criteriaDisplayName")] - public string displayName { get; set; } - - [ReportColumn("added")] - public string isBidOnPath { get; set; } - - [ReportColumn("excluded")] - public string isPathExcluded { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adType")] - public AdFormat adFormat { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("url")] - public string criteriaParameters { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("domain")] - public string domain { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("targetingMode")] - public bool isAutoOptimized { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CampaignNegativeKeywordsPerformanceReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum KeywordMatchType - { - BROAD, - EXACT, - PHRASE - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("negativeKeyword")] - public string criteria { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("keywordID")] - public long id { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("matchType")] - public KeywordMatchType keywordMatchType { get; set; } - } - - public class CampaignNegativePlacementsPerformanceReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum KeywordMatchType - { - BROAD, - EXACT, - PHRASE - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("exclusion")] - public string criteria { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("criteriaDisplayName")] - public string displayName { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("keywordID")] - public long id { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("matchType")] - public KeywordMatchType keywordMatchType { get; set; } - - [ReportColumn("verticalID")] - public long verticalId { get; set; } - } - - public class DestinationUrlReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum CriteriaStatus - { - ENABLED, - PAUSED, - REMOVED - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("keywordPlacementDestinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("keywordPlacement")] - public string criteriaParameters { get; set; } - - [ReportColumn("keywordPlacementState")] - public CriteriaStatus criteriaStatus { get; set; } - - [ReportColumn("matchType")] - public string criteriaTypeName { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("destinationURL")] - public string effectiveDestinationUrl { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class SharedSetReportReportRow - { - public enum Status - { - ENABLED, - REMOVED, - UNKNOWN - } - - public enum Type - { - NEGATIVE_KEYWORDS, - NEGATIVE_PLACEMENTS, - UNKNOWN - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("memberCount")] - public string memberCount { get; set; } - - [ReportColumn("sharedSetName")] - public string name { get; set; } - - [ReportColumn("referenceCount")] - public string referenceCount { get; set; } - - [ReportColumn("sharedSetID")] - public long sharedSetId { get; set; } - - [ReportColumn("state")] - public Status status { get; set; } - - [ReportColumn("sharedSetType")] - public Type type { get; set; } - } - - public class CampaignSharedSetReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum SharedSetType - { - NEGATIVE_KEYWORDS, - NEGATIVE_PLACEMENTS, - UNKNOWN - } - - public enum Status - { - ENABLED, - REMOVED, - UNKNOWN - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("sharedSetName")] - public string sharedSetName { get; set; } - - [ReportColumn("sharedSetType")] - public SharedSetType sharedSetType { get; set; } - - [ReportColumn("state")] - public Status status { get; set; } - } - - public class SharedSetCriteriaReportReportRow - { - public enum KeywordMatchType - { - BROAD, - EXACT, - PHRASE - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("negativeKeyword")] - public string criteria { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("keywordID")] - public long id { get; set; } - - [ReportColumn("matchType")] - public KeywordMatchType keywordMatchType { get; set; } - - [ReportColumn("sharedSetID")] - public long sharedSetId { get; set; } - } - - public class CreativeConversionReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("freeClickType")] - public long conversionTrackerId { get; set; } - - [ReportColumn("freeClickRate")] - public double creativeConversionRate { get; set; } - - [ReportColumn("freeClicks")] - public long creativeConversions { get; set; } - - [ReportColumn("adID")] - public long creativeId { get; set; } - - [ReportColumn("keywordPlacement")] - public string criteriaParameters { get; set; } - - [ReportColumn("matchType")] - public string criteriaTypeName { get; set; } - - [ReportColumn("keywordID")] - public long criterionId { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CallMetricsCallDetailsReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum CallStatus - { - MISSED, - RECEIVED, - UNKNOWN - } - - public enum CallTrackingDisplayLocation - { - AD, - LANDING_PAGE, - UNKNOWN - } - - public enum CallType - { - GOOGLE_SEARCH, - HIGH_END_MOBILE_SEARCH, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("durationSeconds")] - public long callDuration { get; set; } - - [ReportColumn("endTime")] - public long callEndTime { get; set; } - - [ReportColumn("callerCountryCode")] - public string callerCountryCallingCode { get; set; } - - [ReportColumn("callerAreaCode")] - public string callerNationalDesignatedCode { get; set; } - - [ReportColumn("startTime")] - public long callStartTime { get; set; } - - [ReportColumn("status")] - public CallStatus callStatus { get; set; } - - [ReportColumn("callSource")] - public CallTrackingDisplayLocation callTrackingDisplayLocation { get; set; } - - [ReportColumn("callType")] - public CallType callType { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("hourOfDay")] - public long hourOfDay { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class KeywordlessQueryReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum QueryTargetingStatus - { - ADDED, - BOTH, - EXCLUDED, - NONE - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("categories")] - public string categoryPaths { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("keywordID")] - public long criterionId { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("domain")] - public string domain { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("dynamicallyGeneratedHeadline")] - public string line1 { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("searchTerm")] - public string query { get; set; } - - [ReportColumn("addedExcluded")] - public QueryTargetingStatus queryTargetingStatus { get; set; } - - [ReportColumn("landingPageTitle")] - public string title { get; set; } - - [ReportColumn("url")] - public string url { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class KeywordlessCategoryReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("topLevelCategories")] - public string category0 { get; set; } - - [ReportColumn("firstLevelSubCategories")] - public string category1 { get; set; } - - [ReportColumn("secondLevelSubCategories")] - public string category2 { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("keywordID")] - public long criterionId { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("domain")] - public string domain { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CriteriaPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum ApprovalStatus - { - APPROVED, - DISAPPROVED, - PENDING_REVIEW, - UNDER_REVIEW - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum ConversionLagBucket - { - CONVERSION_0_TO_1_DAY, - CONVERSION_1_TO_2_DAYS, - CONVERSION_10_TO_11_DAYS, - CONVERSION_11_TO_12_DAYS, - CONVERSION_12_TO_13_DAYS, - CONVERSION_13_TO_14_DAYS, - CONVERSION_14_TO_21_DAYS, - CONVERSION_2_TO_3_DAYS, - CONVERSION_21_TO_30_DAYS, - CONVERSION_3_TO_4_DAYS, - CONVERSION_30_TO_45_DAYS, - CONVERSION_4_TO_5_DAYS, - CONVERSION_45_TO_60_DAYS, - CONVERSION_5_TO_6_DAYS, - CONVERSION_6_TO_7_DAYS, - CONVERSION_60_TO_90_DAYS, - CONVERSION_7_TO_8_DAYS, - CONVERSION_8_TO_9_DAYS, - CONVERSION_9_TO_10_DAYS, - UNKNOWN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpvBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CreativeQualityScore - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum CriteriaType - { - AD_SCHEDULE, - AGE_RANGE, - APP_PAYMENT_MODEL, - CARRIER, - CONTENT_LABEL, - CUSTOM_AFFINITY, - CUSTOM_INTENT, - GENDER, - INCOME_RANGE, - INTERACTION_TYPE, - IP_BLOCK, - KEYWORD, - LANGUAGE, - LOCATION, - LOCATION_GROUPS, - MOBILE_APP_CATEGORY, - MOBILE_APPLICATION, - MOBILE_DEVICE, - OPERATING_SYSTEM_VERSION, - PARENT, - PLACEMENT, - PLATFORM, - PREFERRED_CONTENT, - PRODUCT_PARTITION, - PRODUCT_SCOPE, - PROXIMITY, - RUN_OF_NETWORK, - UNKNOWN, - USER_INTEREST, - USER_LIST, - VERTICAL, - WEBPAGE, - YOUTUBE_CHANNEL, - YOUTUBE_VIDEO - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum PostClickQualityScore - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum SearchPredictedCtr - { - ABOVE_AVERAGE, - AVERAGE, - BELOW_AVERAGE, - UNKNOWN - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - public enum SystemServingStatus - { - ELIGIBLE, - RARELY_SERVED - } - - [ReportColumn("dynamicAdTarget")] - public string parameter { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("approvalStatus")] - public ApprovalStatus approvalStatus { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("daysToConversion")] - public ConversionLagBucket conversionLagBucket { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPV")] - public decimal cpvBid { get; set; } - - [ReportColumn("maxCPVSource")] - public CpvBidSource cpvBidSource { get; set; } - - [ReportColumn("adRelevance")] - public CreativeQualityScore creativeQualityScore { get; set; } - - [ReportColumn("keywordPlacement")] - public string criteria { get; set; } - - [ReportColumn("keywordPlacementDestinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("criteriaType")] - public CriteriaType criteriaType { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("criteriaDisplayName")] - public string displayName { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("enhancedCPCEnabled")] - public bool enhancedCpcEnabled { get; set; } - - [ReportColumn("estAddClicksWkFirstPositionBid")] - public long estimatedAddClicksAtFirstPositionCpc { get; set; } - - [ReportColumn("estAddCostWkFirstPositionBid")] - public decimal estimatedAddCostAtFirstPositionCpc { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("finalURLSuffix")] - public string finalUrlSuffix { get; set; } - - [ReportColumn("firstPageCPC")] - public string firstPageCpc { get; set; } - - [ReportColumn("firstPositionCPC")] - public string firstPositionCpc { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("hasQualityScore")] - public bool hasQualityScore { get; set; } - - [ReportColumn("keywordID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("labelIDs")] - public string labelIds { get; set; } - - [ReportColumn("labels")] - public string labels { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("landingPageExperience")] - public PostClickQualityScore postClickQualityScore { get; set; } - - [ReportColumn("qualityScore")] - public long qualityScore { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("expectedClickthroughRate")] - public SearchPredictedCtr searchPredictedCtr { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("keywordPlacementState")] - public Status status { get; set; } - - [ReportColumn("criterionServingStatus")] - public SystemServingStatus systemServingStatus { get; set; } - - [ReportColumn("topOfPageCPC")] - public string topOfPageCpc { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("verticalID")] - public long verticalId { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class ClickPerformanceReportReportRow - { - public enum AdFormat - { - AUDIO, - COMPOSITE, - DYNAMIC_IMAGE, - FLASH, - HTML, - IMAGE, - PRINT, - TEXT, - UNKNOWN, - VIDEO - } - - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum KeywordMatchType - { - BROAD, - EXACT, - PHRASE, - UNKNOWN - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("page")] - public long page { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("adType")] - public AdFormat adFormat { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("cityLocationOfInterest")] - public long aoiCityCriteriaId { get; set; } - - [ReportColumn("countryTerritoryLocationOfInterest")] - public long aoiCountryCriteriaId { get; set; } - - [ReportColumn("metroAreaLocationOfInterest")] - public long aoiMetroCriteriaId { get; set; } - - [ReportColumn("mostSpecificLocationTargetLocationOfInterest")] - public long aoiMostSpecificTargetId { get; set; } - - [ReportColumn("regionLocationOfInterest")] - public long aoiRegionCriteriaId { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaignLocationTarget")] - public long campaignLocationTargetId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("adID")] - public long creativeId { get; set; } - - [ReportColumn("keywordID")] - public long criteriaId { get; set; } - - [ReportColumn("keywordPlacement")] - public string criteriaParameters { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("googleClickID")] - public string gclId { get; set; } - - [ReportColumn("matchType")] - public KeywordMatchType keywordMatchType { get; set; } - - [ReportColumn("cityPhysicalLocation")] - public long lopCityCriteriaId { get; set; } - - [ReportColumn("countryTerritoryPhysicalLocation")] - public long lopCountryCriteriaId { get; set; } - - [ReportColumn("metroAreaPhysicalLocation")] - public long lopMetroCriteriaId { get; set; } - - [ReportColumn("mostSpecificLocationTargetPhysicalLocation")] - public long lopMostSpecificTargetId { get; set; } - - [ReportColumn("regionPhysicalLocation")] - public long lopRegionCriteriaId { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("userListID")] - public long userListId { get; set; } - } - - public class BudgetPerformanceReportReportRow - { - public enum AssociatedCampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum BudgetCampaignAssociationStatus - { - ENABLED, - REMOVED, - UNKNOWN - } - - public enum BudgetStatus - { - ENABLED, - REMOVED, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - [ReportColumn("deliveryMethod")] - public string deliveryMethod { get; set; } - - [ReportColumn("budgetPeriod")] - public string period { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("budget")] - public decimal amount { get; set; } - - [ReportColumn("campaignID")] - public long associatedCampaignId { get; set; } - - [ReportColumn("campaign")] - public string associatedCampaignName { get; set; } - - [ReportColumn("campaignState")] - public AssociatedCampaignStatus associatedCampaignStatus { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("budgetUsage")] - public BudgetCampaignAssociationStatus budgetCampaignAssociationStatus { get; set; } - - [ReportColumn("budgetID")] - public long budgetId { get; set; } - - [ReportColumn("budgetName")] - public string budgetName { get; set; } - - [ReportColumn("campaigns")] - public long budgetReferenceCount { get; set; } - - [ReportColumn("budgetState")] - public BudgetStatus budgetStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("explicitlyShared")] - public bool isBudgetExplicitlyShared { get; set; } - - [ReportColumn("totalBudgetAmount")] - public decimal totalAmount { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - } - - public class BidGoalPerformanceReportReportRow - { - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - REMOVED, - UNKNOWN - } - - public enum Type - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - [ReportColumn("adGroups")] - public long adGroupCount { get; set; } - - [ReportColumn("campaigns")] - public long campaignCount { get; set; } - - [ReportColumn("nonRemovedAdGroups")] - public long nonRemovedAdGroupCount { get; set; } - - [ReportColumn("nonRemovedKeywords")] - public long nonRemovedAdGroupCriteriaCount { get; set; } - - [ReportColumn("nonRemovedCampaigns")] - public long nonRemovedCampaignCount { get; set; } - - [ReportColumn("bidAutomationTargetSearchPageLocation")] - public bool pageOnePromotedBidChangesForRaisesOnly { get; set; } - - [ReportColumn("bidAdjustmentTargetSearchPageLocation")] - public double pageOnePromotedBidModifier { get; set; } - - [ReportColumn("locationTargetSearchPageLocation")] - public string pageOnePromotedStrategyGoal { get; set; } - - [ReportColumn("targetCPA")] - public decimal targetCpa { get; set; } - - [ReportColumn("targetROAS")] - public double targetRoas { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("keywords")] - public long adGroupCriteriaCount { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("hourOfDay")] - public long hourOfDay { get; set; } - - [ReportColumn("bidStrategyID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("bidStrategyName")] - public string name { get; set; } - - [ReportColumn("bidLimitTargetSearchPageLocation")] - public decimal pageOnePromotedBidCeiling { get; set; } - - [ReportColumn("limitedBudgetsTargetSearchPageLocation")] - public bool pageOnePromotedRaiseBidWhenBudgetConstrained { get; set; } - - [ReportColumn("lowQualityKeywordsTargetSearchPageLocation")] - public bool pageOnePromotedRaiseBidWhenLowQualityScore { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("state")] - public Status status { get; set; } - - [ReportColumn("upperBidLimitTargetCPA")] - public decimal targetCpaMaxCpcBidCeiling { get; set; } - - [ReportColumn("lowerBidLimitTargetCPA")] - public decimal targetCpaMaxCpcBidFloor { get; set; } - - [ReportColumn("targetOutrankingShare")] - public double targetOutrankShare { get; set; } - - [ReportColumn("bidAutomationTargetOutrankingShare")] - public bool targetOutrankShareBidChangesForRaisesOnly { get; set; } - - [ReportColumn("competitorDomainTargetOutrankingShare")] - public string targetOutrankShareCompetitorDomain { get; set; } - - [ReportColumn("upperMaxCpcBidLimitTargetOutrankingShare")] - public decimal targetOutrankShareMaxCpcBidCeiling { get; set; } - - [ReportColumn("lowQualityKeywordsTargetOutrankingShare")] - public bool targetOutrankShareRaiseBidWhenLowQualityScore { get; set; } - - [ReportColumn("upperBidLimitTargetROAS")] - public decimal targetRoasBidCeiling { get; set; } - - [ReportColumn("lowerBidLimitTargetROAS")] - public decimal targetRoasBidFloor { get; set; } - - [ReportColumn("bidLimitMaximizeClicks")] - public decimal targetSpendBidCeiling { get; set; } - - [ReportColumn("targetSpendMaximizeClicks")] - public decimal targetSpendSpendTarget { get; set; } - - [ReportColumn("bidStrategyType")] - public Type type { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class DisplayKeywordPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpvBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("maxCPV")] - public decimal cpvBid { get; set; } - - [ReportColumn("maxCPVSource")] - public CpvBidSource cpvBidSource { get; set; } - - [ReportColumn("keyword")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("keywordID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("keywordState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class PlaceholderFeedItemReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum GeoTargetingRestriction - { - LOCATION_OF_PRESENCE, - UNKNOWN - } - - public enum KeywordMatchType - { - BROAD, - EXACT, - PHRASE - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - public enum Status - { - ENABLED, - REMOVED, - UNKNOWN - } - - [ReportColumn("scheduling")] - public string scheduling { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("approvalStatus")] - public string validationDetails { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("adID")] - public long adId { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("attributeValues")] - public string attributeValues { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("targetKeywordText")] - public string criteria { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("devicePreference")] - public string devicePreference { get; set; } - - [ReportColumn("disapprovalReasons")] - public string disapprovalShortNames { get; set; } - - [ReportColumn("endDate")] - public string endTime { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("feedID")] - public long feedId { get; set; } - - [ReportColumn("itemID")] - public long feedItemId { get; set; } - - [ReportColumn("targetLocation")] - public long geoTargetingCriterionId { get; set; } - - [ReportColumn("targetLocationRestriction")] - public GeoTargetingRestriction geoTargetingRestriction { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("thisExtensionVsOther")] - public bool isSelfAction { get; set; } - - [ReportColumn("targetKeywordMatchType")] - public KeywordMatchType keywordMatchType { get; set; } - - [ReportColumn("keywordID")] - public long keywordTargetingId { get; set; } - - [ReportColumn("targetKeywordMatchType")] - public string keywordTargetingMatchType { get; set; } - - [ReportColumn("targetKeywordText")] - public string keywordTargetingText { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("feedPlaceholderType")] - public long placeholderType { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("startDate")] - public string startTime { get; set; } - - [ReportColumn("itemState")] - public Status status { get; set; } - - [ReportColumn("targetAdGroupID")] - public long targetingAdGroupId { get; set; } - - [ReportColumn("targetCampaignID")] - public long targetingCampaignId { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class PlacementPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("placement")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("criteriaDisplayName")] - public string displayName { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("placementState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CampaignNegativeLocationsReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("location")] - public long id { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - } - - public class GenderPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("gender")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("genderState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AgeRangePerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("ageRange")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("ageRangeState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CampaignLocationTargetReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("location")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class CampaignAdScheduleTargetReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("adSchedule")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class PaidOrganicQueryReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum QueryMatchType - { - AUTO, - BROAD, - EXACT, - EXPANDED, - PHRASE - } - - public enum SerpType - { - ADS_AND_ORGANIC, - ADS_ONLY, - ORGANIC_ONLY, - UNKNOWN - } - - [ReportColumn("keywordID")] - public string keywordId { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("adAvgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("adAvgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("adClicks")] - public long clicks { get; set; } - - [ReportColumn("combinedClicks")] - public long combinedAdsOrganicClicks { get; set; } - - [ReportColumn("combinedClicksQuery")] - public double combinedAdsOrganicClicksPerQuery { get; set; } - - [ReportColumn("combinedQueries")] - public long combinedAdsOrganicQueries { get; set; } - - [ReportColumn("adCTR")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("adImpressions")] - public long impressions { get; set; } - - [ReportColumn("keyword")] - public string keywordTextMatchingQuery { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("organicAveragePosition")] - public double organicAveragePosition { get; set; } - - [ReportColumn("organicClicks")] - public long organicClicks { get; set; } - - [ReportColumn("organicClicksQuery")] - public double organicClicksPerQuery { get; set; } - - [ReportColumn("organicListings")] - public long organicImpressions { get; set; } - - [ReportColumn("organicListingsQuery")] - public double organicImpressionsPerQuery { get; set; } - - [ReportColumn("organicQueries")] - public long organicQueries { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("matchType")] - public QueryMatchType queryMatchType { get; set; } - - [ReportColumn("query")] - public string searchQuery { get; set; } - - [ReportColumn("searchResultType")] - public SerpType serpType { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AudiencePerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CriterionAttachmentLevel - { - ADGROUP, - CAMPAIGN, - CUSTOMER, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("audience")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("level")] - public CriterionAttachmentLevel criterionAttachmentLevel { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("audienceState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("userListName")] - public string userListName { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class DisplayTopicsPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("topic")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topicState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("verticalID")] - public long verticalId { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class UserAdDistanceReportReportRow - { - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum DistanceBucket - { - DISTANCE_BUCKET_BEYOND_40MILES, - DISTANCE_BUCKET_BEYOND_65KM, - DISTANCE_BUCKET_WITHIN_0_2MILES, - DISTANCE_BUCKET_WITHIN_0_5MILES, - DISTANCE_BUCKET_WITHIN_0_7MILES, - DISTANCE_BUCKET_WITHIN_10KM, - DISTANCE_BUCKET_WITHIN_10MILES, - DISTANCE_BUCKET_WITHIN_15KM, - DISTANCE_BUCKET_WITHIN_15MILES, - DISTANCE_BUCKET_WITHIN_1KM, - DISTANCE_BUCKET_WITHIN_1MILE, - DISTANCE_BUCKET_WITHIN_200M, - DISTANCE_BUCKET_WITHIN_20KM, - DISTANCE_BUCKET_WITHIN_20MILES, - DISTANCE_BUCKET_WITHIN_25KM, - DISTANCE_BUCKET_WITHIN_25MILES, - DISTANCE_BUCKET_WITHIN_30KM, - DISTANCE_BUCKET_WITHIN_30MILES, - DISTANCE_BUCKET_WITHIN_35KM, - DISTANCE_BUCKET_WITHIN_35MILES, - DISTANCE_BUCKET_WITHIN_40KM, - DISTANCE_BUCKET_WITHIN_40MILES, - DISTANCE_BUCKET_WITHIN_45KM, - DISTANCE_BUCKET_WITHIN_500M, - DISTANCE_BUCKET_WITHIN_50KM, - DISTANCE_BUCKET_WITHIN_55KM, - DISTANCE_BUCKET_WITHIN_5KM, - DISTANCE_BUCKET_WITHIN_5MILES, - DISTANCE_BUCKET_WITHIN_60KM, - DISTANCE_BUCKET_WITHIN_65KM, - DISTANCE_BUCKET_WITHIN_700M, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("distanceFromLocationExtensions")] - public DistanceBucket distanceBucket { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class ShoppingPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum Channel - { - LOCAL, - ONLINE, - UNKNOWN - } - - public enum ChannelExclusivity - { - MULTI_CHANNEL, - SINGLE_CHANNEL, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum ProductCondition - { - NEW, - REFURBISHED, - UNKNOWN, - USED - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("mCAId")] - public long aggregatorId { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("brand")] - public string brand { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("category1stLevel")] - public string categoryL1 { get; set; } - - [ReportColumn("category2ndLevel")] - public string categoryL2 { get; set; } - - [ReportColumn("category3rdLevel")] - public string categoryL3 { get; set; } - - [ReportColumn("category4thLevel")] - public string categoryL4 { get; set; } - - [ReportColumn("category5thLevel")] - public string categoryL5 { get; set; } - - [ReportColumn("channel")] - public Channel channel { get; set; } - - [ReportColumn("channelExclusivity")] - public ChannelExclusivity channelExclusivity { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("countryTerritory")] - public long countryCriteriaId { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("customLabel0")] - public string customAttribute0 { get; set; } - - [ReportColumn("customLabel1")] - public string customAttribute1 { get; set; } - - [ReportColumn("customLabel2")] - public string customAttribute2 { get; set; } - - [ReportColumn("customLabel3")] - public string customAttribute3 { get; set; } - - [ReportColumn("customLabel4")] - public string customAttribute4 { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("language")] - public long languageCriteriaId { get; set; } - - [ReportColumn("mCId")] - public long merchantId { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("itemId")] - public string offerId { get; set; } - - [ReportColumn("condition")] - public ProductCondition productCondition { get; set; } - - [ReportColumn("productTitle")] - public string productTitle { get; set; } - - [ReportColumn("productType1stLevel")] - public string productTypeL1 { get; set; } - - [ReportColumn("productType2ndLevel")] - public string productTypeL2 { get; set; } - - [ReportColumn("productType3rdLevel")] - public string productTypeL3 { get; set; } - - [ReportColumn("productType4thLevel")] - public string productTypeL4 { get; set; } - - [ReportColumn("productType5thLevel")] - public string productTypeL5 { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("searchAbsTopIS")] - public double searchAbsoluteTopImpressionShare { get; set; } - - [ReportColumn("clickShare")] - public double searchClickShare { get; set; } - - [ReportColumn("searchImprShare")] - public double searchImpressionShare { get; set; } - - [ReportColumn("storeId")] - public string storeId { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class ProductPartitionReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum PartitionType - { - SUBDIVISION, - UNIT, - UNKNOWN - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("benchmarkMaxCPC")] - public decimal benchmarkAverageMaxCpc { get; set; } - - [ReportColumn("benchmarkCTR")] - public double benchmarkCtr { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("keywordPlacementDestinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("finalURLSuffix")] - public string finalUrlSuffix { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("parentCriterionID")] - public long parentCriterionId { get; set; } - - [ReportColumn("partitionType")] - public PartitionType partitionType { get; set; } - - [ReportColumn("productGroup")] - public string productGroup { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("searchAbsTopIS")] - public double searchAbsoluteTopImpressionShare { get; set; } - - [ReportColumn("clickShare")] - public double searchClickShare { get; set; } - - [ReportColumn("searchImprShare")] - public double searchImpressionShare { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class ParentalStatusPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum BiddingStrategyType - { - MANUAL_CPC, - MANUAL_CPM, - MANUAL_CPV, - MAXIMIZE_CONVERSION_VALUE, - MAXIMIZE_CONVERSIONS, - NONE, - PAGE_ONE_PROMOTED, - TARGET_CPA, - TARGET_OUTRANK_SHARE, - TARGET_ROAS, - TARGET_SPEND, - UNKNOWN - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CpcBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum CpmBidSource - { - ADGROUP, - ADGROUP_BIDDING_STRATEGY, - CAMPAIGN_BIDDING_STRATEGY, - CRITERION - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Status - { - ENABLED, - PAUSED, - REMOVED - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("baseAdGroupID")] - public long baseAdGroupId { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("bidStrategyID")] - public long biddingStrategyId { get; set; } - - [ReportColumn("bidStrategyName")] - public string biddingStrategyName { get; set; } - - [ReportColumn("bidStrategyType")] - public BiddingStrategyType biddingStrategyType { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("maxCPC")] - public decimal cpcBid { get; set; } - - [ReportColumn("maxCPCSource")] - public CpcBidSource cpcBidSource { get; set; } - - [ReportColumn("maxCPM")] - public decimal cpmBid { get; set; } - - [ReportColumn("maxCPMSource")] - public CpmBidSource cpmBidSource { get; set; } - - [ReportColumn("parentalStatus")] - public string criteria { get; set; } - - [ReportColumn("destinationURL")] - public string criteriaDestinationUrl { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("appFinalURL")] - public string finalAppUrls { get; set; } - - [ReportColumn("mobileFinalURL")] - public string finalMobileUrls { get; set; } - - [ReportColumn("finalURL")] - public string finalUrls { get; set; } - - [ReportColumn("gmailForwards")] - public long gmailForwards { get; set; } - - [ReportColumn("gmailSaves")] - public long gmailSaves { get; set; } - - [ReportColumn("gmailClicksToWebsite")] - public long gmailSecondaryClicks { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - - [ReportColumn("isRestricting")] - public bool isRestrict { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("parentalStatusState")] - public Status status { get; set; } - - [ReportColumn("trackingTemplate")] - public string trackingUrlTemplate { get; set; } - - [ReportColumn("customParameter")] - public string urlCustomParameters { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class PlaceholderReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("adID")] - public long extensionPlaceholderCreativeId { get; set; } - - [ReportColumn("feedPlaceholderType")] - public string extensionPlaceholderType { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class AdCustomizersFeedItemReportReportRow - { - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum FeedItemStatus - { - ENABLED, - REMOVED, - UNKNOWN - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adID")] - public long adId { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("feedID")] - public long feedId { get; set; } - - [ReportColumn("attributeValues")] - public string feedItemAttributes { get; set; } - - [ReportColumn("endDate")] - public long feedItemEndTime { get; set; } - - [ReportColumn("itemID")] - public long feedItemId { get; set; } - - [ReportColumn("startDate")] - public long feedItemStartTime { get; set; } - - [ReportColumn("itemState")] - public FeedItemStatus feedItemStatus { get; set; } - - [ReportColumn("targetLocation")] - public long geoTargetingCriterionId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("keywordID")] - public long keywordTargetingId { get; set; } - - [ReportColumn("targetKeywordMatchType")] - public string keywordTargetingMatchType { get; set; } - - [ReportColumn("targetKeywordText")] - public string keywordTargetingText { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("targetAdGroupID")] - public long targetingAdGroupId { get; set; } - - [ReportColumn("targetCampaignID")] - public long targetingCampaignId { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class LabelReportReportRow - { - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("adGroupCreativesCount")] - public long adGroupCreativesCount { get; set; } - - [ReportColumn("adGroupCriteriaCount")] - public long adGroupCriteriaCount { get; set; } - - [ReportColumn("adGroupsCount")] - public long adGroupsCount { get; set; } - - [ReportColumn("campaignsCount")] - public long campaignsCount { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("labelID")] - public long labelId { get; set; } - - [ReportColumn("labelName")] - public string labelName { get; set; } - - [ReportColumn("userListsCount")] - public long userListsCount { get; set; } - } - - public class FinalUrlReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdvertisingChannelType - { - DISPLAY, - EXPRESS, - MULTI_CHANNEL, - SEARCH, - SHOPPING, - UNKNOWN, - VIDEO - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("advertisingChannel")] - public AdvertisingChannelType advertisingChannelType { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("keywordPlacement")] - public string criteriaParameters { get; set; } - - [ReportColumn("matchType")] - public string criteriaTypeName { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("finalURL")] - public string effectiveFinalUrl { get; set; } - - [ReportColumn("trackingTemplate")] - public string effectiveTrackingUrlTemplate { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class VideoPerformanceReportReportRow - { - public enum AdGroupStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum ClickType - { - APP_DEEPLINK, - BREADCRUMBS, - BROADBAND_PLAN, - CALL_TRACKING, - CALLS, - CLICK_ON_ENGAGEMENT_AD, - GET_DIRECTIONS, - LOCATION_EXPANSION, - LOCATION_FORMAT_CALL, - LOCATION_FORMAT_DIRECTIONS, - LOCATION_FORMAT_IMAGE, - LOCATION_FORMAT_LANDING_PAGE, - LOCATION_FORMAT_MAP, - LOCATION_FORMAT_STORE_INFO, - LOCATION_FORMAT_TEXT, - MOBILE_CALL_TRACKING, - OFFER_PRINTS, - OTHER, - PRICE_EXTENSION, - PRODUCT_EXTENSION_CLICKS, - PRODUCT_LISTING_AD_CLICKS, - PROMOTION_EXTENSION, - SHOWCASE_AD_CATEGORY_LINK, - SHOWCASE_AD_LOCAL_PRODUCT_LINK, - SHOWCASE_AD_LOCAL_STOREFRONT_LINK, - SHOWCASE_AD_ONLINE_PRODUCT_LINK, - SITELINKS, - STORE_LOCATOR, - SWIPEABLE_GALLERY_AD_HEADLINE, - SWIPEABLE_GALLERY_AD_SEE_MORE, - SWIPEABLE_GALLERY_AD_SITELINK_FIVE, - SWIPEABLE_GALLERY_AD_SITELINK_FOUR, - SWIPEABLE_GALLERY_AD_SITELINK_ONE, - SWIPEABLE_GALLERY_AD_SITELINK_THREE, - SWIPEABLE_GALLERY_AD_SITELINK_TWO, - SWIPEABLE_GALLERY_AD_SWIPES, - UNKNOWN, - URL_CLICKS, - VIDEO_APP_STORE_CLICKS, - VIDEO_CALL_TO_ACTION_CLICKS, - VIDEO_CARD_ACTION_HEADLINE_CLICKS, - VIDEO_END_CAP_CLICKS, - VIDEO_WEBSITE_CLICKS, - VISUAL_SITELINKS, - WIRELESS_PLAN - } - - public enum CreativeStatus - { - DISABLED, - ENABLED, - PAUSED - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("videoChannelId")] - public string videoChannelId { get; set; } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("adGroupState")] - public AdGroupStatus adGroupStatus { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCPM")] - public double averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("clickType")] - public ClickType clickType { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("adID")] - public long creativeId { get; set; } - - [ReportColumn("adState")] - public CreativeStatus creativeStatus { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("videoDuration")] - public long videoDuration { get; set; } - - [ReportColumn("videoId")] - public string videoId { get; set; } - - [ReportColumn("videoPlayedTo100")] - public double videoQuartile100Rate { get; set; } - - [ReportColumn("videoPlayedTo25")] - public double videoQuartile25Rate { get; set; } - - [ReportColumn("videoPlayedTo50")] - public double videoQuartile50Rate { get; set; } - - [ReportColumn("videoPlayedTo75")] - public double videoQuartile75Rate { get; set; } - - [ReportColumn("videoTitle")] - public string videoTitle { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class TopContentPerformanceReportReportRow - { - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("bidAdj")] - public double bidModifier { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - } - - public class CampaignCriteriaReportReportRow - { - public enum CampaignStatus - { - ENABLED, - PAUSED, - REMOVED, - UNKNOWN - } - - public enum CriteriaType - { - AD_SCHEDULE, - AGE_RANGE, - APP_PAYMENT_MODEL, - CARRIER, - CONTENT_LABEL, - CUSTOM_AFFINITY, - CUSTOM_INTENT, - GENDER, - INCOME_RANGE, - INTERACTION_TYPE, - IP_BLOCK, - KEYWORD, - LANGUAGE, - LOCATION, - LOCATION_GROUPS, - MOBILE_APP_CATEGORY, - MOBILE_APPLICATION, - MOBILE_DEVICE, - OPERATING_SYSTEM_VERSION, - PARENT, - PLACEMENT, - PLATFORM, - PREFERRED_CONTENT, - PRODUCT_PARTITION, - PRODUCT_SCOPE, - PROXIMITY, - RUN_OF_NETWORK, - UNKNOWN, - USER_INTEREST, - USER_LIST, - VERTICAL, - WEBPAGE, - YOUTUBE_CHANNEL, - YOUTUBE_VIDEO - } - - [ReportColumn("currency")] - public string accountCurrencyCode { get; set; } - - [ReportColumn("account")] - public string accountDescriptiveName { get; set; } - - [ReportColumn("timeZone")] - public string accountTimeZone { get; set; } - - [ReportColumn("baseCampaignID")] - public long baseCampaignId { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("campaignState")] - public CampaignStatus campaignStatus { get; set; } - - [ReportColumn("criterion")] - public string criteria { get; set; } - - [ReportColumn("criteriaType")] - public CriteriaType criteriaType { get; set; } - - [ReportColumn("clientName")] - public string customerDescriptiveName { get; set; } - - [ReportColumn("customerID")] - public long externalCustomerId { get; set; } - - [ReportColumn("criterionID")] - public long id { get; set; } - - [ReportColumn("isNegative")] - public bool isNegative { get; set; } - } - - public class CampaignGroupPerformanceReportReportRow - { - public enum ExternalConversionSource - { - AD_CALL_METRICS, - ANALYTICS, - ANDROID_DOWNLOAD, - ANDROID_FIRST_OPEN, - ANDROID_IN_APP, - APP_UNSPECIFIED, - CLICK_TO_CALL, - ENGAGEMENT, - FIREBASE, - GOOGLE_ATTRIBUTION, - GOOGLE_PLAY, - IOS_FIRST_OPEN, - IOS_IN_APP, - OFFERS, - SALESFORCE, - STORE_SALES_CRM, - STORE_SALES_DIRECT, - STORE_SALES_PAYMENT_NETWORK, - STORE_VISITS, - THIRD_PARTY_APP_ANALYTICS, - UNKNOWN, - UPLOAD, - UPLOAD_CALLS, - WEBPAGE, - WEBSITE_CALL_METRICS - } - - public enum Status - { - ENABLED, - REMOVED, - UNKNOWN - } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("allConvRate")] - public double allConversionRate { get; set; } - - [ReportColumn("allConv")] - public double allConversions { get; set; } - - [ReportColumn("allConvValue")] - public double allConversionValue { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPE")] - public double averageCpe { get; set; } - - [ReportColumn("avgCPV")] - public double averageCpv { get; set; } - - [ReportColumn("conversionCategory")] - public string conversionCategoryName { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("conversionTrackerId")] - public long conversionTrackerId { get; set; } - - [ReportColumn("conversionName")] - public string conversionTypeName { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("costAllConv")] - public decimal costPerAllConversion { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("costConvCurrentModel")] - public double costPerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("crossDeviceConv")] - public double crossDeviceConversions { get; set; } - - [ReportColumn("conversionsCurrentModel")] - public double currentModelAttributedConversions { get; set; } - - [ReportColumn("convValueCurrentModel")] - public double currentModelAttributedConversionValue { get; set; } - - [ReportColumn("engagementRate")] - public double engagementRate { get; set; } - - [ReportColumn("engagements")] - public long engagements { get; set; } - - [ReportColumn("conversionSource")] - public ExternalConversionSource externalConversionSource { get; set; } - - [ReportColumn("campaignGroupID")] - public long id { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("campaignGroupName")] - public string name { get; set; } - - [ReportColumn("campaignGroupStatus")] - public Status status { get; set; } - - [ReportColumn("valueAllConv")] - public double valuePerAllConversion { get; set; } - - [ReportColumn("valueConvCurrentModel")] - public double valuePerCurrentModelAttributedConversion { get; set; } - - [ReportColumn("viewRate")] - public double videoViewRate { get; set; } - - [ReportColumn("views")] - public long videoViews { get; set; } - - [ReportColumn("viewThroughConv")] - public long viewThroughConversions { get; set; } - } - - public class LandingPageReportReportRow - { - public enum AdNetworkType1 - { - CONTENT, - MIXED, - SEARCH, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum AdNetworkType2 - { - CONTENT, - MIXED, - SEARCH, - SEARCH_PARTNERS, - UNKNOWN, - YOUTUBE_SEARCH, - YOUTUBE_WATCH - } - - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum Device - { - DESKTOP, - HIGH_END_MOBILE, - TABLET, - UNKNOWN - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - public enum Slot - { - AfsOther, - AfsTop, - Content, - Mixed, - SearchOther, - SearchRhs, - SearchTop, - Unknown - } - - [ReportColumn("activeViewAvgCPM")] - public decimal activeViewCpm { get; set; } - - [ReportColumn("activeViewViewableCTR")] - public double activeViewCtr { get; set; } - - [ReportColumn("activeViewViewableImpressions")] - public long activeViewImpressions { get; set; } - - [ReportColumn("activeViewMeasurableImprImpr")] - public double activeViewMeasurability { get; set; } - - [ReportColumn("activeViewMeasurableCost")] - public decimal activeViewMeasurableCost { get; set; } - - [ReportColumn("activeViewMeasurableImpr")] - public long activeViewMeasurableImpressions { get; set; } - - [ReportColumn("activeViewViewableImprMeasurableImpr")] - public double activeViewViewability { get; set; } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("adGroup")] - public string adGroupName { get; set; } - - [ReportColumn("network")] - public AdNetworkType1 adNetworkType1 { get; set; } - - [ReportColumn("networkWithSearchPartners")] - public AdNetworkType2 adNetworkType2 { get; set; } - - [ReportColumn("avgCost")] - public decimal averageCost { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("avgPosition")] - public double averagePosition { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("campaign")] - public string campaignName { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("device")] - public Device device { get; set; } - - [ReportColumn("expandedLandingPage")] - public string expandedFinalUrlString { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("interactionRate")] - public double interactionRate { get; set; } - - [ReportColumn("interactions")] - public long interactions { get; set; } - - [ReportColumn("interactionTypes")] - public string interactionTypes { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("topVsOther")] - public Slot slot { get; set; } - - [ReportColumn("landingPage")] - public string unexpandedFinalUrlString { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } - - public class MarketplacePerformanceReportReportRow - { - public enum DayOfWeek - { - FRIDAY, - MONDAY, - SATURDAY, - SUNDAY, - THURSDAY, - TUESDAY, - WEDNESDAY - } - - public enum MonthOfYear - { - APRIL, - AUGUST, - DECEMBER, - FEBRUARY, - JANUARY, - JULY, - JUNE, - MARCH, - MAY, - NOVEMBER, - OCTOBER, - SEPTEMBER - } - - [ReportColumn("adGroupID")] - public long adGroupId { get; set; } - - [ReportColumn("avgCPC")] - public decimal averageCpc { get; set; } - - [ReportColumn("avgCPM")] - public decimal averageCpm { get; set; } - - [ReportColumn("campaignID")] - public long campaignId { get; set; } - - [ReportColumn("clicks")] - public long clicks { get; set; } - - [ReportColumn("convRate")] - public double conversionRate { get; set; } - - [ReportColumn("conversions")] - public double conversions { get; set; } - - [ReportColumn("totalConvValue")] - public double conversionValue { get; set; } - - [ReportColumn("cost")] - public decimal cost { get; set; } - - [ReportColumn("costConv")] - public decimal costPerConversion { get; set; } - - [ReportColumn("ctr")] - public double ctr { get; set; } - - [ReportColumn("day")] - public string date { get; set; } - - [ReportColumn("dayOfWeek")] - public DayOfWeek dayOfWeek { get; set; } - - [ReportColumn("impressions")] - public long impressions { get; set; } - - [ReportColumn("month")] - public string month { get; set; } - - [ReportColumn("monthOfYear")] - public MonthOfYear monthOfYear { get; set; } - - [ReportColumn("quarter")] - public string quarter { get; set; } - - [ReportColumn("valueConv")] - public double valuePerConversion { get; set; } - - [ReportColumn("week")] - public string week { get; set; } - - [ReportColumn("year")] - public long year { get; set; } - } -} -#pragma warning restore 1591 diff --git a/src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQuery.cs b/src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQuery.cs deleted file mode 100755 index eadbc387b9f..00000000000 --- a/src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQuery.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2018 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. - -namespace Google.Api.Ads.AdWords.Util.Reports.v201806 -{ - /// - /// A reporting query, returned by - /// - public class ReportQuery : IReportQuery - { - /// - /// The builder associated with this report query. - /// - private ReportQueryBuilder builder; - - /// - /// Initializes a new instance of the class. - /// - /// The builder. - public ReportQuery(ReportQueryBuilder builder) - { - this.builder = builder; - } - - /// - /// Gets the builder. - /// - public ReportQueryBuilder Builder - { - get { return builder; } - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return builder.ReportDefinition.ToQuery(); - } - - /// - /// Performs an implicit conversion from to . - /// - /// The to convert. - /// - /// The result of the conversion. - /// - public static implicit operator string(ReportQuery x) - { - return x.ToString(); - } - } -} diff --git a/src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilder.cs b/src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilder.cs deleted file mode 100755 index 8d5fcd16ed3..00000000000 --- a/src/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilder.cs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2018, Google Inc. All Rights Reserved. -// -// 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.Api.Ads.AdWords.v201806; - -using System; -using System.Globalization; - -namespace Google.Api.Ads.AdWords.Util.Reports.v201806 -{ - /// - /// Class for building report queries. - /// - public class ReportQueryBuilder : IReportQueryBuilder - { - /// - /// The report definition instance for storing internal state. - /// - private ReportDefinition reportDefinition = new ReportDefinition() - { - selector = new Selector() - }; - - /// - /// Initializes a new instance of the class. - /// - public ReportQueryBuilder() - { - } - - internal ReportDefinition ReportDefinition - { - get { return reportDefinition; } - } - - /// - /// Checks if the date format is in yyyyMMdd format. - /// - /// The date text. - /// True, if the date can be parsed, false otherwise. - private bool IsDateFormatCorrect(string dateText) - { - DateTime temp; - return DateTime.TryParseExact(dateText, "yyyyMMdd", CultureInfo.InvariantCulture, - DateTimeStyles.None, out temp); - } - - /// - /// Adds a SELECT clause to the query. - /// - /// The fields to be selected. - /// - /// The parent builder for call chaining. - /// - public ReportQueryBuilder Select(params string[] fields) - { - // Order matters, duplicate elements are allowed. - reportDefinition.selector.fields = fields; - return this; - } - - /// - /// Adds a FROM clause to the query. - /// - /// Type of the report. - /// - /// The parent builder for call chaining. - /// - public ReportQueryBuilder From(ReportDefinitionReportType reportType) - { - reportDefinition.reportType = reportType; - return this; - } - - /// - /// Adds a FROM clause to the query. - /// - /// Type of the report. - /// - /// The parent builder for call chaining. - /// - /// - public ReportQueryBuilder From(string reportType) - { - ReportDefinitionReportType result; - if (!Enum.TryParse(reportType, out result)) - { - throw new ArgumentException(string.Format("Unsupported report type - {0}.", - reportType)); - } - - reportDefinition.reportType = result; - return this; - } - - /// - /// Adds a WHERE clause to the query. - /// - /// Name of the field to filter on. - /// - /// A builder for building the WHERE clause. - /// - public IWhereBuilder Where(string fieldName) - { - Predicate predicate = new Predicate() - { - field = fieldName - }; - reportDefinition.selector.AddPredicate(predicate); - return new WhereBuilder(predicate, this); - } - - /// - /// Adds a DURING clause to the query. - /// - /// The predefined date range. - /// - /// The parent builder for call chaining. - /// - /// Thrown if the dateRange cannot be parsed into a - /// object. - public ReportQueryBuilder During(string dateRange) - { - ReportDefinitionDateRangeType result; - if (!Enum.TryParse(dateRange, out result)) - { - throw new ArgumentException(string.Format("Unsupported date range type - {0}.", - dateRange)); - } - - reportDefinition.dateRangeType = result; - return this; - } - - /// - /// Adds a DURING clause to the query. - /// - /// Type of the date range. - /// - /// The parent builder for call chaining. - /// - public ReportQueryBuilder During(ReportDefinitionDateRangeType dateRangeType) - { - reportDefinition.dateRangeType = dateRangeType; - return this; - } - - /// - /// Adds a DURING clause to the query. - /// - /// The minimum date in yyyyMMdd format. - /// The maximum date in yyyyMMdd format. - /// - /// The parent builder for call chaining. - /// - /// Thrown if the date is not in yyyyMMdd format. - /// - public ReportQueryBuilder During(string minDate, string maxDate) - { - if (!IsDateFormatCorrect(minDate)) - { - throw new ArgumentException(string.Format("Unsupported date format for min - {0}.", - minDate)); - } - - if (!IsDateFormatCorrect(maxDate)) - { - throw new ArgumentException(string.Format("Unsupported date format for max - {0}.", - maxDate)); - } - - reportDefinition.dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE; - reportDefinition.selector.dateRange = new DateRange() - { - max = maxDate, - min = minDate - }; - return this; - } - - /// - /// Adds a DURING clause to the query. - /// - /// The minimum date. - /// The maximum date. - /// - /// The parent builder for call chaining. - /// - public ReportQueryBuilder During(DateTime minDate, DateTime maxDate) - { - return During(minDate.ToString("yyyyMMdd"), maxDate.ToString("yyyyMMdd")); - } - - /// - /// Builds the query. - /// - /// - /// The query. - /// - public ReportQuery Build() - { - return new ReportQuery(this); - } - } -} diff --git a/src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQuery.cs b/src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQuery.cs deleted file mode 100755 index 57c0b6e6979..00000000000 --- a/src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQuery.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -namespace Google.Api.Ads.AdWords.Util.Reports.v201806 -{ - /// - /// A select query, returned by - /// - public class SelectQuery : ISelectQuery - { - /// - /// The builder associated with this select query. - /// - private SelectQueryBuilder builder; - - /// - /// Initializes a new instance of the class. - /// - /// The builder. - public SelectQuery(SelectQueryBuilder builder) - { - this.builder = builder; - } - - /// - /// Gets the builder. - /// - public SelectQueryBuilder Builder - { - get { return builder; } - } - - /// - /// Adds a LIMIT clause to the query. - /// - /// The start index. - /// The number of results. - /// - /// The parent builder for call chaining. - /// - public SelectQuery Limit(uint startIndex, uint numberResults) - { - builder.Limit(startIndex, numberResults); - return this; - } - - /// - /// Determines whether the query has next page. - /// - /// The page. - /// True if there's a next page, false otherwise. - public bool HasNextPage(Page page) - { - Selector selector = this.Builder.Selector; - if (page is AdGroupBidLandscapePage) - { - return GetTotalLandscapePointsInPage(page as AdGroupBidLandscapePage) > 0; - } - else if (page is CriterionBidLandscapePage) - { - return GetTotalLandscapePointsInPage(page as CriterionBidLandscapePage) > 0; - } - else - { - return selector.paging.startIndex < page.totalNumEntries; - } - } - - /// - /// Advances the query by a page. - /// - /// The page. - /// The parent builder for call chaining. - public SelectQuery NextPage(Page page) - { - Selector selector = this.Builder.Selector; - if (page is AdGroupBidLandscapePage) - { - selector.paging.IncreaseOffsetBy( - GetTotalLandscapePointsInPage(page as AdGroupBidLandscapePage)); - } - else if (page is CriterionBidLandscapePage) - { - selector.paging.IncreaseOffsetBy( - GetTotalLandscapePointsInPage(page as CriterionBidLandscapePage)); - } - else - { - selector.paging.IncreaseOffset(); - } - - return this; - } - - /// - /// Gets the total landscape points in the ad group bid landscape page. If the page has a null - /// entries array, returns 0. - /// - /// The ad group bid landscape page. - /// The total landscape points. - private int GetTotalLandscapePointsInPage(AdGroupBidLandscapePage page) - { - if (page.entries == null) - { - return 0; - } - - int totalLandscapePointsInPage = 0; - foreach (AdGroupBidLandscape adGroupBidLandscape in page.entries) - { - if (adGroupBidLandscape.landscapePoints != null) - { - totalLandscapePointsInPage += adGroupBidLandscape.landscapePoints.Length; - } - } - - return totalLandscapePointsInPage; - } - - /// - /// Gets the total landscape points in the criterion bid landscape page. If the page has a null - /// entries array, returns 0. - /// - /// The criterion bid landscape page. - /// The total landscape points. - private int GetTotalLandscapePointsInPage(CriterionBidLandscapePage page) - { - if (page.entries == null) - { - return 0; - } - - int totalLandscapePointsInPage = 0; - foreach (CriterionBidLandscape criterionBidLandscape in page.entries) - { - if (criterionBidLandscape.landscapePoints != null) - { - totalLandscapePointsInPage += criterionBidLandscape.landscapePoints.Length; - } - } - - return totalLandscapePointsInPage; - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return builder.Selector.ToQuery(); - } - - /// - /// Adds a LIMIT clause to the query with default values. - /// - /// - /// The parent builder for call chaining. - /// - public SelectQuery DefaultLimit() - { - builder.DefaultLimit(); - return this; - } - - /// - /// Performs an implicit conversion from to . - /// - /// The to convert. - /// - /// The result of the conversion. - /// - public static implicit operator string(SelectQuery x) - { - return x.ToString(); - } - } -} diff --git a/src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilder.cs b/src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilder.cs deleted file mode 100755 index 4ff42fab22a..00000000000 --- a/src/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilder.cs +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2018, Google Inc. All Rights Reserved. -// -// 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.Api.Ads.AdWords.v201806; - -using System.Linq; - -namespace Google.Api.Ads.AdWords.Util.Reports.v201806 -{ - /// - /// Class for building selector queries. - /// - public class SelectQueryBuilder : ISelectQueryBuilder - { - /// - /// The selector instance for maintaining internal state. - /// - private Selector selector = new Selector(); - - /// - /// Gets the selector. - /// - internal Selector Selector - { - get { return selector; } - } - - /// - /// Adds a SELECT clause to the query. - /// - /// The fields to be selected. - /// - /// The parent builder for call chaining. - /// - public SelectQueryBuilder Select(params string[] fields) - { - // Order doesn't matter, duplicate elements should be removed. - selector.fields = fields.Distinct().ToArray(); - return this; - } - - /// - /// Adds a WHERE clause to the query. - /// - /// Name of the field to filter on. - /// A builder for building the WHERE clause. - public IWhereBuilder Where(string fieldName) - { - Predicate predicate = new Predicate() - { - field = fieldName - }; - selector.AddPredicate(predicate); - return new WhereBuilder(predicate, this); - } - - /// - /// Adds an ASC clause to the query. - /// - /// Name of the field to sort by. - /// The parent builder for call chaining. - public SelectQueryBuilder OrderByAscending(string fieldName) - { - return AddOrdering(fieldName, SortOrder.ASCENDING); - } - - /// - /// Adds a DESC clause to the query. - /// - /// Name of the field to sort by. - /// The parent builder for call chaining. - public SelectQueryBuilder OrderByDescending(string fieldName) - { - return AddOrdering(fieldName, SortOrder.DESCENDING); - } - - /// - /// Adds a LIMIT clause to the query. - /// - /// The start index. - /// The number of results. - /// The parent builder for call chaining. - public SelectQueryBuilder Limit(uint startIndex, uint numberResults) - { - selector.paging = new Paging() - { - startIndex = (int) startIndex, - numberResults = (int) numberResults - }; - return this; - } - - /// - /// Adds an ordering condition to the selector. - /// - /// Name of the field. - /// The sort order. - /// The parent builder for call chaining. - private SelectQueryBuilder AddOrdering(string fieldName, SortOrder sortOrder) - { - selector.AddOrdering(new OrderBy() - { - field = fieldName, - sortOrder = sortOrder - }); - return this; - } - - /// - /// Determines whether the query has next page. - /// - /// The page. - /// True if there's a next page, false otherwise. - public bool HasNextPage(Page page) - { - if (page is AdGroupBidLandscapePage) - { - return GetTotalLandscapePointsInPage(page as AdGroupBidLandscapePage) > 0; - } - else if (page is CriterionBidLandscapePage) - { - return GetTotalLandscapePointsInPage(page as CriterionBidLandscapePage) > 0; - } - else - { - return selector.paging.startIndex < page.totalNumEntries; - } - } - - /// - /// Advances the query by a page. - /// - /// The page. - /// The parent builder for call chaining. - public SelectQueryBuilder NextPage(Page page) - { - if (page is AdGroupBidLandscapePage) - { - selector.paging.IncreaseOffsetBy( - GetTotalLandscapePointsInPage(page as AdGroupBidLandscapePage)); - } - else if (page is CriterionBidLandscapePage) - { - selector.paging.IncreaseOffsetBy( - GetTotalLandscapePointsInPage(page as CriterionBidLandscapePage)); - } - else - { - selector.paging.IncreaseOffset(); - } - - return this; - } - - /// - /// Gets the total landscape points in the ad group bid landscape page. If the page has a null - /// entries array, returns 0. - /// - /// The ad group bid landscape page. - /// The total landscape points. - private int GetTotalLandscapePointsInPage(AdGroupBidLandscapePage page) - { - if (page.entries == null) - { - return 0; - } - - int totalLandscapePointsInPage = 0; - foreach (AdGroupBidLandscape adGroupBidLandscape in page.entries) - { - totalLandscapePointsInPage += adGroupBidLandscape.landscapePoints.Length; - } - - return totalLandscapePointsInPage; - } - - /// - /// Gets the total landscape points in the criterion bid landscape page. If the page has a null - /// entries array, returns 0. - /// - /// The criterion bid landscape page. - /// The total landscape points. - private int GetTotalLandscapePointsInPage(CriterionBidLandscapePage page) - { - if (page.entries == null) - { - return 0; - } - - int totalLandscapePointsInPage = 0; - foreach (CriterionBidLandscape criterionBidLandscape in page.entries) - { - totalLandscapePointsInPage += criterionBidLandscape.landscapePoints.Length; - } - - return totalLandscapePointsInPage; - } - - /// - /// Builds the query. - /// - /// - /// The query. - /// - public SelectQuery Build() - { - return new SelectQuery(this); - } - - /// - /// Adds a LIMIT clause to the query with default values. - /// - /// - /// The parent builder for call chaining. - /// - public SelectQueryBuilder DefaultLimit() - { - selector.paging = Paging.Default; - return this; - } - } -} diff --git a/src/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilder.cs b/src/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilder.cs deleted file mode 100755 index 370a3a4a73f..00000000000 --- a/src/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilder.cs +++ /dev/null @@ -1,609 +0,0 @@ -// Copyright 2018, Google Inc. All Rights Reserved. -// -// 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.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Util.Reports.v201806 -{ - /// - /// Builder for WHERE clause. - /// - /// Type of the parent query builder. - public class WhereBuilder : IWhereBuilder - { - /// - /// The predicate to keep intermediate state. - /// - private Predicate predicate; - - /// - /// The parent query builder for call chaining. - /// - private TParent queryBuilder; - - /// - /// Initializes a new instance of the class. - /// - /// The predicate to store internal state. - /// The parent query builder for call chaining. - internal WhereBuilder(Predicate predicate, TParent queryBuilder) - { - this.queryBuilder = queryBuilder; - this.predicate = predicate; - } - - /// - /// Protected constructor for testing purposes. - /// - protected WhereBuilder() - { - } - - /// - /// Protected creation method for testing purposes. - /// - /// The field to filter on. - /// The parent query builder for call chaining. - protected void Init(string field, TParent queryBuilder) - { - this.predicate = new Predicate() - { - field = field - }; - this.queryBuilder = queryBuilder; - } - - /// - /// Sets the condition. - /// - /// Type of predicate values. - /// The predicate operator. - /// The values. - /// The parent query builder for call chaining. - private TParent SetCondition(PredicateOperator @operator, T[] values) - { - predicate.@operator = @operator; - if (typeof(T) == typeof(string)) - { - predicate.values = Array.ConvertAll(values, delegate(T value) - { - // backslash, singlequote and doublequotes should be escaped. See - // https://developers.google.com/adwords/api/docs/guides/awql#notes_1 - return "'" + value.ToString() - // Replace backslashes first, so double-escaping won't happen. - .Replace("\\", "\\\\").Replace("\"", "\\\"").Replace("'", "\\'") + "'"; - }); - } - else if (typeof(T) == typeof(bool)) - { - // When using a Boolean condition in a predicate, it should be sent as TRUE or FALSE. - predicate.values = Array.ConvertAll(values, value => value.ToString().ToUpper()); - } - else - { - predicate.values = Array.ConvertAll(values, value => value.ToString()); - } - - return queryBuilder; - } - - /// - /// Returns a string that represents this instance. - /// - /// - /// A string that represents this instance. - /// - public override string ToString() - { - return predicate.ToString(); - } - - /// - /// Adds the predicate EQUAL_TO to the query for the given value. - /// - /// The property value as a string independent of the field type. - /// The caller should take care of the formatting if it is necessary. - /// - /// The parent query builder for call chaining. - /// - public TParent Equals(string propertyValue) - { - return SetCondition(PredicateOperator.EQUALS, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate EQUAL_TO to the query for the given value. - /// - /// The property value to be used in query. - /// - /// The parent query builder for call chaining. - /// - public TParent Equals(int propertyValue) - { - return SetCondition(PredicateOperator.EQUALS, new int[] - { - propertyValue - }); - } - - /// - /// Adds the predicate EQUAL_TO to the query for the given value. - /// - /// The property value to be used in query. - /// - /// The parent query builder for call chaining. - /// - public TParent Equals(long propertyValue) - { - return SetCondition(PredicateOperator.EQUALS, new long[] - { - propertyValue - }); - } - - /// - /// Adds the predicate EQUAL_TO to the query for the given value. - /// - /// The property value to be used in query. - /// - /// The parent query builder for call chaining. - /// - public TParent Equals(bool propertyValue) - { - return SetCondition(PredicateOperator.EQUALS, new bool[] - { - propertyValue - }); - } - - /// - /// Adds the predicate NOT_EQUAL_TO to the query for the given value. - /// - /// The property value as a string independent of the field type. - /// The caller should take care of the formatting if it is necessary. - /// - /// The parent query builder for call chaining. - /// - public TParent NotEquals(string propertyValue) - { - return SetCondition(PredicateOperator.NOT_EQUALS, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate NOT_EQUAL_TO to the query for the given value. - /// - /// The property value to be used in query. - /// - /// The parent query builder for call chaining. - /// - public TParent NotEquals(int propertyValue) - { - return SetCondition(PredicateOperator.NOT_EQUALS, new int[] - { - propertyValue - }); - } - - /// - /// Adds the predicate NOT_EQUAL_TO to the query for the given value. - /// - /// The property value to be used in query. - /// - /// The parent query builder for call chaining. - /// - public TParent NotEquals(long propertyValue) - { - return SetCondition(PredicateOperator.NOT_EQUALS, new long[] - { - propertyValue - }); - } - - /// - /// Adds the predicate NOT_EQUAL_TO to the query for the given value. - /// - /// The property value to be used in query. - /// - /// The parent query builder for call chaining. - /// - public TParent NotEquals(bool propertyValue) - { - return SetCondition(PredicateOperator.NOT_EQUALS, new bool[] - { - propertyValue - }); - } - - /// - /// Adds the predicate CONTAINS to the query for the given value. - /// - /// The property value as a string independent of the field type. - /// The caller should take care of the formatting if it is necessary. - /// - /// The parent query builder for call chaining. - /// - public TParent Contains(string propertyValue) - { - return SetCondition(PredicateOperator.CONTAINS, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate CONTAINS_ALL to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsAll(params string[] values) - { - return SetCondition(PredicateOperator.CONTAINS_ALL, values); - } - - /// - /// Adds the predicate CONTAINS_ALL to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsAll(params long[] values) - { - return SetCondition(PredicateOperator.CONTAINS_ALL, values); - } - - /// - /// Adds the predicate CONTAINS_ANY to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsAny(params string[] values) - { - return SetCondition(PredicateOperator.CONTAINS_ANY, values); - } - - /// - /// Adds the predicate CONTAINS_ANY to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsAny(params long[] values) - { - return SetCondition(PredicateOperator.CONTAINS_ANY, values); - } - - /// - /// Adds the predicate CONTAINS_IGNORE_CASE to the query for the given value. - /// - /// The property value as a string independent of the field type. - /// The caller should take care of the formatting if it is necessary. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsIgnoreCase(string propertyValue) - { - return SetCondition(PredicateOperator.CONTAINS_IGNORE_CASE, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate CONTAINS_NONE to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsNone(params string[] values) - { - return SetCondition(PredicateOperator.CONTAINS_NONE, values); - } - - /// - /// Adds the predicate CONTAINS_NONE to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsNone(params long[] values) - { - return SetCondition(PredicateOperator.CONTAINS_NONE, values); - } - - /// - /// Adds the predicate CONTAINS_NONE to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsNone(params int[] values) - { - return SetCondition(PredicateOperator.CONTAINS_NONE, values); - } - - /// - /// Adds the predicate CONTAINS_NONE to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent ContainsNone(params double[] values) - { - return SetCondition(PredicateOperator.CONTAINS_NONE, values); - } - - /// - /// Adds the predicate DOES_NOT_CONTAIN to the query for the given value. - /// - /// The property value as a string independent of the field type. - /// The caller should take care of the formatting if it is necessary. - /// - /// The parent query builder for call chaining. - /// - public TParent DoesNotContain(string propertyValue) - { - return SetCondition(PredicateOperator.DOES_NOT_CONTAIN, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate DOES_NOT_CONTAIN_IGNORE_CASE to the query for the given value. - /// - /// The property value as a string independent of the field type. - /// The caller should take care of the formatting if it is necessary. - /// - /// The parent query builder for call chaining. - /// - public TParent DoesNotContainIgnoreCase(string propertyValue) - { - return SetCondition(PredicateOperator.DOES_NOT_CONTAIN_IGNORE_CASE, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate GREATER_THAN to the query for the given value. - /// - /// The property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent GreaterThan(long propertyValue) - { - return SetCondition(PredicateOperator.GREATER_THAN, new long[] - { - propertyValue - }); - } - - /// - /// Adds the predicate GREATER_THAN to the query for the given value. - /// - /// The property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent GreaterThan(int propertyValue) - { - return SetCondition(PredicateOperator.GREATER_THAN, new int[] - { - propertyValue - }); - } - - /// - /// Adds the predicate GREATER_THAN to the query for the given value. - /// - /// The property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent GreaterThan(double propertyValue) - { - return SetCondition(PredicateOperator.GREATER_THAN, new double[] - { - propertyValue - }); - } - - /// - /// Adds the predicate GREATER_THAN_OR_EQUAL_TO to the query for the given value. - /// - /// The property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent GreaterThanOrEqualTo(long propertyValue) - { - return SetCondition(PredicateOperator.GREATER_THAN_EQUALS, new long[] - { - propertyValue - }); - } - - /// - /// Adds the predicate GREATER_THAN_OR_EQUAL_TO to the query for the given value. - /// - /// The property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent GreaterThanOrEqualTo(int propertyValue) - { - return SetCondition(PredicateOperator.GREATER_THAN_EQUALS, new int[] - { - propertyValue - }); - } - - /// - /// Adds the predicate IN to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent In(params string[] values) - { - return SetCondition(PredicateOperator.IN, values); - } - - /// - /// Adds the predicate IN to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent In(params long[] values) - { - return SetCondition(PredicateOperator.IN, values); - } - - /// - /// Adds the predicate LESS_THAN to the query for the given value. - /// - /// The property value for comparison. - /// - /// The containing query builder. - /// - public TParent LessThan(long propertyValue) - { - return SetCondition(PredicateOperator.LESS_THAN, new long[] - { - propertyValue - }); - } - - /// - /// Adds the predicate LESS_THAN to the query for the given value. - /// - /// The property value for comparison. - /// - /// The containing query builder. - /// - public TParent LessThan(int propertyValue) - { - return SetCondition(PredicateOperator.LESS_THAN, new int[] - { - propertyValue - }); - } - - /// - /// Adds the predicate LESS_THAN to the query for the given value. - /// - /// The property value for comparison. - /// - /// The containing query builder. - /// - public TParent LessThan(double propertyValue) - { - return SetCondition(PredicateOperator.LESS_THAN, new double[] - { - propertyValue - }); - } - - /// - /// Adds the predicate LESS_THAN_OR_EQUAL_TO to the query for the given value. - /// - /// The property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent LessThanOrEqualTo(long propertyValue) - { - return SetCondition(PredicateOperator.LESS_THAN_EQUALS, new long[] - { - propertyValue - }); - } - - /// - /// Adds the predicate NOT_IN to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent NotIn(params string[] values) - { - return SetCondition(PredicateOperator.NOT_IN, values); - } - - /// - /// Adds the predicate NOT_IN to the query for the given set of values. - /// - /// The list of values for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent NotIn(params long[] values) - { - return SetCondition(PredicateOperator.NOT_IN, values); - } - - /// - /// Adds the predicate STARTS_WITH to the query for the given value. - /// - /// The prefix of property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent StartsWith(string propertyValue) - { - return SetCondition(PredicateOperator.STARTS_WITH, new string[] - { - propertyValue - }); - } - - /// - /// Adds the predicate STARTS_WITH_IGNORE_CASE to the query for the given value. - /// - /// The prefix of property value for comparison. - /// - /// The parent query builder for call chaining. - /// - public TParent StartsWithIgnoreCase(string propertyValue) - { - return SetCondition(PredicateOperator.STARTS_WITH_IGNORE_CASE, new string[] - { - propertyValue - }); - } - } -} diff --git a/src/AdWords/Util/Shopping/v201806/OperationPair.cs b/src/AdWords/Util/Shopping/v201806/OperationPair.cs deleted file mode 100755 index 21a1ea5e424..00000000000 --- a/src/AdWords/Util/Shopping/v201806/OperationPair.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using System; - -namespace Google.Api.Ads.AdWords.Util.Shopping.v201806 -{ - /// - /// An OperationPair associates a with an - /// that mutates the node. - /// - internal class OperationPair : Tuple - { - /// - /// Gets the product partition node. - /// - public ProductPartitionNode Node - { - get { return this.Item1; } - } - - /// - /// Gets the operation associated with this node. - /// - public AdGroupCriterionOperation Operation - { - get { return this.Item2; } - } - - /// - /// Initializes a new instance of the class. - /// - /// The product partition node. - /// Gets the product partition node. - public OperationPair(ProductPartitionNode node, AdGroupCriterionOperation operation) : base( - node, operation) - { - } - } -} diff --git a/src/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparer.cs b/src/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparer.cs deleted file mode 100755 index 33da50f0a8c..00000000000 --- a/src/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparer.cs +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Util.Shopping.v201806 -{ - /// - /// Subclass-aware comparator for objects. - /// Performs a logical comparison between instances. This comparator - /// is not consistent with {@link #equals(Object)}. - /// - ///

The {@link #compare(ProductDimension, ProductDimension)} method handles - /// nulls, ordering nulls - /// last.

- ///
- public class ProductDimensionEqualityComparer : IEqualityComparer - { - /// - /// Determines whether the specified objects are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - public bool Equals(ProductDimension x, ProductDimension y) - { - if (Object.ReferenceEquals(x, y)) - { - return true; - } - - if (x == null || y == null || x.GetType() != y.GetType()) - { - return false; - } - - if (x is ProductBiddingCategory) - { - return Equals(x as ProductBiddingCategory, y as ProductBiddingCategory); - } - else if (x is ProductBrand) - { - return Equals(x as ProductBrand, y as ProductBrand); - } - else if (x is ProductCanonicalCondition) - { - return Equals(x as ProductCanonicalCondition, y as ProductCanonicalCondition); - } - else if (x is ProductCustomAttribute) - { - return Equals(x as ProductCustomAttribute, y as ProductCustomAttribute); - } - else if (x is ProductOfferId) - { - return Equals(x as ProductOfferId, y as ProductOfferId); - } - else if (x is ProductChannel) - { - return Equals(x as ProductChannel, y as ProductChannel); - } - else if (x is ProductType) - { - return Equals(x as ProductType, y as ProductType); - } - else if (x is ProductChannelExclusivity) - { - return Equals(x as ProductChannelExclusivity, y as ProductChannelExclusivity); - } - else - { - return false; - } - } - - /// - /// Returns a hash code for this instance. - /// - /// The object. - /// - /// A hash code for this instance, suitable for use in hashing algorithms - /// and data structures like a hash table. - /// - public int GetHashCode(ProductDimension obj) - { - if (obj == null) - { - return 0; - } - - if (obj is ProductBiddingCategory) - { - return GetHashCodeInternal(obj as ProductBiddingCategory); - } - else if (obj is ProductBrand) - { - return GetHashCodeInternal(obj as ProductBrand); - } - else if (obj is ProductCanonicalCondition) - { - return GetHashCodeInternal(obj as ProductCanonicalCondition); - } - else if (obj is ProductCustomAttribute) - { - return GetHashCodeInternal(obj as ProductCustomAttribute); - } - else if (obj is ProductOfferId) - { - return GetHashCodeInternal(obj as ProductOfferId); - } - else if (obj is ProductChannel) - { - return GetHashCodeInternal(obj as ProductChannel); - } - else if (obj is ProductChannelExclusivity) - { - return GetHashCodeInternal(obj as ProductChannelExclusivity); - } - else if (obj is ProductType) - { - return GetHashCodeInternal(obj as ProductType); - } - else - { - return obj.GetHashCode(); - } - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductBiddingCategory obj) - { - return Tuple - .Create(obj.typeSpecified, obj.type, obj.value) - .GetHashCode(); - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductBrand obj) - { - if (obj.value == null) - { - return obj.GetType().Name.GetHashCode(); - } - else - { - return obj.value.ToLower().GetHashCode(); - } - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductCanonicalCondition obj) - { - return Tuple - .Create(obj.conditionSpecified, - obj.condition).GetHashCode(); - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductCustomAttribute obj) - { - if (obj.value == null) - { - return Tuple.Create(obj.typeSpecified, obj.type) - .GetHashCode(); - } - else - { - return Tuple - .Create(obj.typeSpecified, obj.type, - obj.value.ToLower()).GetHashCode(); - } - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductOfferId obj) - { - if (obj.value == null) - { - return obj.GetType().Name.GetHashCode(); - } - else - { - return obj.value.ToLower().GetHashCode(); - } - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductType obj) - { - if (obj.value == null) - { - return Tuple.Create(obj.typeSpecified, obj.type) - .GetHashCode(); - } - else - { - return Tuple - .Create(obj.typeSpecified, obj.type, - obj.value.ToLower()).GetHashCode(); - } - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductChannel obj) - { - return Tuple.Create(obj.channelSpecified, obj.channel) - .GetHashCode(); - } - - /// - /// Gets the hash code for a . - /// - /// The object to calculate hash code for. - /// The hash code. - private int GetHashCodeInternal(ProductChannelExclusivity obj) - { - return Tuple - .Create(obj.channelExclusivitySpecified, - obj.channelExclusivity).GetHashCode(); - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductBiddingCategory x, ProductBiddingCategory y) - { - return x.typeSpecified == y.typeSpecified && x.type == y.type && x.value == y.value; - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductBrand x, ProductBrand y) - { - return AreValuesEqual(x.value, y.value); - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductCanonicalCondition x, ProductCanonicalCondition y) - { - return x.conditionSpecified == y.conditionSpecified && x.condition == y.condition; - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductCustomAttribute x, ProductCustomAttribute y) - { - return x.typeSpecified == y.typeSpecified && x.type == y.type && - AreValuesEqual(x.value, y.value); - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductOfferId x, ProductOfferId y) - { - return AreValuesEqual(x.value, y.value); - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductType x, ProductType y) - { - return x.typeSpecified == y.typeSpecified && x.type == y.type && - AreValuesEqual(x.value, y.value); - } - - /// - /// Determines whether the specified objects - /// are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductChannel x, ProductChannel y) - { - return x.channelSpecified == y.channelSpecified && x.channel == y.channel; - } - - /// - /// Determines whether the specified - /// objects are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// - /// True if the specified objects are equal; otherwise, false. - /// - private bool Equals(ProductChannelExclusivity x, ProductChannelExclusivity y) - { - return x.channelExclusivitySpecified == y.channelExclusivitySpecified && - x.channelExclusivity == y.channelExclusivity; - } - - /// - /// Checks if two string values are equal. - /// - /// The first value. - /// The second value. - /// true if x and y are equal, false otherwise. - /// If both strings are null, then they are considered equal. - /// Strings are converted to lowercase before comparison. - private bool AreValuesEqual(string x, string y) - { - if (x == null && y == null) - { - return true; - } - - return x != null && y != null && x.ToLower() == y.ToLower(); - } - } -} diff --git a/src/AdWords/Util/Shopping/v201806/ProductDimensions.cs b/src/AdWords/Util/Shopping/v201806/ProductDimensions.cs deleted file mode 100755 index d493347addd..00000000000 --- a/src/AdWords/Util/Shopping/v201806/ProductDimensions.cs +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -namespace Google.Api.Ads.AdWords.Util.Shopping.v201806 -{ - /// - /// Factory methods for creating ProductDimension objects. Each - /// ProductDimension subclass has a create method, and each of those methods - /// has a signature that reflects the attributes that logically identify an - /// instance of that subclass. - /// - ///

E.g. method has a single brand - /// parameter since the brand attribute is what uniquely - /// identifies a , while - /// method has both a - /// productDimensionType and a biddingCategoryId - /// parameter since both attributes are required to uniquely identify a - /// .

- /// - ///

Note that this factory only includes methods for subclasses of - /// ProductDimension that are supported by Shopping Campaigns.

- ///
- public static class ProductDimensions - { - /// - /// Creates a new ProductType for the Everything else case. - /// - /// Type of the product dimension. - /// The product type criterion. - public static ProductType CreateType(ProductDimensionType productDimensionType) - { - return CreateType(productDimensionType, null); - } - - /// - /// Creates a new ProductType. - /// - /// Type of the product dimension. - /// The product type value. May be null if - /// creating an "other" dimension - /// The product type criterion - public static ProductType CreateType(ProductDimensionType productDimensionType, - string productTypeValue) - { - return new ProductType() - { - type = productDimensionType, - value = productTypeValue - }; - } - - /// - /// Creates a new ProductCanonicalCondition for the Everything else - /// case. - /// - /// The product canonical condition criterion - public static ProductCanonicalCondition CreateCanonicalCondition() - { - return new ProductCanonicalCondition() - { - conditionSpecified = false - }; - } - - /// - /// Creates a new ProductCanonicalCondition. - /// - /// The condition. - /// The new product canonical condition criterion. - public static ProductCanonicalCondition CreateCanonicalCondition( - ProductCanonicalConditionCondition condition) - { - return new ProductCanonicalCondition() - { - condition = condition - }; - } - - /// - /// Creates a new ProductBiddingCategory for Everything else - /// case. - /// - /// Type of the product dimension. - /// The product bidding category criterion. - public static ProductBiddingCategory CreateBiddingCategory( - ProductDimensionType productDimensionType) - { - return new ProductBiddingCategory() - { - type = productDimensionType - }; - } - - /// - /// Creates a new ProductBiddingCategory. - /// - /// Type of the product dimension. - /// The bidding category ID. - /// The product bidding category criterion. - public static ProductBiddingCategory CreateBiddingCategory( - ProductDimensionType productDimensionType, long biddingCategoryId) - { - ProductBiddingCategory retval = CreateBiddingCategory(productDimensionType); - retval.value = biddingCategoryId; - return retval; - } - - /// - /// Creates a new ProductOfferId for the Everything else case. - /// - /// The product offer ID criterion. - public static ProductOfferId CreateOfferId() - { - return CreateOfferId(null); - } - - /// - /// Creates a new ProductOfferId. - /// - /// The offer ID. - /// The product offer ID criterion. - public static ProductOfferId CreateOfferId(string offerId) - { - return new ProductOfferId() - { - value = offerId - }; - } - - /// - /// Creates a new ProductBrand for the Everything else case. - /// - /// The product brand criterion. - public static ProductBrand CreateBrand() - { - return CreateBrand(null); - } - - /// - /// Creates a new ProductBrand. - /// - /// The brand. - /// The product brand criterion. - public static ProductBrand CreateBrand(string brand) - { - return new ProductBrand() - { - value = brand - }; - } - - /// - /// Creates a new ProductCustomAttribute for the Everything else case. - /// - /// Type of the product dimension. - /// The product custom attribute criterion. - public static ProductCustomAttribute CreateCustomAttribute( - ProductDimensionType productDimensionType) - { - return CreateCustomAttribute(productDimensionType, null); - } - - /// - /// Creates a new ProductCustomAttribute for the Everything else case. - /// - /// Type of the product dimension. - /// The attribute value. - /// The product custom attribute criterion. - public static ProductCustomAttribute CreateCustomAttribute( - ProductDimensionType productDimensionType, string attributeValue) - { - return new ProductCustomAttribute() - { - type = productDimensionType, - value = attributeValue - }; - } - - /// - /// Creates a new ProductChannel. - /// - /// The product channel criterion. - public static ProductChannel CreateChannel() - { - return new ProductChannel(); - } - - /// - /// Creates a new ProductChannel. - /// - /// The channel. - /// The product channel criterion. - public static ProductChannel CreateChannel(ShoppingProductChannel channel) - { - ProductChannel retval = CreateChannel(); - retval.channel = channel; - return retval; - } - - /// - /// Creates a new ProductChannelExclusivity. - /// - /// The new product channel exclusivity criterion. - public static ProductChannelExclusivity CreateChannelExclusivity() - { - return new ProductChannelExclusivity(); - } - - /// - /// Creates a new ProductChannelExclusivity. - /// - /// The channel exclusivity. - /// The new product channel exclusivity criterion. - public static ProductChannelExclusivity CreateChannelExclusivity( - ShoppingProductChannelExclusivity channelExclusivity) - { - return new ProductChannelExclusivity() - { - channelExclusivity = channelExclusivity - }; - } - } -} diff --git a/src/AdWords/Util/Shopping/v201806/ProductPartitionNode.cs b/src/AdWords/Util/Shopping/v201806/ProductPartitionNode.cs deleted file mode 100755 index c25d2fc448c..00000000000 --- a/src/AdWords/Util/Shopping/v201806/ProductPartitionNode.cs +++ /dev/null @@ -1,511 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Util.Shopping.v201806 -{ - /// - /// A node in a tree of s. Used to construct - /// objects for shopping campaigns. - /// - public class ProductPartitionNode - { - /// - /// The parent of this node. - /// - private readonly ProductPartitionNode parentNode; - - /// - /// The product partition ID. - /// - private long productPartitionId; - - /// - /// The node state. - /// - private NodeState nodeState; - - /// - /// The product dimension node that this node wraps. - /// - private readonly ProductDimension dimension; - - /// - /// A map from ProductDimension to child ProductPartitionNode. - /// - /// This map uses a custom comparator for sorting purposes. - private readonly Dictionary children; - - /// - /// Gets or sets the product partition ID. - /// - public long ProductPartitionId - { - get { return productPartitionId; } - set { productPartitionId = value; } - } - - /// - /// Gets the product dimension. - /// - public ProductDimension Dimension - { - get { return dimension; } - } - - /// - /// Returns true if this node's partition type is SUBDIVISION, false - /// otherwise. - /// - public bool IsSubdivision - { - get { return nodeState.NodeType == NodeType.SUBDIVISION; } - } - - /// - /// Returns true if this node's partition type is UNIT, false otherwise. - /// - public bool IsUnit - { - get - { - return nodeState.NodeType == NodeType.BIDDABLE_UNIT || - nodeState.NodeType == NodeType.EXCLUDED_UNIT; - } - } - - /// - /// Gets all the children of this node. - /// - public IEnumerable Children - { - get { return children.Values; } - } - - /// - /// Returns the parent node of this node. The returned node will be - /// null if this is the root node. - /// - public ProductPartitionNode Parent - { - get { return parentNode; } - } - - /// - /// Determines whether this instance has any children. Returns true if this - /// instance has child nodes, false otherwise. - /// - private bool HasChildren - { - get { return children.Count != 0; } - } - - /// - /// Returns true if this node's partition type is UNIT and is biddable - /// (not excluded), false otherwise. - /// - public bool IsBiddableUnit - { - get { return nodeState.NodeType == NodeType.BIDDABLE_UNIT; } - } - - /// - /// Returns true if this node's partition type is UNIT and is excluded - /// (not biddable), false otherwise. - /// - public bool IsExcludedUnit - { - get { return nodeState.NodeType == NodeType.EXCLUDED_UNIT; } - } - - /// - /// Gets or sets the bid. - /// - public long CpcBid - { - get { return nodeState.BidInMicros; } - set { nodeState.BidInMicros = value; } - } - - /// - /// Gets or sets a value indicating whether bid is specified. - /// - public bool CpcBidSpecified - { - get { return nodeState.BidInMicrosSpecified; } - set { nodeState.BidInMicrosSpecified = value; } - } - - /// - /// Initializes a new instance of the - /// class. - /// - /// The parent node. - /// The product dimension that this node wraps. - public ProductPartitionNode(ProductPartitionNode parentNode, ProductDimension dimension) : - this(parentNode, dimension, 0, new ProductDimensionEqualityComparer()) - { - } - - /// - /// Initializes a new instance of the - /// class. - /// - /// The parent node. - /// The product dimension that this node wraps. - /// The product partition ID. - public ProductPartitionNode(ProductPartitionNode parentNode, ProductDimension dimension, - long productPartitionId) : this(parentNode, dimension, productPartitionId, - new ProductDimensionEqualityComparer()) - { - } - - /// - /// Initializes a new instance of the - /// class. - /// - /// The parent node. - /// The product dimension that this node wraps. - /// The product partition ID. - /// The comparer for comparing instances of this - /// product dimension. - public ProductPartitionNode(ProductPartitionNode parentNode, ProductDimension dimension, - long productPartitionId, IEqualityComparer comparer) - { - this.parentNode = parentNode; - this.dimension = dimension; - this.children = new Dictionary(comparer); - this.productPartitionId = productPartitionId; - this.nodeState = new BiddableUnitState(); - } - - /// - /// Modifies this node to be a SUBDIVISION node. - /// - /// This node, updated to a subdivision node. - public ProductPartitionNode AsSubdivision() - { - nodeState = nodeState.TransitionTo(NodeType.SUBDIVISION); - return this; - } - - /// - /// Returns the child node with the specified ProductDimension. - /// - /// The product dimension. - /// - public ProductPartitionNode GetChild(ProductDimension dimension) - { - if (!HasChild(dimension)) - { - throw new ArgumentException( - string.Format(ShoppingMessages.NoChildNodeFoundForDimension, dimension)); - } - - return children[dimension]; - } - - /// - /// Determines whether this node has a child with the specified dimension. - /// - /// The child dimension. - /// True, if the child node exists, false otherwise. - public bool HasChild(ProductDimension dimension) - { - return dimension != null ? children.ContainsKey(dimension) : false; - } - - /// - /// Adds a NEW child for childDimension under this node. - /// - /// The ProductDimension for the - /// new child - /// The newly created child node. - public ProductPartitionNode AddChild(ProductDimension childDimension) - { - // Passing a productPartitionId = 0 is insignificant here. - ProductPartitionNode newChild = - new ProductPartitionNode(this, childDimension, 0, children.Comparer); - return AddChild(newChild); - } - - /// - /// Adds the childNode as a child under this node. - /// - /// The child node. - /// The child node. - /// if the parent node already - /// contains the child node's dimension. - public ProductPartitionNode AddChild(ProductPartitionNode childNode) - { - if (!this.IsSubdivision) - { - throw new ArgumentException( - string.Format(ShoppingMessages.ParentNodeIsNotSubdivision, this.Dimension)); - } - - if (children.ContainsKey(childNode.Dimension)) - { - throw new ArgumentException(string.Format(ShoppingMessages.ChildNodeExists, - childNode.Dimension)); - } - - children.Add(childNode.Dimension, childNode); - return childNode; - } - - /// - /// Removes a child node that has matching dimension with the child node. - /// - /// The child node. - /// This node. - public ProductPartitionNode RemoveChild(ProductPartitionNode childNode) - { - return RemoveChild(childNode.Dimension); - } - - /// - /// Removes the child with the specified dimension. - /// - /// The child dimension. - /// This node. - public ProductPartitionNode RemoveChild(ProductDimension childDimension) - { - if (!children.ContainsKey(childDimension)) - { - throw new ArgumentException(string.Format(ShoppingMessages.ChildNodeDoesNotExist, - childDimension)); - } - - children.Remove(childDimension); - return this; - } - - /// - /// Removes all children of this node. - /// - /// This node. - public ProductPartitionNode RemoveAllChildren() - { - children.Clear(); - return this; - } - - /// - /// Removes all children from this node and modifies this node to be a UNIT - /// node excluded from bidding. - /// - /// This node, updated to an excluded node. - public ProductPartitionNode AsExcludedUnit() - { - PreconditionUtilities.CheckState(this.Parent != null, - ShoppingMessages.RootCannotBeExcluded); - nodeState = nodeState.TransitionTo(NodeType.EXCLUDED_UNIT); - RemoveAllChildren(); - return this; - } - - /// - /// Removes all children from this node and modifies this node to be a UNIT - /// node that is biddable. - /// - /// This node, updated to a biddable node. - public ProductPartitionNode AsBiddableUnit() - { - nodeState = nodeState.TransitionTo(NodeType.BIDDABLE_UNIT); - RemoveAllChildren(); - return this; - } - - /// - /// Constructs a criterion corresponding to - /// the node. - /// - /// The node. - internal ProductPartition GetCriterion() - { - ProductPartition partition = new ProductPartition(); - partition.id = this.ProductPartitionId; - - if (this.Parent != null) - { - partition.parentCriterionId = this.Parent.ProductPartitionId; - } - - partition.caseValue = this.Dimension; - partition.partitionType = - this.IsUnit ? ProductPartitionType.UNIT : ProductPartitionType.SUBDIVISION; - return partition; - } - - /// - /// Constructs a the bidding configuration object corresponding to the node. - /// - /// The bidding configuration node. - /// A null may be returned if a bid is not allowed - /// on this node, or if the bid is not specified. - internal BiddingStrategyConfiguration GetBiddingConfig() - { - BiddingStrategyConfiguration biddingConfig = null; - if (this.CpcBidSpecified && this.IsUnit) - { - biddingConfig = new BiddingStrategyConfiguration(); - - Money bidMoney = new Money() - { - microAmount = this.CpcBid - }; - - CpcBid cpcBid = new CpcBid() - { - bid = bidMoney, - cpcBidSource = BidSource.CRITERION - }; - - biddingConfig.bids = new Bids[] - { - cpcBid - }; - } - - return biddingConfig; - } - - /// - /// Clones this instance. - /// - /// The new node. - internal ProductPartitionNode Clone() - { - ProductDimension newDimension = null; - - if (this.Dimension != null) - { - newDimension = - (ProductDimension) SerializationUtilities.CloneObject(this.Dimension); - } - - ProductPartitionNode newNode = new ProductPartitionNode(null, newDimension, - this.ProductPartitionId, this.children.Comparer); - newNode = CopyProperties(this, newNode); - newNode.CloneChildrenFrom(this.Children); - return newNode; - } - - /// - /// Deeply clones each child in and attaches it - /// to the current node. - /// - /// The children to clone - /// The minimum product partition ID found within the subtrees - /// under . - private void CloneChildrenFrom(IEnumerable children) - { - foreach (ProductPartitionNode childNode in children) - { - if (!this.IsSubdivision) - { - this.AsSubdivision(); - } - - // Clone the child and add it to newParent's collection of children. - ProductDimension newDimension = - (ProductDimension) SerializationUtilities.CloneObject(childNode.Dimension); - ProductPartitionNode newChild = this.AddChild(newDimension); - newChild = CopyProperties(childNode, newChild); - - newChild.CloneChildrenFrom(childNode.Children); - } - } - - /// - /// Performs a shallow copy of properties from - /// to . - /// - /// The node to copy from. - /// The node to copy to. - /// , with its properties updated. - /// Does not change the parent node of - /// . - public static ProductPartitionNode CopyProperties(ProductPartitionNode fromNode, - ProductPartitionNode toNode) - { - switch (fromNode.nodeState.NodeType) - { - case NodeType.BIDDABLE_UNIT: - toNode = toNode.AsBiddableUnit(); - if (fromNode.CpcBidSpecified) - { - toNode.CpcBid = fromNode.CpcBid; - } - - break; - - case NodeType.EXCLUDED_UNIT: - toNode = toNode.AsExcludedUnit(); - break; - - case NodeType.SUBDIVISION: - toNode = toNode.AsSubdivision(); - break; - - default: - throw new InvalidOperationException("Unrecognized node state: " + - fromNode.nodeState.NodeType); - } - - toNode.ProductPartitionId = fromNode.ProductPartitionId; - return toNode; - } - - /// - /// Generates a debug string that represents this node. - /// - /// The level. - /// - private string DebugString(int level) - { - string dimensionType = - (this.dimension != null) ? this.dimension.ProductDimensionType : "ROOT"; - List parts = new List(); - string debugText = string.Format("{0} * Dimension = {1}[{2}], State={3}, ID={4}", - string.Empty.PadLeft(level * 2, ' '), dimensionType, this.dimension, - this.nodeState.NodeType, this.productPartitionId); - - parts.Add(debugText); - foreach (ProductPartitionNode childNode in this.children.Values) - { - parts.Add(childNode.DebugString(level + 1)); - } - - return String.Join("\n", parts); - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return this.DebugString(0); - } - } -} diff --git a/src/AdWords/Util/Shopping/v201806/ProductPartitionNodeAdapter.cs b/src/AdWords/Util/Shopping/v201806/ProductPartitionNodeAdapter.cs deleted file mode 100755 index ea8dcb7bb02..00000000000 --- a/src/AdWords/Util/Shopping/v201806/ProductPartitionNodeAdapter.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -namespace Google.Api.Ads.AdWords.Util.Shopping.v201806 -{ - /// - /// Adapter that translates objects into - /// objects for various operations. - /// - internal class ProductPartitionNodeAdapter - { - /// - /// Creates a new AdGroupCriterion configured for a REMOVE operation. - /// - /// The node whose criterion should be removed. - /// The ad group ID of the criterion. - /// The AdGroupCriterion to be removed. - internal static AdGroupCriterion CreateCriterionForRemove(ProductPartitionNode node, - long adGroupId) - { - PreconditionUtilities.CheckNotNull(node, ShoppingMessages.NodeCannotBeNull); - - return new AdGroupCriterion() - { - adGroupId = adGroupId, - criterion = new ProductPartition() - { - id = node.ProductPartitionId - } - }; - } - - /// - /// Creates a new configured for an - /// ADD operation. - /// - /// The node whose criterion should be added. - /// The ad group ID of the criterion. - /// The temporary ID generator for new nodes. - /// An object for ADD - /// operation. - internal static AdGroupCriterion CreateCriterionForAdd(ProductPartitionNode node, - long adGroupId, TemporaryIdGenerator idGenerator) - { - PreconditionUtilities.CheckNotNull(node, ShoppingMessages.NodeCannotBeNull); - - AdGroupCriterion adGroupCriterion; - - if (node.IsExcludedUnit) - { - adGroupCriterion = new NegativeAdGroupCriterion(); - } - else - { - adGroupCriterion = new BiddableAdGroupCriterion() - { - biddingStrategyConfiguration = node.GetBiddingConfig() - }; - } - - adGroupCriterion.adGroupId = adGroupId; - adGroupCriterion.criterion = node.GetCriterion(); - - adGroupCriterion.criterion.id = node.ProductPartitionId; - if (node.Parent != null) - { - (adGroupCriterion.criterion as ProductPartition).parentCriterionId = - node.Parent.ProductPartitionId; - } - - return adGroupCriterion; - } - - /// - /// Creates a new AdGroupCriterion configured for a SET operation that will - /// set the criterion's bid. - /// - /// The node whose criterion should be updated. - /// The ad group ID of the criterion. - /// The AdGroupCriterion for SET operation. - internal static AdGroupCriterion CreateCriterionForSetBid(ProductPartitionNode node, - long adGroupId) - { - PreconditionUtilities.CheckNotNull(node, ShoppingMessages.NodeCannotBeNull); - PreconditionUtilities.CheckArgument(node.IsBiddableUnit, - string.Format(ShoppingMessages.NodeForBidUpdateIsNotBiddable, - node.ProductPartitionId)); - - return new BiddableAdGroupCriterion() - { - adGroupId = adGroupId, - criterion = node.GetCriterion(), - biddingStrategyConfiguration = node.GetBiddingConfig() - }; - } - } -} diff --git a/src/AdWords/Util/Shopping/v201806/ProductPartitionTree.cs b/src/AdWords/Util/Shopping/v201806/ProductPartitionTree.cs deleted file mode 100755 index 79e82305c18..00000000000 --- a/src/AdWords/Util/Shopping/v201806/ProductPartitionTree.cs +++ /dev/null @@ -1,707 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Logging; -using Google.Api.Ads.Common.Util; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Util.Shopping.v201806 -{ - /// - /// A ProductPartitionTree is a container for a root - /// that also handles applying changes made to the tree under the root. - /// - public class ProductPartitionTree - { - /// - /// The feature ID for this class. - /// - private const AdsFeatureUsageRegistry.Features FEATURE_ID = - AdsFeatureUsageRegistry.Features.ProductPartitionTree; - - /// - /// The registry for saving feature usage information.. - /// - private readonly AdsFeatureUsageRegistry featureUsageRegistry = - AdsFeatureUsageRegistry.Instance; - - /// - /// The ad group ID for this tree. - /// - private readonly long adGroupId; - - /// - /// The root node of this tree. - /// - private readonly ProductPartitionNode root; - - /// - /// The original root node of this tree. This will be null if this - /// tree's ad group originally contained no nodes, e.g., the ad group was - /// created via the API. Otherwise, it will be a deep copy of the - /// ad group's original root node. - /// - /// This root will be used to detect changes made to the tree - /// under . See - /// - private readonly ProductPartitionNode originalRoot; - - /// - /// The comparer for comparing the product dimensions. - /// - private readonly ProductDimensionEqualityComparer dimensionComparator; - - /// - /// The parent ID for root node. - /// - public const int ROOT_PARENT_ID = 0; - - /// - /// The ID for a new root node. - /// - public const int NEW_ROOT_ID = -1; - - /// - /// Required fields for any used to fetch - /// {@link AdGroupCriterion} objects used by - /// an instance of this class. - /// - private static readonly string[] REQUIRED_SELECTOR_FIELD_ENUMS = new string[] - { - AdGroupCriterion.Fields.AdGroupId, - Criterion.Fields.Id, - ProductPartition.Fields.ParentCriterionId, - ProductPartition.Fields.PartitionType, - ProductPartition.Fields.CriteriaType, - ProductPartition.Fields.CaseValue, - CpcBid.Fields.CpcBid, - CpcBid.Fields.CpcBidSource, - BiddableAdGroupCriterion.Fields.Status - }; - - /// - /// Gets the ad group ID for this tree. - /// - public long AdGroupId - { - get { return adGroupId; } - } - - /// - /// Gets the root node of this tree. - /// - public ProductPartitionNode Root - { - get { return root; } - } - - /// - /// Downloads the product partition criteria from an ad group. - /// - /// The AdWords user instance that owns the ad group. - /// - /// The ad group ID. - /// A list of product partition criteria. - private static List DownloadCriteria(AdWordsUser user, long adGroupId) - { - List retval = new List(); - - // Get the AdGroupCriterionService. - AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - - Selector selector = new Selector() - { - fields = REQUIRED_SELECTOR_FIELD_ENUMS, - predicates = new Predicate[] - { - new Predicate() - { - field = "AdGroupId", - @operator = PredicateOperator.EQUALS, - values = new string[] - { - adGroupId.ToString() - } - }, - new Predicate() - { - field = "CriteriaType", - @operator = PredicateOperator.EQUALS, - values = new string[] - { - "PRODUCT_PARTITION" - } - }, - new Predicate() - { - field = "Status", - @operator = PredicateOperator.IN, - values = new string[] - { - UserStatus.ENABLED.ToString(), - UserStatus.PAUSED.ToString() - } - }, - }, - paging = Paging.Default - }; - - AdGroupCriterionPage page; - - do - { - // Get the next page of results. - page = adGroupCriterionService.get(selector); - - if (page != null && page.entries != null) - { - retval.AddRange(page.entries); - selector.paging.IncreaseOffset(); - } - } while (selector.paging.startIndex < page.totalNumEntries); - - return retval; - } - - /// - /// Creates a map with key as the parent criterion ID and value as the list of child nodes. - /// - /// The list of ad group criteria. - /// A criteria map. - private static Dictionary> CreateParentIdMap( - List adGroupCriteria) - { - PreconditionUtilities.CheckNotNull(adGroupCriteria, ShoppingMessages.CriteriaListNull); - - Dictionary> parentIdMap = - new Dictionary>(); - - foreach (AdGroupCriterion adGroupCriterion in adGroupCriteria) - { - PreconditionUtilities.CheckNotNull(adGroupCriterion.criterion, - ShoppingMessages.AdGroupCriterionNull); - if (adGroupCriterion is BiddableAdGroupCriterion) - { - BiddableAdGroupCriterion biddableCriterion = - (BiddableAdGroupCriterion) adGroupCriterion; - - PreconditionUtilities.CheckState(biddableCriterion.userStatusSpecified, - string.Format(ShoppingMessages.UserStatusNotSpecified, - biddableCriterion.criterion.id)); - - if (biddableCriterion.userStatus == UserStatus.REMOVED) - { - continue; - } - } - - if (adGroupCriterion.criterion is ProductPartition) - { - ProductPartition partition = (ProductPartition) adGroupCriterion.criterion; - List children = null; - if (!parentIdMap.TryGetValue(partition.parentCriterionId, out children)) - { - children = new List(); - parentIdMap[partition.parentCriterionId] = children; - } - - children.Add(adGroupCriterion); - } - } - - return parentIdMap; - } - - /// - /// Creates a new tree by retrieving the product partition of the specified - /// ad group. - /// - /// The user that owns the ad group.. - /// The ad group ID. - /// An in-memory representation of the product partition tree - /// in this ad group. - public static ProductPartitionTree DownloadAdGroupTree(AdWordsUser user, long adGroupId) - { - List criteria = DownloadCriteria(user, adGroupId); - return CreateAdGroupTree(adGroupId, criteria); - } - - /// - /// Creates a new ProductPartitionTree based on the collection of ad group - /// criteria provided. - /// - /// If retrieving existing criteria for use with this method, - /// you must include all of the fields in - /// in your selector. - /// The list of ad group criteria. - /// - public static ProductPartitionTree CreateAdGroupTree(List adGroupCriteria) - { - // Mark the usage. - return CreateAdGroupTree(0, adGroupCriteria); - } - - /// - /// Creates a new ProductPartitionTree based on the collection of ad group - /// criteria provided. - /// - /// If retrieving existing criteria for use with this method, - /// you must include all of the fields in - /// in your selector. - /// The ad group ID. - /// The list of ad group criteria. - /// - public static ProductPartitionTree CreateAdGroupTree(long adGroupId, - List adGroupCriteria) - { - PreconditionUtilities.CheckNotNull(adGroupCriteria, ShoppingMessages.CriteriaListNull); - - Dictionary> parentIdMap = - CreateParentIdMap(adGroupCriteria); - - ProductPartitionTree retval = CreateAdGroupTree(adGroupId, parentIdMap); - - // Mark the usage. - retval.featureUsageRegistry.MarkUsage(FEATURE_ID); - return retval; - } - - /// - /// Returns a new tree based on a non-empty collection of ad group criteria. - /// - /// The ad group ID. - /// The multimap from parent product partition ID - /// to child criteria. - /// a new product partition tree. - private static ProductPartitionTree CreateAdGroupTree(long adGroupId, - Dictionary> parentIdMap) - { - ProductPartitionNode rootNode = null; - - if (parentIdMap.Count == 0) - { - rootNode = new ProductPartitionNode(null, null, NEW_ROOT_ID); - } - else - { - List root = - CollectionUtilities.TryGetValue(parentIdMap, ROOT_PARENT_ID); - - PreconditionUtilities.CheckState(root != null, - string.Format(ShoppingMessages.RootCriteriaNotFoundInCriteriaList, adGroupId)); - - PreconditionUtilities.CheckState(root.Count == 1, - string.Format(ShoppingMessages.MoreThanOneRootFound, adGroupId)); - - AdGroupCriterion rootCriterion = root[0]; - - PreconditionUtilities.CheckState(rootCriterion is BiddableAdGroupCriterion, - string.Format(ShoppingMessages.RootCriterionIsNotBiddable, adGroupId)); - - BiddableAdGroupCriterion biddableRootCriterion = - (BiddableAdGroupCriterion) rootCriterion; - - rootNode = new ProductPartitionNode(null, null, rootCriterion.criterion.id, - new ProductDimensionEqualityComparer()); - - // Set the root's bid if a bid exists on the BiddableAdGroupCriterion. - Money rootNodeBid = GetBid(biddableRootCriterion); - - if (rootNodeBid != null) - { - rootNode.AsBiddableUnit().CpcBid = rootNodeBid.microAmount; - } - - AddChildNodes(rootNode, parentIdMap); - } - - return new ProductPartitionTree(adGroupId, rootNode); - } - - /// - /// Constructor that initializes the temp ID generator based on the ID of - /// the root node. - /// - /// the ID of the ad group. - /// The root node of the tree. - private ProductPartitionTree(long adGroupId, ProductPartitionNode root) - { - PreconditionUtilities.CheckNotNull(root, ShoppingMessages.RootNodeCannotBeNull); - - this.adGroupId = adGroupId; - this.root = root; - this.dimensionComparator = new ProductDimensionEqualityComparer(); - - // If this is an existing node in an ad group, then the tree should be - // cloned so that we can keep track of the original state of the tree. - if (this.Root.ProductPartitionId > 0) - { - originalRoot = this.Root.Clone(); - } - } - - /// - /// Gets the criterion-level bid, or null if no such bid exists. - /// - /// The biddable criterion. - /// The criterion-level bid, or null if no such bid exists. - /// - private static Money GetBid(BiddableAdGroupCriterion biddableCriterion) - { - BiddingStrategyConfiguration biddingConfig = - biddableCriterion.biddingStrategyConfiguration; - Money cpcBidAmount = null; - if (biddingConfig != null && biddingConfig.bids != null) - { - foreach (Bids bid in biddingConfig.bids) - { - if (bid is CpcBid) - { - CpcBid cpcBid = (CpcBid) bid; - if (cpcBid.cpcBidSource == BidSource.CRITERION) - { - cpcBidAmount = cpcBid.bid; - break; - } - } - } - } - - return cpcBidAmount; - } - - /// - /// Using the criteria in , recursively adds - /// all children under the partition ID of to - /// . - /// - /// The parent node. - /// The multimap from parent partition ID to list - /// of child criteria - private static void AddChildNodes(ProductPartitionNode parentNode, - Dictionary> parentIdMap) - { - List childCriteria = - CollectionUtilities.TryGetValue(parentIdMap, parentNode.ProductPartitionId); - - // no children, return. - if (childCriteria == null || childCriteria.Count == 0) - { - return; - } - - // Ensure that the parent is a subdivision. - parentNode.AsSubdivision(); - - foreach (AdGroupCriterion childCriterion in childCriteria) - { - ProductPartition partition = (ProductPartition) childCriterion.criterion; - ProductPartitionNode childNode = parentNode.AddChild(partition.caseValue); - childNode.ProductPartitionId = partition.id; - - if (childCriterion is BiddableAdGroupCriterion) - { - childNode = childNode.AsBiddableUnit(); - Money cpcBidAmount = GetBid((BiddableAdGroupCriterion) childCriterion); - if (cpcBidAmount != null) - { - childNode.CpcBid = cpcBidAmount.microAmount; - } - } - else - { - childNode = childNode.AsExcludedUnit(); - } - - AddChildNodes(childNode, parentIdMap); - } - } - - /// - /// Gets the mutate operations that will apply the changes made to this tree. - /// - /// The list of mutate operations. - public AdGroupCriterionOperation[] GetMutateOperations() - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - List operations = new List(); - foreach (OperationPair operationPair in CreateMutateOperationPairs()) - { - operations.Add(operationPair.Operation); - } - - return operations.ToArray(); - } - - /// - /// Creates and returns the pairs of node/operation that will apply the - /// changes made to this tree. - /// - /// The list of operation pairs. - internal List CreateMutateOperationPairs() - { - TemporaryIdGenerator idGenerator = new TemporaryIdGenerator(); - List ops = new List(); - AddMutateOperations(this.originalRoot, this.root, ops, idGenerator); - return ops; - } - - /// - /// Adds to the operations list all operations required to mutate - /// to the state* of - /// . - /// - /// The original node. - /// The new node. - /// The operations list to add to. - /// The temporary ID generator for ADD operations. - /// The set of child product dimensions that require further - /// processing. - private void AddMutateOperations(ProductPartitionNode originalNode, - ProductPartitionNode newNode, List ops, TemporaryIdGenerator idGenerator) - { - NodeDifference nodeDifference = Diff(originalNode, newNode, dimensionComparator); - bool isProcessChildren; - - switch (nodeDifference) - { - case NodeDifference.NEW_NODE: - ops.AddRange(CreateAddOperations(newNode, idGenerator)); - // No need to further process children. The ADD operations above will include operations - // for all children of newNode. - isProcessChildren = false; - break; - - case NodeDifference.REMOVED_NODE: - ops.Add(CreateRemoveOperation(originalNode)); - // No need to further process children. The REMOVE operation above will perform a - // cascading delete of all children of newNode. - isProcessChildren = false; - break; - - case NodeDifference.PARTITION_TYPE_CHANGE: - case NodeDifference.EXCLUDED_UNIT_CHANGE: - ops.Add(CreateRemoveOperation(originalNode)); - ops.AddRange(CreateAddOperations(newNode, idGenerator)); - // No need to further process children. The ADD operations above will include operations - // for all children of newNode. - isProcessChildren = false; - break; - - case NodeDifference.BID_CHANGE: - // Ensure that the new node has the proper ID (this may have been lost if the node - // was removed and then re-added). - newNode.ProductPartitionId = originalNode.ProductPartitionId; - ops.Add(CreateSetBidOperation(newNode)); - // Process the children of newNode. The SET operation above will only handle changes - // made to newNode, not its children. - isProcessChildren = true; - break; - - case NodeDifference.NONE: - // Ensure that the new node has the proper ID (this may have been lost if the node - // was removed and then re-added). - newNode.ProductPartitionId = originalNode.ProductPartitionId; - // This node does not have changes, but its children may. - isProcessChildren = true; - break; - - default: - throw new InvalidOperationException( - "Unrecognized difference: " + nodeDifference); - } - - if (isProcessChildren) - { - // Try to match the children in new and original trees to identify the - // matching dimensions. - - foreach (ProductPartitionNode newChild in newNode.Children) - { - if (originalNode.HasChild(newChild.Dimension)) - { - // this is probably an edit. - AddMutateOperations(originalNode.GetChild(newChild.Dimension), newChild, - ops, idGenerator); - } - else - { - // this is a new node. - AddMutateOperations(null, newChild, ops, idGenerator); - } - } - - foreach (ProductPartitionNode originalChild in originalNode.Children) - { - if (newNode.HasChild(originalChild.Dimension)) - { - // this is probably an edit. We dealt with it before - continue; - } - else - { - // this is a removed node. - AddMutateOperations(originalChild, null, ops, idGenerator); - } - } - } - } - - /// - /// Creates a SET operation for the specified node. - /// - /// The node. - /// An operation pair for the specified operation and node. - /// - private OperationPair CreateSetBidOperation(ProductPartitionNode node) - { - // TODO(user): This check is dangerous, since we should only depend on parent-child - // relationships, not ID relationships. - PreconditionUtilities.CheckArgument(node.ProductPartitionId >= NEW_ROOT_ID, - string.Format(ShoppingMessages.NodeForSetCannotHaveNegativeId, node)); - AdGroupCriterionOperation setOp = new AdGroupCriterionOperation(); - setOp.@operator = Operator.SET; - setOp.operand = ProductPartitionNodeAdapter.CreateCriterionForSetBid(node, adGroupId); - - return new OperationPair(node, setOp); - } - - /// - /// Creates ADD operations for the node and ALL of its children. - /// - /// The node. - /// The temporary ID generator for new nodes. - /// A list of operation pair for the specified operation and nodes. - /// - private List CreateAddOperations(ProductPartitionNode node, - TemporaryIdGenerator idGenerator) - { - AdGroupCriterionOperation addOp = new AdGroupCriterionOperation(); - addOp.@operator = Operator.ADD; - - // Overwrite the ID set by the user when doing ADD operations. This - // minimizes the chances of a malformed tree. - node.ProductPartitionId = idGenerator.Next; - - addOp.operand = - ProductPartitionNodeAdapter.CreateCriterionForAdd(node, adGroupId, idGenerator); - - List operationsList = new List(); - operationsList.Add(new OperationPair(node, addOp)); - - // Recursively add all of this node's children to the operations list. - foreach (ProductPartitionNode child in node.Children) - { - operationsList.AddRange(CreateAddOperations(child, idGenerator)); - } - - return operationsList; - } - - /// - /// Creates a REMOVE operation for the specified node. - /// - /// The node to be removed. - /// An operation pair for the node and the REMOVE operation. - /// - private OperationPair CreateRemoveOperation(ProductPartitionNode node) - { - PreconditionUtilities.CheckArgument(node.ProductPartitionId >= NEW_ROOT_ID, - string.Format(ShoppingMessages.NodeForRemoveCannotHaveNegativeId, - node.ProductPartitionId)); - - AdGroupCriterionOperation removeOp = new AdGroupCriterionOperation(); - removeOp.@operator = Operator.REMOVE; - removeOp.operand = - ProductPartitionNodeAdapter.CreateCriterionForRemove(node, adGroupId); - - return new OperationPair(node, removeOp); - } - - /// - /// Returns the between the original node and - /// the new node. - /// - /// The original node. - /// The new node. - /// The dimension comparator. - private static NodeDifference Diff(ProductPartitionNode originalNode, - ProductPartitionNode newNode, IEqualityComparer dimensionComparator) - { - NodeDifference nodeDifference; - if (originalNode == null && newNode == null) - { - nodeDifference = NodeDifference.NONE; - } - else if (originalNode == null) - { - nodeDifference = NodeDifference.NEW_NODE; - } - else if (newNode == null) - { - nodeDifference = NodeDifference.REMOVED_NODE; - } - else if (!dimensionComparator.Equals(originalNode.Dimension, newNode.Dimension)) - { - throw new InvalidOperationException(string.Format( - ShoppingMessages.ProductDimensionMismatch, originalNode.Dimension, - newNode.Dimension)); - } - else if (originalNode.IsUnit != newNode.IsUnit) - { - nodeDifference = NodeDifference.PARTITION_TYPE_CHANGE; - } - else if (originalNode.IsExcludedUnit != newNode.IsExcludedUnit) - { - nodeDifference = NodeDifference.EXCLUDED_UNIT_CHANGE; - } - else if (!originalNode.IsExcludedUnit && originalNode.IsUnit && newNode.IsUnit) - { - // Both nodes are non-excluded units - the only possible difference - // left is the bid. - nodeDifference = (originalNode.CpcBid != newNode.CpcBid) - ? NodeDifference.BID_CHANGE - : NodeDifference.NONE; - } - else - { - nodeDifference = NodeDifference.NONE; - } - - return nodeDifference; - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - return String.Format("AdGroupID: {0}\nTree:\n{1}", this.adGroupId, this.Root); - } - } -} diff --git a/src/AdWords/v201806/AdWordsApi.ProductDimension.cs b/src/AdWords/v201806/AdWordsApi.ProductDimension.cs deleted file mode 100755 index f49cbc3f8a7..00000000000 --- a/src/AdWords/v201806/AdWordsApi.ProductDimension.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2018 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. - -// This file overrides the ToString() method for all ProductDimensions supported -// by ProductPartitionTree class. - -namespace Google.Api.Ads.AdWords.v201806 -{ - public partial class ProductType : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Type: {0}, Value: {1}", this.type, this.value); - } - } - - public partial class ProductOfferId : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Value: {0}", this.value); - } - } - - public partial class ProductCustomAttribute : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Type: {0}, Value: {1}", this.type, this.value); - } - } - - public partial class ProductChannelExclusivity : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Channel Exclusivity: {0}", this.channelExclusivity); - } - } - - public partial class ProductChannel : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Channel: {0}", this.channel); - } - } - - public partial class ProductCanonicalCondition : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Condition: {0}", this.condition); - } - } - - public partial class ProductBrand : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Value: {0}", this.value); - } - } - - public partial class ProductBiddingCategory : ProductDimension - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return string.Format("Type: {0}, Value: {1}", this.type, this.value); - } - } -} diff --git a/src/AdWords/v201806/AdWordsApi.cs b/src/AdWords/v201806/AdWordsApi.cs deleted file mode 100755 index 9bc3a7076e8..00000000000 --- a/src/AdWords/v201806/AdWordsApi.cs +++ /dev/null @@ -1,109647 +0,0 @@ -// Copyright 2018 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. - -#pragma warning disable 1591 -namespace Google.Api.Ads.AdWords.v201806 -{ - using Google.Api.Ads.AdWords.Util.Selectors; - using Google.Api.Ads.AdWords.Util.Reports; - using Google.Api.Ads.Common.Util; - using Google.Api.Ads.AdWords.Lib; - using System.ComponentModel; - using System.Collections.Generic; - using System; - - /// Exception class for holding a list of service errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ApiException : ApplicationException - { - private ApiError[] errorsField; - - /// List of errors. - /// - [System.Xml.Serialization.XmlElementAttribute("errors", Order = 0)] - public ApiError[] errors - { - get - { - return this.errorsField; - } - set - { - this.errorsField = value; - } - } - } - - - /// The API error base class that provides details about an error that occurred - /// while processing a service request.

The OGNL field path is provided for - /// parsers to identify the request data element that may have caused the error.

- ///
- [System.Xml.Serialization.XmlIncludeAttribute(typeof(UrlError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(StringLengthError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(StringFormatError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(StatsQueryError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SizeLimitError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SelectorError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequiredError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RejectedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ReadOnlyError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RateExceededError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RangeError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(QuotaCheckError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(QueryError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PolicyViolationError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PolicyFindingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PagingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperatorError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationAccessDenied))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NullError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NotEmptyError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NewEntityCreationError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MediaError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MediaBundleError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(InternalApiError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ImageError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IdError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FunctionParsingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FunctionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ForwardCompatibilityError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedAttributeReferenceError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(EntityNotFound))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(EntityCountLimitExceeded))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdCountLimitExceeded))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(EntityAccessDenied))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DistinctError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DateError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DatabaseError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CollectionSizeError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ClientTermsError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AuthorizationError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AuthenticationError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssetLinkError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdxError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdSharingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCustomizerError))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RegionCodeError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignCriterionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SettingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ListError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DateRangeError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BiddingErrors))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignBidModifierError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignFeedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PerformanceTargetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupPerformanceTargetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConversionTrackingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AppPostbackUrlError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerNegativeCriterionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupFeedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerSyncError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerFeedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DataError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemTargetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedMappingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LocationCriterionServiceError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManagedCustomerServiceError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(VideoError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AudioError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionPolicyError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MultiplierError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionLimitExceeded))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineConversionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CurrencyCodeError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NotWhitelistedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineDataUploadError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineCallConversionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ReportDefinitionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrafficEstimatorError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetingIdeaError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UserListError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MutateMembersError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignSharedSetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedCriterionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedSetError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupServiceError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LabelError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LabelServiceError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCustomizerFeedError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExtensionSettingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DraftError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignPreferenceError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrialError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TaskExecutionError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineConversionAdjustmentError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MediaUploadError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCampaignAdSubProductTypeError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomAffinityError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdParamPolicyError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdParamError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BatchJobProcessingError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BatchJobError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BiddingStrategyError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerOrderLineError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetOrderError))] - public abstract partial class ApiError - { - private string fieldPathField; - - private FieldPathElement[] fieldPathElementsField; - - private string triggerField; - - private string errorStringField; - - private string apiErrorTypeField; - - /// The OGNL field path to identify cause of error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string fieldPath - { - get - { - return this.fieldPathField; - } - set - { - this.fieldPathField = value; - } - } - - /// A parsed copy of the field path. For example, the field path - /// "operations[1].operand" corresponds to this list: {FieldPathElement(field = - /// "operations", index = 1), FieldPathElement(field = "operand", index = null)}. - /// - [System.Xml.Serialization.XmlElementAttribute("fieldPathElements", Order = 1)] - public FieldPathElement[] fieldPathElements - { - get - { - return this.fieldPathElementsField; - } - set - { - this.fieldPathElementsField = value; - } - } - - /// The data that caused the error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string trigger - { - get - { - return this.triggerField; - } - set - { - this.triggerField = value; - } - } - - /// A simple string representation of the error and reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string errorString - { - get - { - return this.errorStringField; - } - set - { - this.errorStringField = value; - } - } - - /// Indicates that this instance is a subtype of ApiError. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ApiError.Type", Order = 4)] - public string ApiErrorType - { - get - { - return this.apiErrorTypeField; - } - set - { - this.apiErrorTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A segment of a field path. Each dot in a field path defines a new segment. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FieldPathElement - { - private string fieldField; - - private int indexField; - - private bool indexFieldSpecified; - - /// The name of a field in lower camelcase. (e.g. "biddingStrategy") - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string field - { - get - { - return this.fieldField; - } - set - { - this.fieldField = value; - } - } - - /// For list fields, this is a 0-indexed position in the list. Null for non-list - /// fields. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int index - { - get - { - return this.indexField; - } - set - { - this.indexField = value; - this.indexSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool indexSpecified - { - get - { - return this.indexFieldSpecified; - } - set - { - this.indexFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Points to a substring within an ad field or criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PolicyViolationError.Part", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PolicyViolationErrorPart - { - private int indexField; - - private bool indexFieldSpecified; - - private int lengthField; - - private bool lengthFieldSpecified; - - /// Index of the starting position of the violating text within the line. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int index - { - get - { - return this.indexField; - } - set - { - this.indexField = value; - this.indexSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool indexSpecified - { - get - { - return this.indexFieldSpecified; - } - set - { - this.indexFieldSpecified = value; - } - } - - /// The length of the violating text. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int length - { - get - { - return this.lengthField; - } - set - { - this.lengthField = value; - this.lengthSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool lengthSpecified - { - get - { - return this.lengthFieldSpecified; - } - set - { - this.lengthFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Key of the violation. The key is used for referring to a violation when filing - /// an exemption request. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PolicyViolationKey - { - private string policyNameField; - - private string violatingTextField; - - /// Unique id of the violated policy. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string policyName - { - get - { - return this.policyNameField; - } - set - { - this.policyNameField = value; - } - } - - /// The text that violates the policy if specified. Otherwise, refers to the policy - /// in general (e.g. when requesting to be exempt from the whole policy). May be - /// null for criterion exemptions, in which case this refers to the whole policy. - /// Must be specified for ad exemptions. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string violatingText - { - get - { - return this.violatingTextField; - } - set - { - this.violatingTextField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Base class for exceptions. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ApiException))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ApplicationException - { - private string messageField; - - private string applicationExceptionTypeField; - - /// Error message. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string message - { - get - { - return this.messageField; - } - set - { - this.messageField = value; - } - } - - /// Indicates that this instance is a subtype of ApplicationException. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ApplicationException.Type", Order = 1)] - public string ApplicationExceptionType - { - get - { - return this.applicationExceptionTypeField; - } - set - { - this.applicationExceptionTypeField = value; - } - } - } - - - /// This represents an entry in a map with a key of type String and value of type - /// String. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class String_StringMapEntry - { - private string keyField; - - private string valueField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - /// Base type for AdWords label attributes. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DisplayAttribute))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LabelAttribute - { - private string labelAttributeTypeField; - - /// Indicates that this instance is a subtype of LabelAttribute. Although this field - /// is returned in the response, it is ignored on input and cannot be selected. - /// Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("LabelAttribute.Type", Order = 0)] - public string LabelAttributeType - { - get - { - return this.labelAttributeTypeField; - } - set - { - this.labelAttributeTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attributes for Text Labels. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DisplayAttribute : LabelAttribute - { - private string backgroundColorField; - - private string descriptionField; - - /// Background color of the label in RGB format. A background color string must begin with a '#' character followed - /// by either 6 or 3 hexadecimal characters (24 vs. 12 bits). This is checked by the - /// regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string backgroundColor - { - get - { - return this.backgroundColorField; - } - set - { - this.backgroundColorField = value; - } - } - - /// A short description of the label. The - /// length of this string should be between 0 and 200, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : LabelAttribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : LabelAttribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : LabelAttribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a label that can be attached to entities such as campaign, ad group, - /// ads, criterion etc. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TextLabel))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Label - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private LabelStatus statusField; - - private bool statusFieldSpecified; - - private LabelAttribute attributeField; - - private string labelTypeField; - - /// Id of label. This field is required and should - /// not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Name of label. The length of this string - /// should be between 1 and 80, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Status of the label. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public LabelStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Attributes of the label. This field is read - /// only and will be ignored when sent to the API for the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public LabelAttribute attribute - { - get - { - return this.attributeField; - } - set - { - this.attributeField = value; - } - } - - /// Indicates that this instance is a subtype of Label. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Label.Type", Order = 4)] - public string LabelType - { - get - { - return this.labelTypeField; - } - set - { - this.labelTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field LabelId = new Field("LabelId", true, true); - - public static readonly Field LabelName = new Field("LabelName", true, true); - - public static readonly Field LabelStatus = new Field("LabelStatus", true, true); - - public static readonly Field LabelAttribute = new Field("LabelAttribute", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field LabelId = Fields.LabelId; - - public static readonly Field LabelName = Fields.LabelName; - - public static readonly Field LabelStatus = Fields.LabelStatus; - - public static readonly Field LabelAttribute = Fields.LabelAttribute; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field LabelId = Fields.LabelId; - - public static readonly Field LabelName = Fields.LabelName; - - public static readonly Field LabelStatus = Fields.LabelStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Label.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum LabelStatus - { - /// The label is enabled. - /// - ENABLED = 0, - /// The label has been removed. - /// - REMOVED = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// Represent a display label entry. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TextLabel : Label - { - } - - - /// Contains policy information for an ad. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdPolicySummary - { - private PolicyTopicEntry[] policyTopicEntriesField; - - private PolicySummaryReviewState reviewStateField; - - private bool reviewStateFieldSpecified; - - private PolicySummaryDenormalizedStatus denormalizedStatusField; - - private bool denormalizedStatusFieldSpecified; - - private PolicyApprovalStatus combinedApprovalStatusField; - - private bool combinedApprovalStatusFieldSpecified; - - /// List of policy findings. - /// - [System.Xml.Serialization.XmlElementAttribute("policyTopicEntries", Order = 0)] - public PolicyTopicEntry[] policyTopicEntries - { - get - { - return this.policyTopicEntriesField; - } - set - { - this.policyTopicEntriesField = value; - } - } - - /// Progress through the review process. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public PolicySummaryReviewState reviewState - { - get - { - return this.reviewStateField; - } - set - { - this.reviewStateField = value; - this.reviewStateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reviewStateSpecified - { - get - { - return this.reviewStateFieldSpecified; - } - set - { - this.reviewStateFieldSpecified = value; - } - } - - /// Overall review status based on the policy topic entries. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public PolicySummaryDenormalizedStatus denormalizedStatus - { - get - { - return this.denormalizedStatusField; - } - set - { - this.denormalizedStatusField = value; - this.denormalizedStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool denormalizedStatusSpecified - { - get - { - return this.denormalizedStatusFieldSpecified; - } - set - { - this.denormalizedStatusFieldSpecified = value; - } - } - - /// Approval status that combines review state and status. This field can be selected using the value - /// "CombinedApprovalStatus".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public PolicyApprovalStatus combinedApprovalStatus - { - get - { - return this.combinedApprovalStatusField; - } - set - { - this.combinedApprovalStatusField = value; - this.combinedApprovalStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool combinedApprovalStatusSpecified - { - get - { - return this.combinedApprovalStatusFieldSpecified; - } - set - { - this.combinedApprovalStatusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CombinedApprovalStatus = new Field("CombinedApprovalStatus", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CombinedApprovalStatus = Fields.CombinedApprovalStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CombinedApprovalStatus = Fields.CombinedApprovalStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains Ads Policy decisions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PolicyTopicEntry - { - private PolicyTopicEntryType policyTopicEntryTypeField; - - private bool policyTopicEntryTypeFieldSpecified; - - private PolicyTopicEvidence[] policyTopicEvidencesField; - - private PolicyTopicConstraint[] policyTopicConstraintsField; - - private string policyTopicIdField; - - private string policyTopicNameField; - - private string policyTopicHelpCenterUrlField; - - /// The type of the policy topic entry. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PolicyTopicEntryType policyTopicEntryType - { - get - { - return this.policyTopicEntryTypeField; - } - set - { - this.policyTopicEntryTypeField = value; - this.policyTopicEntryTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool policyTopicEntryTypeSpecified - { - get - { - return this.policyTopicEntryTypeFieldSpecified; - } - set - { - this.policyTopicEntryTypeFieldSpecified = value; - } - } - - /// The policy topic evidences associated with this policy topic entry. - /// - [System.Xml.Serialization.XmlElementAttribute("policyTopicEvidences", Order = 1)] - public PolicyTopicEvidence[] policyTopicEvidences - { - get - { - return this.policyTopicEvidencesField; - } - set - { - this.policyTopicEvidencesField = value; - } - } - - /// The targeting constraints to which this PolicyTopicEntry is related. - /// - [System.Xml.Serialization.XmlElementAttribute("policyTopicConstraints", Order = 2)] - public PolicyTopicConstraint[] policyTopicConstraints - { - get - { - return this.policyTopicConstraintsField; - } - set - { - this.policyTopicConstraintsField = value; - } - } - - /// The policy topic id. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string policyTopicId - { - get - { - return this.policyTopicIdField; - } - set - { - this.policyTopicIdField = value; - } - } - - /// The policy topic name (in English). This field - /// is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string policyTopicName - { - get - { - return this.policyTopicNameField; - } - set - { - this.policyTopicNameField = value; - } - } - - /// URL of the help center article describing this policy topic entry. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string policyTopicHelpCenterUrl - { - get - { - return this.policyTopicHelpCenterUrlField; - } - set - { - this.policyTopicHelpCenterUrlField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The summarized nature of a policy entry. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicyTopicEntryType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Will never serve. - /// - PROHIBITED = 1, - /// Constrained for at least one value. - /// - LIMITED = 2, - } - - - /// Evidence that caused this policy topic to be reported. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PolicyTopicEvidence - { - private PolicyTopicEvidenceType policyTopicEvidenceTypeField; - - private bool policyTopicEvidenceTypeFieldSpecified; - - private string[] evidenceTextListField; - - private PolicyTopicEvidenceDestinationMismatchUrlType[] policyTopicEvidenceDestinationMismatchUrlTypesField; - - /// The type of evidence for the policy topic. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PolicyTopicEvidenceType policyTopicEvidenceType - { - get - { - return this.policyTopicEvidenceTypeField; - } - set - { - this.policyTopicEvidenceTypeField = value; - this.policyTopicEvidenceTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool policyTopicEvidenceTypeSpecified - { - get - { - return this.policyTopicEvidenceTypeFieldSpecified; - } - set - { - this.policyTopicEvidenceTypeFieldSpecified = value; - } - } - - /// The actual evidence that triggered this policy topic to be reported. This field - /// is associated with the policyTopicEvidenceType. So for example, when - /// policyTopicEvidenceType is AD_TEXT, the evidence is the texts associated with - /// the Ad. - /// - [System.Xml.Serialization.XmlElementAttribute("evidenceTextList", Order = 1)] - public string[] evidenceTextList - { - get - { - return this.evidenceTextListField; - } - set - { - this.evidenceTextListField = value; - } - } - - /// The url types that triggered this policy topic to be reported. This field is - /// associated with the policyTopicEvidenceType and will only be populated when it - /// has value of DESTINATION_MISMATCH. So for example, when policyTopicEvidenceType - /// is DESTINATION_MISMATCH, policyTopicEvidenceDestinationMismatchUrlTypes will be - /// populated with mismatched url types, DISPLAY_URL, FINAL_URL and/or - /// FINAL_MOBILE_URL. - /// - [System.Xml.Serialization.XmlElementAttribute("policyTopicEvidenceDestinationMismatchUrlTypes", Order = 2)] - public PolicyTopicEvidenceDestinationMismatchUrlType[] policyTopicEvidenceDestinationMismatchUrlTypes - { - get - { - return this.policyTopicEvidenceDestinationMismatchUrlTypesField; - } - set - { - this.policyTopicEvidenceDestinationMismatchUrlTypesField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Describes the type of evidence inside the policy topic evidence. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicyTopicEvidenceType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Evidence found in the text of the ad. - /// - AD_TEXT = 1, - /// HTTP code returned when the final URL was crawled. - /// - HTTP_CODE = 2, - /// List of websites linked with this ad. - /// - WEBSITES = 3, - /// The language the ad was detected to be written in. - /// - LANGUAGE = 4, - /// List of evidence found in the text of the ad. - /// - AD_TEXT_LIST = 6, - /// The text in the destination of the ad that is causing a policy violation. - /// - DESTINATION_TEXT_LIST = 5, - /// Mismatch between any of Display URL, Final URL, and Final Mobile URL. - /// - DESTINATION_MISMATCH = 7, - } - - - /// Describes the destination mismatch url type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicyTopicEvidenceDestinationMismatchUrlType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - DISPLAY_URL = 1, - FINAL_URL = 2, - FINAL_MOBILE_URL = 3, - /// Tracking template with substituted desktop url. - /// - TRACKING_URL = 4, - /// Tracking template with substituted mobile url. - /// - MOBILE_TRACKING_URL = 5, - } - - - /// A target which caused a policy finding. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResellerConstraint))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CountryConstraint))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CertificateMissingInCountryConstraint))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CertificateDomainMismatchInCountryConstraint))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CertificateMissingConstraint))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class PolicyTopicConstraint - { - private PolicyTopicConstraintPolicyTopicConstraintType constraintTypeField; - - private bool constraintTypeFieldSpecified; - - private string policyTopicConstraintTypeField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PolicyTopicConstraintPolicyTopicConstraintType constraintType - { - get - { - return this.constraintTypeField; - } - set - { - this.constraintTypeField = value; - this.constraintTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool constraintTypeSpecified - { - get - { - return this.constraintTypeFieldSpecified; - } - set - { - this.constraintTypeFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of PolicyTopicConstraint. Although - /// this field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("PolicyTopicConstraint.Type", Order = 1)] - public string PolicyTopicConstraintType - { - get - { - return this.policyTopicConstraintTypeField; - } - set - { - this.policyTopicConstraintTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Subtype of PolicyTopicConstraint. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PolicyTopicConstraint.PolicyTopicConstraintType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicyTopicConstraintPolicyTopicConstraintType - { - UNKNOWN = 0, - COUNTRY = 1, - RESELLER = 2, - CERTIFICATE_MISSING_IN_COUNTRY = 3, - CERTIFICATE_DOMAIN_MISMATCH_IN_COUNTRY = 4, - CERTIFICATE_MISSING = 5, - CERTIFICATE_DOMAIN_MISMATCH = 6, - } - - - /// Constraint indicating that the policy topic was constrained by disapproval of - /// the website for reseller purposes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ResellerConstraint : PolicyTopicConstraint - { - } - - - /// Information about countries that were targeted that caused a policy finding. If - /// a CountryConstraint has 0 targeted countries and an empty list of constrained - /// countries, it means that the constraint applies globally. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CertificateMissingInCountryConstraint))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CertificateDomainMismatchInCountryConstraint))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CountryConstraint : PolicyTopicConstraint - { - private long[] constrainedCountriesField; - - private int totalTargetedCountriesField; - - private bool totalTargetedCountriesFieldSpecified; - - /// The set of targeted country criterion IDs to which a policy topic entry applies. - /// - [System.Xml.Serialization.XmlElementAttribute("constrainedCountries", Order = 0)] - public long[] constrainedCountries - { - get - { - return this.constrainedCountriesField; - } - set - { - this.constrainedCountriesField = value; - } - } - - /// The total number of targeted countries. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int totalTargetedCountries - { - get - { - return this.totalTargetedCountriesField; - } - set - { - this.totalTargetedCountriesField = value; - this.totalTargetedCountriesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalTargetedCountriesSpecified - { - get - { - return this.totalTargetedCountriesFieldSpecified; - } - set - { - this.totalTargetedCountriesFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : PolicyTopicConstraint.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : PolicyTopicConstraint.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : PolicyTopicConstraint.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Information about countries that were targeted but that do not have a policy - /// certificate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CertificateMissingInCountryConstraint : CountryConstraint - { - } - - - /// Information about countries that were targeted, but the certificate for those - /// countries does not include the correct domain. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CertificateDomainMismatchInCountryConstraint : CountryConstraint - { - } - - - /// A policy finding was caused by a missing certificate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CertificateMissingConstraint : PolicyTopicConstraint - { - } - - - /// The review state of a reviewable. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicySummaryReviewState - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - REVIEW_IN_PROGRESS = 1, - REVIEWED = 2, - /// Appeal requested for this reviewable. - /// - UNDER_APPEAL = 3, - } - - - /// The denormalized status of a reviewable, calculated based on the status of its - /// individual policy entries. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicySummaryDenormalizedStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - DISAPPROVED = 1, - APPROVED_LIMITED = 2, - APPROVED = 3, - } - - - /// Policy approval status. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicyApprovalStatus - { - UNKNOWN = 0, - APPROVED = 1, - APPROVED_LIMITED = 2, - ELIGIBLE = 3, - UNDER_REVIEW = 4, - DISAPPROVED = 5, - SITE_SUSPENDED = 6, - } - - - /// Represents a field in a template element. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TemplateElementField - { - private string nameField; - - private TemplateElementFieldType typeField; - - private bool typeFieldSpecified; - - private string fieldTextField; - - private Media fieldMediaField; - - /// The name of this field. This field can be - /// selected using the value "TemplateElementFieldName". This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The type of this field. This field can be - /// selected using the value "TemplateElementFieldType". This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public TemplateElementFieldType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// Text value for text field types. Null if not text field. The field is a text - /// field if type is ADDRESS, ENUM, TEXT, URL, or VISIBLE_URL. This field can be selected using the value - /// "TemplateElementFieldText". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string fieldText - { - get - { - return this.fieldTextField; - } - set - { - this.fieldTextField = value; - } - } - - /// Media value for non-text field types. Null if a text field. This fields must be - /// specified if fieldText is null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public Media fieldMedia - { - get - { - return this.fieldMediaField; - } - set - { - this.fieldMediaField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TemplateElementFieldName = new Field("TemplateElementFieldName", false, true); - - public static readonly Field TemplateElementFieldType = new Field("TemplateElementFieldType", false, true); - - public static readonly Field TemplateElementFieldText = new Field("TemplateElementFieldText", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TemplateElementFieldName = Fields.TemplateElementFieldName; - - public static readonly Field TemplateElementFieldType = Fields.TemplateElementFieldType; - - public static readonly Field TemplateElementFieldText = Fields.TemplateElementFieldText; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Possible field types of template element fields. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "TemplateElementField.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum TemplateElementFieldType - { - /// Address field type (text). - /// - ADDRESS = 0, - /// Audio field type (Media). - /// - AUDIO = 1, - /// Enum field type (text). - /// - ENUM = 2, - /// Image field type (Media). - /// - IMAGE = 3, - /// Background Image field type (Media). - /// - BACKGROUND_IMAGE = 4, - /// Number field type (text). - /// - NUMBER = 5, - /// Text field type (text). - /// - TEXT = 6, - /// URL field type (text). - /// - URL = 7, - /// Video field type (Media). - /// - VIDEO = 8, - /// Visible URL field type (text). - /// - VISIBLE_URL = 9, - /// A ZIP file containing HTML5 assets. - /// - MEDIA_BUNDLE = 10, - /// UNKNOWN type can not be passed as input. Used - /// for return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 11, - } - - - /// Represents some kind of media. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Video))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MediaBundle))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Image))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Audio))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Media - { - private long mediaIdField; - - private bool mediaIdFieldSpecified; - - private MediaMediaType typeField; - - private bool typeFieldSpecified; - - private long referenceIdField; - - private bool referenceIdFieldSpecified; - - private Media_Size_DimensionsMapEntry[] dimensionsField; - - private Media_Size_StringMapEntry[] urlsField; - - private MediaLegacyMimeType mimeTypeField; - - private bool mimeTypeFieldSpecified; - - private string sourceUrlField; - - private string nameField; - - private long fileSizeField; - - private bool fileSizeFieldSpecified; - - private string creationTimeField; - - private string mediaTypeField; - - /// ID of this media object. This field can be - /// selected using the value "MediaId". This field is required and should not be null when it is - /// contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long mediaId - { - get - { - return this.mediaIdField; - } - set - { - this.mediaIdField = value; - this.mediaIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool mediaIdSpecified - { - get - { - return this.mediaIdFieldSpecified; - } - set - { - this.mediaIdFieldSpecified = value; - } - } - - /// Type of media object. Required when using MediaService#upload to upload a new media file. - /// MEDIA_BUNDLE, ICON, IMAGE, and DYNAMIC_IMAGE are the supported MediaTypes to - /// upload. This field can be selected using the - /// value "Type". This field is read only - /// and will be ignored when sent to the API for the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public MediaMediaType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// Media reference ID key. This field can be - /// selected using the value "ReferenceId". This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long referenceId - { - get - { - return this.referenceIdField; - } - set - { - this.referenceIdField = value; - this.referenceIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool referenceIdSpecified - { - get - { - return this.referenceIdFieldSpecified; - } - set - { - this.referenceIdFieldSpecified = value; - } - } - - /// Various dimension sizes for the media. Only applies to image media (and video - /// media for video thumbnails). This field can - /// be selected using the value "Dimensions". - /// - [System.Xml.Serialization.XmlElementAttribute("dimensions", Order = 3)] - public Media_Size_DimensionsMapEntry[] dimensions - { - get - { - return this.dimensionsField; - } - set - { - this.dimensionsField = value; - } - } - - /// URLs pointing to the resized media for the given sizes. Only applies to image - /// media. This field can be selected using the - /// value "Urls". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("urls", Order = 4)] - public Media_Size_StringMapEntry[] urls - { - get - { - return this.urlsField; - } - set - { - this.urlsField = value; - } - } - - /// The mime type of the media. This field can - /// be selected using the value "MimeType". This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public MediaLegacyMimeType mimeType - { - get - { - return this.mimeTypeField; - } - set - { - this.mimeTypeField = value; - this.mimeTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool mimeTypeSpecified - { - get - { - return this.mimeTypeFieldSpecified; - } - set - { - this.mimeTypeFieldSpecified = value; - } - } - - /// The URL of where the original media was downloaded from (or a file name). This field can be selected using the value - /// "SourceUrl". This field is read only - /// and will be ignored when sent to the API for the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string sourceUrl - { - get - { - return this.sourceUrlField; - } - set - { - this.sourceUrlField = value; - } - } - - /// The name of the media. The name can be used by clients to help identify - /// previously uploaded media. This field can be - /// selected using the value "Name". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The size of the media file in bytes. This - /// field can be selected using the value "FileSize". This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public long fileSize - { - get - { - return this.fileSizeField; - } - set - { - this.fileSizeField = value; - this.fileSizeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool fileSizeSpecified - { - get - { - return this.fileSizeFieldSpecified; - } - set - { - this.fileSizeFieldSpecified = value; - } - } - - /// Media creation date in the format YYYY-MM-DD HH:MM:SS+TZ. This is not updatable - /// and not specifiable. This field can be - /// selected using the value "CreationTime". This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public string creationTime - { - get - { - return this.creationTimeField; - } - set - { - this.creationTimeField = value; - } - } - - /// Indicates that this instance is a subtype of Media. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Media.Type", Order = 10)] - public string MediaType - { - get - { - return this.mediaTypeField; - } - set - { - this.mediaTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field MediaId = new Field("MediaId", false, true); - - public static readonly Field Type = new Field("Type", false, true); - - public static readonly Field ReferenceId = new Field("ReferenceId", false, true); - - public static readonly Field Dimensions = new Field("Dimensions", false, true); - - public static readonly Field Urls = new Field("Urls", false, true); - - public static readonly Field MimeType = new Field("MimeType", false, true); - - public static readonly Field SourceUrl = new Field("SourceUrl", false, true); - - public static readonly Field Name = new Field("Name", false, true); - - public static readonly Field FileSize = new Field("FileSize", false, true); - - public static readonly Field CreationTime = new Field("CreationTime", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field MediaId = Fields.MediaId; - - public static readonly Field Type = Fields.Type; - - public static readonly Field ReferenceId = Fields.ReferenceId; - - public static readonly Field Dimensions = Fields.Dimensions; - - public static readonly Field Urls = Fields.Urls; - - public static readonly Field MimeType = Fields.MimeType; - - public static readonly Field SourceUrl = Fields.SourceUrl; - - public static readonly Field Name = Fields.Name; - - public static readonly Field FileSize = Fields.FileSize; - - public static readonly Field CreationTime = Fields.CreationTime; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Media types - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Media.MediaType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaMediaType - { - /// Audio file. - /// - AUDIO = 0, - /// Animated image, such as animated GIF. - /// - DYNAMIC_IMAGE = 1, - /// Small image; used for map ad. - /// - ICON = 2, - /// Static image; for image ad. - /// - IMAGE = 3, - /// Predefined standard icon; used for map ads. - /// - STANDARD_ICON = 4, - /// Video file. - /// - VIDEO = 5, - /// ZIP file; used in fields of template ads. - /// - MEDIA_BUNDLE = 6, - } - - - /// This represents an entry in a map with a key of type Size and value of type - /// Dimensions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Media_Size_DimensionsMapEntry - { - private MediaSize keyField; - - private bool keyFieldSpecified; - - private Dimensions valueField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MediaSize key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - this.keySpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool keySpecified - { - get - { - return this.keyFieldSpecified; - } - set - { - this.keyFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Dimensions value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - /// Sizes for retrieving the original media - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Media.Size", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaSize - { - /// Full size of Media. - /// - FULL = 0, - /// Shunken size of media. - /// - SHRUNKEN = 1, - /// Preview size of media. - /// - PREVIEW = 2, - /// Video thumbnail size of Media. - /// - VIDEO_THUMBNAIL = 3, - } - - - /// Represents a simple height-width dimension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Dimensions - { - private int widthField; - - private bool widthFieldSpecified; - - private int heightField; - - private bool heightFieldSpecified; - - /// Width of the dimension This field can be - /// selected using the value "Width". This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int width - { - get - { - return this.widthField; - } - set - { - this.widthField = value; - this.widthSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool widthSpecified - { - get - { - return this.widthFieldSpecified; - } - set - { - this.widthFieldSpecified = value; - } - } - - /// Height of the dimension This field can be - /// selected using the value "Height". This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int height - { - get - { - return this.heightField; - } - set - { - this.heightField = value; - this.heightSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool heightSpecified - { - get - { - return this.heightFieldSpecified; - } - set - { - this.heightFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Width = new Field("Width", false, true); - - public static readonly Field Height = new Field("Height", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Width = Fields.Width; - - public static readonly Field Height = Fields.Height; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// This represents an entry in a map with a key of type Size and value of type - /// String. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Media_Size_StringMapEntry - { - private MediaSize keyField; - - private bool keyFieldSpecified; - - private string valueField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MediaSize key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - this.keySpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool keySpecified - { - get - { - return this.keyFieldSpecified; - } - set - { - this.keyFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - /// Mime types - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Media.LegacyMimeType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaLegacyMimeType - { - /// MIME type of image/jpeg - /// - IMAGE_JPEG = 0, - /// MIME type of image/gif - /// - IMAGE_GIF = 1, - /// MIME type of image/png - /// - IMAGE_PNG = 2, - /// MIME type of application/x-shockwave-flash - /// - FLASH = 3, - /// MIME type of text/html - /// - TEXT_HTML = 4, - /// MIME type of application/pdf - /// - PDF = 5, - /// MIME type of application/msword - /// - MSWORD = 6, - /// MIME type of application/vnd.ms-excel - /// - MSEXCEL = 7, - /// MIME type of application/rtf - /// - RTF = 8, - /// MIME type of audio/wav - /// - AUDIO_WAV = 9, - /// MIME type of audio/mp3 - /// - AUDIO_MP3 = 10, - /// MIME type of application/x-html5-ad-zip - /// - HTML5_AD_ZIP = 11, - } - - - /// Encapsulates a Video media identified by a MediaId. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Video : Media - { - private long durationMillisField; - - private bool durationMillisFieldSpecified; - - private string streamingUrlField; - - private bool readyToPlayOnTheWebField; - - private bool readyToPlayOnTheWebFieldSpecified; - - private string industryStandardCommercialIdentifierField; - - private string advertisingIdField; - - private string youTubeVideoIdStringField; - - /// The duration of the associated video, in milliseconds. This field can be selected using the value "DurationMillis". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long durationMillis - { - get - { - return this.durationMillisField; - } - set - { - this.durationMillisField = value; - this.durationMillisSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool durationMillisSpecified - { - get - { - return this.durationMillisFieldSpecified; - } - set - { - this.durationMillisFieldSpecified = value; - } - } - - /// Streaming URL for the video. This field can - /// be selected using the value "StreamingUrl". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string streamingUrl - { - get - { - return this.streamingUrlField; - } - set - { - this.streamingUrlField = value; - } - } - - /// Indicates whether the video is ready to play on the web. This field can be selected using the value - /// "ReadyToPlayOnTheWeb". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool readyToPlayOnTheWeb - { - get - { - return this.readyToPlayOnTheWebField; - } - set - { - this.readyToPlayOnTheWebField = value; - this.readyToPlayOnTheWebSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool readyToPlayOnTheWebSpecified - { - get - { - return this.readyToPlayOnTheWebFieldSpecified; - } - set - { - this.readyToPlayOnTheWebFieldSpecified = value; - } - } - - /// The Industry Standard Commercial Identifier code for this media, used mainly for - /// television commercials. This field can be - /// selected using the value "IndustryStandardCommercialIdentifier". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string industryStandardCommercialIdentifier - { - get - { - return this.industryStandardCommercialIdentifierField; - } - set - { - this.industryStandardCommercialIdentifierField = value; - } - } - - /// The Advertising Digital Identification code for this media, as defined by the - /// American Association of Advertising Agencies, used mainly for television - /// commercials. This field can be selected - /// using the value "AdvertisingId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string advertisingId - { - get - { - return this.advertisingIdField; - } - set - { - this.advertisingIdField = value; - } - } - - /// For YouTube-hosted videos, the YouTube video ID (as seen in YouTube URLs) may - /// also be filled in. This field can be - /// selected using the value "YouTubeVideoIdString". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string youTubeVideoIdString - { - get - { - return this.youTubeVideoIdStringField; - } - set - { - this.youTubeVideoIdStringField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Media.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field DurationMillis = new Field("DurationMillis", false, true); - - public static readonly Field StreamingUrl = new Field("StreamingUrl", false, true); - - public static readonly Field ReadyToPlayOnTheWeb = new Field("ReadyToPlayOnTheWeb", false, true); - - public static readonly Field IndustryStandardCommercialIdentifier = new Field("IndustryStandardCommercialIdentifier", false, true); - - public static readonly Field AdvertisingId = new Field("AdvertisingId", false, true); - - public static readonly Field YouTubeVideoIdString = new Field("YouTubeVideoIdString", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Media.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field DurationMillis = Fields.DurationMillis; - - public static readonly Field StreamingUrl = Fields.StreamingUrl; - - public static readonly Field ReadyToPlayOnTheWeb = Fields.ReadyToPlayOnTheWeb; - - public static readonly Field IndustryStandardCommercialIdentifier = Fields.IndustryStandardCommercialIdentifier; - - public static readonly Field AdvertisingId = Fields.AdvertisingId; - - public static readonly Field YouTubeVideoIdString = Fields.YouTubeVideoIdString; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Media.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a ZIP archive media the content of which contains HTML5 assets. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MediaBundle : Media - { - private byte[] dataField; - - private string mediaBundleUrlField; - - private string entryPointField; - - /// Raw zipped data. - /// - [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", Order = 0)] - public byte[] data - { - get - { - return this.dataField; - } - set - { - this.dataField = value; - } - } - - /// URL pointing to the data for the MediaBundle data. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string mediaBundleUrl - { - get - { - return this.mediaBundleUrlField; - } - set - { - this.mediaBundleUrlField = value; - } - } - - /// Entry in the ZIP archive used to display the MediaBundle in an - /// Ad. This field can only be set and returned when the - /// MediaBundle is used with the AdGroupAdService. If this - /// field is set when calling MediaService, an error will be returned. - ///

To use a MediaBundle that was created with the - /// MediaService in an Ad, create a bundle and set the - /// mediaId and entryPoint fields.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string entryPoint - { - get - { - return this.entryPointField; - } - set - { - this.entryPointField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Media.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Media.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Media.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Encapsulates an Image media. For SET,REMOVE operations - /// in MediaService, use mediaId. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Image : Media - { - private byte[] dataField; - - /// Raw image data. - /// - [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", Order = 0)] - public byte[] data - { - get - { - return this.dataField; - } - set - { - this.dataField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Media.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Media.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Media.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Encapsulates an Audio media identified by a MediaId. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Audio : Media - { - private long durationMillisField; - - private bool durationMillisFieldSpecified; - - private string streamingUrlField; - - private bool readyToPlayOnTheWebField; - - private bool readyToPlayOnTheWebFieldSpecified; - - /// The duration of the associated audio, in milliseconds. This field can be selected using the value - /// "DurationMillis".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long durationMillis - { - get - { - return this.durationMillisField; - } - set - { - this.durationMillisField = value; - this.durationMillisSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool durationMillisSpecified - { - get - { - return this.durationMillisFieldSpecified; - } - set - { - this.durationMillisFieldSpecified = value; - } - } - - /// The streaming URL of the audio. This field - /// can be selected using the value "StreamingUrl". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string streamingUrl - { - get - { - return this.streamingUrlField; - } - set - { - this.streamingUrlField = value; - } - } - - /// Indicates whether the audio is ready to play on the web. This field can be selected using the value - /// "ReadyToPlayOnTheWeb". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool readyToPlayOnTheWeb - { - get - { - return this.readyToPlayOnTheWebField; - } - set - { - this.readyToPlayOnTheWebField = value; - this.readyToPlayOnTheWebSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool readyToPlayOnTheWebSpecified - { - get - { - return this.readyToPlayOnTheWebFieldSpecified; - } - set - { - this.readyToPlayOnTheWebFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Media.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field DurationMillis = new Field("DurationMillis", true, true); - - public static readonly Field StreamingUrl = new Field("StreamingUrl", false, true); - - public static readonly Field ReadyToPlayOnTheWeb = new Field("ReadyToPlayOnTheWeb", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Media.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field DurationMillis = Fields.DurationMillis; - - public static readonly Field StreamingUrl = Fields.StreamingUrl; - - public static readonly Field ReadyToPlayOnTheWeb = Fields.ReadyToPlayOnTheWeb; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Media.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field DurationMillis = Fields.DurationMillis; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an element in a template. Each template element is composed of a list - /// of fields (actual value data). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TemplateElement - { - private string uniqueNameField; - - private TemplateElementField[] fieldsField; - - /// Unique name for this element. This field can - /// be selected using the value "UniqueName". This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string uniqueName - { - get - { - return this.uniqueNameField; - } - set - { - this.uniqueNameField = value; - } - } - - /// List of fields to use for this template element. These must be the same for all - /// template ads in the same template ad union. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("fields", Order = 1)] - public TemplateElementField[] fields - { - get - { - return this.fieldsField; - } - set - { - this.fieldsField = value; - } - } - } - - - /// Represents an id indicating a grouping of Ads under some heuristic. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TempAdUnionId))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdUnionId - { - private long idField; - - private bool idFieldSpecified; - - private string adUnionIdTypeField; - - /// The ID of the ad union This field must be - /// greater than or equal to 1. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of AdUnionId. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("AdUnionId.Type", Order = 1)] - public string AdUnionIdType - { - get - { - return this.adUnionIdTypeField; - } - set - { - this.adUnionIdTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the temporary id for an ad union id, which the user can specify. The - /// temporary id can be used to group ads together during ad creation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TempAdUnionId : AdUnionId - { - } - - - /// Represents Dynamic Settings. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DynamicSettings - { - private Image landscapeLogoImageField; - - private string pricePrefixField; - - private string promoTextField; - - /// Landscape logo image. This ad format does not allow the creation of an image - /// using the Image.data field. An image must first be created using the - /// MediaService, and Image.mediaId must be populated when creating a "DynamicSettings". Valid image types are GIF, JPEG, - /// and PNG. The minimum size is 512x128 the aspect ratio must be 512:128 (+-1%). - /// This field can be selected using the value - /// "LandscapeLogoImage". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Image landscapeLogoImage - { - get - { - return this.landscapeLogoImageField; - } - set - { - this.landscapeLogoImageField = value; - } - } - - /// Prefix before price. Maximum display width is 10. example, "as low as". This field can be selected using the value - /// "PricePrefix".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string pricePrefix - { - get - { - return this.pricePrefixField; - } - set - { - this.pricePrefixField = value; - } - } - - /// Promotion text used for dynamic formats of responsive ads. Maximum display width - /// is 25. For example, "Free two-day shipping". This field can be selected using the value "PromoText".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string promoText - { - get - { - return this.promoTextField; - } - set - { - this.promoTextField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field LandscapeLogoImage = new Field("LandscapeLogoImage", false, true); - - public static readonly Field PricePrefix = new Field("PricePrefix", true, true); - - public static readonly Field PromoText = new Field("PromoText", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field LandscapeLogoImage = Fields.LandscapeLogoImage; - - public static readonly Field PricePrefix = Fields.PricePrefix; - - public static readonly Field PromoText = Fields.PromoText; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field PricePrefix = Fields.PricePrefix; - - public static readonly Field PromoText = Fields.PromoText; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Common policy summary information attached to a generic entity. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssetPolicySummaryInfo))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemPolicySummary))] - public abstract partial class PolicySummaryInfo - { - private PolicyTopicEntry[] policyTopicEntriesField; - - private PolicySummaryReviewState reviewStateField; - - private bool reviewStateFieldSpecified; - - private PolicySummaryDenormalizedStatus denormalizedStatusField; - - private bool denormalizedStatusFieldSpecified; - - private PolicyApprovalStatus combinedApprovalStatusField; - - private bool combinedApprovalStatusFieldSpecified; - - private string policySummaryInfoTypeField; - - /// List of policy findings. - /// - [System.Xml.Serialization.XmlElementAttribute("policyTopicEntries", Order = 0)] - public PolicyTopicEntry[] policyTopicEntries - { - get - { - return this.policyTopicEntriesField; - } - set - { - this.policyTopicEntriesField = value; - } - } - - /// Progress through the review process. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public PolicySummaryReviewState reviewState - { - get - { - return this.reviewStateField; - } - set - { - this.reviewStateField = value; - this.reviewStateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reviewStateSpecified - { - get - { - return this.reviewStateFieldSpecified; - } - set - { - this.reviewStateFieldSpecified = value; - } - } - - /// Overall review status based on the policy topic entries. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public PolicySummaryDenormalizedStatus denormalizedStatus - { - get - { - return this.denormalizedStatusField; - } - set - { - this.denormalizedStatusField = value; - this.denormalizedStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool denormalizedStatusSpecified - { - get - { - return this.denormalizedStatusFieldSpecified; - } - set - { - this.denormalizedStatusFieldSpecified = value; - } - } - - /// Approval status that combines review state and status. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public PolicyApprovalStatus combinedApprovalStatus - { - get - { - return this.combinedApprovalStatusField; - } - set - { - this.combinedApprovalStatusField = value; - this.combinedApprovalStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool combinedApprovalStatusSpecified - { - get - { - return this.combinedApprovalStatusFieldSpecified; - } - set - { - this.combinedApprovalStatusFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of PolicySummaryInfo. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("PolicySummaryInfo.Type", Order = 4)] - public string PolicySummaryInfoType - { - get - { - return this.policySummaryInfoTypeField; - } - set - { - this.policySummaryInfoTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Policy summary information attached to an asset-entity link. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetPolicySummaryInfo : PolicySummaryInfo - { - } - - - /// Information about an image asset in specfic dimensions, either original or - /// resized. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ImageDimensionInfo - { - private int imageHeightField; - - private bool imageHeightFieldSpecified; - - private int imageWidthField; - - private bool imageWidthFieldSpecified; - - private string imageUrlField; - - /// Height of the image. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int imageHeight - { - get - { - return this.imageHeightField; - } - set - { - this.imageHeightField = value; - this.imageHeightSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool imageHeightSpecified - { - get - { - return this.imageHeightFieldSpecified; - } - set - { - this.imageHeightFieldSpecified = value; - } - } - - /// Width of the image. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int imageWidth - { - get - { - return this.imageWidthField; - } - set - { - this.imageWidthField = value; - this.imageWidthSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool imageWidthSpecified - { - get - { - return this.imageWidthFieldSpecified; - } - set - { - this.imageWidthFieldSpecified = value; - } - } - - /// URL pointing to the image in the specified height & width. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string imageUrl - { - get - { - return this.imageUrlField; - } - set - { - this.imageUrlField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ImageHeight = new Field("ImageHeight", true, true); - - public static readonly Field ImageWidth = new Field("ImageWidth", true, true); - - public static readonly Field ImageFullSizeUrl = new Field("ImageFullSizeUrl", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ImageHeight = Fields.ImageHeight; - - public static readonly Field ImageWidth = Fields.ImageWidth; - - public static readonly Field ImageFullSizeUrl = Fields.ImageFullSizeUrl; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ImageHeight = Fields.ImageHeight; - - public static readonly Field ImageWidth = Fields.ImageWidth; - - public static readonly Field ImageFullSizeUrl = Fields.ImageFullSizeUrl; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an asset. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TextAsset))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ImageAsset))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Asset - { - private long assetIdField; - - private bool assetIdFieldSpecified; - - private string assetNameField; - - private AssetType assetSubtypeField; - - private bool assetSubtypeFieldSpecified; - - private AssetStatus assetStatusField; - - private bool assetStatusFieldSpecified; - - private string assetTypeField; - - /// Id of this asset. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long assetId - { - get - { - return this.assetIdField; - } - set - { - this.assetIdField = value; - this.assetIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool assetIdSpecified - { - get - { - return this.assetIdFieldSpecified; - } - set - { - this.assetIdFieldSpecified = value; - } - } - - /// Optional name of the asset which can act as a unique identifier. Asset names must not contain any null (code - /// point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) - /// characters. This is checked by the regular expression '[^\x00\x0A\x0D]*'. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string assetName - { - get - { - return this.assetNameField; - } - set - { - this.assetNameField = value; - } - } - - /// Asset type. Used for returning asset type and filtering by asset type in GET. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public AssetType assetSubtype - { - get - { - return this.assetSubtypeField; - } - set - { - this.assetSubtypeField = value; - this.assetSubtypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool assetSubtypeSpecified - { - get - { - return this.assetSubtypeFieldSpecified; - } - set - { - this.assetSubtypeFieldSpecified = value; - } - } - - /// Asset status. This status does NOT affect serving, and is only meant to be a - /// "library status." To stop an asset from serving, you need to remove the asset - /// from the entity that is using it. This field - /// is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public AssetStatus assetStatus - { - get - { - return this.assetStatusField; - } - set - { - this.assetStatusField = value; - this.assetStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool assetStatusSpecified - { - get - { - return this.assetStatusFieldSpecified; - } - set - { - this.assetStatusFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of Asset. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Asset.Type", Order = 4)] - public string AssetType - { - get - { - return this.assetTypeField; - } - set - { - this.assetTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AssetId = new Field("AssetId", true, true); - - public static readonly Field AssetName = new Field("AssetName", true, true); - - public static readonly Field AssetSubtype = new Field("AssetSubtype", true, true); - - public static readonly Field AssetStatus = new Field("AssetStatus", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AssetId = Fields.AssetId; - - public static readonly Field AssetName = Fields.AssetName; - - public static readonly Field AssetSubtype = Fields.AssetSubtype; - - public static readonly Field AssetStatus = Fields.AssetStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AssetId = Fields.AssetId; - - public static readonly Field AssetName = Fields.AssetName; - - public static readonly Field AssetSubtype = Fields.AssetSubtype; - - public static readonly Field AssetStatus = Fields.AssetStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Asset type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Asset.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AssetType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Text asset - /// - TEXT = 1, - /// Image asset - /// - IMAGE = 2, - } - - - /// The status of an Asset. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AssetStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - ENABLED = 3, - REMOVED = 2, - } - - - /// Represents a text asset. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TextAsset : Asset - { - private string assetTextField; - - /// Text of the text asset. This field is required - /// and should not be null when it is contained within Operators : ADD. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string assetText - { - get - { - return this.assetTextField; - } - set - { - this.assetTextField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Asset.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Asset.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Asset.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an image asset. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ImageAsset : Asset - { - private byte[] imageDataField; - - private long imageFileSizeField; - - private bool imageFileSizeFieldSpecified; - - private MediaMimeType imageMimeTypeField; - - private bool imageMimeTypeFieldSpecified; - - private ImageDimensionInfo fullSizeInfoField; - - /// The raw data of an image. Mutate only field. - /// - [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", Order = 0)] - public byte[] imageData - { - get - { - return this.imageDataField; - } - set - { - this.imageDataField = value; - } - } - - /// File size of the image. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long imageFileSize - { - get - { - return this.imageFileSizeField; - } - set - { - this.imageFileSizeField = value; - this.imageFileSizeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool imageFileSizeSpecified - { - get - { - return this.imageFileSizeFieldSpecified; - } - set - { - this.imageFileSizeFieldSpecified = value; - } - } - - /// The mime type of the image. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public MediaMimeType imageMimeType - { - get - { - return this.imageMimeTypeField; - } - set - { - this.imageMimeTypeField = value; - this.imageMimeTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool imageMimeTypeSpecified - { - get - { - return this.imageMimeTypeFieldSpecified; - } - set - { - this.imageMimeTypeFieldSpecified = value; - } - } - - /// Information specific to the image in its original, "full" size dimensions. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public ImageDimensionInfo fullSizeInfo - { - get - { - return this.fullSizeInfoField; - } - set - { - this.fullSizeInfoField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Asset.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ImageFileSize = new Field("ImageFileSize", true, true); - - public static readonly Field ImageMimeType = new Field("ImageMimeType", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Asset.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ImageFileSize = Fields.ImageFileSize; - - public static readonly Field ImageMimeType = Fields.ImageMimeType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Asset.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ImageFileSize = Fields.ImageFileSize; - - public static readonly Field ImageMimeType = Fields.ImageMimeType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The mime type of a media. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaMimeType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 12, - /// MIME type of image/jpeg. - /// - IMAGE_JPEG = 0, - /// MIME type of image/gif. - /// - IMAGE_GIF = 1, - /// MIME type of image/png. - /// - IMAGE_PNG = 2, - } - - - /// Represents an asset link. This class contains an asset and information that is - /// specific to an asset-entity link (e.g. policy information). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetLink - { - private Asset assetField; - - private ServedAssetFieldType pinnedFieldField; - - private bool pinnedFieldFieldSpecified; - - private AssetPolicySummaryInfo assetPolicySummaryInfoField; - - private AssetPerformanceLabel assetPerformanceLabelField; - - private bool assetPerformanceLabelFieldSpecified; - - /// Asset contained in this AssetLink. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Asset asset - { - get - { - return this.assetField; - } - set - { - this.assetField = value; - } - } - - /// The pinned field of the Asset. This restricts the Asset to only serve within - /// this field. Multiple Assets can be pinned to the same field. An Asset that is - /// unpinned or pinned to a different field will not serve in a field that has at - /// least one asset pinned to it. This field is optional. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ServedAssetFieldType pinnedField - { - get - { - return this.pinnedFieldField; - } - set - { - this.pinnedFieldField = value; - this.pinnedFieldSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool pinnedFieldSpecified - { - get - { - return this.pinnedFieldFieldSpecified; - } - set - { - this.pinnedFieldFieldSpecified = value; - } - } - - /// Approval information contained in this AssetLink. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public AssetPolicySummaryInfo assetPolicySummaryInfo - { - get - { - return this.assetPolicySummaryInfoField; - } - set - { - this.assetPolicySummaryInfoField = value; - } - } - - /// Performance label for the asset. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public AssetPerformanceLabel assetPerformanceLabel - { - get - { - return this.assetPerformanceLabelField; - } - set - { - this.assetPerformanceLabelField = value; - this.assetPerformanceLabelSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool assetPerformanceLabelSpecified - { - get - { - return this.assetPerformanceLabelFieldSpecified; - } - set - { - this.assetPerformanceLabelFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Indicates the purpose, placement, or field for which an asset is used when - /// serving in an ad. Each value in this enum indicates one possible way the asset - /// can serve. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ServedAssetFieldType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The asset is not placed in a specific field. This can be used to clear a - /// pinnedField. - /// - NONE = 1, - /// The asset was used in headline 1. - /// - HEADLINE_1 = 2, - /// The asset was used in headline 2. - /// - HEADLINE_2 = 3, - /// The asset was used in headline 3. - /// - HEADLINE_3 = 4, - /// The asset was used in description 1. - /// - DESCRIPTION_1 = 5, - /// The asset was used in description 2. - /// - DESCRIPTION_2 = 6, - } - - - /// The performance label of an asset, usually computed in the context of a linkage. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AssetPerformanceLabel - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// This asset does not yet have any performance info. This may be because it is - /// still under review. - /// - PENDING = 1, - /// The asset has started getting impressions; but the stats are not statistically - /// significant enough to assign a label. - /// - LEARNING = 2, - /// Worst performing assets. - /// - LOW = 3, - /// Medium performing assets. - /// - GOOD = 4, - /// Best performing assets. - /// - BEST = 5, - } - - - /// Represents product image specific data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductImage - { - private Image productImageField; - - private string descriptionField; - - private DisplayCallToAction displayCallToActionField; - - /// Product image. An image must first be created using the MediaService, and - /// Image.mediaId must be populated when creating a "ProductImage". Valid image types are GIF, JPEG, and - /// PNG. The minimum size is 300x300 and the aspect ratio must be 1:1 (+-1%). This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Image productImage - { - get - { - return this.productImageField; - } - set - { - this.productImageField = value; - } - } - - /// Description of the product. Maximum display width is 15 characters. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// Display-call-to-action of the product image. The DisplayCallToAction.textColor - /// field cannot be set when setting this field. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public DisplayCallToAction displayCallToAction - { - get - { - return this.displayCallToActionField; - } - set - { - this.displayCallToActionField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents display-call-to-action specific data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DisplayCallToAction - { - private string textField; - - private string textColorField; - - private string urlIdField; - - /// Text of the display-call-to-action. Maximum display width is 15 characters. - /// This field can be selected using the value - /// "MarketingImageCallToActionText".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string text - { - get - { - return this.textField; - } - set - { - this.textField = value; - } - } - - /// Text color of the display-call-to-action. In hexadecimal, e.g. #ffffff for - /// white. This field can be selected using the - /// value "MarketingImageCallToActionTextColor".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string textColor - { - get - { - return this.textColorField; - } - set - { - this.textColorField = value; - } - } - - /// Identifies the url data in Ad.urlData used for this DisplayCallToAction. If not - /// set, the url defaults to Ad#finalUrls. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string urlId - { - get - { - return this.urlIdField; - } - set - { - this.urlIdField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field MarketingImageCallToActionText = new Field("MarketingImageCallToActionText", true, true); - - public static readonly Field MarketingImageCallToActionTextColor = new Field("MarketingImageCallToActionTextColor", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field MarketingImageCallToActionText = Fields.MarketingImageCallToActionText; - - public static readonly Field MarketingImageCallToActionTextColor = Fields.MarketingImageCallToActionTextColor; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field MarketingImageCallToActionText = Fields.MarketingImageCallToActionText; - - public static readonly Field MarketingImageCallToActionTextColor = Fields.MarketingImageCallToActionTextColor; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents Gmail teaser specific data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GmailTeaser - { - private string headlineField; - - private string descriptionField; - - private string businessNameField; - - private Image logoImageField; - - /// Headline of the teaser. Maximum display width is 25 characters. This field can be selected using the value - /// "GmailTeaserHeadline". This field can be selected using the value - /// "DisplayUploadAdGmailTeaserHeadline".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string headline - { - get - { - return this.headlineField; - } - set - { - this.headlineField = value; - } - } - - /// Description of the teaser. Maximum display width is 90 characters. This field can be selected using the value - /// "GmailTeaserDescription". This field can be selected using the value - /// "DisplayUploadAdGmailTeaserDescription".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// Business name of the advertiser. Maximum display width is 20 characters. This field can be selected using the value - /// "GmailTeaserBusinessName". This field can be selected using the value - /// "DisplayUploadAdGmailTeaserBusinessName".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string businessName - { - get - { - return this.businessNameField; - } - set - { - this.businessNameField = value; - } - } - - /// Required. Logo image. An image must first be created using the MediaService, and - /// Image.mediaId must be populated when creating a "GmailTeaser". Valid image types are GIF, JPEG, and - /// PNG. The minimum size is 144x144 and the aspect ratio must be 1:1 (+-1%). - /// Required. This field can be selected using - /// the value "GmailTeaserLogoImage". This field can be selected using the value - /// "DisplayUploadAdGmailTeaserLogoImage". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public Image logoImage - { - get - { - return this.logoImageField; - } - set - { - this.logoImageField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field GmailTeaserHeadline = new Field("GmailTeaserHeadline", true, true); - - public static readonly Field GmailTeaserDescription = new Field("GmailTeaserDescription", true, true); - - public static readonly Field GmailTeaserBusinessName = new Field("GmailTeaserBusinessName", true, true); - - public static readonly Field GmailTeaserLogoImage = new Field("GmailTeaserLogoImage", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field GmailTeaserHeadline = Fields.GmailTeaserHeadline; - - public static readonly Field GmailTeaserDescription = Fields.GmailTeaserDescription; - - public static readonly Field GmailTeaserBusinessName = Fields.GmailTeaserBusinessName; - - public static readonly Field GmailTeaserLogoImage = Fields.GmailTeaserLogoImage; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field GmailTeaserHeadline = Fields.GmailTeaserHeadline; - - public static readonly Field GmailTeaserDescription = Fields.GmailTeaserDescription; - - public static readonly Field GmailTeaserBusinessName = Fields.GmailTeaserBusinessName; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Holds a set of final urls that are scoped within a namespace. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UrlData - { - private string urlIdField; - - private string[] finalUrlsField; - - private string[] finalMobileUrlsField; - - private string trackingUrlTemplateField; - - /// Unique identifier for this instance of UrlData. Refer to the - /// Template Ads documentation for the list of valid values. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string urlId - { - get - { - return this.urlIdField; - } - set - { - this.urlIdField = value; - } - } - - /// A list of final landing page urls. - /// - [System.Xml.Serialization.XmlArrayAttribute(Order = 1)] - [System.Xml.Serialization.XmlArrayItemAttribute("urls", IsNullable = false)] - public string[] finalUrls - { - get - { - return this.finalUrlsField; - } - set - { - this.finalUrlsField = value; - } - } - - /// A list of final mobile landing page urls. - /// - [System.Xml.Serialization.XmlArrayAttribute(Order = 2)] - [System.Xml.Serialization.XmlArrayItemAttribute("urls", IsNullable = false)] - public string[] finalMobileUrls - { - get - { - return this.finalMobileUrlsField; - } - set - { - this.finalMobileUrlsField = value; - } - } - - /// URL template for constructing a tracking URL. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// CustomParameter is used to map a custom parameter key to its value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomParameter - { - private string keyField; - - private string valueField; - - private bool isRemoveField; - - private bool isRemoveFieldSpecified; - - /// The parameter key to be mapped. This field is - /// required and should not be null. The length of this string should be between 1 and 16, inclusive, - /// in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - /// The value this parameter should be mapped to. It should be null if isRemove is - /// true. The length of this string should be - /// between 0 and 200, inclusive, in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// On SET operation, indicates that the parameter should be removed from the - /// existing parameters. If set to true, the value field must be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool isRemove - { - get - { - return this.isRemoveField; - } - set - { - this.isRemoveField = value; - this.isRemoveSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isRemoveSpecified - { - get - { - return this.isRemoveFieldSpecified; - } - set - { - this.isRemoveFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// CustomParameters holds a list of CustomParameters to be treated as a map. It has - /// a special field used to indicate that the current map should be cleared and - /// replaced with this new map. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomParameters - { - private CustomParameter[] parametersField; - - private bool doReplaceField; - - private bool doReplaceFieldSpecified; - - /// The list of custom parameters.

On update, all parameters can be cleared by - /// providing an empty or null list and setting doReplace to true.

- ///
- [System.Xml.Serialization.XmlElementAttribute("parameters", Order = 0)] - public CustomParameter[] parameters - { - get - { - return this.parametersField; - } - set - { - this.parametersField = value; - } - } - - /// On SET operation, indicates that the current parameters should be cleared and - /// replaced with these parameters. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool doReplace - { - get - { - return this.doReplaceField; - } - set - { - this.doReplaceField = value; - this.doReplaceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool doReplaceSpecified - { - get - { - return this.doReplaceFieldSpecified; - } - set - { - this.doReplaceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A URL for deep linking into an app for the given operating system. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AppUrl - { - private string urlField; - - private AppUrlOsType osTypeField; - - private bool osTypeFieldSpecified; - - /// The app deep link url. E.g. "android-app://com.my.App" - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string url - { - get - { - return this.urlField; - } - set - { - this.urlField = value; - } - } - - /// The operating system targeted by this url. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public AppUrlOsType osType - { - get - { - return this.osTypeField; - } - set - { - this.osTypeField = value; - this.osTypeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool osTypeSpecified - { - get - { - return this.osTypeFieldSpecified; - } - set - { - this.osTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The possible os types for an AppUrl - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AppUrl.OsType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AppUrlOsType - { - /// The Apple IOS operating system, - /// - OS_TYPE_IOS = 0, - /// The Android operating system. - /// - OS_TYPE_ANDROID = 1, - UNKNOWN = 2, - } - - - /// The base class of all ad types. Ads are created using the - /// AdGroupAdService. Some ad types such as s may be - /// modified using the AdService.

When calling - /// AdGroupAdService to update the of an - /// AdGroupAd, you can construct an Ad object (instead of - /// the Ad's concrete type) with the #id field set. - /// This is enabled for AdX.

- ///
- [System.Xml.Serialization.XmlIncludeAttribute(typeof(DynamicSearchAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResponsiveSearchAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(GoalOptimizedShoppingAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TextAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TemplateAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ShowcaseAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RichMediaAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ThirdPartyRedirectAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResponsiveDisplayAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MultiAssetResponsiveDisplayAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ImageAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(GmailAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExpandedTextAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExpandedDynamicSearchAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DeprecatedAd))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CallOnlyAd))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Ad - { - private long idField; - - private bool idFieldSpecified; - - private string urlField; - - private string displayUrlField; - - private string[] finalUrlsField; - - private string[] finalMobileUrlsField; - - private AppUrl[] finalAppUrlsField; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private CustomParameters urlCustomParametersField; - - private UrlData[] urlDataField; - - private bool automatedField; - - private bool automatedFieldSpecified; - - private AdType typeField; - - private bool typeFieldSpecified; - - private long devicePreferenceField; - - private bool devicePreferenceFieldSpecified; - - private SystemManagedEntitySource systemManagedEntitySourceField; - - private bool systemManagedEntitySourceFieldSpecified; - - private string adTypeField; - - /// ID of this ad. This field is ignored when creating ads using . - /// This field can be selected using the value - /// "Id".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Destination URL.

Do not set this field if you are using upgraded URLs, as - /// described at: - /// https://developers.google.com/adwords/api/docs/guides/upgraded-urls This field can be selected using the value - /// "Url".This field can be filtered - /// on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string url - { - get - { - return this.urlField; - } - set - { - this.urlField = value; - } - } - - /// Visible URL. This field can be selected - /// using the value "DisplayUrl".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string displayUrl - { - get - { - return this.displayUrlField; - } - set - { - this.displayUrlField = value; - } - } - - /// A list of possible final URLs after all cross domain redirects.

This field is - /// used for upgraded urls only, as described at: - /// https://developers.google.com/adwords/api/docs/guides/upgraded-urls This field can be selected using the value - /// "CreativeFinalUrls".This field can be - /// filtered on. The maximum size of - /// this collection is 10.

- ///
- [System.Xml.Serialization.XmlElementAttribute("finalUrls", Order = 3)] - public string[] finalUrls - { - get - { - return this.finalUrlsField; - } - set - { - this.finalUrlsField = value; - } - } - - /// A list of possible final mobile URLs after all cross domain redirects.

This - /// field is used for upgraded urls only, as described at: - /// https://developers.google.com/adwords/api/docs/guides/upgraded-urls This field can be selected using the value - /// "CreativeFinalMobileUrls".This field - /// can be filtered on. The maximum - /// size of this collection is 10.

- ///
- [System.Xml.Serialization.XmlElementAttribute("finalMobileUrls", Order = 4)] - public string[] finalMobileUrls - { - get - { - return this.finalMobileUrlsField; - } - set - { - this.finalMobileUrlsField = value; - } - } - - /// A list of final app URLs that will be used on mobile if the user has the - /// specific app installed.

This field is used for upgraded urls only, as - /// described at: - /// https://developers.google.com/adwords/api/docs/guides/upgraded-urls This field can be selected using the value - /// "CreativeFinalAppUrls".This field can - /// be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute("finalAppUrls", Order = 5)] - public AppUrl[] finalAppUrls - { - get - { - return this.finalAppUrlsField; - } - set - { - this.finalAppUrlsField = value; - } - } - - /// URL template for constructing a tracking URL.

This field is used for upgraded - /// urls only, as described at: - /// https://developers.google.com/adwords/api/docs/guides/upgraded-urls This field can be selected using the value - /// "CreativeTrackingUrlTemplate".This - /// field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// URL template for appending params to Final URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "CreativeFinalUrlSuffix".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls.

This field is used - /// for upgraded urls only, as described at: - /// https://developers.google.com/adwords/api/docs/guides/upgraded-urls This field can be selected using the value - /// "CreativeUrlCustomParameters".This - /// field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public CustomParameters urlCustomParameters - { - get - { - return this.urlCustomParametersField; - } - set - { - this.urlCustomParametersField = value; - } - } - - /// Additional urls for the ad that are tagged with a unique identifier. Currently - /// only used for TemplateAds for specific template IDs. For all other ad types, use - /// finalUrls, finalMobileUrls and finalAppUrls instead. This field can be selected using the value "UrlData". - /// - [System.Xml.Serialization.XmlElementAttribute("urlData", Order = 9)] - public UrlData[] urlData - { - get - { - return this.urlDataField; - } - set - { - this.urlDataField = value; - } - } - - /// Indicates if this ad was added by AdWords. This field can be selected using the value "Automated".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public bool automated - { - get - { - return this.automatedField; - } - set - { - this.automatedField = value; - this.automatedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool automatedSpecified - { - get - { - return this.automatedFieldSpecified; - } - set - { - this.automatedFieldSpecified = value; - } - } - - /// Type of ad. This field can be selected using - /// the value "AdType".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public AdType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// The device preference for the ad. You can only specify a preference for mobile - /// devices (CriterionId 30001). If unspecified (no device preference), all devices - /// are targeted. This field can be selected - /// using the value "DevicePreference".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public long devicePreference - { - get - { - return this.devicePreferenceField; - } - set - { - this.devicePreferenceField = value; - this.devicePreferenceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool devicePreferenceSpecified - { - get - { - return this.devicePreferenceFieldSpecified; - } - set - { - this.devicePreferenceFieldSpecified = value; - } - } - - /// The source of this system-managed ad. This - /// field can be selected using the value "SystemManagedEntitySource".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public SystemManagedEntitySource systemManagedEntitySource - { - get - { - return this.systemManagedEntitySourceField; - } - set - { - this.systemManagedEntitySourceField = value; - this.systemManagedEntitySourceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool systemManagedEntitySourceSpecified - { - get - { - return this.systemManagedEntitySourceFieldSpecified; - } - set - { - this.systemManagedEntitySourceFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of Ad. Although this field is returned - /// in the response, it is ignored on input and cannot be selected. Specify xsi:type - /// instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Ad.Type", Order = 14)] - public string AdType - { - get - { - return this.adTypeField; - } - set - { - this.adTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field Url = new Field("Url", true, true); - - public static readonly Field DisplayUrl = new Field("DisplayUrl", true, true); - - public static readonly Field CreativeFinalUrls = new Field("CreativeFinalUrls", true, true); - - public static readonly Field CreativeFinalMobileUrls = new Field("CreativeFinalMobileUrls", true, true); - - public static readonly Field CreativeFinalAppUrls = new Field("CreativeFinalAppUrls", true, true); - - public static readonly Field CreativeTrackingUrlTemplate = new Field("CreativeTrackingUrlTemplate", true, true); - - public static readonly Field CreativeFinalUrlSuffix = new Field("CreativeFinalUrlSuffix", true, true); - - public static readonly Field CreativeUrlCustomParameters = new Field("CreativeUrlCustomParameters", true, true); - - public static readonly Field UrlData = new Field("UrlData", false, true); - - public static readonly Field Automated = new Field("Automated", true, true); - - public static readonly Field AdType = new Field("AdType", true, true); - - public static readonly Field DevicePreference = new Field("DevicePreference", true, true); - - public static readonly Field SystemManagedEntitySource = new Field("SystemManagedEntitySource", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Url = Fields.Url; - - public static readonly Field DisplayUrl = Fields.DisplayUrl; - - public static readonly Field CreativeFinalUrls = Fields.CreativeFinalUrls; - - public static readonly Field CreativeFinalMobileUrls = Fields.CreativeFinalMobileUrls; - - public static readonly Field CreativeFinalAppUrls = Fields.CreativeFinalAppUrls; - - public static readonly Field CreativeTrackingUrlTemplate = Fields.CreativeTrackingUrlTemplate; - - public static readonly Field CreativeFinalUrlSuffix = Fields.CreativeFinalUrlSuffix; - - public static readonly Field CreativeUrlCustomParameters = Fields.CreativeUrlCustomParameters; - - public static readonly Field UrlData = Fields.UrlData; - - public static readonly Field Automated = Fields.Automated; - - public static readonly Field AdType = Fields.AdType; - - public static readonly Field DevicePreference = Fields.DevicePreference; - - public static readonly Field SystemManagedEntitySource = Fields.SystemManagedEntitySource; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Url = Fields.Url; - - public static readonly Field DisplayUrl = Fields.DisplayUrl; - - public static readonly Field CreativeFinalUrls = Fields.CreativeFinalUrls; - - public static readonly Field CreativeFinalMobileUrls = Fields.CreativeFinalMobileUrls; - - public static readonly Field CreativeFinalAppUrls = Fields.CreativeFinalAppUrls; - - public static readonly Field CreativeTrackingUrlTemplate = Fields.CreativeTrackingUrlTemplate; - - public static readonly Field CreativeFinalUrlSuffix = Fields.CreativeFinalUrlSuffix; - - public static readonly Field CreativeUrlCustomParameters = Fields.CreativeUrlCustomParameters; - - public static readonly Field Automated = Fields.Automated; - - public static readonly Field AdType = Fields.AdType; - - public static readonly Field DevicePreference = Fields.DevicePreference; - - public static readonly Field SystemManagedEntitySource = Fields.SystemManagedEntitySource; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The types of ads. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Ad.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdType - { - DEPRECATED_AD = 0, - IMAGE_AD = 1, - PRODUCT_AD = 2, - TEMPLATE_AD = 3, - TEXT_AD = 4, - THIRD_PARTY_REDIRECT_AD = 5, - DYNAMIC_SEARCH_AD = 6, - CALL_ONLY_AD = 7, - EXPANDED_TEXT_AD = 9, - RESPONSIVE_DISPLAY_AD = 10, - SHOWCASE_AD = 11, - GOAL_OPTIMIZED_SHOPPING_AD = 15, - EXPANDED_DYNAMIC_SEARCH_AD = 12, - GMAIL_AD = 14, - RESPONSIVE_SEARCH_AD = 16, - MULTI_ASSET_RESPONSIVE_DISPLAY_AD = 17, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 8, - } - - - /// Indicates the source of a system-generated entity. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SystemManagedEntitySource - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Generated ad variations experiment ad. - /// - AD_VARIATIONS = 1, - } - - - /// Represents a dynamic search ad. This ad will have its headline and final URL - /// auto-generated at serving time according to domain name specific information - /// provided by DynamicSearchAdsSetting at the campaign level.

Auto-generated - /// fields: headline and final URL.

Note: we recommend using the - /// ExpandedDynamicSearchAd type, introduced in v201705, rather than the - /// DynamicSearchAd type.

Required fields: description1, - /// , displayUrl.

The tracking URL field must - /// contain at least one of the following placeholder tags (URL parameters):

- ///
  • {unescapedlpurl}
  • {escapedlpurl}
  • {lpurl}
  • - ///
  • {lpurl+2}
  • {lpurl+3}
  • {unescapedlpurl} will be - /// replaced with the full landing page URL of the displayed ad. Extra query - /// parameters can be added to the end, e.g.: "{unescapedlpurl}?lang=en".
  • - ///
  • {escapedlpurl} will be replaced with the URL-encoded version of the full - /// landing page URL. This makes it suitable for use as a query parameter value - /// (e.g.: "http://www.3rdpartytracker.com/?lp={escapedlpurl}") but not at the - /// beginning of the URL field.
  • {lpurl} encodes the "?" and "=" of the - /// landing page URL making it suitable for use as a query parameter. If found at - /// the beginning of the URL field, it is replaced by the {unescapedlpurl} value. - /// E.g.: "http://tracking.com/redir.php?tracking=xyz&url={lpurl}".
  • - ///
  • {lpurl+2} and {lpurl+3} will be replaced with the landing page URL escaped - /// two or three times, respectively. This makes it suitable if there is a chain of - /// redirects in the tracking URL.

Note that - /// finalUrls and cannot be set for dynamic search - /// ads.

For more information, see the article Using dynamic tracking - /// URLs.

This is disabled for AdX when - /// it is contained within Operators: ADD, SET. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DynamicSearchAd : Ad - { - private string description1Field; - - private string description2Field; - - /// The first description line. This field can - /// be selected using the value "Description1".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string description1 - { - get - { - return this.description1Field; - } - set - { - this.description1Field = value; - } - } - - /// The second description line. This field can - /// be selected using the value "Description2".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string description2 - { - get - { - return this.description2Field; - } - set - { - this.description2Field = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Description1 = new Field("Description1", true, true); - - public static readonly Field Description2 = new Field("Description2", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Description1 = Fields.Description1; - - public static readonly Field Description2 = Fields.Description2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Description1 = Fields.Description1; - - public static readonly Field Description2 = Fields.Description2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a responsive search ad.

Important

    - ///
  • Responsive search ads are in beta and may not be available to all AdWords - /// advertisers.
  • Per the AdWords Terms & - /// Conditions for features in beta, you may not disclose any non-public - /// information.
  • Responsive search ads will learn and improve over time, so - /// make sure to regularly monitor the performance and status of your ads.
  • - ///
  • Responsive search ads are currently available in English, French, - /// German, and Spanish only.
  • Assets can be shown in any order, so - /// make sure that they make sense individually or in combination, and don?t violate - /// our policies or local law.
  • Even after ads are assembled, they may not - /// serve.
  • If you have text that should appear in every ad, then you must - /// pin it to either Headline position 1, Headline position 2, or Description - /// position 1, and also make sure it is less than 80 characters long.
- ///

To increase the likelihood that your ad shows, be sure to - /// provide at least 5 distinct headlines and 2 distinct descriptions that don't - /// repeat the same or similar phrases. Providing redundant content will restrict - /// the system's ability to assemble combinations. See example ads

- ///

Help center documentation



Caution: Responsive search ads do not use url, #displayUrl displayUrl, finalAppUrls, or devicePreference; setting these fields on a responsive search ad will - /// cause an error.

This is enabled for - /// AdX. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ResponsiveSearchAd : Ad - { - private AssetLink[] headlinesField; - - private AssetLink[] descriptionsField; - - private string path1Field; - - private string path2Field; - - /// Headlines. When the Ad serves, the headlines will be selected from this list. - /// This field can be selected using the value - /// "ResponsiveSearchAdHeadlines". This - /// field is required and should not be null when it is contained - /// within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("headlines", Order = 0)] - public AssetLink[] headlines - { - get - { - return this.headlinesField; - } - set - { - this.headlinesField = value; - } - } - - /// Descriptions. When the Ad serves, the descriptions will be selected from this - /// list. This field can be selected using the - /// value "ResponsiveSearchAdDescriptions". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("descriptions", Order = 1)] - public AssetLink[] descriptions - { - get - { - return this.descriptionsField; - } - set - { - this.descriptionsField = value; - } - } - - /// Text that appears in the ad with the displayed URL. This field can be selected using the value - /// "ResponsiveSearchAdPath1".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string path1 - { - get - { - return this.path1Field; - } - set - { - this.path1Field = value; - } - } - - /// In addition to #path1, more text that appears with the - /// displayed URL. This field can be selected - /// using the value "ResponsiveSearchAdPath2".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string path2 - { - get - { - return this.path2Field; - } - set - { - this.path2Field = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ResponsiveSearchAdHeadlines = new Field("ResponsiveSearchAdHeadlines", false, true); - - public static readonly Field ResponsiveSearchAdDescriptions = new Field("ResponsiveSearchAdDescriptions", false, true); - - public static readonly Field ResponsiveSearchAdPath1 = new Field("ResponsiveSearchAdPath1", true, true); - - public static readonly Field ResponsiveSearchAdPath2 = new Field("ResponsiveSearchAdPath2", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ResponsiveSearchAdHeadlines = Fields.ResponsiveSearchAdHeadlines; - - public static readonly Field ResponsiveSearchAdDescriptions = Fields.ResponsiveSearchAdDescriptions; - - public static readonly Field ResponsiveSearchAdPath1 = Fields.ResponsiveSearchAdPath1; - - public static readonly Field ResponsiveSearchAdPath2 = Fields.ResponsiveSearchAdPath2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ResponsiveSearchAdPath1 = Fields.ResponsiveSearchAdPath1; - - public static readonly Field ResponsiveSearchAdPath2 = Fields.ResponsiveSearchAdPath2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a Smart Shopping ad that optimizes towards your goals. A Smart - /// Shopping ad targets multiple advertising channels across Search, Google Display - /// Network, and YouTube with a focus on retail. This supports ads that display - /// product data (managed using the Google Merchant Center) as specified in the - /// parent campaign's Shopping setting as well as ads - /// using advertiser provided asset data.

Caution: Smart - /// Shopping ads do not use url, #finalUrls - /// finalUrls, finalMobileUrls, finalAppUrls, or displayUrl; - /// setting these fields on a Smart Shopping ad will cause an error. This is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GoalOptimizedShoppingAd : Ad - { - } - - - /// Represents a TextAd. This is disabled for - /// AdX when it is contained within Operators: ADD, SET. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TextAd : Ad - { - private string headlineField; - - private string description1Field; - - private string description2Field; - - /// The headline of the ad. This field can be - /// selected using the value "Headline".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string headline - { - get - { - return this.headlineField; - } - set - { - this.headlineField = value; - } - } - - /// The first description line. This field can - /// be selected using the value "Description1".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string description1 - { - get - { - return this.description1Field; - } - set - { - this.description1Field = value; - } - } - - /// The second description line. This field can - /// be selected using the value "Description2".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string description2 - { - get - { - return this.description2Field; - } - set - { - this.description2Field = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Headline = new Field("Headline", true, true); - - public static readonly Field Description1 = new Field("Description1", true, true); - - public static readonly Field Description2 = new Field("Description2", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Headline = Fields.Headline; - - public static readonly Field Description1 = Fields.Description1; - - public static readonly Field Description2 = Fields.Description2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Headline = Fields.Headline; - - public static readonly Field Description1 = Fields.Description1; - - public static readonly Field Description2 = Fields.Description2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a - /// Display Ad Builder template ad. A template ad is composed of a template - /// (specified by its ID) and the data that populates the template's fields. For a - /// list of available templates and their required fields, see Template Ads. This is disabled for AdX when it is contained - /// within Operators: ADD, SET. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TemplateAd : Ad - { - private long templateIdField; - - private bool templateIdFieldSpecified; - - private AdUnionId adUnionIdField; - - private TemplateElement[] templateElementsField; - - private Image adAsImageField; - - private Dimensions dimensionsField; - - private string nameField; - - private int durationField; - - private bool durationFieldSpecified; - - private long originAdIdField; - - private bool originAdIdFieldSpecified; - - /// ID of the template to use. This field can be - /// selected using the value "TemplateId".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long templateId - { - get - { - return this.templateIdField; - } - set - { - this.templateIdField = value; - this.templateIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool templateIdSpecified - { - get - { - return this.templateIdFieldSpecified; - } - set - { - this.templateIdFieldSpecified = value; - } - } - - /// Group ID of all template ads, which should be created together. Template ads in - /// the same union reference the same data but have different dimensions. Single ads - /// do not have a union ID. If a template ad specifies an ad union with only one ad, - /// no union will be created. This field can be - /// selected using the value "TemplateAdUnionId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public AdUnionId adUnionId - { - get - { - return this.adUnionIdField; - } - set - { - this.adUnionIdField = value; - } - } - - /// List of elements (each containing a set of fields) for the template referenced - /// by templateId. See Template Ads for the elements - /// and fields required for each template. - /// - [System.Xml.Serialization.XmlElementAttribute("templateElements", Order = 2)] - public TemplateElement[] templateElements - { - get - { - return this.templateElementsField; - } - set - { - this.templateElementsField = value; - } - } - - /// The template ad rendered as an image. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public Image adAsImage - { - get - { - return this.adAsImageField; - } - set - { - this.adAsImageField = value; - } - } - - /// The dimensions for this ad. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Dimensions dimensions - { - get - { - return this.dimensionsField; - } - set - { - this.dimensionsField = value; - } - } - - /// Name of this ad. This field is required and - /// should not be null. This - /// field can be selected using the value "TemplateAdName". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Duration of this ad (if it contains playable media). This field can be selected using the value - /// "TemplateAdDuration". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public int duration - { - get - { - return this.durationField; - } - set - { - this.durationField = value; - this.durationSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool durationSpecified - { - get - { - return this.durationFieldSpecified; - } - set - { - this.durationFieldSpecified = value; - } - } - - /// For copies, the ad id of the ad this was or should be copied from. This field can be selected using the value - /// "TemplateOriginAdId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public long originAdId - { - get - { - return this.originAdIdField; - } - set - { - this.originAdIdField = value; - this.originAdIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool originAdIdSpecified - { - get - { - return this.originAdIdFieldSpecified; - } - set - { - this.originAdIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TemplateId = new Field("TemplateId", true, true); - - public static readonly Field TemplateAdUnionId = new Field("TemplateAdUnionId", false, true); - - public static readonly Field TemplateAdName = new Field("TemplateAdName", false, true); - - public static readonly Field TemplateAdDuration = new Field("TemplateAdDuration", false, true); - - public static readonly Field TemplateOriginAdId = new Field("TemplateOriginAdId", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TemplateId = Fields.TemplateId; - - public static readonly Field TemplateAdUnionId = Fields.TemplateAdUnionId; - - public static readonly Field TemplateAdName = Fields.TemplateAdName; - - public static readonly Field TemplateAdDuration = Fields.TemplateAdDuration; - - public static readonly Field TemplateOriginAdId = Fields.TemplateOriginAdId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TemplateId = Fields.TemplateId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a Showcase shopping ad. This is - /// enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ShowcaseAd : Ad - { - private string nameField; - - private string headlineField; - - private string descriptionField; - - private Image collapsedImageField; - - private Image expandedImageField; - - /// The name label for this ad. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Headline displayed in the Showcase shopping ad. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string headline - { - get - { - return this.headlineField; - } - set - { - this.headlineField = value; - } - } - - /// Description displayed in the expanded view of the Showcase shopping ad. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// Image displayed in the collapsed view of the Showcase shopping ad.

The format - /// of the image must be either JPEG or PNG and the size of the image must be - /// 270x270 px.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public Image collapsedImage - { - get - { - return this.collapsedImageField; - } - set - { - this.collapsedImageField = value; - } - } - - /// Image displayed in the expanded view of the Showcase shopping ad.

The format - /// of the image must be either JPEG or PNG and the size of the image must be - /// 1080x566 px. This field is required and should - /// not be null when it is contained within Operators : ADD.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Image expandedImage - { - get - { - return this.expandedImageField; - } - set - { - this.expandedImageField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Data associated with a rich media ad. This - /// is disabled for AdX when it is contained within Operators: ADD, SET. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ThirdPartyRedirectAd))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class RichMediaAd : Ad - { - private string nameField; - - private Dimensions dimensionsField; - - private string snippetField; - - private string impressionBeaconUrlField; - - private int adDurationField; - - private bool adDurationFieldSpecified; - - private long certifiedVendorFormatIdField; - - private bool certifiedVendorFormatIdFieldSpecified; - - private string sourceUrlField; - - private RichMediaAdRichMediaAdType richMediaAdTypeField; - - private bool richMediaAdTypeFieldSpecified; - - private RichMediaAdAdAttribute[] adAttributesField; - - /// Name of the rich media ad. This field is - /// required and should not be null. This field can be selected using the value "RichMediaAdName". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Dimensions (height and width) of the ad. This field is optional for - /// ThirdPartyRedirectAd. Ad Exchange traditional yield management creatives do not - /// specify the dimension on the ThirdPartyRedirectAd; instead, the size is - /// specified in the publisher front end when creating a mediation chain. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Dimensions dimensions - { - get - { - return this.dimensionsField; - } - set - { - this.dimensionsField = value; - } - } - - /// Snippet for this ad. Required for standard third-party ads.

The length of the - /// string should be between 1 and 3072, inclusive. This field can be selected using the value - /// "RichMediaAdSnippet".

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string snippet - { - get - { - return this.snippetField; - } - set - { - this.snippetField = value; - } - } - - /// Impression beacon URL for the ad. This field - /// can be selected using the value "RichMediaAdImpressionBeaconUrl". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string impressionBeaconUrl - { - get - { - return this.impressionBeaconUrlField; - } - set - { - this.impressionBeaconUrlField = value; - } - } - - /// Duration for the ad (in milliseconds). Default is 0. This field can be selected using the value - /// "RichMediaAdDuration". This field must - /// be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public int adDuration - { - get - { - return this.adDurationField; - } - set - { - this.adDurationField = value; - this.adDurationSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adDurationSpecified - { - get - { - return this.adDurationFieldSpecified; - } - set - { - this.adDurationFieldSpecified = value; - } - } - - /// Certified Vendor Format - /// ID. This field can be selected using the - /// value "RichMediaAdCertifiedVendorFormatId". This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long certifiedVendorFormatId - { - get - { - return this.certifiedVendorFormatIdField; - } - set - { - this.certifiedVendorFormatIdField = value; - this.certifiedVendorFormatIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool certifiedVendorFormatIdSpecified - { - get - { - return this.certifiedVendorFormatIdFieldSpecified; - } - set - { - this.certifiedVendorFormatIdFieldSpecified = value; - } - } - - /// SourceUrl pointing to the third party snippet. For third party in-stream video - /// ads, this stores the VAST URL. For DFA ads, it stores the InRed URL. This field can be selected using the value - /// "RichMediaAdSourceUrl". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string sourceUrl - { - get - { - return this.sourceUrlField; - } - set - { - this.sourceUrlField = value; - } - } - - /// Type of this rich media ad, the default is Standard. This field can be selected using the value "RichMediaAdType". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public RichMediaAdRichMediaAdType richMediaAdType - { - get - { - return this.richMediaAdTypeField; - } - set - { - this.richMediaAdTypeField = value; - this.richMediaAdTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool richMediaAdTypeSpecified - { - get - { - return this.richMediaAdTypeFieldSpecified; - } - set - { - this.richMediaAdTypeFieldSpecified = value; - } - } - - /// A list of attributes that describe the rich media ad capabilities. - /// - [System.Xml.Serialization.XmlElementAttribute("adAttributes", Order = 8)] - public RichMediaAdAdAttribute[] adAttributes - { - get - { - return this.adAttributesField; - } - set - { - this.adAttributesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field RichMediaAdName = new Field("RichMediaAdName", false, true); - - public static readonly Field RichMediaAdSnippet = new Field("RichMediaAdSnippet", false, true); - - public static readonly Field RichMediaAdImpressionBeaconUrl = new Field("RichMediaAdImpressionBeaconUrl", false, true); - - public static readonly Field RichMediaAdDuration = new Field("RichMediaAdDuration", false, true); - - public static readonly Field RichMediaAdCertifiedVendorFormatId = new Field("RichMediaAdCertifiedVendorFormatId", false, true); - - public static readonly Field RichMediaAdSourceUrl = new Field("RichMediaAdSourceUrl", false, true); - - public static readonly Field RichMediaAdType = new Field("RichMediaAdType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field RichMediaAdName = Fields.RichMediaAdName; - - public static readonly Field RichMediaAdSnippet = Fields.RichMediaAdSnippet; - - public static readonly Field RichMediaAdImpressionBeaconUrl = Fields.RichMediaAdImpressionBeaconUrl; - - public static readonly Field RichMediaAdDuration = Fields.RichMediaAdDuration; - - public static readonly Field RichMediaAdCertifiedVendorFormatId = Fields.RichMediaAdCertifiedVendorFormatId; - - public static readonly Field RichMediaAdSourceUrl = Fields.RichMediaAdSourceUrl; - - public static readonly Field RichMediaAdType = Fields.RichMediaAdType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Different types of rich media ad that are available to customers. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RichMediaAd.RichMediaAdType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RichMediaAdRichMediaAdType - { - /// Standard. - /// - STANDARD = 0, - /// In stream video ad. - /// - IN_STREAM_VIDEO = 1, - } - - - /// A set of attributes that describe the rich media ad capabilities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RichMediaAd.AdAttribute", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RichMediaAdAdAttribute - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Indicates that the ad supports mouse roll over to expand. - /// - ROLL_OVER_TO_EXPAND = 1, - /// Indicates that the ad supports SSL. - /// - SSL = 2, - } - - - /// Data associated with rich media extension attributes. This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ThirdPartyRedirectAd : RichMediaAd - { - private bool isCookieTargetedField; - - private bool isCookieTargetedFieldSpecified; - - private bool isUserInterestTargetedField; - - private bool isUserInterestTargetedFieldSpecified; - - private bool isTaggedField; - - private bool isTaggedFieldSpecified; - - private VideoType[] videoTypesField; - - private ThirdPartyRedirectAdExpandingDirection[] expandingDirectionsField; - - /// Defines whether or not the ad is cookie targeted. (i.e. user list targeting, or - /// the network's equivalent). This field can be - /// selected using the value "IsCookieTargeted". This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool isCookieTargeted - { - get - { - return this.isCookieTargetedField; - } - set - { - this.isCookieTargetedField = value; - this.isCookieTargetedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isCookieTargetedSpecified - { - get - { - return this.isCookieTargetedFieldSpecified; - } - set - { - this.isCookieTargetedFieldSpecified = value; - } - } - - /// Defines whether or not the ad is targeting user interest. This field can be selected using the value - /// "IsUserInterestTargeted". This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool isUserInterestTargeted - { - get - { - return this.isUserInterestTargetedField; - } - set - { - this.isUserInterestTargetedField = value; - this.isUserInterestTargetedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isUserInterestTargetedSpecified - { - get - { - return this.isUserInterestTargetedFieldSpecified; - } - set - { - this.isUserInterestTargetedFieldSpecified = value; - } - } - - /// Defines whether or not the ad contains a tracking pixel of any kind. This field can be selected using the value - /// "IsTagged". This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool isTagged - { - get - { - return this.isTaggedField; - } - set - { - this.isTaggedField = value; - this.isTaggedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isTaggedSpecified - { - get - { - return this.isTaggedFieldSpecified; - } - set - { - this.isTaggedFieldSpecified = value; - } - } - - /// Video Types of the ad. (RealMedia, Quick Time etc.) This field can be selected using the value "VideoTypes". - /// - [System.Xml.Serialization.XmlElementAttribute("videoTypes", Order = 3)] - public VideoType[] videoTypes - { - get - { - return this.videoTypesField; - } - set - { - this.videoTypesField = value; - } - } - - /// Allowed expanding directions. These directions are used to match publishers' ad - /// slots. For example, if a slot allows expansion toward the right, only ads with - /// EXPANDING_RIGHT specified will show up there. This field can be selected using the value - /// "ExpandingDirections". - /// - [System.Xml.Serialization.XmlElementAttribute("expandingDirections", Order = 4)] - public ThirdPartyRedirectAdExpandingDirection[] expandingDirections - { - get - { - return this.expandingDirectionsField; - } - set - { - this.expandingDirectionsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : RichMediaAd.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field IsCookieTargeted = new Field("IsCookieTargeted", false, true); - - public static readonly Field IsUserInterestTargeted = new Field("IsUserInterestTargeted", false, true); - - public static readonly Field IsTagged = new Field("IsTagged", false, true); - - public static readonly Field VideoTypes = new Field("VideoTypes", false, true); - - public static readonly Field ExpandingDirections = new Field("ExpandingDirections", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : RichMediaAd.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field IsCookieTargeted = Fields.IsCookieTargeted; - - public static readonly Field IsUserInterestTargeted = Fields.IsUserInterestTargeted; - - public static readonly Field IsTagged = Fields.IsTagged; - - public static readonly Field VideoTypes = Fields.VideoTypes; - - public static readonly Field ExpandingDirections = Fields.ExpandingDirections; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : RichMediaAd.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// VideoType enum values that are permitted for video filterable creative attribute - /// IDs. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum VideoType - { - /// The Adobe Flash video format (.swf). - /// - ADOBE = 0, - /// The RealVideo format (.rm or .ram). - /// - REALPLAYER = 1, - /// The QuickTime format (.mov). - /// - QUICKTIME = 2, - /// The Windows Media format (.wmv). - /// - WINDOWSMEDIA = 3, - } - - - /// Allowed expanding directions for ads that are expandable. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ThirdPartyRedirectAd.ExpandingDirection", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ThirdPartyRedirectAdExpandingDirection - { - /// Whether the ad can be expanded is unknown. Used for return value only. An enumeration could not be processed, - /// typically due to incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// The ad is allowed to expand upward. - /// - EXPANDING_UP = 1, - /// The ad is allowed to expand downward. - /// - EXPANDING_DOWN = 2, - /// The ad is allowed to expand leftward. - /// - EXPANDING_LEFT = 3, - /// The ad is allowed to expand rightward. - /// - EXPANDING_RIGHT = 4, - /// The ad is allowed to expand toward the up-left corner. - /// - EXPANDING_UPLEFT = 5, - /// The ad is allowed to expand toward the up-right corner. - /// - EXPANDING_UPRIGHT = 6, - /// The ad is allowed to expand toward the down-left corner. - /// - EXPANDING_DOWNLEFT = 7, - /// The ad is allowed to expand toward the down-right corner. - /// - EXPANDING_DOWNRIGHT = 8, - } - - - /// Enhanced display ad format.

Caution: Responsive - /// display ads do not use url, displayUrl, finalAppUrls, or - /// devicePreference; setting these fields on a - /// responsive display ad will cause an error. This is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ResponsiveDisplayAd : Ad - { - private Image marketingImageField; - - private Image logoImageField; - - private Image squareMarketingImageField; - - private string shortHeadlineField; - - private string longHeadlineField; - - private string descriptionField; - - private string businessNameField; - - private string mainColorField; - - private string accentColorField; - - private bool allowFlexibleColorField; - - private bool allowFlexibleColorFieldSpecified; - - private string callToActionTextField; - - private DynamicSettings dynamicDisplayAdSettingsField; - - private DisplayAdFormatSetting formatSettingField; - - private bool formatSettingFieldSpecified; - - /// Marketing image to be used in the ad. This ad format does not allow the creation - /// of an image using the Image.data field. An image must first be created using the - /// MediaService, and Image.mediaId must be populated when creating a "ResponsiveDisplayAd". Valid image types are - /// GIF, JPEG, and PNG. The minimum size is 600x314 and the aspect ratio must be - /// 600:314 (+-1%). This field can be selected - /// using the value "MarketingImage". This - /// field is required and should not be null when it is contained - /// within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Image marketingImage - { - get - { - return this.marketingImageField; - } - set - { - this.marketingImageField = value; - } - } - - /// Logo image to be used in the ad. This ad format does not allow the creation of - /// an image using the Image.data field. An image must first be created using the - /// MediaService, and Image.mediaId must be populated when creating a "ResponsiveDisplayAd". Valid image types are - /// GIF, JPEG, and PNG. The minimum size is 128x128 and the aspect ratio must be 1:1 - /// (+-1%). This field can be selected using the - /// value "LogoImage". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Image logoImage - { - get - { - return this.logoImageField; - } - set - { - this.logoImageField = value; - } - } - - /// Square marketing image to be used in the ad. This image may be used when a - /// square aspect ratio is more appropriate than the aspect ratio of the #marketingImage image. This ad format does not allow - /// the creation of an image using the Image.data field. An image must first be - /// created using the MediaService, and Image.mediaId must be populated when - /// creating a "ResponsiveDisplayAd". Valid image types are GIF, - /// JPEG, and PNG. The minimum size is 300x300 the aspect ratio must be 1:1 (+-1%). - /// This field can be selected using the value - /// "SquareMarketingImage". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Image squareMarketingImage - { - get - { - return this.squareMarketingImageField; - } - set - { - this.squareMarketingImageField = value; - } - } - - /// Short format of the headline of the ad. Maximum display width is 25. This field can be selected using the value - /// "ShortHeadline".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string shortHeadline - { - get - { - return this.shortHeadlineField; - } - set - { - this.shortHeadlineField = value; - } - } - - /// Long format of the headline of the ad. Maximum display width is 90. This field can be selected using the value - /// "LongHeadline".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string longHeadline - { - get - { - return this.longHeadlineField; - } - set - { - this.longHeadlineField = value; - } - } - - /// The descriptive text of the ad. Maximum display width is 90. This field can be selected using the value - /// "Description".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// The business name. Maximum display width is 25. This field is required and should not be null when it is - /// contained within Operators : ADD. This field can be selected using the value - /// "BusinessName".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string businessName - { - get - { - return this.businessNameField; - } - set - { - this.businessNameField = value; - } - } - - /// Main color. In hexadecimal, e.g. #ffffff for white. If one of mainColor and - /// accentColor is set, the other is required as well. This field can be selected using the value "MainColor".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string mainColor - { - get - { - return this.mainColorField; - } - set - { - this.mainColorField = value; - } - } - - /// Accent color. In hexadecimal, e.g. #ffffff for white. If one of mainColor and - /// accentColor is set, the other is required as well. This field can be selected using the value - /// "AccentColor".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public string accentColor - { - get - { - return this.accentColorField; - } - set - { - this.accentColorField = value; - } - } - - /// Advertiser?s consent to allow flexible color. When true, we may serve the ad - /// with different color when necessary. When false, we will serve the ad with - /// advertiser color or neutral color. Must be true if mainColor and accentColor are - /// not set. The default value is true. This - /// field can be selected using the value "AllowFlexibleColor".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public bool allowFlexibleColor - { - get - { - return this.allowFlexibleColorField; - } - set - { - this.allowFlexibleColorField = value; - this.allowFlexibleColorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool allowFlexibleColorSpecified - { - get - { - return this.allowFlexibleColorFieldSpecified; - } - set - { - this.allowFlexibleColorFieldSpecified = value; - } - } - - /// Call to action text. Valid texts: - /// https://support.google.com/adwords/answer/7005917 This field can be selected using the value - /// "CallToActionText".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public string callToActionText - { - get - { - return this.callToActionTextField; - } - set - { - this.callToActionTextField = value; - } - } - - /// Settings for serving dynamic ResponsiveDisplayAd. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public DynamicSettings dynamicDisplayAdSettings - { - get - { - return this.dynamicDisplayAdSettingsField; - } - set - { - this.dynamicDisplayAdSettingsField = value; - } - } - - /// Specifies which format the ad will be served in. The default value is - /// ALL_FORMATS. This field can be selected - /// using the value "FormatSetting".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public DisplayAdFormatSetting formatSetting - { - get - { - return this.formatSettingField; - } - set - { - this.formatSettingField = value; - this.formatSettingSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool formatSettingSpecified - { - get - { - return this.formatSettingFieldSpecified; - } - set - { - this.formatSettingFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field MarketingImage = new Field("MarketingImage", false, true); - - public static readonly Field LogoImage = new Field("LogoImage", false, true); - - public static readonly Field SquareMarketingImage = new Field("SquareMarketingImage", false, true); - - public static readonly Field ShortHeadline = new Field("ShortHeadline", true, true); - - public static readonly Field LongHeadline = new Field("LongHeadline", true, true); - - public static readonly Field Description = new Field("Description", true, true); - - public static readonly Field BusinessName = new Field("BusinessName", true, true); - - public static readonly Field MainColor = new Field("MainColor", true, true); - - public static readonly Field AccentColor = new Field("AccentColor", true, true); - - public static readonly Field AllowFlexibleColor = new Field("AllowFlexibleColor", true, true); - - public static readonly Field CallToActionText = new Field("CallToActionText", true, true); - - public static readonly Field FormatSetting = new Field("FormatSetting", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field MarketingImage = Fields.MarketingImage; - - public static readonly Field LogoImage = Fields.LogoImage; - - public static readonly Field SquareMarketingImage = Fields.SquareMarketingImage; - - public static readonly Field ShortHeadline = Fields.ShortHeadline; - - public static readonly Field LongHeadline = Fields.LongHeadline; - - public static readonly Field Description = Fields.Description; - - public static readonly Field BusinessName = Fields.BusinessName; - - public static readonly Field MainColor = Fields.MainColor; - - public static readonly Field AccentColor = Fields.AccentColor; - - public static readonly Field AllowFlexibleColor = Fields.AllowFlexibleColor; - - public static readonly Field CallToActionText = Fields.CallToActionText; - - public static readonly Field FormatSetting = Fields.FormatSetting; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ShortHeadline = Fields.ShortHeadline; - - public static readonly Field LongHeadline = Fields.LongHeadline; - - public static readonly Field Description = Fields.Description; - - public static readonly Field BusinessName = Fields.BusinessName; - - public static readonly Field MainColor = Fields.MainColor; - - public static readonly Field AccentColor = Fields.AccentColor; - - public static readonly Field AllowFlexibleColor = Fields.AllowFlexibleColor; - - public static readonly Field CallToActionText = Fields.CallToActionText; - - public static readonly Field FormatSetting = Fields.FormatSetting; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Serving format setting of this ad. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DisplayAdFormatSetting - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Text, image and native formats - /// - ALL_FORMATS = 1, - /// Text and image formats - /// - NON_NATIVE = 2, - /// Native format - /// - NATIVE = 3, - } - - - /// Represents a product ad (known as a product listing ad in the - /// AdWords user interface). A product ad displays product data (managed using the - /// Google Merchant Center) that is pulled from the Google base product feed - /// specified in the parent campaign's shopping - /// setting.

Caution: Product ads do not use url, finalUrls, finalMobileUrls, finalAppUrls, or displayUrl; - /// setting these fields on a product ad will cause an error. urlCustomParameters and trackingUrlTemplate can be set, but it is not - /// recommended, as they will not be used; they should be set at the ad group or - /// campaign level instead.

This is disabled - /// for AdX when it is contained within Operators: ADD, SET. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductAd : Ad - { - } - - - /// Representation of multi-asset responsive display ad format.

Caution: multi-asset responsive display ads do not use url, displayUrl, finalAppUrls, or #devicePreference - /// devicePreference; setting these fields on a multi-asset responsive display - /// ad will cause an error. This is enabled for - /// AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MultiAssetResponsiveDisplayAd : Ad - { - private AssetLink[] marketingImagesField; - - private AssetLink[] squareMarketingImagesField; - - private AssetLink[] logoImagesField; - - private AssetLink[] landscapeLogoImagesField; - - private AssetLink[] headlinesField; - - private AssetLink longHeadlineField; - - private AssetLink[] descriptionsField; - - private string businessNameField; - - private string mainColorField; - - private string accentColorField; - - private bool allowFlexibleColorField; - - private bool allowFlexibleColorFieldSpecified; - - private string callToActionTextField; - - private string dynamicSettingsPricePrefixField; - - private string dynamicSettingsPromoTextField; - - private DisplayAdFormatSetting formatSettingField; - - private bool formatSettingFieldSpecified; - - /// Marketing image to be used in the ad. This ad format does not allow the creation - /// of an imageAsset using the ImageAsset.imageData field. An imageAsset must first - /// be created using the AssetService, and ImageAsset.assetId must be populated in - /// this field. Valid image types are GIF, JPEG, and PNG. The minimum size is - /// 600x314 and the aspect ratio must be 1.91:1 (+-1%). One marketingImage is - /// required. Support up to 15 with squareMarketingImages. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdMarketingImages". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("marketingImages", Order = 0)] - public AssetLink[] marketingImages - { - get - { - return this.marketingImagesField; - } - set - { - this.marketingImagesField = value; - } - } - - /// Square marketing image to be used in the ad. This image may be used when a - /// square aspect ratio is more appropriate than the aspect ratio of the #marketingImage image. This ad format does not allow - /// the creation of an imageAsset using the ImageAsset.imageData field. An - /// imageAsset must first be created using the AssetService, and ImageAsset.assetId - /// must be populated in this field. Valid image types are GIF, JPEG, and PNG. The - /// minimum size is 300x300 the aspect ratio must be 1:1 (+-1%). One - /// squareMarketingImage is required. Support up to 15 with marketingImages. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdSquareMarketingImages". This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("squareMarketingImages", Order = 1)] - public AssetLink[] squareMarketingImages - { - get - { - return this.squareMarketingImagesField; - } - set - { - this.squareMarketingImagesField = value; - } - } - - /// Logo image to be used in the ad. This ad format does not allow the creation of - /// an image using the ImageAsset.imageData field. An imageAsset must first be - /// created using the AssetService, and ImageAsset.assetId must be populated in this - /// field. Valid image types are GIF, JPEG, and PNG. The minimum size is 128x128 and - /// the aspect ratio must be 1:1 (+-1%). Optional. Support up to 5 with - /// landscapeLogoImages. This field can be - /// selected using the value "MultiAssetResponsiveDisplayAdLogoImages". - /// - [System.Xml.Serialization.XmlElementAttribute("logoImages", Order = 2)] - public AssetLink[] logoImages - { - get - { - return this.logoImagesField; - } - set - { - this.logoImagesField = value; - } - } - - /// Landscape logo image which is used for serving dynamic - /// MultiAssetResponsiveDisplayAd. This ad format does not allow the creation of an - /// image using the ImageAsset.imageData field. An imageAsset must first be created - /// using the AssetService, and ImageAsset.assetId must be populated in this field. - /// Valid image types are GIF, JPEG, and PNG. The minimum size is 512x128 and the - /// aspect ratio must be 4:1 (+-1%). Optional. Support up to 5 with logoImages. - /// This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdLandscapeLogoImages". - /// - [System.Xml.Serialization.XmlElementAttribute("landscapeLogoImages", Order = 3)] - public AssetLink[] landscapeLogoImages - { - get - { - return this.landscapeLogoImagesField; - } - set - { - this.landscapeLogoImagesField = value; - } - } - - /// Short format of the headline of the ad. Maximum display width is 30. One short - /// headline is required. Support up to 5 short headlines. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdHeadlines". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("headlines", Order = 4)] - public AssetLink[] headlines - { - get - { - return this.headlinesField; - } - set - { - this.headlinesField = value; - } - } - - /// Long format of the headline of the ad. Maximum display width is 90. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdLongHeadline". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public AssetLink longHeadline - { - get - { - return this.longHeadlineField; - } - set - { - this.longHeadlineField = value; - } - } - - /// The descriptive text of the ad. Maximum display width is 90. One description is - /// required. Support up to 5 descriptions. This - /// field can be selected using the value - /// "MultiAssetResponsiveDisplayAdDescriptions". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("descriptions", Order = 6)] - public AssetLink[] descriptions - { - get - { - return this.descriptionsField; - } - set - { - this.descriptionsField = value; - } - } - - /// The Advertiser/brand name. Maximum display width is 25. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdBusinessName".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string businessName - { - get - { - return this.businessNameField; - } - set - { - this.businessNameField = value; - } - } - - /// Main color, represented as a hexadecimal string (e.g. #ffffff for white). If one - /// of mainColor and accentColor is set, the other is required as well. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdMainColor".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public string mainColor - { - get - { - return this.mainColorField; - } - set - { - this.mainColorField = value; - } - } - - /// Accent color, represented as a hexadecimal string (e.g. #ffffff for white). If - /// one of mainColor and accentColor is set, the other is required as well. This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdAccentColor".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public string accentColor - { - get - { - return this.accentColorField; - } - set - { - this.accentColorField = value; - } - } - - /// Allow flexible color. If set to true, the ad will show on text and native ad - /// placements even when publisher settings may override your custom color - /// selections. This field must be set to true if both mainColor and accentColor are - /// not set. The default value is true. This - /// field can be selected using the value - /// "MultiAssetResponsiveDisplayAdAllowFlexibleColor".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public bool allowFlexibleColor - { - get - { - return this.allowFlexibleColorField; - } - set - { - this.allowFlexibleColorField = value; - this.allowFlexibleColorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool allowFlexibleColorSpecified - { - get - { - return this.allowFlexibleColorFieldSpecified; - } - set - { - this.allowFlexibleColorFieldSpecified = value; - } - } - - /// Call to action text. This field can be - /// selected using the value - /// "MultiAssetResponsiveDisplayAdCallToActionText".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public string callToActionText - { - get - { - return this.callToActionTextField; - } - set - { - this.callToActionTextField = value; - } - } - - /// Prefix before price. Maximum display width is 10. For example, "as low as". For - /// more details, check the help page - /// https://developers.google.com/adwords/api/docs/guides/dynamic-remarketing This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public string dynamicSettingsPricePrefix - { - get - { - return this.dynamicSettingsPricePrefixField; - } - set - { - this.dynamicSettingsPricePrefixField = value; - } - } - - /// Promotion text used for dynamic formats of multi-asset responsive display ads. - /// Maximum display width is 25. For example, "Free two-day shipping". For more - /// details, check the help page - /// https://developers.google.com/adwords/api/docs/guides/dynamic-remarketing This field can be selected using the value - /// "MultiAssetResponsiveDisplayAdDynamicSettingsPromoText".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public string dynamicSettingsPromoText - { - get - { - return this.dynamicSettingsPromoTextField; - } - set - { - this.dynamicSettingsPromoTextField = value; - } - } - - /// Specifies which format the ad will be served in. The default value is - /// ALL_FORMATS. This field can be selected - /// using the value "MultiAssetResponsiveDisplayAdFormatSetting".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public DisplayAdFormatSetting formatSetting - { - get - { - return this.formatSettingField; - } - set - { - this.formatSettingField = value; - this.formatSettingSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool formatSettingSpecified - { - get - { - return this.formatSettingFieldSpecified; - } - set - { - this.formatSettingFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field MultiAssetResponsiveDisplayAdMarketingImages = new Field("MultiAssetResponsiveDisplayAdMarketingImages", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdSquareMarketingImages = new Field("MultiAssetResponsiveDisplayAdSquareMarketingImages", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdLogoImages = new Field("MultiAssetResponsiveDisplayAdLogoImages", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdLandscapeLogoImages = new Field("MultiAssetResponsiveDisplayAdLandscapeLogoImages", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdHeadlines = new Field("MultiAssetResponsiveDisplayAdHeadlines", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdLongHeadline = new Field("MultiAssetResponsiveDisplayAdLongHeadline", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdDescriptions = new Field("MultiAssetResponsiveDisplayAdDescriptions", false, true); - - public static readonly Field MultiAssetResponsiveDisplayAdBusinessName = new Field("MultiAssetResponsiveDisplayAdBusinessName", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdMainColor = new Field("MultiAssetResponsiveDisplayAdMainColor", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdAccentColor = new Field("MultiAssetResponsiveDisplayAdAccentColor", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdAllowFlexibleColor = new Field("MultiAssetResponsiveDisplayAdAllowFlexibleColor", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdCallToActionText = new Field("MultiAssetResponsiveDisplayAdCallToActionText", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix = new Field("MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdDynamicSettingsPromoText = new Field("MultiAssetResponsiveDisplayAdDynamicSettingsPromoText", true, true); - - public static readonly Field MultiAssetResponsiveDisplayAdFormatSetting = new Field("MultiAssetResponsiveDisplayAdFormatSetting", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field MultiAssetResponsiveDisplayAdMarketingImages = Fields.MultiAssetResponsiveDisplayAdMarketingImages; - - public static readonly Field MultiAssetResponsiveDisplayAdSquareMarketingImages = Fields.MultiAssetResponsiveDisplayAdSquareMarketingImages; - - public static readonly Field MultiAssetResponsiveDisplayAdLogoImages = Fields.MultiAssetResponsiveDisplayAdLogoImages; - - public static readonly Field MultiAssetResponsiveDisplayAdLandscapeLogoImages = Fields.MultiAssetResponsiveDisplayAdLandscapeLogoImages; - - public static readonly Field MultiAssetResponsiveDisplayAdHeadlines = Fields.MultiAssetResponsiveDisplayAdHeadlines; - - public static readonly Field MultiAssetResponsiveDisplayAdLongHeadline = Fields.MultiAssetResponsiveDisplayAdLongHeadline; - - public static readonly Field MultiAssetResponsiveDisplayAdDescriptions = Fields.MultiAssetResponsiveDisplayAdDescriptions; - - public static readonly Field MultiAssetResponsiveDisplayAdBusinessName = Fields.MultiAssetResponsiveDisplayAdBusinessName; - - public static readonly Field MultiAssetResponsiveDisplayAdMainColor = Fields.MultiAssetResponsiveDisplayAdMainColor; - - public static readonly Field MultiAssetResponsiveDisplayAdAccentColor = Fields.MultiAssetResponsiveDisplayAdAccentColor; - - public static readonly Field MultiAssetResponsiveDisplayAdAllowFlexibleColor = Fields.MultiAssetResponsiveDisplayAdAllowFlexibleColor; - - public static readonly Field MultiAssetResponsiveDisplayAdCallToActionText = Fields.MultiAssetResponsiveDisplayAdCallToActionText; - - public static readonly Field MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix = Fields.MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix; - - public static readonly Field MultiAssetResponsiveDisplayAdDynamicSettingsPromoText = Fields.MultiAssetResponsiveDisplayAdDynamicSettingsPromoText; - - public static readonly Field MultiAssetResponsiveDisplayAdFormatSetting = Fields.MultiAssetResponsiveDisplayAdFormatSetting; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field MultiAssetResponsiveDisplayAdBusinessName = Fields.MultiAssetResponsiveDisplayAdBusinessName; - - public static readonly Field MultiAssetResponsiveDisplayAdMainColor = Fields.MultiAssetResponsiveDisplayAdMainColor; - - public static readonly Field MultiAssetResponsiveDisplayAdAccentColor = Fields.MultiAssetResponsiveDisplayAdAccentColor; - - public static readonly Field MultiAssetResponsiveDisplayAdAllowFlexibleColor = Fields.MultiAssetResponsiveDisplayAdAllowFlexibleColor; - - public static readonly Field MultiAssetResponsiveDisplayAdCallToActionText = Fields.MultiAssetResponsiveDisplayAdCallToActionText; - - public static readonly Field MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix = Fields.MultiAssetResponsiveDisplayAdDynamicSettingsPricePrefix; - - public static readonly Field MultiAssetResponsiveDisplayAdDynamicSettingsPromoText = Fields.MultiAssetResponsiveDisplayAdDynamicSettingsPromoText; - - public static readonly Field MultiAssetResponsiveDisplayAdFormatSetting = Fields.MultiAssetResponsiveDisplayAdFormatSetting; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an ImageAd. This is enabled for - /// AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ImageAd : Ad - { - private Image imageField; - - private string nameField; - - private long adToCopyImageFromField; - - private bool adToCopyImageFromFieldSpecified; - - /// The image data for the ad. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Image image - { - get - { - return this.imageField; - } - set - { - this.imageField = value; - } - } - - /// The name label for this ad. This field is - /// required and should not be null. This field can be selected using the value - /// "ImageCreativeName".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// For ADD operations only: use this field to specify an existing image ad to copy - /// the image from, in which case the "image" field can be left empty. This is the - /// preferred way of copying images over re-uploading the same image. This field is read only and will be ignored when - /// sent to the API for the following Operators: REMOVE and - /// SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long adToCopyImageFrom - { - get - { - return this.adToCopyImageFromField; - } - set - { - this.adToCopyImageFromField = value; - this.adToCopyImageFromSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adToCopyImageFromSpecified - { - get - { - return this.adToCopyImageFromFieldSpecified; - } - set - { - this.adToCopyImageFromFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ImageCreativeName = new Field("ImageCreativeName", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ImageCreativeName = Fields.ImageCreativeName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ImageCreativeName = Fields.ImageCreativeName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents Gmail ad.

Caution: Gmail ads do not use url, displayUrl, finalAppUrls, or devicePreference; Setting these fields on a Gmail - /// ad will cause an error. This is enabled for - /// AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GmailAd : Ad - { - private GmailTeaser teaserField; - - private Image headerImageField; - - private Image marketingImageField; - - private string marketingImageHeadlineField; - - private string marketingImageDescriptionField; - - private DisplayCallToAction marketingImageDisplayCallToActionField; - - private ProductImage[] productImagesField; - - private Video[] productVideoListField; - - /// Gmail teaser info. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public GmailTeaser teaser - { - get - { - return this.teaserField; - } - set - { - this.teaserField = value; - } - } - - /// Header image. An image must first be created using the MediaService, and - /// Image.mediaId must be populated when creating a "GmailAd". Valid image types are GIF, JPEG, and PNG. The - /// minimum size is 300x100 and the aspect ratio must be in 3:1 to 5:1 (+-1%). This field can be selected using the value - /// "GmailHeaderImage". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Image headerImage - { - get - { - return this.headerImageField; - } - set - { - this.headerImageField = value; - } - } - - /// Marketing image. An image must first be created using the MediaService, and - /// Image.mediaId must be populated when creating a "GmailAd".Valid image types are GIF, JPEG, and PNG. The - /// minimum size is 600x314 and the aspect ratio must be 600:314 (+-1%). For square - /// marketing image, the minimum size is 300x300 and the aspect ratio must be 1:1 - /// (+-1%). Either productVideos or marketingImage must be specified. This field can be selected using the value - /// "GmailMarketingImage". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Image marketingImage - { - get - { - return this.marketingImageField; - } - set - { - this.marketingImageField = value; - } - } - - /// Headline of the marketing image. Maximum display width is 25 characters. This field can be selected using the value - /// "MarketingImageHeadline".This field - /// can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string marketingImageHeadline - { - get - { - return this.marketingImageHeadlineField; - } - set - { - this.marketingImageHeadlineField = value; - } - } - - /// Description of the marketing image. Maximum display width is 90 characters. - /// This field can be selected using the value - /// "MarketingImageDescription".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string marketingImageDescription - { - get - { - return this.marketingImageDescriptionField; - } - set - { - this.marketingImageDescriptionField = value; - } - } - - /// Display-call-to-action of the marketing image. The DisplayCallToAction.urlId - /// field cannot be set when setting this field. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public DisplayCallToAction marketingImageDisplayCallToAction - { - get - { - return this.marketingImageDisplayCallToActionField; - } - set - { - this.marketingImageDisplayCallToActionField = value; - } - } - - /// Product images. Support up to 15 product images. This field can be selected using the value "ProductImages". - /// - [System.Xml.Serialization.XmlElementAttribute("productImages", Order = 6)] - public ProductImage[] productImages - { - get - { - return this.productImagesField; - } - set - { - this.productImagesField = value; - } - } - - /// Product Videos. Either productVideoList or marketingImage must be specified. - /// Supports up to 7 product videos. It must be a YouTube hosted video and mediaId - /// must be populated. The YouTube hosted video can be added to AdWords through - /// either the AdWords UI or through AdWords Scripts - /// (https://developers.google.com/adwords/scripts/docs/reference/adwordsapp/adwordsapp_videobuilder). - /// This field can be selected using the value - /// "ProductVideoList". - /// - [System.Xml.Serialization.XmlElementAttribute("productVideoList", Order = 7)] - public Video[] productVideoList - { - get - { - return this.productVideoListField; - } - set - { - this.productVideoListField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field GmailHeaderImage = new Field("GmailHeaderImage", false, true); - - public static readonly Field GmailMarketingImage = new Field("GmailMarketingImage", false, true); - - public static readonly Field MarketingImageHeadline = new Field("MarketingImageHeadline", true, true); - - public static readonly Field MarketingImageDescription = new Field("MarketingImageDescription", true, true); - - public static readonly Field ProductImages = new Field("ProductImages", false, true); - - public static readonly Field ProductVideoList = new Field("ProductVideoList", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field GmailHeaderImage = Fields.GmailHeaderImage; - - public static readonly Field GmailMarketingImage = Fields.GmailMarketingImage; - - public static readonly Field MarketingImageHeadline = Fields.MarketingImageHeadline; - - public static readonly Field MarketingImageDescription = Fields.MarketingImageDescription; - - public static readonly Field ProductImages = Fields.ProductImages; - - public static readonly Field ProductVideoList = Fields.ProductVideoList; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field MarketingImageHeadline = Fields.MarketingImageHeadline; - - public static readonly Field MarketingImageDescription = Fields.MarketingImageDescription; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Enhanced text ad format.

Caution: Expanded text ads do - /// not use url, displayUrl, finalAppUrls, or devicePreference; setting these fields on an - /// expanded text ad will cause an error. This - /// is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExpandedTextAd : Ad - { - private string headlinePart1Field; - - private string headlinePart2Field; - - private string descriptionField; - - private string path1Field; - - private string path2Field; - - /// First part of the headline. This field can - /// be selected using the value "HeadlinePart1".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string headlinePart1 - { - get - { - return this.headlinePart1Field; - } - set - { - this.headlinePart1Field = value; - } - } - - /// Second part of the headline. This field can - /// be selected using the value "HeadlinePart2".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string headlinePart2 - { - get - { - return this.headlinePart2Field; - } - set - { - this.headlinePart2Field = value; - } - } - - /// The descriptive text of the ad. This field - /// can be selected using the value "Description".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// Text that appears in the ad with the displayed URL. This field can be selected using the value "Path1".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string path1 - { - get - { - return this.path1Field; - } - set - { - this.path1Field = value; - } - } - - /// In addition to #path1, more text that appears with the - /// displayed URL. This field can be selected - /// using the value "Path2".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string path2 - { - get - { - return this.path2Field; - } - set - { - this.path2Field = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field HeadlinePart1 = new Field("HeadlinePart1", true, true); - - public static readonly Field HeadlinePart2 = new Field("HeadlinePart2", true, true); - - public static readonly Field Description = new Field("Description", true, true); - - public static readonly Field Path1 = new Field("Path1", true, true); - - public static readonly Field Path2 = new Field("Path2", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field HeadlinePart1 = Fields.HeadlinePart1; - - public static readonly Field HeadlinePart2 = Fields.HeadlinePart2; - - public static readonly Field Description = Fields.Description; - - public static readonly Field Path1 = Fields.Path1; - - public static readonly Field Path2 = Fields.Path2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field HeadlinePart1 = Fields.HeadlinePart1; - - public static readonly Field HeadlinePart2 = Fields.HeadlinePart2; - - public static readonly Field Description = Fields.Description; - - public static readonly Field Path1 = Fields.Path1; - - public static readonly Field Path2 = Fields.Path2; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an ExpandedDynamicSearchAd. This ad will have its headline, final - /// URLs and display URL auto-generated at serving time according to domain name - /// specific information provided by DynamicSearchAdsSetting linked at the campaign - /// level.

Auto-generated fields: headline, final URLs and display URL.

- ///

Required fields: description.

The tracking URL - /// field must contain at least one of the following placeholder tags (URL - /// parameters):

  • {unescapedlpurl}
  • {escapedlpurl}
  • - ///
  • {lpurl}
  • {lpurl+2}
  • {lpurl+3}
    - ///
  • {unescapedlpurl} will be replaced with the full landing page URL of the - /// displayed ad. Extra query parameters can be added to the end, e.g.: - /// "{unescapedlpurl}?lang=en".
  • {escapedlpurl} will be replaced with the - /// URL-encoded version of the full landing page URL. This makes it suitable for use - /// as a query parameter value (e.g.: - /// "http://www.3rdpartytracker.com/?lp={escapedlpurl}") but not at the beginning of - /// the URL field.
  • {lpurl} encodes the "?" and "=" of the landing page URL - /// making it suitable for use as a query parameter. If found at the beginning of - /// the URL field, it is replaced by the {unescapedlpurl} value. E.g.: - /// "http://tracking.com/redir.php?tracking=xyz&url={lpurl}".
  • {lpurl+2} - /// and {lpurl+3} will be replaced with the landing page URL escaped two or three - /// times, respectively. This makes it suitable if there is a chain of redirects in - /// the tracking URL.
This is enabled - /// for AdX. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExpandedDynamicSearchAd : Ad - { - private string descriptionField; - - /// The descriptive text of the ad. This field - /// can be selected using the value "Description".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Description = new Field("Description", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Description = Fields.Description; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Description = Fields.Description; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a deprecated ad. Deprecated ads can be deleted, but cannot be - /// created. This is disabled for AdX when it is - /// contained within Operators: ADD, SET. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DeprecatedAd : Ad - { - private string nameField; - - private DeprecatedAdType deprecatedAdTypeField; - - private bool deprecatedAdTypeFieldSpecified; - - /// Name of the ad. This field can be selected - /// using the value "Name". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Type of the creative. This field can be - /// selected using the value "Type". This - /// field is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public DeprecatedAdType deprecatedAdType - { - get - { - return this.deprecatedAdTypeField; - } - set - { - this.deprecatedAdTypeField = value; - this.deprecatedAdTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool deprecatedAdTypeSpecified - { - get - { - return this.deprecatedAdTypeFieldSpecified; - } - set - { - this.deprecatedAdTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Name = new Field("Name", false, true); - - public static readonly Field Type = new Field("Type", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Name = Fields.Name; - - public static readonly Field Type = Fields.Type; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DeprecatedAd.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DeprecatedAdType - { - /// Video ad. - /// - VIDEO = 0, - /// Click to call ad. - /// - CLICK_TO_CALL = 1, - /// Instream video ad. - /// - IN_STREAM_VIDEO = 2, - /// Froogle ad. - /// - FROOGLE = 3, - /// Text link ad. - /// - TEXT_LINK = 4, - /// Gadget ad. - /// - GADGET = 5, - /// Print ad. - /// - PRINT = 6, - /// Wide text ad. - /// - TEXT_WIDE = 7, - /// Gadget template ad. - /// - GADGET_TEMPLATE = 8, - /// Text ad with video. - /// - TEXT_WITH_VIDEO = 9, - /// Audio ad. - /// - AUDIO = 10, - /// Local business ads. - /// - LOCAL_BUSINESS_AD = 11, - /// Audio based template ads. - /// - AUDIO_TEMPLATE = 12, - /// Mobile ads - /// - MOBILE_AD = 13, - /// Mobile image ads - /// - MOBILE_IMAGE_AD = 14, - UNKNOWN = 15, - } - - - /// Represents a CallOnlyAd.

Caution: Call only ads do not - /// use url, finalUrls, finalMobileUrls, finalAppUrls, urlCustomParameters, or trackingUrlTemplate; setting these fields on a - /// call only ad will cause an error. This is - /// enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CallOnlyAd : Ad - { - private string countryCodeField; - - private string phoneNumberField; - - private string businessNameField; - - private string description1Field; - - private string description2Field; - - private bool callTrackedField; - - private bool callTrackedFieldSpecified; - - private bool disableCallConversionField; - - private bool disableCallConversionFieldSpecified; - - private long conversionTypeIdField; - - private bool conversionTypeIdFieldSpecified; - - private string phoneNumberVerificationUrlField; - - /// Two letter country code for the ad. Examples: 'US', 'GB'. This field can be selected using the value - /// "CallOnlyAdCountryCode".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string countryCode - { - get - { - return this.countryCodeField; - } - set - { - this.countryCodeField = value; - } - } - - /// Phone number string for the ad. Examples: '(800) 356-9377', "16502531234", - /// "+442001234567" This field can be selected - /// using the value "CallOnlyAdPhoneNumber".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string phoneNumber - { - get - { - return this.phoneNumberField; - } - set - { - this.phoneNumberField = value; - } - } - - /// Business name of the ad. This field can be - /// selected using the value "CallOnlyAdBusinessName".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string businessName - { - get - { - return this.businessNameField; - } - set - { - this.businessNameField = value; - } - } - - /// First line of ad text. This field can be - /// selected using the value "CallOnlyAdDescription1".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string description1 - { - get - { - return this.description1Field; - } - set - { - this.description1Field = value; - } - } - - /// Second line of ad text. This field can be - /// selected using the value "CallOnlyAdDescription2".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string description2 - { - get - { - return this.description2Field; - } - set - { - this.description2Field = value; - } - } - - /// If set to true, enable call tracking for the creative. Enabling call tracking - /// also enables call conversions. This field - /// can be selected using the value "CallOnlyAdCallTracked". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool callTracked - { - get - { - return this.callTrackedField; - } - set - { - this.callTrackedField = value; - this.callTrackedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool callTrackedSpecified - { - get - { - return this.callTrackedFieldSpecified; - } - set - { - this.callTrackedFieldSpecified = value; - } - } - - /// By default, call conversions are enabled when callTracked is on. To disable call - /// conversions, set this field to true. Only in effect if callTracked is also set - /// to true. If callTracked is set to false, this field is ignored. This field can be selected using the value - /// "CallOnlyAdDisableCallConversion". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public bool disableCallConversion - { - get - { - return this.disableCallConversionField; - } - set - { - this.disableCallConversionField = value; - this.disableCallConversionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool disableCallConversionSpecified - { - get - { - return this.disableCallConversionFieldSpecified; - } - set - { - this.disableCallConversionFieldSpecified = value; - } - } - - /// Conversion type to attribute a call conversion to. If not set, then a default - /// conversion type id is used. Only in effect if callTracked is also set to true - /// otherwise this field is ignored. This field - /// can be selected using the value "CallOnlyAdConversionTypeId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public long conversionTypeId - { - get - { - return this.conversionTypeIdField; - } - set - { - this.conversionTypeIdField = value; - this.conversionTypeIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool conversionTypeIdSpecified - { - get - { - return this.conversionTypeIdFieldSpecified; - } - set - { - this.conversionTypeIdFieldSpecified = value; - } - } - - /// Url to be used for phone number verification. This field can be selected using the value - /// "CallOnlyAdPhoneNumberVerificationUrl".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public string phoneNumberVerificationUrl - { - get - { - return this.phoneNumberVerificationUrlField; - } - set - { - this.phoneNumberVerificationUrlField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Ad.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CallOnlyAdCountryCode = new Field("CallOnlyAdCountryCode", true, true); - - public static readonly Field CallOnlyAdPhoneNumber = new Field("CallOnlyAdPhoneNumber", true, true); - - public static readonly Field CallOnlyAdBusinessName = new Field("CallOnlyAdBusinessName", true, true); - - public static readonly Field CallOnlyAdDescription1 = new Field("CallOnlyAdDescription1", true, true); - - public static readonly Field CallOnlyAdDescription2 = new Field("CallOnlyAdDescription2", true, true); - - public static readonly Field CallOnlyAdCallTracked = new Field("CallOnlyAdCallTracked", false, true); - - public static readonly Field CallOnlyAdDisableCallConversion = new Field("CallOnlyAdDisableCallConversion", false, true); - - public static readonly Field CallOnlyAdConversionTypeId = new Field("CallOnlyAdConversionTypeId", false, true); - - public static readonly Field CallOnlyAdPhoneNumberVerificationUrl = new Field("CallOnlyAdPhoneNumberVerificationUrl", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Ad.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CallOnlyAdCountryCode = Fields.CallOnlyAdCountryCode; - - public static readonly Field CallOnlyAdPhoneNumber = Fields.CallOnlyAdPhoneNumber; - - public static readonly Field CallOnlyAdBusinessName = Fields.CallOnlyAdBusinessName; - - public static readonly Field CallOnlyAdDescription1 = Fields.CallOnlyAdDescription1; - - public static readonly Field CallOnlyAdDescription2 = Fields.CallOnlyAdDescription2; - - public static readonly Field CallOnlyAdCallTracked = Fields.CallOnlyAdCallTracked; - - public static readonly Field CallOnlyAdDisableCallConversion = Fields.CallOnlyAdDisableCallConversion; - - public static readonly Field CallOnlyAdConversionTypeId = Fields.CallOnlyAdConversionTypeId; - - public static readonly Field CallOnlyAdPhoneNumberVerificationUrl = Fields.CallOnlyAdPhoneNumberVerificationUrl; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Ad.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CallOnlyAdCountryCode = Fields.CallOnlyAdCountryCode; - - public static readonly Field CallOnlyAdPhoneNumber = Fields.CallOnlyAdPhoneNumber; - - public static readonly Field CallOnlyAdBusinessName = Fields.CallOnlyAdBusinessName; - - public static readonly Field CallOnlyAdDescription1 = Fields.CallOnlyAdDescription1; - - public static readonly Field CallOnlyAdDescription2 = Fields.CallOnlyAdDescription2; - - public static readonly Field CallOnlyAdPhoneNumberVerificationUrl = Fields.CallOnlyAdPhoneNumberVerificationUrl; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an ad in an ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAd - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private Ad adField; - - private AdGroupAdStatus statusField; - - private bool statusFieldSpecified; - - private AdGroupAdPolicySummary policySummaryField; - - private Label[] labelsField; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - private String_StringMapEntry[] forwardCompatibilityMapField; - - /// The id of the adgroup containing this ad. This field can be selected using the value "AdGroupId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The contents of the ad itself. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Ad ad - { - get - { - return this.adField; - } - set - { - this.adField = value; - } - } - - /// The status of the ad. This field is required and should not be null - /// when it is contained within Operators : SET. This field can be selected using the value - /// "Status".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public AdGroupAdStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Summary of policy findings for this ad. This - /// field can be selected using the value "PolicySummary". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public AdGroupAdPolicySummary policySummary - { - get - { - return this.policySummaryField; - } - set - { - this.policySummaryField = value; - } - } - - /// Labels that are attached to the AdGroupAd. To associate an existing Label to an existing AdGroupAd, use AdGroupAdService#mutateLabel with ADD - /// operator. To remove an associated Label from the AdGroupAd, use AdGroupAdService#mutateLabel with REMOVE - /// operator. To filter on Labels, use one of Predicate.Operator#CONTAINS_ALL, Predicate.Operator#CONTAINS_ANY, Predicate.Operator#CONTAINS_NONE - /// operators with a list of Label ids. This field can be selected using the value "Labels".This field can be filtered on. This field may not be set for campaign channel - /// subtype UNIVERSAL_APP_CAMPAIGN. This - /// field is read only and will be ignored when sent to the API for the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute("labels", Order = 4)] - public Label[] labels - { - get - { - return this.labelsField; - } - set - { - this.labelsField = value; - } - } - - /// ID of the base campaign from which this draft/trial ad was created. This field - /// is only returned on get requests. This field - /// can be selected using the value "BaseCampaignId".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// ID of the base ad group from which this draft/trial ad was created. For base ad - /// groups this is equal to the ad group ID. If the ad group was created in the - /// draft or trial and has no corresponding base ad group, this field is null. This - /// field is only returned on get requests. This - /// field can be selected using the value "BaseAdGroupId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// This Map provides a place to put new features and settings in older versions of - /// the AdWords API in the rare instance we need to introduce a new feature in an - /// older version. It is presently unused. Do not set a value. - /// - [System.Xml.Serialization.XmlElementAttribute("forwardCompatibilityMap", Order = 7)] - public String_StringMapEntry[] forwardCompatibilityMap - { - get - { - return this.forwardCompatibilityMapField; - } - set - { - this.forwardCompatibilityMapField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field PolicySummary = new Field("PolicySummary", false, true); - - public static readonly Field Labels = new Field("Labels", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field Status = Fields.Status; - - public static readonly Field PolicySummary = Fields.PolicySummary; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The current status of an Ad. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupAd.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupAdStatus - { - /// Enabled. - /// - ENABLED = 0, - /// Paused. - /// - PAUSED = 1, - /// Disabled. - /// - DISABLED = 2, - } - - - /// Contains the results from a get call. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdPage))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignCriterionPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignBidModifierPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NullStatsPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignFeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupPerformanceTargetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NoStatsPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConversionTrackerPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerNegativeCriterionPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupFeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerFeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionBidLandscapePage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidLandscapePage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DomainCategoryPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemTargetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedMappingPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManagedCustomerPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineDataUploadPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UserListPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignSharedSetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedCriterionPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedSetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LabelPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCustomizerFeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupExtensionSettingPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignExtensionSettingPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerExtensionSettingPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DraftPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DraftAsyncErrorPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrialPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrialAsyncErrorPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidModifierPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BatchJobPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BiddingStrategyPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetOrderPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetPage))] - public abstract partial class Page - { - private int totalNumEntriesField; - - private bool totalNumEntriesFieldSpecified; - - private string pageTypeField; - - /// Total number of entries in the result that this page is a part of. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int totalNumEntries - { - get - { - return this.totalNumEntriesField; - } - set - { - this.totalNumEntriesField = value; - this.totalNumEntriesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalNumEntriesSpecified - { - get - { - return this.totalNumEntriesFieldSpecified; - } - set - { - this.totalNumEntriesFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of Page. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Page.Type", Order = 1)] - public string PageType - { - get - { - return this.pageTypeField; - } - set - { - this.pageTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a page of AdGroupAds resulting from the query - /// done by AdGroupAdService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdPage : Page - { - private AdGroupAd[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroupAd[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies the page of results to return in the response. A page is specified by - /// the result position to start at and the maximum number of results to return. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Paging - { - private int startIndexField; - - private bool startIndexFieldSpecified; - - private int numberResultsField; - - private bool numberResultsFieldSpecified; - - /// Index of the first result to return in this page. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int startIndex - { - get - { - return this.startIndexField; - } - set - { - this.startIndexField = value; - this.startIndexSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool startIndexSpecified - { - get - { - return this.startIndexFieldSpecified; - } - set - { - this.startIndexFieldSpecified = value; - } - } - - /// Maximum number of results to return in this page. Set this to a reasonable value - /// to limit the number of results returned per page. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int numberResults - { - get - { - return this.numberResultsField; - } - set - { - this.numberResultsField = value; - this.numberResultsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool numberResultsSpecified - { - get - { - return this.numberResultsFieldSpecified; - } - set - { - this.numberResultsFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies how the resulting information should be sorted. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OrderBy - { - private string fieldField; - - private SortOrder sortOrderField; - - private bool sortOrderFieldSpecified; - - /// The field to sort the results on. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string field - { - get - { - return this.fieldField; - } - set - { - this.fieldField = value; - } - } - - /// The order to sort the results on. The default sort order is SortOrder#ASCENDING. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public SortOrder sortOrder - { - get - { - return this.sortOrderField; - } - set - { - this.sortOrderField = value; - this.sortOrderSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sortOrderSpecified - { - get - { - return this.sortOrderFieldSpecified; - } - set - { - this.sortOrderFieldSpecified = value; - } - } - } - - - /// Possible orders of sorting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SortOrder - { - ASCENDING = 0, - DESCENDING = 1, - } - - - /// Represents a range of dates that has either an upper or a lower bound. The - /// format for the date is YYYYMMDD. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DateRange - { - private string minField; - - private string maxField; - - /// the lower bound of this date range, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string min - { - get - { - return this.minField; - } - set - { - this.minField = value; - } - } - - /// the upper bound of this date range, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string max - { - get - { - return this.maxField; - } - set - { - this.maxField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies how an entity (eg. adgroup, campaign, criterion, ad) should be - /// filtered. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Predicate - { - private string fieldField; - - private PredicateOperator operatorField; - - private bool operatorFieldSpecified; - - private string[] valuesField; - - /// The field by which to filter the returned data. Possible values are marked - /// Filterable on the entity's reference page. For example, for predicates for the - /// CampaignService selector, refer to the filterable fields - /// from the Campaign reference page. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string field - { - get - { - return this.fieldField; - } - set - { - this.fieldField = value; - } - } - - /// The operator to use for filtering the data returned. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public PredicateOperator @operator - { - get - { - return this.operatorField; - } - set - { - this.operatorField = value; - this.operatorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operatorSpecified - { - get - { - return this.operatorFieldSpecified; - } - set - { - this.operatorFieldSpecified = value; - } - } - - /// The values by which to filter the field. The Operator#CONTAINS_ALL, Operator#CONTAINS_ANY, Operator#CONTAINS_NONE, Operator#IN and Operator#NOT_IN take multiple values. All others take - /// a single value. This field must not - /// contain elements. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("values", Order = 2)] - public string[] values - { - get - { - return this.valuesField; - } - set - { - this.valuesField = value; - } - } - } - - - /// Defines the valid set of operators. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Predicate.Operator", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PredicateOperator - { - /// Checks if the field is equal to the given value.

This operator is used with - /// integers, dates, booleans, strings, enums, and sets.

- ///
- EQUALS = 0, - /// Checks if the field does not equal the given value.

This operator is used - /// with integers, booleans, strings, enums, and sets.

- ///
- NOT_EQUALS = 1, - /// Checks if the field is equal to one of the given values.

This operator - /// accepts multiple operands and is used with integers, booleans, strings, and - /// enums.

- ///
- IN = 2, - /// Checks if the field does not equal any of the given values.

This operator - /// accepts multiple operands and is used with integers, booleans, strings, and - /// enums.

- ///
- NOT_IN = 3, - /// Checks if the field is greater than the given value.

This operator is used - /// with numbers and dates.

- ///
- GREATER_THAN = 4, - /// Checks if the field is greater or equal to the given value.

This operator is - /// used with numbers and dates.

- ///
- GREATER_THAN_EQUALS = 5, - /// Checks if the field is less than the given value.

This operator is used with - /// numbers and dates.

- ///
- LESS_THAN = 6, - /// Checks if the field is less or equal to than the given value.

This operator - /// is used with numbers and dates.

- ///
- LESS_THAN_EQUALS = 7, - /// Checks if the field starts with the given value.

This operator is used with - /// strings.

- ///
- STARTS_WITH = 8, - /// Checks if the field starts with the given value, ignoring case.

This operator - /// is used with strings.

- ///
- STARTS_WITH_IGNORE_CASE = 9, - /// Checks if the field contains the given value as a substring.

This operator is - /// used with strings.

- ///
- CONTAINS = 10, - /// Checks if the field contains the given value as a substring, ignoring case. - ///

This operator is used with strings.

- ///
- CONTAINS_IGNORE_CASE = 11, - /// Checks if the field does not contain the given value as a substring.

This - /// operator is used with strings.

- ///
- DOES_NOT_CONTAIN = 12, - /// Checks if the field does not contain the given value as a substring, ignoring - /// case.

This operator is used with strings.

- ///
- DOES_NOT_CONTAIN_IGNORE_CASE = 13, - /// Checks if the field contains any of the given values.

This operator - /// accepts multiple values and is used on sets of numbers or strings.

- ///
- CONTAINS_ANY = 14, - /// Checks if the field contains all of the given values.

This operator - /// accepts multiple values and is used on sets of numbers or strings.

- ///
- CONTAINS_ALL = 15, - /// Checks if the field contains none of the given values.

This operator - /// accepts multiple values and is used on sets of numbers or strings.

- ///
- CONTAINS_NONE = 16, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 17, - } - - - /// A generic selector to specify the type of information to return. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Selector - { - private string[] fieldsField; - - private Predicate[] predicatesField; - - private DateRange dateRangeField; - - private OrderBy[] orderingField; - - private Paging pagingField; - - /// List of fields to select. Possible values are marked - /// Selectable on the entity's reference page. For example, for the - /// CampaignService selector, refer to the selectable fields from the - /// Campaign reference page. This field must contain distinct elements. This field must not contain - /// elements. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("fields", Order = 0)] - public string[] fields - { - get - { - return this.fieldsField; - } - set - { - this.fieldsField = value; - } - } - - /// Specifies how an entity (eg. adgroup, campaign, criterion, ad) should be - /// filtered. This field must not contain - /// null elements. - /// - [System.Xml.Serialization.XmlElementAttribute("predicates", Order = 1)] - public Predicate[] predicates - { - get - { - return this.predicatesField; - } - set - { - this.predicatesField = value; - } - } - - /// Range of dates for which you want to include data. If this value is omitted, - /// results for all dates are returned.

Note: This field is - /// only used by the report download service. For all other services, it is - /// ignored.

This range must be - /// contained within the range [19700101, 20380101]. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public DateRange dateRange - { - get - { - return this.dateRangeField; - } - set - { - this.dateRangeField = value; - } - } - - /// The fields on which you want to sort, and the sort order. The order in the list - /// is significant: The first element in the list indicates the primary sort order, - /// the next specifies the secondary sort order and so on. - /// - [System.Xml.Serialization.XmlElementAttribute("ordering", Order = 3)] - public OrderBy[] ordering - { - get - { - return this.orderingField; - } - set - { - this.orderingField = value; - } - } - - /// Pagination information. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Paging paging - { - get - { - return this.pagingField; - } - set - { - this.pagingField = value; - } - } - } - - - /// Url Validation errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UrlError : ApiError - { - private UrlErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UrlErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the url error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "UrlError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum UrlErrorReason - { - /// The tracking url template is invalid. - /// - INVALID_TRACKING_URL_TEMPLATE = 0, - /// The tracking url template contains invalid tag. - /// - INVALID_TAG_IN_TRACKING_URL_TEMPLATE = 1, - /// The tracking url template must contain at least one tag (e.g. {lpurl}), This - /// applies only to tracking url template associated with website ads or product - /// ads. - /// - MISSING_TRACKING_URL_TEMPLATE_TAG = 2, - /// The tracking url template must start with a valid protocol (or lpurl tag). - /// - MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 3, - /// The tracking url template starts with an invalid protocol. - /// - INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 4, - /// The tracking url template contains illegal characters. - /// - MALFORMED_TRACKING_URL_TEMPLATE = 5, - /// The tracking url template must contain a host name (or lpurl tag). - /// - MISSING_HOST_IN_TRACKING_URL_TEMPLATE = 6, - /// The tracking url template has an invalid or missing top level domain extension. - /// - INVALID_TLD_IN_TRACKING_URL_TEMPLATE = 7, - /// The tracking url template contains nested occurrences of the same conditional - /// tag (i.e. {ifmobile:{ifmobile:x}}). - /// - REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG = 8, - /// The final url is invalid. - /// - INVALID_FINAL_URL = 9, - /// The final url contains invalid tag. - /// - INVALID_TAG_IN_FINAL_URL = 10, - /// The final url contains nested occurrences of the same conditional tag (i.e. - /// {ifmobile:{ifmobile:x}}). - /// - REDUNDANT_NESTED_FINAL_URL_TAG = 11, - /// The final url must start with a valid protocol. - /// - MISSING_PROTOCOL_IN_FINAL_URL = 12, - /// The final url starts with an invalid protocol. - /// - INVALID_PROTOCOL_IN_FINAL_URL = 13, - /// The final url contains illegal characters. - /// - MALFORMED_FINAL_URL = 14, - /// The final url must contain a host name. - /// - MISSING_HOST_IN_FINAL_URL = 15, - /// The tracking url template has an invalid or missing top level domain extension. - /// - INVALID_TLD_IN_FINAL_URL = 16, - /// The final mobile url is invalid. - /// - INVALID_FINAL_MOBILE_URL = 17, - /// The final mobile url contains invalid tag. - /// - INVALID_TAG_IN_FINAL_MOBILE_URL = 18, - /// The final mobile url contains nested occurrences of the same conditional tag - /// (i.e. {ifmobile:{ifmobile:x}}). - /// - REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG = 19, - /// The final mobile url must start with a valid protocol. - /// - MISSING_PROTOCOL_IN_FINAL_MOBILE_URL = 20, - /// The final mobile url starts with an invalid protocol. - /// - INVALID_PROTOCOL_IN_FINAL_MOBILE_URL = 21, - /// The final mobile url contains illegal characters. - /// - MALFORMED_FINAL_MOBILE_URL = 22, - /// The final mobile url must contain a host name. - /// - MISSING_HOST_IN_FINAL_MOBILE_URL = 23, - /// The tracking url template has an invalid or missing top level domain extension. - /// - INVALID_TLD_IN_FINAL_MOBILE_URL = 24, - /// The final app url is invalid. - /// - INVALID_FINAL_APP_URL = 25, - /// The final app url contains invalid tag. - /// - INVALID_TAG_IN_FINAL_APP_URL = 26, - /// The final app url contains nested occurrences of the same conditional tag (i.e. - /// {ifmobile:{ifmobile:x}}). - /// - REDUNDANT_NESTED_FINAL_APP_URL_TAG = 27, - /// More than one app url found for the same OS type. - /// - MULTIPLE_APP_URLS_FOR_OSTYPE = 28, - /// The OS type given for an app url is not valid. - /// - INVALID_OSTYPE = 29, - /// The protocol given for an app url is not valid. (E.g. "android-app://") - /// - INVALID_PROTOCOL_FOR_APP_URL = 30, - /// The package id (app id) given for an app url is not valid. - /// - INVALID_PACKAGE_ID_FOR_APP_URL = 31, - /// The number of url custom parameters for an entity exceeds the maximum limit - /// allowed. - /// - URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT = 32, - /// The parameter has isRemove set to true but a value that is non-null. - /// - URL_CUSTOM_PARAMETER_REMOVAL_WITH_NON_NULL_VALUE = 33, - /// For add operations, there will not be any existing parameters to delete. - /// - CANNOT_REMOVE_URL_CUSTOM_PARAMETER_IN_ADD_OPERATION = 34, - /// When the doReplace flag is set to true, individual parameters cannot be deleted. - /// - CANNOT_REMOVE_URL_CUSTOM_PARAMETER_DURING_FULL_REPLACEMENT = 35, - /// The final url suffix cannot begin with ? or & characters and must be a valid - /// query string. - /// - FINAL_URL_SUFFIX_MALFORMED = 49, - /// The final url suffix cannot contain {lpurl} related or {ignore} tags. - /// - INVALID_TAG_IN_FINAL_URL_SUFFIX = 50, - /// For ADD operations and when the doReplace flag is set to true, custom parameter - /// values cannot be null. - /// - NULL_CUSTOM_PARAMETER_VALUE_DURING_ADD_OR_FULL_REPLACEMENT = 36, - /// An invalid character appears in the parameter key. - /// - INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY = 37, - /// An invalid character appears in the parameter value. - /// - INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE = 38, - /// The url custom parameter value fails url tag validation. - /// - INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE = 39, - /// The custom parameter contains nested occurrences of the same conditional tag - /// (i.e. {ifmobile:{ifmobile:x}}). - /// - REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG = 40, - /// The protocol (http:// or https://) is missing. - /// - MISSING_PROTOCOL = 41, - /// The url is invalid. - /// - INVALID_URL = 42, - /// Destination Url is deprecated. - /// - DESTINATION_URL_DEPRECATED = 43, - /// The url contains invalid tag. - /// - INVALID_TAG_IN_URL = 44, - /// The url must contain at least one tag (e.g. {lpurl}), This applies only to urls - /// associated with website ads or product ads. - /// - MISSING_URL_TAG = 45, - DUPLICATE_URL_ID = 47, - INVALID_URL_ID = 48, - URL_ERROR = 46, - } - - - /// Errors associated with the length of the given string being out of bounds. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class StringLengthError : ApiError - { - private StringLengthErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public StringLengthErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "StringLengthError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum StringLengthErrorReason - { - TOO_SHORT = 0, - TOO_LONG = 1, - } - - - /// A list of error code for reporting invalid content of input strings. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class StringFormatError : ApiError - { - private StringFormatErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public StringFormatErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "StringFormatError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum StringFormatErrorReason - { - UNKNOWN = 0, - /// The input string value contains disallowed characters. - /// - ILLEGAL_CHARS = 1, - /// The input string value is invalid for the associated field. - /// - INVALID_FORMAT = 2, - } - - - /// Represents possible error codes when querying for stats. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class StatsQueryError : ApiError - { - private StatsQueryErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public StatsQueryErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for errors when querying for stats. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "StatsQueryError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum StatsQueryErrorReason - { - /// Date is outside of allowed range. - /// - DATE_NOT_IN_VALID_RANGE = 0, - } - - - /// Indicates that the number of entries in the request or response exceeds the - /// system limit. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SizeLimitError : ApiError - { - private SizeLimitErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SizeLimitErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for Ad Scheduling errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SizeLimitError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SizeLimitErrorReason - { - /// The number of entries in the request exceeds the system limit. - /// - REQUEST_SIZE_LIMIT_EXCEEDED = 0, - /// The number of entries in the response exceeds the system limit. - /// - RESPONSE_SIZE_LIMIT_EXCEEDED = 1, - /// The account is too large to load. - /// - INTERNAL_STORAGE_ERROR = 2, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 3, - } - - - /// Represents possible error codes for Selector. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SelectorError : ApiError - { - private SelectorErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SelectorErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SelectorError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SelectorErrorReason - { - /// The field name is not valid. - /// - INVALID_FIELD_NAME = 0, - /// The list of fields is null or empty. - /// - MISSING_FIELDS = 1, - /// The list of predicates is null or empty. - /// - MISSING_PREDICATES = 2, - /// Predicate operator does not support multiple values. Multiple values are - /// supported only for Predicate.Operator#IN and - /// Predicate.Operator#NOT_IN. - /// - OPERATOR_DOES_NOT_SUPPORT_MULTIPLE_VALUES = 3, - /// The predicate enum value is not valid. - /// - INVALID_PREDICATE_ENUM_VALUE = 4, - /// The predicate operator is empty. - /// - MISSING_PREDICATE_OPERATOR = 5, - /// The predicate values are empty. - /// - MISSING_PREDICATE_VALUES = 6, - /// The predicate field name is not valid. - /// - INVALID_PREDICATE_FIELD_NAME = 7, - /// The predicate operator is not valid. - /// - INVALID_PREDICATE_OPERATOR = 8, - /// Invalid selection of fields. - /// - INVALID_FIELD_SELECTION = 9, - /// The predicate value is not valid. - /// - INVALID_PREDICATE_VALUE = 10, - /// The sort field name is not valid or the field is not sortable. - /// - INVALID_SORT_FIELD_NAME = 11, - /// Standard error. - /// - SELECTOR_ERROR = 12, - /// Filtering by date range is not supported. - /// - FILTER_BY_DATE_RANGE_NOT_SUPPORTED = 13, - /// Selector paging start index is too high. - /// - START_INDEX_IS_TOO_HIGH = 14, - /// The values list in a predicate was too long. - /// - TOO_MANY_PREDICATE_VALUES = 15, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN_ERROR = 16, - } - - - /// Errors due to missing required field. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RequiredError : ApiError - { - private RequiredErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RequiredErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RequiredError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RequiredErrorReason - { - /// Missing required field. - /// - REQUIRED = 0, - } - - - /// Encapsulates the generic errors thrown when there's an error with user request. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RequestError : ApiError - { - private RequestErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RequestErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RequestError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RequestErrorReason - { - /// Error reason is unknown. - /// - UNKNOWN = 0, - /// Invalid input. - /// - INVALID_INPUT = 1, - /// The api version in the request has been discontinued. Please update to the new - /// AdWords API version. - /// - UNSUPPORTED_VERSION = 2, - } - - - /// Indicates that a field was rejected due to compatibility issues. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RejectedError : ApiError - { - private RejectedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RejectedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RejectedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RejectedErrorReason - { - /// Unknown value encountered - /// - UNKNOWN_VALUE = 0, - } - - - /// Errors from attempting to write to read-only fields. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ReadOnlyError : ApiError - { - private ReadOnlyErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ReadOnlyErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ReadOnlyError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ReadOnlyErrorReason - { - READ_ONLY = 0, - } - - - /// Signals that a call failed because a measured rate exceeded. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RateExceededError : ApiError - { - private RateExceededErrorReason reasonField; - - private bool reasonFieldSpecified; - - private string rateNameField; - - private string rateScopeField; - - private int retryAfterSecondsField; - - private bool retryAfterSecondsFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RateExceededErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// Cause of the rate exceeded error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string rateName - { - get - { - return this.rateNameField; - } - set - { - this.rateNameField = value; - } - } - - /// The scope of the rate (ACCOUNT/DEVELOPER). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string rateScope - { - get - { - return this.rateScopeField; - } - set - { - this.rateScopeField = value; - } - } - - /// The amount of time (in seconds) the client should wait before retrying the - /// request. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int retryAfterSeconds - { - get - { - return this.retryAfterSecondsField; - } - set - { - this.retryAfterSecondsField = value; - this.retryAfterSecondsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool retryAfterSecondsSpecified - { - get - { - return this.retryAfterSecondsFieldSpecified; - } - set - { - this.retryAfterSecondsFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reason for the rate exceeded error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RateExceededError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RateExceededErrorReason - { - /// Rate exceeded. - /// - RATE_EXCEEDED = 0, - } - - - /// A list of all errors associated with the Range constraint. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RangeError : ApiError - { - private RangeErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RangeErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RangeError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RangeErrorReason - { - TOO_LOW = 0, - TOO_HIGH = 1, - } - - - /// Encapsulates the errors thrown during developer quota checks. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class QuotaCheckError : ApiError - { - private QuotaCheckErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public QuotaCheckErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Enums for all the reasons an error can be thrown to the user during billing - /// quota checks. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "QuotaCheckError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum QuotaCheckErrorReason - { - /// Customer passed in an invalid token in the header. - /// - INVALID_TOKEN_HEADER = 0, - /// Customer is marked delinquent. - /// - ACCOUNT_DELINQUENT = 1, - /// Customer is a fraudulent. - /// - ACCOUNT_INACCESSIBLE = 2, - /// Inactive Account. - /// - ACCOUNT_INACTIVE = 3, - /// Signup not complete - /// - INCOMPLETE_SIGNUP = 4, - /// Developer token is not approved for production access, and the customer is - /// attempting to access a production account. - /// - DEVELOPER_TOKEN_NOT_APPROVED = 5, - /// Terms and conditions are not signed. - /// - TERMS_AND_CONDITIONS_NOT_SIGNED = 6, - /// Monthly budget quota reached. - /// - MONTHLY_BUDGET_REACHED = 7, - /// Monthly budget quota exceeded. - /// - QUOTA_EXCEEDED = 8, - } - - - /// A QueryError represents possible errors for query parsing and execution. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class QueryError : ApiError - { - private QueryErrorReason reasonField; - - private bool reasonFieldSpecified; - - private string messageField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public QueryErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string message - { - get - { - return this.messageField; - } - set - { - this.messageField = value; - } - } - } - - - /// The reason for the query error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "QueryError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum QueryErrorReason - { - /// Exception that happens when trying to parse a query that doesn't match the AWQL - /// grammar. - /// - PARSING_FAILED = 0, - /// The provided query is an empty string. - /// - MISSING_QUERY = 1, - /// The query does not contain the required SELECT clause or it is not in the - /// correct location. - /// - MISSING_SELECT_CLAUSE = 2, - /// The query does not contain the required FROM clause or it is not in the correct - /// location. - /// - MISSING_FROM_CLAUSE = 3, - /// The SELECT clause could not be parsed. - /// - INVALID_SELECT_CLAUSE = 4, - /// The FROM clause could not be parsed. - /// - INVALID_FROM_CLAUSE = 5, - /// The WHERE clause could not be parsed. - /// - INVALID_WHERE_CLAUSE = 6, - /// The ORDER BY clause could not be parsed. - /// - INVALID_ORDER_BY_CLAUSE = 7, - /// The LIMIT clause could not be parsed. - /// - INVALID_LIMIT_CLAUSE = 8, - /// The startIndex in the LIMIT clause does not contain a valid integer. - /// - INVALID_START_INDEX_IN_LIMIT_CLAUSE = 9, - /// The pageSize in the LIMIT clause does not contain a valid integer. - /// - INVALID_PAGE_SIZE_IN_LIMIT_CLAUSE = 10, - /// The DURING clause could not be parsed. - /// - INVALID_DURING_CLAUSE = 11, - /// The minimum date in the DURING clause is not a valid date in YYYYMMDD format. - /// - INVALID_MIN_DATE_IN_DURING_CLAUSE = 12, - /// The maximum date in the DURING clause is not a valid date in YYYYMMDD format. - /// - INVALID_MAX_DATE_IN_DURING_CLAUSE = 13, - /// The minimum date in the DURING is after the maximum date. - /// - MAX_LESS_THAN_MIN_IN_DURING_CLAUSE = 14, - /// The query matched the grammar, but is invalid in some way such as using a - /// service that isn't supported. - /// - VALIDATION_FAILED = 15, - } - - - /// Represents violations of a single policy by some text in a field. Violations of - /// a single policy by the same string in multiple places within a field is reported - /// in one instance of this class and only one exemption needs to be filed. - /// Violations of a single policy by two different strings is reported as two - /// separate instances of this class. e.g. If 'ACME' violates 'capitalization' and - /// occurs twice in a text ad it would be represented by one instance. If the ad - /// also contains 'INC' which also violates 'capitalization' it would be represented - /// in a separate instance. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionPolicyError))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdParamPolicyError))] - public partial class PolicyViolationError : ApiError - { - private PolicyViolationKey keyField; - - private string externalPolicyNameField; - - private string externalPolicyUrlField; - - private string externalPolicyDescriptionField; - - private bool isExemptableField; - - private bool isExemptableFieldSpecified; - - private PolicyViolationErrorPart[] violatingPartsField; - - /// Unique identifier for the violation. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PolicyViolationKey key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - /// Name of policy suitable for display to users. In the user's preferred language. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string externalPolicyName - { - get - { - return this.externalPolicyNameField; - } - set - { - this.externalPolicyNameField = value; - } - } - - /// Url with writeup about the policy. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string externalPolicyUrl - { - get - { - return this.externalPolicyUrlField; - } - set - { - this.externalPolicyUrlField = value; - } - } - - /// Localized description of the violation. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string externalPolicyDescription - { - get - { - return this.externalPolicyDescriptionField; - } - set - { - this.externalPolicyDescriptionField = value; - } - } - - /// Whether user can file an exemption request for this violation. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool isExemptable - { - get - { - return this.isExemptableField; - } - set - { - this.isExemptableField = value; - this.isExemptableSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isExemptableSpecified - { - get - { - return this.isExemptableFieldSpecified; - } - set - { - this.isExemptableFieldSpecified = value; - } - } - - /// Lists the parts that violate the policy. - /// - [System.Xml.Serialization.XmlElementAttribute("violatingParts", Order = 5)] - public PolicyViolationErrorPart[] violatingParts - { - get - { - return this.violatingPartsField; - } - set - { - this.violatingPartsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error indicating that an entity will be disapproved unless changes are made to - /// it before it is saved. This error occurs when the entity will have a policy - /// summary that includes a PROHIBITED policy topic entry. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PolicyFindingError : ApiError - { - private PolicyFindingErrorReason reasonField; - - private bool reasonFieldSpecified; - - private PolicyTopicEntry[] policySummaryField; - - /// Error reason enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PolicyFindingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// Policy summary containing the policy topic that caused the error. - /// - [System.Xml.Serialization.XmlArrayAttribute(Order = 1)] - [System.Xml.Serialization.XmlArrayItemAttribute("policyTopicEntries", IsNullable = false)] - public PolicyTopicEntry[] policySummary - { - get - { - return this.policySummaryField; - } - set - { - this.policySummaryField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// PolicyFindingError error codes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PolicyFindingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PolicyFindingErrorReason - { - POLICY_FINDING = 0, - } - - - /// Error codes for pagination. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PagingError : ApiError - { - private PagingErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PagingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for errors when using pagination. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PagingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PagingErrorReason - { - /// The start index value cannot be a negative number. - /// - START_INDEX_CANNOT_BE_NEGATIVE = 0, - /// The number of results cannot be a negative number. - /// - NUMBER_OF_RESULTS_CANNOT_BE_NEGATIVE = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// Errors due to the use of unsupported operations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OperatorError : ApiError - { - private OperatorErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OperatorErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the validation error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OperatorError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OperatorErrorReason - { - OPERATOR_NOT_SUPPORTED = 0, - } - - - /// Operation not permitted due to the invoked service's access policy. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OperationAccessDenied : ApiError - { - private OperationAccessDeniedReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OperationAccessDeniedReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for the operation access error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OperationAccessDenied.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OperationAccessDeniedReason - { - /// Unauthorized invocation of a service's method (get, mutate, etc.) - /// - ACTION_NOT_PERMITTED = 0, - /// Unauthorized ADD operation in invoking a service's mutate method. - /// - ADD_OPERATION_NOT_PERMITTED = 1, - /// Unauthorized REMOVE operation in invoking a service's mutate method. - /// - REMOVE_OPERATION_NOT_PERMITTED = 2, - /// Unauthorized SET operation in invoking a service's mutate method. - /// - SET_OPERATION_NOT_PERMITTED = 3, - /// A mutate action is not allowed on this campaign, from this client. - /// - MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT = 4, - /// This operation is not permitted on this campaign type - /// - OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE = 5, - /// An ADD operation may not set status to REMOVED. - /// - ADD_AS_REMOVED_NOT_PERMITTED = 6, - /// This operation is not allowed because the campaign or adgroup is removed. - /// - OPERATION_NOT_PERMITTED_FOR_REMOVED_ENTITY = 7, - /// This operation is not permitted on this ad group type. - /// - OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE = 9, - /// The reason the invoked method or operation is prohibited is not known (the - /// client may be of an older version than the server). - /// - UNKNOWN = 8, - } - - - /// Errors associated with violation of a NOT NULL check. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NullError : ApiError - { - private NullErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public NullErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the validation error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "NullError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum NullErrorReason - { - /// Specified list/container must not contain any null elements - /// - NULL_CONTENT = 0, - } - - - /// Errors corresponding with violation of a NOT EMPTY check. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NotEmptyError : ApiError - { - private NotEmptyErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public NotEmptyErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the validation error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "NotEmptyError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum NotEmptyErrorReason - { - EMPTY_LIST = 0, - } - - - /// Error associated with creation of new entities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NewEntityCreationError : ApiError - { - private NewEntityCreationErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public NewEntityCreationErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "NewEntityCreationError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum NewEntityCreationErrorReason - { - /// Do not set the id field while creating new entities. - /// - CANNOT_SET_ID_FOR_ADD = 0, - /// Creating more than one entity with the same temp ID is not allowed. - /// - DUPLICATE_TEMP_IDS = 1, - /// Parent object with specified temp id failed validation, so no deep validation - /// will be done for this child entity. - /// - TEMP_ID_ENTITY_HAD_ERRORS = 2, - } - - - /// Error class for media related errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MediaError : ApiError - { - private MediaErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MediaErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "MediaError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaErrorReason - { - /// Cannot add a standard icon type - /// - CANNOT_ADD_STANDARD_ICON = 0, - /// May only select Standard Icons alone - /// - CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES = 1, - /// Image contains both a media ID and media data. - /// - CANNOT_SPECIFY_MEDIA_ID_AND_DATA = 22, - /// A media with given type and reference id already exists - /// - DUPLICATE_MEDIA = 2, - /// A required field was not specified or is an empty string. - /// - EMPTY_FIELD = 3, - /// A media may only be modified once per call - /// - ENTITY_REFERENCED_IN_MULTIPLE_OPS = 4, - /// Field is not supported for the media sub type. - /// - FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE = 5, - /// The media id is invalid - /// - INVALID_MEDIA_ID = 6, - /// The media subtype is invalid - /// - INVALID_MEDIA_SUB_TYPE = 7, - /// The media type is invalid - /// - INVALID_MEDIA_TYPE = 8, - /// The mimetype is invalid - /// - INVALID_MIME_TYPE = 23, - /// The media reference id is invalid - /// - INVALID_REFERENCE_ID = 9, - /// The YouTube video id is invalid - /// - INVALID_YOU_TUBE_ID = 10, - /// Media has failed transcoding - /// - MEDIA_FAILED_TRANSCODING = 11, - /// Media has not been transcoded - /// - MEDIA_NOT_TRANSCODED = 12, - /// The MediaType does not match the actual media object's type - /// - MEDIA_TYPE_DOES_NOT_MATCH_OBJECT_TYPE = 13, - /// None of the fields have been specified. - /// - NO_FIELDS_SPECIFIED = 14, - /// One of reference Id or media Id must be specified - /// - NULL_REFERENCE_ID_AND_MEDIA_ID = 15, - /// The string has too many characters. - /// - TOO_LONG = 16, - /// The specified operation is not supported. Only ADD, SET, and REMOVE are - /// supported - /// - UNSUPPORTED_OPERATION = 17, - /// The specified type is not supported. - /// - UNSUPPORTED_TYPE = 18, - /// YouTube is unavailable for requesting video data. - /// - YOU_TUBE_SERVICE_UNAVAILABLE = 19, - /// The YouTube video has a non positive duration. - /// - YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION = 20, - /// The YouTube video id is syntactically valid but the video was not found. - /// - YOU_TUBE_VIDEO_NOT_FOUND = 21, - } - - - /// Error class for errors associated with parsing media bundle data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MediaBundleError : ApiError - { - private MediaBundleErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MediaBundleErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Enumeration of the reasons for the MediaBundleError - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "MediaBundleError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaBundleErrorReason - { - /// The entryPoint field cannot be set using the MediaService. - /// - ENTRY_POINT_CANNOT_BE_SET_USING_MEDIA_SERVICE = 0, - /// There was a problem with the request. - /// - BAD_REQUEST = 1, - /// HTML5 ads using DoubleClick Studio created ZIP files are not supported. - /// - DOUBLECLICK_BUNDLE_NOT_ALLOWED = 2, - /// Cannot reference URL external to the media bundle. - /// - EXTERNAL_URL_NOT_ALLOWED = 3, - /// Media bundle file is too large. - /// - FILE_TOO_LARGE = 4, - /// ZIP file from Google Web Designer is not published. - /// - GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED = 5, - /// Input was invalid. - /// - INVALID_INPUT = 6, - /// There was a problem with the media bundle. - /// - INVALID_MEDIA_BUNDLE = 7, - /// There was a problem with one or more of the media bundle entries. - /// - INVALID_MEDIA_BUNDLE_ENTRY = 8, - /// The media bundle contains a file with an unknown mime type - /// - INVALID_MIME_TYPE = 9, - /// The media bundle contain an invalid asset path. - /// - INVALID_PATH = 10, - /// HTML5 ad is trying to reference an asset not in .ZIP file - /// - INVALID_URL_REFERENCE = 11, - /// Media data is too large. - /// - MEDIA_DATA_TOO_LARGE = 12, - /// The media bundle contains no primary entry. - /// - MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 13, - /// There was an error on the server. - /// - SERVER_ERROR = 14, - /// The image could not be stored. - /// - STORAGE_ERROR = 15, - /// Media bundle created with the Swiffy tool is not allowed. - /// - SWIFFY_BUNDLE_NOT_ALLOWED = 16, - /// The media bundle contains too many files. - /// - TOO_MANY_FILES = 17, - /// The media bundle is not of legal dimensions. - /// - UNEXPECTED_SIZE = 18, - /// Google Web Designer not created for "AdWords" environment. - /// - UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT = 19, - /// Unsupported HTML5 feature in HTML5 asset. - /// - UNSUPPORTED_HTML5_FEATURE = 20, - /// URL in HTML5 entry is not ssl compliant. - /// - URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT = 21, - /// Custom exits not allowed in HTML5 entry. - /// - CUSTOM_EXIT_NOT_ALLOWED = 22, - } - - - /// Indicates that a server-side error has occured. s are generally not - /// the result of an invalid request or message sent by the client. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class InternalApiError : ApiError - { - private InternalApiErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public InternalApiErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The single reason for the internal API error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "InternalApiError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum InternalApiErrorReason - { - /// API encountered an unexpected internal error. - /// - UNEXPECTED_INTERNAL_API_ERROR = 0, - /// A temporary error occurred during the request. Please retry. - /// - TRANSIENT_ERROR = 1, - /// The cause of the error is not known or only defined in newer versions. - /// - UNKNOWN = 2, - /// The API is currently unavailable for a planned downtime. - /// - DOWNTIME = 3, - /// Mutate succeeded but server was unable to build response. Client should not - /// retry mutate. - /// - ERROR_GENERATING_RESPONSE = 4, - } - - - /// Error class for errors associated with parsing image data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ImageError : ApiError - { - private ImageErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ImageErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ImageError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ImageErrorReason - { - /// The image is not valid. - /// - INVALID_IMAGE = 0, - /// The image could not be stored. - /// - STORAGE_ERROR = 1, - /// There was a problem with the request. - /// - BAD_REQUEST = 2, - /// The image is not of legal dimensions. - /// - UNEXPECTED_SIZE = 3, - /// Animated image are not permitted. - /// - ANIMATED_NOT_ALLOWED = 4, - /// Animation is too long. - /// - ANIMATION_TOO_LONG = 5, - /// There was an error on the server. - /// - SERVER_ERROR = 6, - /// Image cannot be in CMYK color format. - /// - CMYK_JPEG_NOT_ALLOWED = 7, - /// Flash images are not permitted. - /// - FLASH_NOT_ALLOWED = 8, - /// Flash images must support clickTag. - /// - FLASH_WITHOUT_CLICKTAG = 9, - /// A flash error has occurred after fixing the click tag. - /// - FLASH_ERROR_AFTER_FIXING_CLICK_TAG = 10, - /// Unacceptable visual effects. - /// - ANIMATED_VISUAL_EFFECT = 11, - /// There was a problem with the flash image. - /// - FLASH_ERROR = 12, - /// Incorrect image layout. - /// - LAYOUT_PROBLEM = 13, - /// There was a problem reading the image file. - /// - PROBLEM_READING_IMAGE_FILE = 14, - /// There was an error storing the image. - /// - ERROR_STORING_IMAGE = 15, - /// The aspect ratio of the image is not allowed. - /// - ASPECT_RATIO_NOT_ALLOWED = 36, - /// Flash cannot have network objects. - /// - FLASH_HAS_NETWORK_OBJECTS = 16, - /// Flash cannot have network methods. - /// - FLASH_HAS_NETWORK_METHODS = 17, - /// Flash cannot have a Url. - /// - FLASH_HAS_URL = 18, - /// Flash cannot use mouse tracking. - /// - FLASH_HAS_MOUSE_TRACKING = 19, - /// Flash cannot have a random number. - /// - FLASH_HAS_RANDOM_NUM = 20, - /// Ad click target cannot be '_self'. - /// - FLASH_SELF_TARGETS = 21, - /// GetUrl method should only use '_blank'. - /// - FLASH_BAD_GETURL_TARGET = 22, - /// Flash version is not supported. - /// - FLASH_VERSION_NOT_SUPPORTED = 23, - /// Flash movies need to have hard coded click URL or clickTAG - /// - FLASH_WITHOUT_HARD_CODED_CLICK_URL = 24, - /// Uploaded flash file is corrupted. - /// - INVALID_FLASH_FILE = 25, - /// Uploaded flash file can be parsed, but the click tag can not be fixed properly. - /// - FAILED_TO_FIX_CLICK_TAG_IN_FLASH = 26, - /// Flash movie accesses network resources - /// - FLASH_ACCESSES_NETWORK_RESOURCES = 27, - /// Flash movie attempts to call external javascript code - /// - FLASH_EXTERNAL_JS_CALL = 28, - /// Flash movie attempts to call flash system commands - /// - FLASH_EXTERNAL_FS_CALL = 29, - /// Image file is too large. - /// - FILE_TOO_LARGE = 30, - /// Image data is too large. - /// - IMAGE_DATA_TOO_LARGE = 31, - /// Error while processing the image. - /// - IMAGE_PROCESSING_ERROR = 32, - /// Image is too small. - /// - IMAGE_TOO_SMALL = 33, - /// Input was invalid. - /// - INVALID_INPUT = 34, - /// There was a problem reading the image file. - /// - PROBLEM_READING_FILE = 35, - } - - - /// Errors associated with the ids. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class IdError : ApiError - { - private IdErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public IdErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "IdError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum IdErrorReason - { - /// Id not found - /// - NOT_FOUND = 0, - } - - - /// An error resulting from a failure to parse the textual representation of a - /// function. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FunctionParsingError : ApiError - { - private FunctionParsingErrorReason reasonField; - - private bool reasonFieldSpecified; - - private string offendingTextField; - - private int offendingTextIndexField; - - private bool offendingTextIndexFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FunctionParsingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string offendingText - { - get - { - return this.offendingTextField; - } - set - { - this.offendingTextField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int offendingTextIndex - { - get - { - return this.offendingTextIndexField; - } - set - { - this.offendingTextIndexField = value; - this.offendingTextIndexSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool offendingTextIndexSpecified - { - get - { - return this.offendingTextIndexFieldSpecified; - } - set - { - this.offendingTextIndexFieldSpecified = value; - } - } - } - - - /// Function parsing error reason. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FunctionParsingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FunctionParsingErrorReason - { - /// Unexpected end of function string. - /// - NO_MORE_INPUT = 0, - /// Could not find an expected character. - /// - EXPECTED_CHARACTER = 1, - /// Unexpected separator character. - /// - UNEXPECTED_SEPARATOR = 2, - /// Unmatched left bracket or parenthesis. - /// - UNMATCHED_LEFT_BRACKET = 3, - /// Unmatched right bracket or parenthesis. - /// - UNMATCHED_RIGHT_BRACKET = 4, - /// Functions are nested too deeply. - /// - TOO_MANY_NESTED_FUNCTIONS = 5, - /// Missing right-hand-side operand. - /// - MISSING_RIGHT_HAND_OPERAND = 6, - /// Invalid operator/function name. - /// - INVALID_OPERATOR_NAME = 7, - /// Feed attribute operand's argument is not an integer. - /// - FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER = 8, - /// Missing function operands. - /// - NO_OPERANDS = 9, - /// Function had too many operands. - /// - TOO_MANY_OPERANDS = 10, - UNKNOWN = 11, - } - - - /// Errors that indicate issues with the function. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FunctionError : ApiError - { - private FunctionErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FunctionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FunctionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FunctionErrorReason - { - /// The format of the function is not recognized as a supported function format. - /// - INVALID_FUNCTION_FORMAT = 0, - /// Operand data types do not match. - /// - DATA_TYPE_MISMATCH = 1, - /// The operands cannot be used together in a conjunction. - /// - INVALID_CONJUNCTION_OPERANDS = 2, - /// Invalid numer of Operands. - /// - INVALID_NUMBER_OF_OPERANDS = 3, - /// Operand Type not supported. - /// - INVALID_OPERAND_TYPE = 4, - /// Operator not supported. - /// - INVALID_OPERATOR = 5, - /// Request context type not supported. - /// - INVALID_REQUEST_CONTEXT_TYPE = 6, - /// The matching function is not allowed for call placeholders - /// - INVALID_FUNCTION_FOR_CALL_PLACEHOLDER = 7, - /// The matching function is not allowed for the specified placeholder - /// - INVALID_FUNCTION_FOR_PLACEHOLDER = 8, - /// Invalid operand. - /// - INVALID_OPERAND = 9, - /// Missing value for the constant operand. - /// - MISSING_CONSTANT_OPERAND_VALUE = 10, - /// The value of the constant operand is invalid. - /// - INVALID_CONSTANT_OPERAND_VALUE = 11, - /// Invalid function nesting. - /// - INVALID_NESTING = 12, - /// The Feed ID was different from another Feed ID in the same function. - /// - MULTIPLE_FEED_IDS_NOT_SUPPORTED = 13, - /// The matching function is invalid for use with a feed with a fixed schema. - /// - INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA = 16, - /// Invalid attribute name. - /// - INVALID_ATTRIBUTE_NAME = 14, - UNKNOWN = 15, - } - - - /// A ForwardComptibilityError represents possible errors when using the - /// forwardCompatibilityMap in some of the common services. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ForwardCompatibilityError : ApiError - { - private ForwardCompatibilityErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ForwardCompatibilityErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reason for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ForwardCompatibilityError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ForwardCompatibilityErrorReason - { - /// Invalid value specified for a key in the forward compatibility map. - /// - INVALID_FORWARD_COMPATIBILITY_MAP_VALUE = 0, - UNKNOWN = 1, - } - - - /// An error indicating a problem with a reference to a feed attribute in an ad. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedAttributeReferenceError : ApiError - { - private FeedAttributeReferenceErrorReason reasonField; - - private bool reasonFieldSpecified; - - private string feedNameField; - - private string feedAttributeNameField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedAttributeReferenceErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// The referenced feed name. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string feedName - { - get - { - return this.feedNameField; - } - set - { - this.feedNameField = value; - } - } - - /// The referenced feed attribute name. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string feedAttributeName - { - get - { - return this.feedAttributeNameField; - } - set - { - this.feedAttributeNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Feed attribute reference error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedAttributeReferenceError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedAttributeReferenceErrorReason - { - /// A feed referenced by ID has been deleted. - /// - CANNOT_REFERENCE_DELETED_FEED = 0, - /// There is no active feed with the given name. - /// - INVALID_FEED_NAME = 1, - /// There is no feed attribute in an active feed with the given name. - /// - INVALID_FEED_ATTRIBUTE_NAME = 2, - } - - - /// An id did not correspond to an entity, or it referred to an entity which does - /// not belong to the customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class EntityNotFound : ApiError - { - private EntityNotFoundReason reasonField; - - private bool reasonFieldSpecified; - - /// Reason for this error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public EntityNotFoundReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "EntityNotFound.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum EntityNotFoundReason - { - /// The specified id refered to an entity which either doesn't exist or is not - /// accessible to the customer. e.g. campaign belongs to another customer. - /// - INVALID_ID = 0, - } - - - /// Signals that an entity count limit was exceeded for some level. For example, too - /// many criteria for a campaign. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdCountLimitExceeded))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionLimitExceeded))] - public partial class EntityCountLimitExceeded : ApiError - { - private EntityCountLimitExceededReason reasonField; - - private bool reasonFieldSpecified; - - private string enclosingIdField; - - private int limitField; - - private bool limitFieldSpecified; - - private string accountLimitTypeField; - - private int existingCountField; - - private bool existingCountFieldSpecified; - - /// Specifies which level's limit was exceeded. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public EntityCountLimitExceededReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// Id of the entity whose limit was exceeded. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string enclosingId - { - get - { - return this.enclosingIdField; - } - set - { - this.enclosingIdField = value; - } - } - - /// The limit which was exceeded. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int limit - { - get - { - return this.limitField; - } - set - { - this.limitField = value; - this.limitSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool limitSpecified - { - get - { - return this.limitFieldSpecified; - } - set - { - this.limitFieldSpecified = value; - } - } - - /// The account limit type which was exceeded. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string accountLimitType - { - get - { - return this.accountLimitTypeField; - } - set - { - this.accountLimitTypeField = value; - } - } - - /// The count of existing entities. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public int existingCount - { - get - { - return this.existingCountField; - } - set - { - this.existingCountField = value; - this.existingCountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool existingCountSpecified - { - get - { - return this.existingCountFieldSpecified; - } - set - { - this.existingCountFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Limits at various levels of the account. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "EntityCountLimitExceeded.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum EntityCountLimitExceededReason - { - /// Indicates that this request would exceed the number of allowed entities for the - /// AdWords account. The exact entity type and limit being checked can be inferred - /// from #accountLimitType. - /// - ACCOUNT_LIMIT = 0, - /// Indicates that this request would exceed the number of allowed entities in a - /// Campaign. The exact entity type and limit being checked can be inferred from #accountLimitType, and the numeric id of the - /// Campaign involved is given by #enclosingId. - /// - CAMPAIGN_LIMIT = 1, - /// Indicates that this request would exceed the number of allowed entities in an ad - /// group. The exact entity type and limit being checked can be inferred from #accountLimitType, and the numeric id of the ad - /// group involved is given by #enclosingId. - /// - ADGROUP_LIMIT = 2, - /// Indicates that this request would exceed the number of allowed entities in an ad - /// group ad. The exact entity type and limit being checked can be inferred from #accountLimitType, and the #enclosingId contains the ad group id followed by the ad - /// id, separated by a single comma (,). - /// - AD_GROUP_AD_LIMIT = 3, - /// Indicates that this request would exceed the number of allowed entities in an ad - /// group criterion. The exact entity type and limit being checked can be inferred - /// from #accountLimitType, and the #enclosingId contains the ad group id followed by the - /// criterion id, separated by a single comma (,). - /// - AD_GROUP_CRITERION_LIMIT = 4, - /// Indicates that this request would exceed the number of allowed entities in this - /// shared set. The exact entity type and limit being checked can be inferred from - /// #accountLimitType, and the numeric id of the - /// shared set involved is given by #enclosingId. - /// - SHARED_SET_LIMIT = 5, - /// Exceeds a limit related to a matching function. - /// - MATCHING_FUNCTION_LIMIT = 6, - /// Specific limit that has been exceeded is unknown (the client may be of an older - /// version than the server). - /// - UNKNOWN = 7, - } - - - /// Indicates too many ads were added/enabled under the specified adgroup. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdCountLimitExceeded : EntityCountLimitExceeded - { - } - - - /// Reports permission problems trying to access an entity. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class EntityAccessDenied : ApiError - { - private EntityAccessDeniedReason reasonField; - - private bool reasonFieldSpecified; - - /// Reason for this error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public EntityAccessDeniedReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "EntityAccessDenied.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum EntityAccessDeniedReason - { - /// User did not have read access. - /// - READ_ACCESS_DENIED = 0, - /// User did not have write access. - /// - WRITE_ACCESS_DENIED = 1, - } - - - /// Errors related to distinct ids or content. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DistinctError : ApiError - { - private DistinctErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DistinctErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the validation error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DistinctError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DistinctErrorReason - { - DUPLICATE_ELEMENT = 0, - DUPLICATE_TYPE = 1, - } - - - /// Errors associated with invalid dates and date ranges. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DateError : ApiError - { - private DateErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DateErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DateError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DateErrorReason - { - /// Given field values do not correspond to a valid date. - /// - INVALID_FIELD_VALUES_IN_DATE = 0, - /// Given field values do not correspond to a valid date time. - /// - INVALID_FIELD_VALUES_IN_DATE_TIME = 1, - /// The string date's format should be yyyymmdd. - /// - INVALID_STRING_DATE = 2, - /// The string date range's format should be yyyymmdd yyyymmdd. - /// - INVALID_STRING_DATE_RANGE = 3, - /// The string date time's format should be yyyymmdd hhmmss [tz]. - /// - INVALID_STRING_DATE_TIME = 4, - /// Date is before allowed minimum. - /// - EARLIER_THAN_MINIMUM_DATE = 5, - /// Date is after allowed maximum. - /// - LATER_THAN_MAXIMUM_DATE = 6, - /// Date range bounds are not in order. - /// - DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE = 7, - /// Both dates in range are null. - /// - DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 8, - } - - - /// Errors that are thrown due to a database access problem. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DatabaseError : ApiError - { - private DatabaseErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DatabaseErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the database error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DatabaseError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DatabaseErrorReason - { - /// A concurrency problem occurred as two threads were attempting to modify same - /// object. - /// - CONCURRENT_MODIFICATION = 0, - /// The permission was denied to access an object. - /// - PERMISSION_DENIED = 1, - /// The user's access to an object has been prohibited. - /// - ACCESS_PROHIBITED = 2, - /// Requested campaign belongs to a product that is not supported by the api. - /// - CAMPAIGN_PRODUCT_NOT_SUPPORTED = 3, - /// a duplicate key was detected upon insertion - /// - DUPLICATE_KEY = 4, - /// a database error has occurred - /// - DATABASE_ERROR = 5, - /// an unknown error has occurred - /// - UNKNOWN = 6, - } - - - /// Errors associated with the size of the given collection being out of bounds. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CollectionSizeError : ApiError - { - private CollectionSizeErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CollectionSizeErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CollectionSizeError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CollectionSizeErrorReason - { - TOO_FEW = 0, - TOO_MANY = 1, - } - - - /// Error due to user not accepting the AdWords terms of service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ClientTermsError : ApiError - { - private ClientTermsErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ClientTermsErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Enums for the various reasons an error can be thrown as a result of ClientTerms - /// violation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ClientTermsError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ClientTermsErrorReason - { - /// Customer has not agreed to the latest AdWords Terms & Conditions - /// - INCOMPLETE_SIGNUP_CURRENT_ADWORDS_TNC_NOT_AGREED = 0, - } - - - /// Errors encountered when trying to authorize a user. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AuthorizationError : ApiError - { - private AuthorizationErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AuthorizationErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the authorization error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AuthorizationError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AuthorizationErrorReason - { - /// Could not complete authorization due to an internal problem. - /// - UNABLE_TO_AUTHORIZE = 0, - /// Customer has no AdWords account. - /// - NO_ADWORDS_ACCOUNT_FOR_CUSTOMER = 1, - /// User doesn't have permission to access customer. - /// - USER_PERMISSION_DENIED = 2, - /// Effective user doesn't have permission to access this customer. - /// - EFFECTIVE_USER_PERMISSION_DENIED = 3, - /// Access denied since the customer is not active. - /// - CUSTOMER_NOT_ACTIVE = 7, - /// User has read-only permission cannot mutate. - /// - USER_HAS_READONLY_PERMISSION = 4, - /// No customer found. - /// - NO_CUSTOMER_FOUND = 5, - /// Developer doesn't have permission to access service. - /// - SERVICE_ACCESS_DENIED = 6, - /// The customer has a policy to enforce 2-Step Verification, but the user is not - /// enrolled. - /// - TWO_STEP_VERIFICATION_NOT_ENROLLED = 8, - /// The customer has a policy to enforce enrollment in the Advanced Protection - /// Program, but the user is not enrolled. - /// - ADVANCED_PROTECTION_NOT_ENROLLED = 9, - } - - - /// Errors returned when Authentication failed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AuthenticationError : ApiError - { - private AuthenticationErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AuthenticationErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The single reason for the authentication failure. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AuthenticationError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AuthenticationErrorReason - { - /// Authentication of the request failed. - /// - AUTHENTICATION_FAILED = 0, - /// Client Customer Id is required if CustomerIdMode is set to - /// CLIENT_EXTERNAL_CUSTOMER_ID. Starting version V201409 ClientCustomerId will be - /// required for all requests except for CustomerService#get - /// - CLIENT_CUSTOMER_ID_IS_REQUIRED = 1, - /// Client Email is required if CustomerIdMode is set to - /// CLIENT_EXTERNAL_EMAIL_FIELD. - /// - CLIENT_EMAIL_REQUIRED = 2, - /// Client customer Id is not a number. - /// - CLIENT_CUSTOMER_ID_INVALID = 3, - /// Client customer Id is not a number. - /// - CLIENT_EMAIL_INVALID = 4, - /// Client email is not a valid customer email. - /// - CLIENT_EMAIL_FAILED_TO_AUTHENTICATE = 5, - /// No customer found for the customer id provided in the header. - /// - CUSTOMER_NOT_FOUND = 6, - /// Client's Google Account is deleted. - /// - GOOGLE_ACCOUNT_DELETED = 7, - /// Google account login token in the cookie is invalid. - /// - GOOGLE_ACCOUNT_COOKIE_INVALID = 8, - /// problem occurred during Google account authentication. - /// - FAILED_TO_AUTHENTICATE_GOOGLE_ACCOUNT = 9, - /// The user in the google account login token does not match the UserId in the - /// cookie. - /// - GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH = 10, - /// Login cookie is required for authentication. - /// - LOGIN_COOKIE_REQUIRED = 11, - /// User in the cookie is not a valid Ads user. - /// - NOT_ADS_USER = 12, - /// Oauth token in the header is not valid. - /// - OAUTH_TOKEN_INVALID = 13, - /// Oauth token in the header has expired. - /// - OAUTH_TOKEN_EXPIRED = 14, - /// Oauth token in the header has been disabled. - /// - OAUTH_TOKEN_DISABLED = 15, - /// Oauth token in the header has been revoked. - /// - OAUTH_TOKEN_REVOKED = 16, - /// Oauth token HTTP header is malformed. - /// - OAUTH_TOKEN_HEADER_INVALID = 17, - /// Login cookie is not valid. - /// - LOGIN_COOKIE_INVALID = 18, - /// Failed to decrypt the login cookie. - /// - FAILED_TO_RETRIEVE_LOGIN_COOKIE = 19, - /// User Id in the header is not a valid id. - /// - USER_ID_INVALID = 20, - } - - - /// Represents an error in an AssetLink - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetLinkError : ApiError - { - private AssetLinkErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AssetLinkErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AssetLinkError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AssetLinkErrorReason - { - /// Provided asset's type is invalid for use in the specified field. - /// - INVALID_ASSET_TYPE_FOR_FIELD = 0, - /// Pinning is not supported for the given AssetLink field. - /// - PINNING_UNSUPPORTED = 1, - /// The input pinnedField is not valid for the given AssetLink field. - /// - INVALID_PINNED_FIELD = 2, - UNKNOWN = 3, - } - - - /// Represents an error in an Asset. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetError : ApiError - { - private AssetErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AssetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AssetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AssetErrorReason - { - UNKNOWN = 0, - /// The asset type is not supported by asset service. - /// - ASSET_TYPE_NOT_SUPPORTED = 1, - /// Cannot remove an asset with status REMOVED. - /// - CANNOT_REMOVE_ASSET_WITH_REMOVED_STATUS = 2, - /// The asset has a name which is different from an existing duplicate that - /// represents the same content. - /// - CANNOT_MODIFY_ASSET_NAME = 3, - /// The asset is duplicated across operations. - /// - DUPLICATE_ASSET = 4, - /// The asset name is duplicated, either across operations, or with an existing - /// asset. - /// - DUPLICATE_ASSET_NAME = 5, - /// No asset type specific data are set. - /// - ASSET_DATA_IS_MISSING = 6, - } - - - /// Errors that are thrown when a non-AdX feature is accessed by an AdX customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdxError : ApiError - { - private AdxErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdxErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the AdX error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdxError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdxErrorReason - { - /// Attempt to use non-AdX feature by AdX customer. - /// - UNSUPPORTED_FEATURE = 0, - } - - - /// Errors related using the AdGroupAdService to create an AdGroupAd with a - /// reference to an existing AdId. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdSharingError : ApiError - { - private AdSharingErrorReason reasonField; - - private bool reasonFieldSpecified; - - private ApiError sharedAdErrorField; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdSharingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ApiError sharedAdError - { - get - { - return this.sharedAdErrorField; - } - set - { - this.sharedAdErrorField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Reasons for error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdSharingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdSharingErrorReason - { - /// Error resulting in attempting to add an Ad to an AdGroup that already contains - /// the Ad. - /// - AD_GROUP_ALREADY_CONTAINS_AD = 0, - /// Ad is not compatible with the AdGroup it is being shared with. For more details, - /// look at #sharedAdError. - /// - INCOMPATIBLE_AD_UNDER_AD_GROUP = 1, - /// Cannot add AdGroupAd on inactive Ad. - /// - CANNOT_SHARE_INACTIVE_AD = 2, - } - - - /// Error information for AdGroupAdService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdError : ApiError - { - private AdGroupAdErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupAdErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupAdError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupAdErrorReason - { - /// No link found between the adgroup ad and the label. - /// - AD_GROUP_AD_LABEL_DOES_NOT_EXIST = 0, - /// The label has already been attached to the adgroup ad. - /// - AD_GROUP_AD_LABEL_ALREADY_EXISTS = 1, - /// The specified ad was not found in the adgroup - /// - AD_NOT_UNDER_ADGROUP = 2, - /// Removed ads may not be modified - /// - CANNOT_OPERATE_ON_REMOVED_ADGROUPAD = 3, - /// An ad of this type is deprecated and cannot be created. Only deletions are - /// permitted. - /// - CANNOT_CREATE_DEPRECATED_ADS = 4, - /// Text ads are deprecated and cannot be created. Use expanded text ads instead. - /// - CANNOT_CREATE_TEXT_ADS = 8, - /// A required field was not specified or is an empty string. - /// - EMPTY_FIELD = 5, - /// An ad may only be modified once per call - /// - ENTITY_REFERENCED_IN_MULTIPLE_OPS = 6, - /// The specified operation is not supported. Only ADD, SET, and REMOVE are - /// supported - /// - UNSUPPORTED_OPERATION = 7, - } - - - /// Base error class for Ad Service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdError : ApiError - { - private AdErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdErrorReason - { - /// Ad customizers are not supported for ad type. - /// - AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE = 0, - /// Estimating character sizes the string is too long. - /// - APPROXIMATELY_TOO_LONG = 1, - /// Estimating character sizes the string is too short. - /// - APPROXIMATELY_TOO_SHORT = 2, - /// There is a problem with the snippet. - /// - BAD_SNIPPET = 3, - /// Cannot modify an ad. - /// - CANNOT_MODIFY_AD = 116, - /// business name and url cannot be set at the same time - /// - CANNOT_SET_BUSINESS_NAME_IF_URL_SET = 4, - /// The specified field is incompatible with this ad's type or settings. - /// - CANNOT_SET_FIELD = 5, - /// Cannot set field when originAdId is set. - /// - CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET = 6, - /// Cannot set field when an existing ad id is set for sharing. - /// - CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING = 117, - /// Cannot set allowFlexibleColor false if no color is provided by user. - /// - CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE = 126, - /// When user select native, no color control is allowed because we will always - /// respect publisher color for native format serving. - /// - CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING = 127, - /// Cannot specify a url for the ad type - /// - CANNOT_SET_URL = 7, - /// Cannot specify a tracking or mobile url without also setting final urls - /// - CANNOT_SET_WITHOUT_FINAL_URLS = 8, - /// Cannot specify a legacy url and a final url simultaneously - /// - CANNOT_SET_WITH_FINAL_URLS = 9, - /// Cannot specify a legacy url and a tracking url template simultaneously in a DSA. - /// - CANNOT_SET_WITH_TRACKING_URL_TEMPLATE = 10, - /// Cannot specify a urls in UrlData and in template fields simultaneously. - /// - CANNOT_SET_WITH_URL_DATA = 121, - /// This operator cannot be used with a subclass of Ad. - /// - CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR = 118, - /// Customer is not approved for mobile ads. - /// - CUSTOMER_NOT_APPROVED_MOBILEADS = 11, - /// Customer is not approved for 3PAS richmedia ads. - /// - CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS = 12, - /// Customer is not approved for 3PAS redirect richmedia (Ad Exchange) ads. - /// - CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS = 13, - /// Not an eligible customer - /// - CUSTOMER_NOT_ELIGIBLE = 14, - /// Customer is not eligible for updating beacon url - /// - CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL = 15, - /// There already exists an ad with the same dimensions in the union. - /// - DIMENSION_ALREADY_IN_UNION = 16, - /// Ad's dimension must be set before setting union dimension. - /// - DIMENSION_MUST_BE_SET = 17, - /// Ad's dimension must be included in the union dimensions. - /// - DIMENSION_NOT_IN_UNION = 18, - /// Display Url cannot be specified (applies to Ad Exchange Ads) - /// - DISPLAY_URL_CANNOT_BE_SPECIFIED = 19, - /// Telephone number contains invalid characters or invalid format. Please re-enter - /// your number using digits (0-9), dashes (-), and parentheses only. - /// - DOMESTIC_PHONE_NUMBER_FORMAT = 20, - /// Emergency telephone numbers are not allowed. Please enter a valid domestic phone - /// number to connect customers to your business. - /// - EMERGENCY_PHONE_NUMBER = 21, - /// A required field was not specified or is an empty string. - /// - EMPTY_FIELD = 22, - /// A feed attribute referenced in an ad customizer tag is not in the ad customizer - /// mapping for the feed. - /// - FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID = 23, - /// The ad customizer field mapping for the feed attribute does not match the - /// expected field type. - /// - FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH = 24, - /// The use of ad customizer tags in the ad text is disallowed. Details in trigger. - /// - ILLEGAL_AD_CUSTOMIZER_TAG_USE = 25, - /// Tags of the form {PH_x}, where x is a number, are disallowed in ad text. - /// - ILLEGAL_TAG_USE = 120, - /// The dimensions of the ad are specified or derived in multiple ways and are not - /// consistent. - /// - INCONSISTENT_DIMENSIONS = 26, - /// The status cannot differ among template ads of the same union. - /// - INCONSISTENT_STATUS_IN_TEMPLATE_UNION = 27, - /// The length of the string is not valid. - /// - INCORRECT_LENGTH = 28, - /// The ad is ineligible for upgrade. - /// - INELIGIBLE_FOR_UPGRADE = 29, - /// User cannot create mobile ad for countries targeted in specified campaign. - /// - INVALID_AD_ADDRESS_CAMPAIGN_TARGET = 30, - /// Invalid Ad type. A specific type of Ad is required. - /// - INVALID_AD_TYPE = 31, - /// Headline, description or phone cannot be present when creating mobile image ad. - /// - INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE = 32, - /// Image cannot be present when creating mobile text ad. - /// - INVALID_ATTRIBUTES_FOR_MOBILE_TEXT = 33, - /// Invalid call to action text. - /// - INVALID_CALL_TO_ACTION_TEXT = 128, - /// Invalid character in URL. - /// - INVALID_CHARACTER_FOR_URL = 34, - /// Creative's country code is not valid. - /// - INVALID_COUNTRY_CODE = 35, - /// Invalid use of Dynamic Search Ads tags ({lpurl} etc.) - /// - INVALID_DSA_URL_TAG = 36, - /// Invalid use of Expanded Dynamic Search Ads tags ({lpurl} etc.) - /// - INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 122, - /// An input error whose real reason was not properly mapped (should not happen). - /// - INVALID_INPUT = 37, - /// An invalid markup language was entered. - /// - INVALID_MARKUP_LANGUAGE = 38, - /// An invalid mobile carrier was entered. - /// - INVALID_MOBILE_CARRIER = 39, - /// Specified mobile carriers target a country not targeted by the campaign. - /// - INVALID_MOBILE_CARRIER_TARGET = 40, - /// Wrong number of elements for given element type - /// - INVALID_NUMBER_OF_ELEMENTS = 41, - /// The format of the telephone number is incorrect. Please re-enter the number - /// using the correct format. - /// - INVALID_PHONE_NUMBER_FORMAT = 42, - /// The certified vendor format id is incorrect. - /// - INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID = 43, - /// The template ad data contains validation errors. - /// - INVALID_TEMPLATE_DATA = 44, - /// The template field doesn't have have the correct type. - /// - INVALID_TEMPLATE_ELEMENT_FIELD_TYPE = 45, - /// Invalid template id. - /// - INVALID_TEMPLATE_ID = 46, - /// After substituting replacement strings, the line is too wide. - /// - LINE_TOO_WIDE = 47, - /// The feed referenced must have ad customizer mapping to be used in a customizer - /// tag. - /// - MISSING_AD_CUSTOMIZER_MAPPING = 49, - /// Missing address component in template element address field. - /// - MISSING_ADDRESS_COMPONENT = 50, - /// An ad name must be entered. - /// - MISSING_ADVERTISEMENT_NAME = 51, - /// Business name must be entered. - /// - MISSING_BUSINESS_NAME = 52, - /// Description (line 2) must be entered. - /// - MISSING_DESCRIPTION1 = 53, - /// Description (line 3) must be entered. - /// - MISSING_DESCRIPTION2 = 54, - /// The destination url must contain at least one tag (e.g. {lpurl}) - /// - MISSING_DESTINATION_URL_TAG = 56, - /// The tracking url template of ExpandedDynamicSearchAd must contain at least one - /// tag. (e.g. {lpurl}) - /// - MISSING_LANDING_PAGE_URL_TAG = 123, - /// A valid dimension must be specified for this ad. - /// - MISSING_DIMENSION = 57, - /// A display URL must be entered. - /// - MISSING_DISPLAY_URL = 58, - /// Headline must be entered. - /// - MISSING_HEADLINE = 59, - /// A height must be entered. - /// - MISSING_HEIGHT = 60, - /// An image must be entered. - /// - MISSING_IMAGE = 61, - /// Marketing image or product videos are required. - /// - MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS = 129, - /// The markup language in which your site is written must be entered. - /// - MISSING_MARKUP_LANGUAGES = 62, - /// A mobile carrier must be entered. - /// - MISSING_MOBILE_CARRIER = 63, - /// Phone number must be entered. - /// - MISSING_PHONE = 64, - /// Missing required template fields - /// - MISSING_REQUIRED_TEMPLATE_FIELDS = 65, - /// Missing a required field value - /// - MISSING_TEMPLATE_FIELD_VALUE = 66, - /// The ad must have text. - /// - MISSING_TEXT = 67, - /// A visible URL must be entered. - /// - MISSING_VISIBLE_URL = 69, - /// A width must be entered. - /// - MISSING_WIDTH = 70, - /// Only 1 feed can be used as the source of ad customizer substitutions in a single - /// ad. - /// - MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED = 71, - /// TempAdUnionId must be use when adding template ads. - /// - MUST_USE_TEMP_AD_UNION_ID_ON_ADD = 72, - /// The string has too many characters. - /// - TOO_LONG = 73, - /// The string has too few characters. - /// - TOO_SHORT = 74, - /// Ad union dimensions cannot change for saved ads. - /// - UNION_DIMENSIONS_CANNOT_CHANGE = 75, - /// Address component is not {country, lat, lng}. - /// - UNKNOWN_ADDRESS_COMPONENT = 76, - /// Unknown unique field name - /// - UNKNOWN_FIELD_NAME = 77, - /// Unknown unique name (template element type specifier) - /// - UNKNOWN_UNIQUE_NAME = 78, - /// Unsupported ad dimension - /// - UNSUPPORTED_DIMENSIONS = 79, - /// URL starts with an invalid scheme. - /// - URL_INVALID_SCHEME = 80, - /// URL ends with an invalid top-level domain name. - /// - URL_INVALID_TOP_LEVEL_DOMAIN = 81, - /// URL contains illegal characters. - /// - URL_MALFORMED = 82, - /// URL must contain a host name. - /// - URL_NO_HOST = 83, - /// URL not equivalent during upgrade. - /// - URL_NOT_EQUIVALENT = 84, - /// URL host name too long to be stored as visible URL (applies to Ad Exchange ads) - /// - URL_HOST_NAME_TOO_LONG = 85, - /// URL must start with a scheme. - /// - URL_NO_SCHEME = 86, - /// URL should end in a valid domain extension, such as .com or .net. - /// - URL_NO_TOP_LEVEL_DOMAIN = 87, - /// URL must not end with a path. - /// - URL_PATH_NOT_ALLOWED = 88, - /// URL must not specify a port. - /// - URL_PORT_NOT_ALLOWED = 89, - /// URL must not contain a query. - /// - URL_QUERY_NOT_ALLOWED = 90, - /// A url scheme is not allowed in front of tag in dest url (e.g. http://{lpurl}) - /// - URL_SCHEME_BEFORE_DSA_TAG = 91, - /// A url scheme is not allowed in front of tag in tracking url template (e.g. - /// http://{lpurl}) - /// - URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 124, - /// The user does not have permissions to create a template ad for the given - /// template. - /// - USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE = 92, - /// Expandable setting is inconsistent/wrong. For example, an AdX ad is invalid if - /// it has a expandable vendor format but no expanding directions specified, or - /// expanding directions is specified, but the vendor format is not expandable. - /// - INCONSISTENT_EXPANDABLE_SETTINGS = 93, - /// Format is invalid - /// - INVALID_FORMAT = 94, - /// The text of this field did not match a pattern of allowed values. - /// - INVALID_FIELD_TEXT = 95, - /// Template element is mising - /// - ELEMENT_NOT_PRESENT = 96, - /// Error occurred during image processing - /// - IMAGE_ERROR = 97, - /// The value is not within the valid range - /// - VALUE_NOT_IN_RANGE = 98, - /// Template element field is not present - /// - FIELD_NOT_PRESENT = 99, - /// Address is incomplete - /// - ADDRESS_NOT_COMPLETE = 100, - /// Invalid address - /// - ADDRESS_INVALID = 101, - /// Error retrieving specified video - /// - VIDEO_RETRIEVAL_ERROR = 102, - /// Error processing audio - /// - AUDIO_ERROR = 103, - /// Display URL is incorrect for YouTube PYV ads - /// - INVALID_YOUTUBE_DISPLAY_URL = 104, - /// Too many product Images in GmailAd - /// - TOO_MANY_PRODUCT_IMAGES = 130, - /// Too many product Videos in GmailAd - /// - TOO_MANY_PRODUCT_VIDEOS = 131, - /// The device preference is not compatible with the ad type - /// - INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE = 105, - /// Call tracking is not supported for specified country. - /// - CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 106, - /// Carrier specific short number is not allowed. - /// - CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 107, - /// Specified phone number type is disallowed. - /// - DISALLOWED_NUMBER_TYPE = 108, - /// Phone number not supported for country. - /// - PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 109, - /// Phone number not supported with call tracking enabled for country. - /// - PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 110, - /// Premium rate phone number is not allowed. - /// - PREMIUM_RATE_NUMBER_NOT_ALLOWED = 111, - /// Vanity phone number is not allowed. - /// - VANITY_PHONE_NUMBER_NOT_ALLOWED = 112, - /// Invalid call conversion type id. - /// - INVALID_CALL_CONVERSION_TYPE_ID = 113, - CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID = 114, - /// Cannot set path2 without path1. - /// - CANNOT_SET_PATH2_WITHOUT_PATH1 = 119, - /// Missing domain name in campaign setting when adding expanded dynamic search ad. - /// - MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME = 125, - /// An unexpected or unknown error occurred. - /// - UNKNOWN = 115, - } - - - /// An error indicating a problem with an ad customizer tag. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerError : ApiError - { - private AdCustomizerErrorReason reasonField; - - private bool reasonFieldSpecified; - - private string functionStringField; - - private string operatorNameField; - - private int operandIndexField; - - private bool operandIndexFieldSpecified; - - private string operandValueField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdCustomizerErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// String form of the function that contained the error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string functionString - { - get - { - return this.functionStringField; - } - set - { - this.functionStringField = value; - } - } - - /// Lowercased string representation of the ad customizer function's operator. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string operatorName - { - get - { - return this.operatorNameField; - } - set - { - this.operatorNameField = value; - } - } - - /// Index of the operand that caused the error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int operandIndex - { - get - { - return this.operandIndexField; - } - set - { - this.operandIndexField = value; - this.operandIndexSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operandIndexSpecified - { - get - { - return this.operandIndexFieldSpecified; - } - set - { - this.operandIndexFieldSpecified = value; - } - } - - /// Value of the operand that caused the error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string operandValue - { - get - { - return this.operandValueField; - } - set - { - this.operandValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Ad customizer error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdCustomizerError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdCustomizerErrorReason - { - /// Invalid date argument in countdown function. - /// - COUNTDOWN_INVALID_DATE_FORMAT = 0, - /// Countdown end date is in the past. - /// - COUNTDOWN_DATE_IN_PAST = 1, - /// Invalid locale string in countdown function. - /// - COUNTDOWN_INVALID_LOCALE = 2, - /// Days-before argument to countdown function is not positive. - /// - COUNTDOWN_INVALID_START_DAYS_BEFORE = 3, - /// A user list referenced in an IF function does not exist. - /// - UNKNOWN_USER_LIST = 4, - } - - - /// AdGroupAd service operations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdOperation : Operation - { - private AdGroupAd operandField; - - private ExemptionRequest[] exemptionRequestsField; - - private string[] ignorablePolicyTopicIdsField; - - /// AdGroupAd to operate on. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupAd operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// Exemption requests for any policy violations in this Ad. This field is only used - /// for ADD operations - /// - [System.Xml.Serialization.XmlElementAttribute("exemptionRequests", Order = 1)] - public ExemptionRequest[] exemptionRequests - { - get - { - return this.exemptionRequestsField; - } - set - { - this.exemptionRequestsField = value; - } - } - - /// The list of policy topic IDs that should not cause a PolicyFindingError to be - /// reported. If the up front policy check produces a policy summary containing - /// PROHIBITED or FULLY_LIMITED policy topic entries of these types, the reviewable - /// entities will be saved without reporting an error. The reviewable entities will - /// not be eligible to serve until they pass the policy check.

This field accepts - /// returned policyTopicId from PolicyTopicEntry in the PolicyFindingError.

- ///
- [System.Xml.Serialization.XmlElementAttribute("ignorablePolicyTopicIds", Order = 2)] - public string[] ignorablePolicyTopicIds - { - get - { - return this.ignorablePolicyTopicIdsField; - } - set - { - this.ignorablePolicyTopicIdsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// This represents an operation that includes an operator and an operand specified - /// type. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdLabelOperation))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignCriterionOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignLabelOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignBidModifierOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupPerformanceTargetOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConversionTrackerOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerNegativeCriterionOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceLinkOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemTargetOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedMappingOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MoveOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManagedCustomerOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManagedCustomerLabelOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LinkOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionLabelOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineConversionFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineDataUploadOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineCallConversionFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UserListOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MutateMembersOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignSharedSetOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedCriterionOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedSetOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupLabelOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LabelOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AccountLabelOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCustomizerFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupExtensionSettingOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignExtensionSettingOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerExtensionSettingOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DraftOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrialOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidModifierOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineConversionAdjustmentFeedOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssetOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCampaignAdSubProductTypeOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomAffinityTokenOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomAffinityOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdParamOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BatchJobOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BiddingStrategyOperation))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetOrderOperation))] - public abstract partial class Operation - { - private Operator operatorField; - - private bool operatorFieldSpecified; - - private string operationTypeField; - - /// Operator. This field is required and should - /// not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Operator @operator - { - get - { - return this.operatorField; - } - set - { - this.operatorField = value; - this.operatorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operatorSpecified - { - get - { - return this.operatorFieldSpecified; - } - set - { - this.operatorFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of Operation. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Operation.Type", Order = 1)] - public string OperationType - { - get - { - return this.operationTypeField; - } - set - { - this.operationTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// This represents an operator that may be presented to an adsapi service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum Operator - { - /// The ADD operator. - /// - ADD = 0, - /// The REMOVE operator. - /// - REMOVE = 1, - /// The SET operator (used for updates). - /// - SET = 2, - } - - - /// Operations for adding/removing labels from AdGroupAds. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdLabelOperation : Operation - { - private AdGroupAdLabel operandField; - - /// AdGroupAdLabel to operate on. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupAdLabel operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manages the labels associated with an AdGroupAd. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdLabel - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private long adIdField; - - private bool adIdFieldSpecified; - - private long labelIdField; - - private bool labelIdFieldSpecified; - - /// The id of the adgroup containing the ad that the label to be applied to. This field is required and should not be - /// null when it is contained within Operators : - /// ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The id of the ad that the label to be applied to. This field is required and should not be null when it is - /// contained within Operators : ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long adId - { - get - { - return this.adIdField; - } - set - { - this.adIdField = value; - this.adIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adIdSpecified - { - get - { - return this.adIdFieldSpecified; - } - set - { - this.adIdFieldSpecified = value; - } - } - - /// The id of an existing label to be applied to the adgroup ad. This field is required and should not be - /// null when it is contained within Operators : - /// ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long labelId - { - get - { - return this.labelIdField; - } - set - { - this.labelIdField = value; - this.labelIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool labelIdSpecified - { - get - { - return this.labelIdFieldSpecified; - } - set - { - this.labelIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupAdService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdReturnValue : ListReturnValue - { - private AdGroupAd[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of ads in an ad group. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupAd[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Base list return value type. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupAdLabelReturnValue))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignCriterionReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignLabelReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignBidModifierReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignGroupPerformanceTargetReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConversionTrackerReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerNegativeCriterionReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemTargetReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedMappingReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupCriterionLabelReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineConversionFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineDataUploadReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineCallConversionFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UserListReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignSharedSetReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedCriterionReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedSetReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupLabelReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LabelReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCustomizerFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupExtensionSettingReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignExtensionSettingReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerExtensionSettingReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DraftReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrialReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidModifierReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OfflineConversionAdjustmentFeedReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssetReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCampaignAdSubProductTypeReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BatchJobReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BiddingStrategyReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetOrderReturnValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BudgetReturnValue))] - public abstract partial class ListReturnValue - { - private string listReturnValueTypeField; - - /// Indicates that this instance is a subtype of ListReturnValue. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ListReturnValue.Type", Order = 0)] - public string ListReturnValueType - { - get - { - return this.listReturnValueTypeField; - } - set - { - this.listReturnValueTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupAdService#mutateLabel call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdLabelReturnValue : ListReturnValue - { - private AdGroupAdLabel[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupAdLabel[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdGroupAdServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface, System.ServiceModel.IClientChannel - { - } - namespace Wrappers.AdGroupAdService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupAdOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdGroupAdOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupAdReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdGroupAdReturnValue rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabel", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupAdLabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateLabelRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelRequest(Google.Api.Ads.AdWords.v201806.AdGroupAdLabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabelResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupAdLabelReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateLabelResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelResponse(Google.Api.Ads.AdWords.v201806.AdGroupAdLabelReturnValue rval) - { - this.rval = rval; - } - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface")] - public interface AdGroupAdServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupAdPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupAdService.mutateResponse mutate(Wrappers.AdGroupAdService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdGroupAdService.mutateRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupAdService.mutateLabelResponse mutateLabel(Wrappers.AdGroupAdService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateLabelAsync(Wrappers.AdGroupAdService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupAdPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// A request to be exempted from a PolicyViolationError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExemptionRequest - { - private PolicyViolationKey keyField; - - /// Identifies the violation to request an exemption for. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PolicyViolationKey key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Use this service to manage ads. Available ad types are subclasses of the base Ad type and are shown in the AdGroupAd.ad documentation. Here are some of the - /// commonly used ad types:
Expanded Text - /// Ad
The primary ad type used on the search network. An expanded text - /// ad contains two headlines, a single description line, a final url, and optional - /// path fields.
Image Ad
A standard image - /// ad.
Template Ad (AdWords - /// Display Ad Builder)
A flexible ad type that supports various Template Ad formats.
- ///
- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdGroupAdService : AdWordsSoapClient, IAdGroupAdService - { - /// Creates a new instance of the class. - /// - public AdGroupAdService() - { - } - - /// Creates a new instance of the class. - /// - public AdGroupAdService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupAdService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupAdService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupAdService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of AdGroupAds. AdGroupAds that had been removed are not returned - /// by default. - /// The selector specifying the AdGroupAds to return. - /// The page containing the AdGroupAds that meet the criteria specified by - /// the selector. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupAdPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupAdService.mutateResponse Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface.mutate(Wrappers.AdGroupAdService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations (ie. add, set, remove):

Add - Creates a - /// new ad group ad. The adGroupId must - /// reference an existing ad group. The child Ad must be sufficiently - /// specified by constructing a concrete ad type (such as TextAd) and - /// setting its fields accordingly.

Set - Updates an ad group ad. Except for - /// status, ad group ad fields are not mutable. Status updates are - /// straightforward - the status of the ad group ad is updated as specified. If any - /// other field has changed, it will be ignored. If you want to change any of the - /// fields other than status, you must make a new ad and then remove the old - /// one.

Remove - Removes the link between the specified AdGroup and Ad.

- ///
The operations to apply. - /// A list of AdGroupAds where each entry in the list is the result of - /// applying the operation in the input list with the same index. For an add/set - /// operation, the return AdGroupAd will be what is saved to the db. In the case of - /// the remove operation, the return AdGroupAd will simply be an AdGroupAd - /// containing an Ad with the id set to the Ad being removed from the - /// AdGroup. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupAdReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupAdOperation[] operations) - { - Wrappers.AdGroupAdService.mutateRequest inValue = new Wrappers.AdGroupAdService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdGroupAdService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface.mutateAsync(Wrappers.AdGroupAdService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupAdOperation[] operations) - { - Wrappers.AdGroupAdService.mutateRequest inValue = new Wrappers.AdGroupAdService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupAdService.mutateLabelResponse Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface.mutateLabel(Wrappers.AdGroupAdService.mutateLabelRequest request) - { - return base.Channel.mutateLabel(request); - } - - /// Adds labels to the AdGroupAd or removes labels from the AdGroupAd.

Add - - /// Apply an existing label to an existing ad group ad. The - /// adGroupId and adId must reference an existing ad group ad. The labelId must reference an - /// existing label.

Remove - Removes the link between the - /// specified ad group ad and label. - ///

- ///
The operations to apply. - /// A list of AdGroupAdLabel where each entry in the list is the result of - /// applying the operation in the input list with the same index. For an add - /// operation, the returned AdGroupAdLabel contains the AdGroupId, AdId and the - /// LabelId. In the case of a remove operation, the returned AdGroupAdLabel will - /// only have AdGroupId and AdId. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupAdLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.AdGroupAdLabelOperation[] operations) - { - Wrappers.AdGroupAdService.mutateLabelRequest inValue = new Wrappers.AdGroupAdService.mutateLabelRequest(); - inValue.operations = operations; - Wrappers.AdGroupAdService.mutateLabelResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface) (this)).mutateLabel(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface.mutateLabelAsync(Wrappers.AdGroupAdService.mutateLabelRequest request) - { - return base.Channel.mutateLabelAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.AdGroupAdLabelOperation[] operations) - { - Wrappers.AdGroupAdService.mutateLabelRequest inValue = new Wrappers.AdGroupAdService.mutateLabelRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupAdServiceInterface) (this)).mutateLabelAsync(inValue)).Result.rval); - } - - /// Returns a list of AdGroupAds based on the query. - /// The SQL-like AWQL query string. - /// A list of AdGroupAds. - /// if problems occur while parsing the query - /// or fetching AdGroupAds. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupAdPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignCriterionService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignCriterionOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignCriterionOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignCriterionReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignCriterionReturnValue rval) - { - this.rval = rval; - } - } - } - /// Logical expression for targeting webpages of an advertiser's website.

A - /// condition is defined as operand OP argument where - /// operand is one of the values enumerated in WebpageConditionOperand, and, based on this - /// value, OP is either of EQUALS or .

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class WebpageCondition - { - private WebpageConditionOperand operandField; - - private bool operandFieldSpecified; - - private string argumentField; - - private WebpageConditionOperator operatorField; - - private bool operatorFieldSpecified; - - /// Operand of webpage targeting condition. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public WebpageConditionOperand operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - this.operandSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operandSpecified - { - get - { - return this.operandFieldSpecified; - } - set - { - this.operandFieldSpecified = value; - } - } - - /// Argument of the webpage targeting condition. This string must not contain a substring that matches the - /// regular expression '\*|\>\>|\=\=|\&\+' This field is required and should not be null. - /// The length of this string should be - /// between 1 and 2048, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string argument - { - get - { - return this.argumentField; - } - set - { - this.argumentField = value; - } - } - - /// Operator of webpage targeting condition. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public WebpageConditionOperator @operator - { - get - { - return this.operatorField; - } - set - { - this.operatorField = value; - this.operatorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operatorSpecified - { - get - { - return this.operatorFieldSpecified; - } - set - { - this.operatorFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operand value of WebpageCondition. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum WebpageConditionOperand - { - /// Operand denoting a webpage URL targeting condition. Operators WebpageConditionOperator#CONTAINS - /// and WebpageConditionOperator#EQUALS are - /// supported for such conditions. - /// - URL = 0, - /// Operand denoting a webpage category targeting condition. The operator WebpageConditionOperator#EQUALS will - /// be used for such conditions. - /// - CATEGORY = 1, - /// Operand denoting a webpage title targeting condition. The operator WebpageConditionOperator#CONTAINS - /// will be used for such conditions. - /// - PAGE_TITLE = 2, - /// Operand denoting a webpage content targeting condition. The operator WebpageConditionOperator#CONTAINS - /// will be used for such conditions. - /// - PAGE_CONTENT = 3, - /// Operand denoting a webpage custom label targeting condition.
The operator - /// WebpageConditionOperator#EQUALS - /// will be used for such conditions. - ///
- CUSTOM_LABEL = 5, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 4, - } - - - /// Webpage Condition Operator. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum WebpageConditionOperator - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The argument web condition equals to the compared web condition. - /// - EQUALS = 1, - /// The argument condition is a part of the compared web condition. - /// - CONTAINS = 2, - } - - - /// Base type of criterion parameters. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(WebpageParameter))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class CriterionParameter - { - private string criterionParameterTypeField; - - /// Indicates that this instance is a subtype of CriterionParameter. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("CriterionParameter.Type", Order = 0)] - public string CriterionParameterType - { - get - { - return this.criterionParameterTypeField; - } - set - { - this.criterionParameterTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Parameter of Webpage criterion, expressed as a list of conditions, or logical - /// expressions, for targeting webpages of an advertiser's website. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class WebpageParameter : CriterionParameter - { - private string criterionNameField; - - private WebpageCondition[] conditionsField; - - /// The name of the criterion that is defined by this parameter.

This name value - /// will be used for identifying, sorting and filtering criteria with this type of - /// parameters. For criteria with simpler parameters, such as keywords and - /// placements, the parameter value itself is used for identification, sorting and - /// filtering. This field is required and should - /// not be null. The - /// length of this string should be between 1 and 2048, inclusive.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string criterionName - { - get - { - return this.criterionNameField; - } - set - { - this.criterionNameField = value; - } - } - - /// Conditions, or logical expressions, for webpage targeting.

The list of - /// webpage targeting conditions are and-ed together when evaluated for - /// targeting. A null list of conditions means that all webpages of the - /// campaign's website are targeted.

The - /// maximum size of this collection is 3. This field must contain distinct elements. - ///
- [System.Xml.Serialization.XmlElementAttribute("conditions", Order = 1)] - public WebpageCondition[] conditions - { - get - { - return this.conditionsField; - } - set - { - this.conditionsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : CriterionParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : CriterionParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : CriterionParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An operand that can be used in a function expression. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PlacesOfInterestOperand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LocationExtensionOperand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IncomeOperand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(GeoTargetOperand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConstantOperand))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestContextOperand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FunctionOperand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedAttributeOperand))] - public abstract partial class FunctionArgumentOperand - { - private string functionArgumentOperandTypeField; - - /// Indicates that this instance is a subtype of FunctionArgumentOperand. Although - /// this field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("FunctionArgumentOperand.Type", Order = 0)] - public string FunctionArgumentOperandType - { - get - { - return this.functionArgumentOperandTypeField; - } - set - { - this.functionArgumentOperandTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// This operand specifies a place of interest category for semantic targeting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PlacesOfInterestOperand : FunctionArgumentOperand - { - private PlacesOfInterestOperandCategory categoryField; - - private bool categoryFieldSpecified; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PlacesOfInterestOperandCategory category - { - get - { - return this.categoryField; - } - set - { - this.categoryField = value; - this.categorySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool categorySpecified - { - get - { - return this.categoryFieldSpecified; - } - set - { - this.categoryFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Categories to identify places of interest. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PlacesOfInterestOperand.Category", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PlacesOfInterestOperandCategory - { - AIRPORT = 0, - DOWNTOWN = 1, - UNIVERSITY = 2, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 3, - } - - - /// This operand specifies information required for location extension targeting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LocationExtensionOperand : FunctionArgumentOperand - { - private ConstantOperand radiusField; - - private long locationIdField; - - private bool locationIdFieldSpecified; - - /// Distance in units specifying the radius around targeted locations. Only long and - /// double are supported constant types. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ConstantOperand radius - { - get - { - return this.radiusField; - } - set - { - this.radiusField = value; - } - } - - /// Used to filter locations present in the location feed by location criterion id. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long locationId - { - get - { - return this.locationIdField; - } - set - { - this.locationIdField = value; - this.locationIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool locationIdSpecified - { - get - { - return this.locationIdFieldSpecified; - } - set - { - this.locationIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A constant operand in a matching function. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConstantOperand : FunctionArgumentOperand - { - private ConstantOperandConstantType typeField; - - private bool typeFieldSpecified; - - private ConstantOperandUnit unitField; - - private bool unitFieldSpecified; - - private long longValueField; - - private bool longValueFieldSpecified; - - private bool booleanValueField; - - private bool booleanValueFieldSpecified; - - private double doubleValueField; - - private bool doubleValueFieldSpecified; - - private string stringValueField; - - /// Type of constant in this operand. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ConstantOperandConstantType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// Units of constant in this operand. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ConstantOperandUnit unit - { - get - { - return this.unitField; - } - set - { - this.unitField = value; - this.unitSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool unitSpecified - { - get - { - return this.unitFieldSpecified; - } - set - { - this.unitFieldSpecified = value; - } - } - - /// Long value of the operand if it is a long type. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long longValue - { - get - { - return this.longValueField; - } - set - { - this.longValueField = value; - this.longValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool longValueSpecified - { - get - { - return this.longValueFieldSpecified; - } - set - { - this.longValueFieldSpecified = value; - } - } - - /// Boolean value of the operand if it is a boolean type. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool booleanValue - { - get - { - return this.booleanValueField; - } - set - { - this.booleanValueField = value; - this.booleanValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool booleanValueSpecified - { - get - { - return this.booleanValueFieldSpecified; - } - set - { - this.booleanValueFieldSpecified = value; - } - } - - /// Double value of the operand if it is a double type. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public double doubleValue - { - get - { - return this.doubleValueField; - } - set - { - this.doubleValueField = value; - this.doubleValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool doubleValueSpecified - { - get - { - return this.doubleValueFieldSpecified; - } - set - { - this.doubleValueFieldSpecified = value; - } - } - - /// String value of the operand if it is a string type. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string stringValue - { - get - { - return this.stringValueField; - } - set - { - this.stringValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The types of constant operands. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConstantOperand.ConstantType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConstantOperandConstantType - { - /// Boolean constant type. booleanValue should be set for this type. - /// - BOOLEAN = 0, - /// Double constant type. doubleValue should be set for this type. - /// - DOUBLE = 1, - /// Long constant type. longValue should be set for this type. - /// - LONG = 2, - /// String constant type. stringValue should be set for this type. - /// - STRING = 3, - } - - - /// The units of constant operands, if applicable. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConstantOperand.Unit", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConstantOperandUnit - { - /// Meters. - /// - METERS = 0, - /// Miles. - /// - MILES = 1, - NONE = 2, - } - - - /// This operand specifies the income bracket a household falls under. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class IncomeOperand : FunctionArgumentOperand - { - private IncomeTier tierField; - - private bool tierFieldSpecified; - - /// Income tier specifying an income bracket that a household falls under. Tier 1 - /// belongs to the highest income bracket. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public IncomeTier tier - { - get - { - return this.tierField; - } - set - { - this.tierField = value; - this.tierSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool tierSpecified - { - get - { - return this.tierFieldSpecified; - } - set - { - this.tierFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Income tiers that specify the income bracket a household falls under. TIER_1 - /// belongs to the highest income bracket. The income bracket range associated with - /// each tier is defined per country and computed based on income percentiles. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum IncomeTier - { - UNKNOWN = 0, - TIER_1 = 1, - TIER_2 = 2, - TIER_3 = 3, - TIER_4 = 4, - TIER_5 = 5, - /// Bucket consisting of the bottom 5 tiers, specifying the bottom 50% of household - /// income zip codes. - /// - TIER_6_TO_10 = 6, - } - - - /// Represents an operand containing geo information, specifying the scope of the - /// geographical area. Currently, geo targets are restricted to a single criterion - /// id per operand. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GeoTargetOperand : FunctionArgumentOperand - { - private long[] locationsField; - - /// CriterionId of locations deciding the geographical scope. This field must contain distinct - /// elements. This field must not - /// contain elements. - /// - [System.Xml.Serialization.XmlElementAttribute("locations", Order = 0)] - public long[] locations - { - get - { - return this.locationsField; - } - set - { - this.locationsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a function where its operator is applied to its argument operands - /// resulting in a return value. It has the form (Operand... Operator Operand...). - /// The type of the return value depends on the operator being applied and the type - /// of the operands.

Operands per function is limited to - /// 20.

Here is a code example:

  // For example
-    /// "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed
-    /// associated with feed_attribute) FeedAttributeId feedAttributeId =
-    /// (FeedAttributeId of feed_attribute) Function function = new Function();
-    /// function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId,
-    /// feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand(
-    /// Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching
-    /// on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as:
-    /// Function function = new Function(); function.setLhsOperand(
-    /// Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID)));
-    /// function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList(
-    /// (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new
-    /// ConstantOperand(30L)));  
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Function - { - private FunctionOperator operatorField; - - private bool operatorFieldSpecified; - - private FunctionArgumentOperand[] lhsOperandField; - - private FunctionArgumentOperand[] rhsOperandField; - - private string functionStringField; - - /// Operator for a function. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FunctionOperator @operator - { - get - { - return this.operatorField; - } - set - { - this.operatorField = value; - this.operatorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operatorSpecified - { - get - { - return this.operatorFieldSpecified; - } - set - { - this.operatorFieldSpecified = value; - } - } - - /// Operand on the LHS in the equation. This is also the operand to be used for - /// single operand expressions such as NOT. The minimum size of this collection is 1. - /// - [System.Xml.Serialization.XmlElementAttribute("lhsOperand", Order = 1)] - public FunctionArgumentOperand[] lhsOperand - { - get - { - return this.lhsOperandField; - } - set - { - this.lhsOperandField = value; - } - } - - /// Operand on the RHS of the equation. - /// - [System.Xml.Serialization.XmlElementAttribute("rhsOperand", Order = 2)] - public FunctionArgumentOperand[] rhsOperand - { - get - { - return this.rhsOperandField; - } - set - { - this.rhsOperandField = value; - } - } - - /// String representation of the Function.

For mutate actions, this - /// field can be set instead of the , lhsOperand, and - /// rhsOperand fields. This field will be parsed and used to populate - /// the other fields.

When Function objects are returned from - /// get or mutate calls, this field contains the string representation of the - /// . Note that because multiple strings may map to the same - /// Function (whitespace and single versus double quotation marks, for - /// example), the value returned may not be identical to the string sent in the - /// request.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string functionString - { - get - { - return this.functionStringField; - } - set - { - this.functionStringField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operators that can be used in functions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Function.Operator", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FunctionOperator - { - /// The IN operator. - /// - IN = 0, - /// The IDENTITY operator. - /// - IDENTITY = 1, - /// The EQUALS operator - /// - EQUALS = 2, - /// Operator that takes two or more operands that are of type FunctionOperand and - /// checks that all the operands evaluate to true. For functions related to ad - /// formats, all the operands must be in lhsOperand. Return ConstantOperand with - /// Bool type. - /// - AND = 3, - /// Operator that returns true if the elements in lhsOperand contains any of the - /// elements in rhsOperands. Otherwise, return false. - /// - CONTAINS_ANY = 4, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 5, - } - - - /// Structure to specify an address location. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Address - { - private string streetAddressField; - - private string streetAddress2Field; - - private string cityNameField; - - private string provinceCodeField; - - private string provinceNameField; - - private string postalCodeField; - - private string countryCodeField; - - /// Street address line 1; null if unknown. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string streetAddress - { - get - { - return this.streetAddressField; - } - set - { - this.streetAddressField = value; - } - } - - /// Street address line 2; null if unknown. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string streetAddress2 - { - get - { - return this.streetAddress2Field; - } - set - { - this.streetAddress2Field = value; - } - } - - /// Name of the city; null if unknown. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string cityName - { - get - { - return this.cityNameField; - } - set - { - this.cityNameField = value; - } - } - - /// Province or state code; null if unknown. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string provinceCode - { - get - { - return this.provinceCodeField; - } - set - { - this.provinceCodeField = value; - } - } - - /// Province or state name; null if unknown. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string provinceName - { - get - { - return this.provinceNameField; - } - set - { - this.provinceNameField = value; - } - } - - /// Postal code; null if unknown. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string postalCode - { - get - { - return this.postalCodeField; - } - set - { - this.postalCodeField = value; - } - } - - /// Country code; null if unknown. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string countryCode - { - get - { - return this.countryCodeField; - } - set - { - this.countryCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies a geo location with the supplied latitude/longitude. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GeoPoint - { - private int latitudeInMicroDegreesField; - - private bool latitudeInMicroDegreesFieldSpecified; - - private int longitudeInMicroDegreesField; - - private bool longitudeInMicroDegreesFieldSpecified; - - /// Micro degrees for the latitude. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int latitudeInMicroDegrees - { - get - { - return this.latitudeInMicroDegreesField; - } - set - { - this.latitudeInMicroDegreesField = value; - this.latitudeInMicroDegreesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool latitudeInMicroDegreesSpecified - { - get - { - return this.latitudeInMicroDegreesFieldSpecified; - } - set - { - this.latitudeInMicroDegreesFieldSpecified = value; - } - } - - /// Micro degrees for the longitude. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int longitudeInMicroDegrees - { - get - { - return this.longitudeInMicroDegreesField; - } - set - { - this.longitudeInMicroDegreesField = value; - this.longitudeInMicroDegreesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool longitudeInMicroDegreesSpecified - { - get - { - return this.longitudeInMicroDegreesFieldSpecified; - } - set - { - this.longitudeInMicroDegreesFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Dimension by which to subdivide or filter products. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UnknownProductDimension))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductTypeFull))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductType))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductOfferId))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductCustomAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductLegacyCondition))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductChannelExclusivity))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductChannel))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductCanonicalCondition))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductBrand))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductBiddingCategory))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductAdwordsLabels))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductAdwordsGrouping))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class ProductDimension - { - private string productDimensionTypeField; - - /// Indicates that this instance is a subtype of ProductDimension. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ProductDimension.Type", Order = 0)] - public string ProductDimensionType - { - get - { - return this.productDimensionTypeField; - } - set - { - this.productDimensionTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An unknown product dimension type which will be returned in place of any - /// ProductDimension not supported by the clients current API version. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UnknownProductDimension : ProductDimension - { - } - - - /// A full product type string. Category of the product according to the merchant's - /// own classification. Example:
 "Home & Garden > Kitchen &
-    /// Dining > Kitchen Appliances > Refrigerators" 

Not - /// supported by campaigns of AdvertisingChannelType#SHOPPING so is - /// only used in ProductScopes.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductTypeFull : ProductDimension - { - private string valueField; - - /// This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// One element of a product type string at a certain level. Top-level product types - /// are at level 1, their children at level 2, and so on. We currently support up to - /// 5 levels. The user must specify a dimension type that indicates the level of the - /// product type. All cases of the same subdivision must have the same dimension - /// type (product type level). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductType : ProductDimension - { - private ProductDimensionType typeField; - - private bool typeFieldSpecified; - - private string valueField; - - /// Dimension type of the product type. Indicates the level of the product type. - /// The value must be one of {PRODUCT_TYPE_L1, - /// PRODUCT_TYPE_L2, PRODUCT_TYPE_L3, PRODUCT_TYPE_L4, PRODUCT_TYPE_L5}. - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ProductDimensionType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Type of product dimension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ProductDimensionType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - BIDDING_CATEGORY_L1 = 1, - BIDDING_CATEGORY_L2 = 2, - BIDDING_CATEGORY_L3 = 3, - BIDDING_CATEGORY_L4 = 4, - BIDDING_CATEGORY_L5 = 5, - BRAND = 6, - CANONICAL_CONDITION = 7, - CUSTOM_ATTRIBUTE_0 = 8, - CUSTOM_ATTRIBUTE_1 = 9, - CUSTOM_ATTRIBUTE_2 = 10, - CUSTOM_ATTRIBUTE_3 = 11, - CUSTOM_ATTRIBUTE_4 = 12, - OFFER_ID = 13, - PRODUCT_TYPE_L1 = 14, - PRODUCT_TYPE_L2 = 15, - PRODUCT_TYPE_L3 = 16, - PRODUCT_TYPE_L4 = 17, - PRODUCT_TYPE_L5 = 18, - CHANNEL = 19, - CHANNEL_EXCLUSIVITY = 20, - } - - - /// An offer ID as specified by the merchant. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductOfferId : ProductDimension - { - private string valueField; - - /// This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A custom attribute value. As a product can have multiple custom attributes, the - /// user must specify a dimension type that indicates the index of the attribute by - /// which to subdivide. All cases of the same subdivision must have the same - /// dimension type (attribute index). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductCustomAttribute : ProductDimension - { - private ProductDimensionType typeField; - - private bool typeFieldSpecified; - - private string valueField; - - /// Dimension type of the custom attribute. Indicates the index of the custom - /// attribute. The value must be one of - /// {CUSTOM_ATTRIBUTE_0, CUSTOM_ATTRIBUTE_1, CUSTOM_ATTRIBUTE_2, CUSTOM_ATTRIBUTE_3, - /// CUSTOM_ATTRIBUTE_4}. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ProductDimensionType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A plain condition string. Not supported by campaigns of AdvertisingChannelType#SHOPPING so is - /// only used in ProductScopes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductLegacyCondition : ProductDimension - { - private string valueField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - /// The product channel exclusivity dimension, which limits the availability of an - /// offer between only local, only online, or both. Only supported by campaigns of - /// AdvertisingChannelType#SHOPPING. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductChannelExclusivity : ProductDimension - { - private ShoppingProductChannelExclusivity channelExclusivityField; - - private bool channelExclusivityFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ShoppingProductChannelExclusivity channelExclusivity - { - get - { - return this.channelExclusivityField; - } - set - { - this.channelExclusivityField = value; - this.channelExclusivitySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool channelExclusivitySpecified - { - get - { - return this.channelExclusivityFieldSpecified; - } - set - { - this.channelExclusivityFieldSpecified = value; - } - } - } - - - /// Channel exclusivity specifies whether an item is sold exclusively in one channel - /// or through multiple channels. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ShoppingProductChannelExclusivity - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The item is sold through one channel only, either local stores or online as - /// indicated by its ShoppingProductChannel. - /// - SINGLE_CHANNEL = 1, - /// The item is matched to its online or local stores counterpart, indicating it is - /// available for purchase in both ShoppingProductChannels. - /// - MULTI_CHANNEL = 2, - } - - - /// The product channel dimension, which specifies the locality of an offer. Only - /// supported by campaigns of AdvertisingChannelType#SHOPPING. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductChannel : ProductDimension - { - private ShoppingProductChannel channelField; - - private bool channelFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ShoppingProductChannel channel - { - get - { - return this.channelField; - } - set - { - this.channelField = value; - this.channelSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool channelSpecified - { - get - { - return this.channelFieldSpecified; - } - set - { - this.channelFieldSpecified = value; - } - } - } - - - /// Channel specifies where the item is sold: online or in local stores. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ShoppingProductChannel - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The item is sold online. - /// - ONLINE = 1, - /// The item is sold in local stores. - /// - LOCAL = 2, - } - - - /// A canonical condition. Only supported by campaigns of AdvertisingChannelType#SHOPPING. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductCanonicalCondition : ProductDimension - { - private ProductCanonicalConditionCondition conditionField; - - private bool conditionFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ProductCanonicalConditionCondition condition - { - get - { - return this.conditionField; - } - set - { - this.conditionField = value; - this.conditionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool conditionSpecified - { - get - { - return this.conditionFieldSpecified; - } - set - { - this.conditionFieldSpecified = value; - } - } - } - - - /// A canonical product condition. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ProductCanonicalCondition.Condition", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ProductCanonicalConditionCondition - { - NEW = 0, - USED = 1, - REFURBISHED = 2, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 3, - } - - - /// A brand string. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductBrand : ProductDimension - { - private string valueField; - - /// This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// One element of a bidding category at a certain level. Top-level categories are - /// at level 1, their children at level 2, and so on. We currently support up to 5 - /// levels. The user must specify a dimension type that indicates the level of the - /// category. All cases of the same subdivision must have the same dimension type - /// (category level). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductBiddingCategory : ProductDimension - { - private ProductDimensionType typeField; - - private bool typeFieldSpecified; - - private long valueField; - - private bool valueFieldSpecified; - - /// Dimension type of the category. Indicates the level of the category in the - /// taxonomy. This field can be filtered on - /// using the value "ParentDimensionType". The - /// value must be one of {BIDDING_CATEGORY_L1, BIDDING_CATEGORY_L2, - /// BIDDING_CATEGORY_L3, BIDDING_CATEGORY_L4, BIDDING_CATEGORY_L5}. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ProductDimensionType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// ID of the product category. This field can - /// be filtered on using the value "ParentDimensionId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ParentDimensionType = new Field("ParentDimensionType", true, false); - - public static readonly Field ParentDimensionId = new Field("ParentDimensionId", true, false); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ParentDimensionType = Fields.ParentDimensionType; - - public static readonly Field ParentDimensionId = Fields.ParentDimensionId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ParentDimensionType = Fields.ParentDimensionType; - - public static readonly Field ParentDimensionId = Fields.ParentDimensionId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An adwords labels string. Not supported by campaigns of AdvertisingChannelType#SHOPPING so is - /// only used in ProductScopes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductAdwordsLabels : ProductDimension - { - private string valueField; - - /// This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An adwords grouping string. Not supported by campaigns of AdvertisingChannelType#SHOPPING so is - /// only used in ProductScopes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductAdwordsGrouping : ProductDimension - { - private string valueField; - - /// This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ProductDimension.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ProductDimension.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ProductDimension.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a criterion (such as a keyword, placement, or vertical). This is disabled for AdX when it is contained - /// within Operators: ADD, SET. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(YouTubeVideo))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(YouTubeChannel))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Webpage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Vertical))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionUserInterest))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LocationGroups))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Proximity))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductScope))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Platform))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Placement))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Parent))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperatingSystemVersion))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MobileDevice))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MobileApplication))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MobileAppCategory))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Location))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Language))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Keyword))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IpBlock))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IncomeRange))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Gender))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ContentLabel))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Carrier))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AgeRange))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdSchedule))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(InteractionType))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductPartition))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionCustomIntent))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionCustomAffinity))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AppPaymentModel))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PreferredContent))] - public partial class Criterion - { - private long idField; - - private bool idFieldSpecified; - - private CriterionType typeField; - - private bool typeFieldSpecified; - - private string criterionTypeField; - - /// ID of this criterion. This field can be - /// selected using the value "Id".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "CriteriaType".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public CriterionType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of Criterion. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Criterion.Type", Order = 2)] - public string CriterionType - { - get - { - return this.criterionTypeField; - } - set - { - this.criterionTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field CriteriaType = new Field("CriteriaType", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CriteriaType = Fields.CriteriaType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CriteriaType = Fields.CriteriaType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The types of criteria. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Criterion.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CriterionType - { - /// Content label for exclusion. - /// - CONTENT_LABEL = 0, - /// Keyword. e.g. 'mars cruise' - /// - KEYWORD = 1, - /// Placement. aka Website. e.g. 'www.flowers4sale.com' - /// - PLACEMENT = 2, - /// Vertical, e.g. 'category::Animals>Pets' This is for vertical targeting on the - /// content network. - /// - VERTICAL = 3, - /// User lists, are links to sets of users defined by the advertiser. - /// - USER_LIST = 4, - /// User interests, categories of interests the user is interested in. - /// - USER_INTEREST = 5, - /// Mobile applications to target. - /// - MOBILE_APPLICATION = 6, - /// Mobile application categories to target. - /// - MOBILE_APP_CATEGORY = 7, - /// Product partition (product group) in a shopping campaign. - /// - PRODUCT_PARTITION = 8, - /// IP addresses to exclude. - /// - IP_BLOCK = 9, - /// Webpages of an advertiser's website to target. - /// - WEBPAGE = 10, - /// Languages to target. - /// - LANGUAGE = 11, - /// Geographic regions to target. - /// - LOCATION = 12, - /// Age Range to exclude. - /// - AGE_RANGE = 13, - /// Mobile carriers to target. - /// - CARRIER = 14, - /// Mobile operating system versions to target. - /// - OPERATING_SYSTEM_VERSION = 15, - /// Mobile devices to target. - /// - MOBILE_DEVICE = 16, - /// Gender to exclude. - /// - GENDER = 17, - /// Parent to target and exclude. - /// - PARENT = 18, - /// Proximity (area within a radius) to target. - /// - PROXIMITY = 19, - /// Platforms to target. - /// - PLATFORM = 20, - /// Representing preferred content bid modifier. - /// - PREFERRED_CONTENT = 28, - /// AdSchedule or specific days and time intervals to target. - /// - AD_SCHEDULE = 21, - /// Targeting based on location groups. - /// - LOCATION_GROUPS = 22, - /// Scope of products. Contains a list of product dimensions, all of which a product - /// has to match to be included in the campaign. - /// - PRODUCT_SCOPE = 23, - /// Custom Affinity, a criterion used for custom audience targeting. - /// - CUSTOM_AFFINITY = 31, - /// Custom Intent, a criterion used for custom audience targeting. - /// - CUSTOM_INTENT = 32, - /// YouTube video to target. - /// - YOUTUBE_VIDEO = 24, - /// YouTube channel to target. - /// - YOUTUBE_CHANNEL = 25, - /// Enables advertisers to target paid apps. - /// - APP_PAYMENT_MODEL = 26, - /// Income range to target and exclude. - /// - INCOME_RANGE = 30, - /// Interaction type to bid modify. - /// - INTERACTION_TYPE = 29, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 27, - } - - - /// YouTube video criterion.

A criterion of this type can be either targeted or - /// excluded. This is disabled for AdX when it - /// is contained within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class YouTubeVideo : Criterion - { - private string videoIdField; - - private string videoNameField; - - /// YouTube video id as it appears on the YouTube watch page. This field can be selected using the value - /// "VideoId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string videoId - { - get - { - return this.videoIdField; - } - set - { - this.videoIdField = value; - } - } - - /// Name of the video. This field can be - /// selected using the value "VideoName". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string videoName - { - get - { - return this.videoNameField; - } - set - { - this.videoNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field VideoId = new Field("VideoId", false, true); - - public static readonly Field VideoName = new Field("VideoName", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field VideoId = Fields.VideoId; - - public static readonly Field VideoName = Fields.VideoName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// YouTube channel criterion.

A criterion of this type can be either targeted or - /// excluded. This is disabled for AdX when it - /// is contained within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class YouTubeChannel : Criterion - { - private string channelIdField; - - private string channelNameField; - - /// The YouTube uploader channel id or the channel code of a YouTube content - /// channel.

The uploader channel id can be obtained from the YouTube id-based - /// URL. For example, in - /// https://www.youtube.com/channel/UCEN58iXQg82TXgsDCjWqIkg the - /// channel id is UCEN58iXQg82TXgsDCjWqIkg

For more information - /// see: https://support.google.com/youtube/answer/6180214 This field can be selected using the value "ChannelId".

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string channelId - { - get - { - return this.channelIdField; - } - set - { - this.channelIdField = value; - } - } - - /// The public name for a YouTube user channel. This field can be selected using the value "ChannelName". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string channelName - { - get - { - return this.channelNameField; - } - set - { - this.channelNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ChannelId = new Field("ChannelId", false, true); - - public static readonly Field ChannelName = new Field("ChannelName", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ChannelId = Fields.ChannelId; - - public static readonly Field ChannelName = Fields.ChannelName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Criterion for targeting webpages of an advertiser's website. The website domain - /// name is specified at the campaign level. This is disabled for AdX when it is contained within Operators: ADD, - /// SET. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Webpage : Criterion - { - private WebpageParameter parameterField; - - private double criteriaCoverageField; - - private bool criteriaCoverageFieldSpecified; - - private string[] criteriaSamplesField; - - /// The webpage criterion parameter. This field - /// can be selected using the value "Parameter". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public WebpageParameter parameter - { - get - { - return this.parameterField; - } - set - { - this.parameterField = value; - } - } - - /// Keywordless criteria coverage - Computed percentage of website coverage based on - /// the website target, negative website targets and negative keywords in the ad - /// group and campaign. This field can be - /// selected using the value "CriteriaCoverage". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public double criteriaCoverage - { - get - { - return this.criteriaCoverageField; - } - set - { - this.criteriaCoverageField = value; - this.criteriaCoverageSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criteriaCoverageSpecified - { - get - { - return this.criteriaCoverageFieldSpecified; - } - set - { - this.criteriaCoverageFieldSpecified = value; - } - } - - /// Keywordless criteria samples - List of sample urls that matches with the website - /// target. This field can be selected using the - /// value "CriteriaSamples". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("criteriaSamples", Order = 2)] - public string[] criteriaSamples - { - get - { - return this.criteriaSamplesField; - } - set - { - this.criteriaSamplesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Parameter = new Field("Parameter", false, true); - - public static readonly Field CriteriaCoverage = new Field("CriteriaCoverage", false, true); - - public static readonly Field CriteriaSamples = new Field("CriteriaSamples", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Parameter = Fields.Parameter; - - public static readonly Field CriteriaCoverage = Fields.CriteriaCoverage; - - public static readonly Field CriteriaSamples = Fields.CriteriaSamples; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Use verticals to target or exclude placements in the Google Display Network - /// based on the category into which the placement falls (for example, "Pets & - /// Animals/Pets/Dogs"). View the - /// complete list of available vertical categories. This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Vertical : Criterion - { - private long verticalIdField; - - private bool verticalIdFieldSpecified; - - private long verticalParentIdField; - - private bool verticalParentIdFieldSpecified; - - private string[] pathField; - - /// Id of this vertical. This field can be - /// selected using the value "VerticalId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long verticalId - { - get - { - return this.verticalIdField; - } - set - { - this.verticalIdField = value; - this.verticalIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool verticalIdSpecified - { - get - { - return this.verticalIdFieldSpecified; - } - set - { - this.verticalIdFieldSpecified = value; - } - } - - /// Id of the parent of this vertical. This - /// field can be selected using the value "VerticalParentId". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long verticalParentId - { - get - { - return this.verticalParentIdField; - } - set - { - this.verticalParentIdField = value; - this.verticalParentIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool verticalParentIdSpecified - { - get - { - return this.verticalParentIdFieldSpecified; - } - set - { - this.verticalParentIdFieldSpecified = value; - } - } - - /// The category to target or exclude. Each subsequent element in the array - /// describes a more specific sub-category. For example, {"Pets & - /// Animals", "Pets", "Dogs"} represents the "Pets & Animals/Pets/Dogs" - /// category. A complete list of available vertical categories is available here This field is required and - /// must not be empty. This field can be - /// selected using the value "Path". - /// - [System.Xml.Serialization.XmlElementAttribute("path", Order = 2)] - public string[] path - { - get - { - return this.pathField; - } - set - { - this.pathField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field VerticalId = new Field("VerticalId", false, true); - - public static readonly Field VerticalParentId = new Field("VerticalParentId", false, true); - - public static readonly Field Path = new Field("Path", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field VerticalId = Fields.VerticalId; - - public static readonly Field VerticalParentId = Fields.VerticalParentId; - - public static readonly Field Path = Fields.Path; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// UserList - represents a user list that is defined by the advertiser to be - /// targeted. This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionUserList : Criterion - { - private long userListIdField; - - private bool userListIdFieldSpecified; - - private string userListNameField; - - private CriterionUserListMembershipStatus userListMembershipStatusField; - - private bool userListMembershipStatusFieldSpecified; - - private bool userListEligibleForSearchField; - - private bool userListEligibleForSearchFieldSpecified; - - private bool userListEligibleForDisplayField; - - private bool userListEligibleForDisplayFieldSpecified; - - /// Id of this user list. This is a required field. This field can be selected using the value "UserListId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long userListId - { - get - { - return this.userListIdField; - } - set - { - this.userListIdField = value; - this.userListIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userListIdSpecified - { - get - { - return this.userListIdFieldSpecified; - } - set - { - this.userListIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "UserListName". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string userListName - { - get - { - return this.userListNameField; - } - set - { - this.userListNameField = value; - } - } - - /// This field can be selected using the value - /// "UserListMembershipStatus".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public CriterionUserListMembershipStatus userListMembershipStatus - { - get - { - return this.userListMembershipStatusField; - } - set - { - this.userListMembershipStatusField = value; - this.userListMembershipStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userListMembershipStatusSpecified - { - get - { - return this.userListMembershipStatusFieldSpecified; - } - set - { - this.userListMembershipStatusFieldSpecified = value; - } - } - - /// Determines whether a user list is eligible for targeting in the google.com - /// (search) network. This field can be selected - /// using the value "UserListEligibleForSearch".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool userListEligibleForSearch - { - get - { - return this.userListEligibleForSearchField; - } - set - { - this.userListEligibleForSearchField = value; - this.userListEligibleForSearchSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userListEligibleForSearchSpecified - { - get - { - return this.userListEligibleForSearchFieldSpecified; - } - set - { - this.userListEligibleForSearchFieldSpecified = value; - } - } - - /// Determines whether a user list is eligible for targeting in the display network. - /// This field can be selected using the value - /// "UserListEligibleForDisplay".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool userListEligibleForDisplay - { - get - { - return this.userListEligibleForDisplayField; - } - set - { - this.userListEligibleForDisplayField = value; - this.userListEligibleForDisplaySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userListEligibleForDisplaySpecified - { - get - { - return this.userListEligibleForDisplayFieldSpecified; - } - set - { - this.userListEligibleForDisplayFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field UserListId = new Field("UserListId", false, true); - - public static readonly Field UserListName = new Field("UserListName", false, true); - - public static readonly Field UserListMembershipStatus = new Field("UserListMembershipStatus", true, true); - - public static readonly Field UserListEligibleForSearch = new Field("UserListEligibleForSearch", true, true); - - public static readonly Field UserListEligibleForDisplay = new Field("UserListEligibleForDisplay", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field UserListId = Fields.UserListId; - - public static readonly Field UserListName = Fields.UserListName; - - public static readonly Field UserListMembershipStatus = Fields.UserListMembershipStatus; - - public static readonly Field UserListEligibleForSearch = Fields.UserListEligibleForSearch; - - public static readonly Field UserListEligibleForDisplay = Fields.UserListEligibleForDisplay; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field UserListMembershipStatus = Fields.UserListMembershipStatus; - - public static readonly Field UserListEligibleForSearch = Fields.UserListEligibleForSearch; - - public static readonly Field UserListEligibleForDisplay = Fields.UserListEligibleForDisplay; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Membership status of the user list. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CriterionUserList.MembershipStatus", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CriterionUserListMembershipStatus - { - /// Open status - list is accruing members and can be targeted to. - /// - OPEN = 0, - /// Closed status - No new members being added. Can not be used for targeting a new - /// campaign. Existing campaigns can still work as long as the list is not removed - /// as a targeting criteria. - /// - CLOSED = 1, - } - - - /// User Interest represents a particular interest-based vertical to be targeted. - /// This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionUserInterest : Criterion - { - private long userInterestIdField; - - private bool userInterestIdFieldSpecified; - - private long userInterestParentIdField; - - private bool userInterestParentIdFieldSpecified; - - private string userInterestNameField; - - /// Id of this user interest. This is a required field. This field can be selected using the value "UserInterestId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long userInterestId - { - get - { - return this.userInterestIdField; - } - set - { - this.userInterestIdField = value; - this.userInterestIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userInterestIdSpecified - { - get - { - return this.userInterestIdFieldSpecified; - } - set - { - this.userInterestIdFieldSpecified = value; - } - } - - /// Parent Id of this user interest. This field - /// can be selected using the value "UserInterestParentId". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long userInterestParentId - { - get - { - return this.userInterestParentIdField; - } - set - { - this.userInterestParentIdField = value; - this.userInterestParentIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userInterestParentIdSpecified - { - get - { - return this.userInterestParentIdFieldSpecified; - } - set - { - this.userInterestParentIdFieldSpecified = value; - } - } - - /// Name of this user interest. This field can - /// be selected using the value "UserInterestName". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string userInterestName - { - get - { - return this.userInterestNameField; - } - set - { - this.userInterestNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field UserInterestId = new Field("UserInterestId", false, true); - - public static readonly Field UserInterestParentId = new Field("UserInterestParentId", false, true); - - public static readonly Field UserInterestName = new Field("UserInterestName", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field UserInterestId = Fields.UserInterestId; - - public static readonly Field UserInterestParentId = Fields.UserInterestParentId; - - public static readonly Field UserInterestName = Fields.UserInterestName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a criterion containing a function that when evaluated specifies how - /// to target based on the type of the location. These "location groups" are custom, - /// dynamic bundles of locations (for instance "High income areas in California" or - /// "Airports in France").

Examples:

For income demographic targeting, we - /// need to specify the income tier and the geo which it targets. Areas in - /// California that are in the top national income tier can be represented by:
-    ///  Function function = new Function(); function.setLhsOperand(Arrays.asList(
-    /// (Operand) new IncomeOperand(IncomeTier.TIER_1));
-    /// function.setOperator(Operator.AND); function.setRhsOperand(Arrays.asList(
-    /// (Operand) new GeoTargetOperand(Lists.newArrayList(new CriterionId(21137L))));
-    ///  
For place of interest targeting, we need to specify the place of - /// interest category and the geo which it targets. Airports in France can be - /// represented by:
  Function function = new Function();
-    /// function.setLhsOperand(Arrays.asList( (Operand) new
-    /// PlacesOfInterestOperand(PlacesOfInterestOperand.Category.AIRPORT));
-    /// function.setOperator(Operator.AND); function.setRhsOperand(Arrays.asList(
-    /// (Operand) new GeoTargetOperand(Lists.newArrayList(new CriterionId(2250L))));
-    ///  

NOTE: Places of interest and income targeting are read - /// only.

This is disabled for AdX when it - /// is contained within Operators: ADD, SET. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LocationGroups : Criterion - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private Function matchingFunctionField; - - /// Feed to be used for targeting around locations. This is required for distance - /// targets. This field can be selected using - /// the value "FeedId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Matching function to filter out locations targeted by the criteria. This allows - /// advertisers to target based on the semantics of the location. This field can be selected using the value - /// "MatchingFunction". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Function matchingFunction - { - get - { - return this.matchingFunctionField; - } - set - { - this.matchingFunctionField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", false, true); - - public static readonly Field MatchingFunction = new Field("MatchingFunction", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field MatchingFunction = Fields.MatchingFunction; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a Proximity Criterion. A proximity is an area within a certain radius - /// of a point with the center point being described by a lat/long pair. The caller - /// may also alternatively provide address fields which will be geocoded into a - /// lat/long pair. Note: If a geoPoint value is provided, the address is not used - /// for calculating the lat/long to target.

A criterion of this type is only - /// targetable. This is enabled for - /// AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Proximity : Criterion - { - private GeoPoint geoPointField; - - private ProximityDistanceUnits radiusDistanceUnitsField; - - private bool radiusDistanceUnitsFieldSpecified; - - private double radiusInUnitsField; - - private bool radiusInUnitsFieldSpecified; - - private Address addressField; - - /// Latitude and longitude. This field can be - /// selected using the value "GeoPoint". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public GeoPoint geoPoint - { - get - { - return this.geoPointField; - } - set - { - this.geoPointField = value; - } - } - - /// Radius distance units. This field can be - /// selected using the value "RadiusDistanceUnits". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ProximityDistanceUnits radiusDistanceUnits - { - get - { - return this.radiusDistanceUnitsField; - } - set - { - this.radiusDistanceUnitsField = value; - this.radiusDistanceUnitsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool radiusDistanceUnitsSpecified - { - get - { - return this.radiusDistanceUnitsFieldSpecified; - } - set - { - this.radiusDistanceUnitsFieldSpecified = value; - } - } - - /// Radius expressed in distance units. This - /// field can be selected using the value "RadiusInUnits". This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public double radiusInUnits - { - get - { - return this.radiusInUnitsField; - } - set - { - this.radiusInUnitsField = value; - this.radiusInUnitsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool radiusInUnitsSpecified - { - get - { - return this.radiusInUnitsFieldSpecified; - } - set - { - this.radiusInUnitsFieldSpecified = value; - } - } - - /// Full address; null if unknonwn. This field can be selected using the value "Address". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public Address address - { - get - { - return this.addressField; - } - set - { - this.addressField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field GeoPoint = new Field("GeoPoint", false, true); - - public static readonly Field RadiusDistanceUnits = new Field("RadiusDistanceUnits", false, true); - - public static readonly Field RadiusInUnits = new Field("RadiusInUnits", false, true); - - public static readonly Field Address = new Field("Address", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field GeoPoint = Fields.GeoPoint; - - public static readonly Field RadiusDistanceUnits = Fields.RadiusDistanceUnits; - - public static readonly Field RadiusInUnits = Fields.RadiusInUnits; - - public static readonly Field Address = Fields.Address; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The radius distance is expressed in either kilometers or miles. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Proximity.DistanceUnits", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ProximityDistanceUnits - { - /// The unit of distance is kilometer. - /// - KILOMETERS = 0, - /// The unit of distance is mile. - /// - MILES = 1, - } - - - /// Scope of products. Contains a set of product dimensions, all of which a product - /// has to match to be included in the campaign. These product dimensions must have - /// a value; the "everything else" case without a value is not allowed.

If there - /// is no ProductScope, all products are included in the campaign. If a - /// campaign has more than one , products are included as long as they - /// match any. Campaigns of AdvertisingChannelType#SHOPPING can - /// have at most one ProductScope. This is disabled for AdX when it is contained within Operators: ADD, - /// SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductScope : Criterion - { - private ProductDimension[] dimensionsField; - - /// This field can be selected using the value - /// "Dimensions". This field - /// must contain at least one element when it is contained within Operators: ADD. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("dimensions", Order = 0)] - public ProductDimension[] dimensions - { - get - { - return this.dimensionsField; - } - set - { - this.dimensionsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Dimensions = new Field("Dimensions", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Dimensions = Fields.Dimensions; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents Platform criterion.

A criterion of this type can only be created - /// using an ID. This is enabled for - /// AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Platform : Criterion - { - private string platformNameField; - - /// This field can be selected using the value - /// "PlatformName".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string platformName - { - get - { - return this.platformNameField; - } - set - { - this.platformNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field PlatformName = new Field("PlatformName", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field PlatformName = Fields.PlatformName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field PlatformName = Fields.PlatformName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A placement used for modifying bids for sites when targeting the content - /// network. This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Placement : Criterion - { - private string urlField; - - /// Url of the placement.

For example, "http://www.domain.com". This field can be selected using the value - /// "PlacementUrl".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string url - { - get - { - return this.urlField; - } - set - { - this.urlField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field PlacementUrl = new Field("PlacementUrl", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field PlacementUrl = Fields.PlacementUrl; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field PlacementUrl = Fields.PlacementUrl; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Parent criterion.

A criterion of this type can only be created using an ID. A - /// criterion of this type can be either targeted or excluded. This is disabled for AdX when it is contained - /// within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Parent : Criterion - { - private ParentParentType parentTypeField; - - private bool parentTypeFieldSpecified; - - /// This field can be selected using the value - /// "ParentType". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ParentParentType parentType - { - get - { - return this.parentTypeField; - } - set - { - this.parentTypeField = value; - this.parentTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool parentTypeSpecified - { - get - { - return this.parentTypeFieldSpecified; - } - set - { - this.parentTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ParentType = new Field("ParentType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ParentType = Fields.ParentType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The possible types of parents. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Parent.ParentType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ParentParentType - { - PARENT_PARENT = 0, - PARENT_NOT_A_PARENT = 1, - PARENT_UNDETERMINED = 2, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 3, - } - - - /// Represents an Operating System Version Criterion. View the complete list of - /// available mobile platforms. You can also get the list from ConstantDataService. - ///

A criterion of this type can only be created using an ID. A criterion of this - /// type can be either targeted or excluded. This is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OperatingSystemVersion : Criterion - { - private string nameField; - - private int osMajorVersionField; - - private bool osMajorVersionFieldSpecified; - - private int osMinorVersionField; - - private bool osMinorVersionFieldSpecified; - - private OperatingSystemVersionOperatorType operatorTypeField; - - private bool operatorTypeFieldSpecified; - - /// The name of the operating system. This field - /// can be selected using the value "OperatingSystemName". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The OS Major Version number. This field can - /// be selected using the value "OsMajorVersion". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int osMajorVersion - { - get - { - return this.osMajorVersionField; - } - set - { - this.osMajorVersionField = value; - this.osMajorVersionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool osMajorVersionSpecified - { - get - { - return this.osMajorVersionFieldSpecified; - } - set - { - this.osMajorVersionFieldSpecified = value; - } - } - - /// The OS Minor Version number. This field can - /// be selected using the value "OsMinorVersion". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int osMinorVersion - { - get - { - return this.osMinorVersionField; - } - set - { - this.osMinorVersionField = value; - this.osMinorVersionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool osMinorVersionSpecified - { - get - { - return this.osMinorVersionFieldSpecified; - } - set - { - this.osMinorVersionFieldSpecified = value; - } - } - - /// The operator type. This field can be - /// selected using the value "OperatorType". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public OperatingSystemVersionOperatorType operatorType - { - get - { - return this.operatorTypeField; - } - set - { - this.operatorTypeField = value; - this.operatorTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operatorTypeSpecified - { - get - { - return this.operatorTypeFieldSpecified; - } - set - { - this.operatorTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field OperatingSystemName = new Field("OperatingSystemName", false, true); - - public static readonly Field OsMajorVersion = new Field("OsMajorVersion", false, true); - - public static readonly Field OsMinorVersion = new Field("OsMinorVersion", false, true); - - public static readonly Field OperatorType = new Field("OperatorType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field OperatingSystemName = Fields.OperatingSystemName; - - public static readonly Field OsMajorVersion = Fields.OsMajorVersion; - - public static readonly Field OsMinorVersion = Fields.OsMinorVersion; - - public static readonly Field OperatorType = Fields.OperatorType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The operator type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OperatingSystemVersion.OperatorType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OperatingSystemVersionOperatorType - { - GREATER_THAN_EQUAL_TO = 0, - EQUAL_TO = 1, - UNKNOWN = 2, - } - - - /// Represents a Mobile Device Criterion.

A criterion of this type can only be - /// created using an ID. A criterion of this type can be either targeted or - /// excluded. This is enabled for - /// AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MobileDevice : Criterion - { - private string deviceNameField; - - private string manufacturerNameField; - - private MobileDeviceDeviceType deviceTypeField; - - private bool deviceTypeFieldSpecified; - - private string operatingSystemNameField; - - /// This field can be selected using the value - /// "DeviceName". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string deviceName - { - get - { - return this.deviceNameField; - } - set - { - this.deviceNameField = value; - } - } - - /// This field can be selected using the value - /// "ManufacturerName". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string manufacturerName - { - get - { - return this.manufacturerNameField; - } - set - { - this.manufacturerNameField = value; - } - } - - /// This field can be selected using the value - /// "DeviceType". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public MobileDeviceDeviceType deviceType - { - get - { - return this.deviceTypeField; - } - set - { - this.deviceTypeField = value; - this.deviceTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool deviceTypeSpecified - { - get - { - return this.deviceTypeFieldSpecified; - } - set - { - this.deviceTypeFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "OperatingSystemName". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string operatingSystemName - { - get - { - return this.operatingSystemNameField; - } - set - { - this.operatingSystemNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field OperatingSystemName = new Field("OperatingSystemName", false, true); - - public static readonly Field DeviceName = new Field("DeviceName", false, true); - - public static readonly Field ManufacturerName = new Field("ManufacturerName", false, true); - - public static readonly Field DeviceType = new Field("DeviceType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field OperatingSystemName = Fields.OperatingSystemName; - - public static readonly Field DeviceName = Fields.DeviceName; - - public static readonly Field ManufacturerName = Fields.ManufacturerName; - - public static readonly Field DeviceType = Fields.DeviceType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "MobileDevice.DeviceType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MobileDeviceDeviceType - { - DEVICE_TYPE_MOBILE = 0, - DEVICE_TYPE_TABLET = 1, - } - - - /// Represents the mobile application to be targeted. This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MobileApplication : Criterion - { - private string appIdField; - - private string displayNameField; - - /// A string that uniquely identifies a mobile application to AdWords API. The - /// format of this string is "{platform}-{platform_native_id}", where - /// platform is "1" for iOS apps and "2" for Android apps, and where - /// platform_native_id is the mobile application identifier native to - /// the corresponding platform. For iOS, this native identifier is the 9 digit - /// string that appears at the end of an App Store URL (e.g., "476943146" for - /// "Flood-It! 2" whose App Store link is - /// http://itunes.apple.com/us/app/flood-it!-2/id476943146). For Android, this - /// native identifier is the application's package name (e.g., - /// "com.labpixies.colordrips" for "Color Drips" given Google Play link - /// https://play.google.com/store/apps/details?id=com.labpixies.colordrips). A well - /// formed app id for AdWords API would thus be "1-476943146" for iOS and - /// "2-com.labpixies.colordrips" for Android. This field can be selected using the value "AppId".This field can be filtered on. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string appId - { - get - { - return this.appIdField; - } - set - { - this.appIdField = value; - } - } - - /// Title of this mobile application. This field - /// can be selected using the value "DisplayName".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string displayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AppId = new Field("AppId", true, true); - - public static readonly Field DisplayName = new Field("DisplayName", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AppId = Fields.AppId; - - public static readonly Field DisplayName = Fields.DisplayName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AppId = Fields.AppId; - - public static readonly Field DisplayName = Fields.DisplayName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the mobile app category to be targeted. View the complete list of - /// available mobile app categories. This is - /// enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MobileAppCategory : Criterion - { - private int mobileAppCategoryIdField; - - private bool mobileAppCategoryIdFieldSpecified; - - private string displayNameField; - - /// ID of this mobile app category. A complete list of the available mobile app - /// categories is available here. This field can be selected using the value - /// "MobileAppCategoryId". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int mobileAppCategoryId - { - get - { - return this.mobileAppCategoryIdField; - } - set - { - this.mobileAppCategoryIdField = value; - this.mobileAppCategoryIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool mobileAppCategoryIdSpecified - { - get - { - return this.mobileAppCategoryIdFieldSpecified; - } - set - { - this.mobileAppCategoryIdFieldSpecified = value; - } - } - - /// Name of this mobile app category. This field - /// is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string displayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field MobileAppCategoryId = new Field("MobileAppCategoryId", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field MobileAppCategoryId = Fields.MobileAppCategoryId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents Location criterion.

A criterion of this type can only be created - /// using an ID. A criterion of this type can be either targeted or excluded. This is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Location : Criterion - { - private string locationNameField; - - private string displayTypeField; - - private LocationTargetingStatus targetingStatusField; - - private bool targetingStatusFieldSpecified; - - private Location[] parentLocationsField; - - /// Name of the location criterion. Note: This field is filterable only in - /// LocationCriterionService. If used as a filter, a location name cannot be greater - /// than 300 characters. This field can be - /// selected using the value "LocationName".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string locationName - { - get - { - return this.locationNameField; - } - set - { - this.locationNameField = value; - } - } - - /// Display type of the location criterion. This - /// field can be selected using the value "DisplayType". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string displayType - { - get - { - return this.displayTypeField; - } - set - { - this.displayTypeField = value; - } - } - - /// The targeting status of the location criterion. This field can be selected using the value "TargetingStatus". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public LocationTargetingStatus targetingStatus - { - get - { - return this.targetingStatusField; - } - set - { - this.targetingStatusField = value; - this.targetingStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetingStatusSpecified - { - get - { - return this.targetingStatusFieldSpecified; - } - set - { - this.targetingStatusFieldSpecified = value; - } - } - - /// Ordered list of parents of the location criterion. This field can be selected using the value "ParentLocations". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("parentLocations", Order = 3)] - public Location[] parentLocations - { - get - { - return this.parentLocationsField; - } - set - { - this.parentLocationsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field LocationName = new Field("LocationName", true, true); - - public static readonly Field DisplayType = new Field("DisplayType", false, true); - - public static readonly Field TargetingStatus = new Field("TargetingStatus", false, true); - - public static readonly Field ParentLocations = new Field("ParentLocations", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field LocationName = Fields.LocationName; - - public static readonly Field DisplayType = Fields.DisplayType; - - public static readonly Field TargetingStatus = Fields.TargetingStatus; - - public static readonly Field ParentLocations = Fields.ParentLocations; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field LocationName = Fields.LocationName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Enum that represents the different Targeting Status values for a Location - /// criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum LocationTargetingStatus - { - /// The location is active. - /// - ACTIVE = 0, - /// The location is not available for targeting. - /// - OBSOLETE = 1, - /// The location is phasing out, it will marked obsolete soon. - /// - PHASING_OUT = 2, - } - - - /// Represents a Language criterion.

A criterion of this type can only be created - /// using an ID. A criterion of this type is only targetable. This is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Language : Criterion - { - private string codeField; - - private string nameField; - - /// This field can be selected using the value - /// "LanguageCode". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string code - { - get - { - return this.codeField; - } - set - { - this.codeField = value; - } - } - - /// This field can be selected using the value - /// "LanguageName". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field LanguageCode = new Field("LanguageCode", false, true); - - public static readonly Field LanguageName = new Field("LanguageName", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field LanguageCode = Fields.LanguageCode; - - public static readonly Field LanguageName = Fields.LanguageName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a keyword. This is disabled for - /// AdX when it is contained within Operators: ADD, SET. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Keyword : Criterion - { - private string textField; - - private KeywordMatchType matchTypeField; - - private bool matchTypeFieldSpecified; - - /// Text of this keyword (at most 80 characters and ten words). This field can be selected using the value - /// "KeywordText".This field can be - /// filtered on. Keyword text must not - /// contain NUL (code point 0x0) characters. This is checked by the regular - /// expression '[^\x00]*'. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string text - { - get - { - return this.textField; - } - set - { - this.textField = value; - } - } - - /// Match type of this keyword. This field can - /// be selected using the value "KeywordMatchType".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public KeywordMatchType matchType - { - get - { - return this.matchTypeField; - } - set - { - this.matchTypeField = value; - this.matchTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool matchTypeSpecified - { - get - { - return this.matchTypeFieldSpecified; - } - set - { - this.matchTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field KeywordText = new Field("KeywordText", true, true); - - public static readonly Field KeywordMatchType = new Field("KeywordMatchType", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field KeywordText = Fields.KeywordText; - - public static readonly Field KeywordMatchType = Fields.KeywordMatchType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field KeywordText = Fields.KeywordText; - - public static readonly Field KeywordMatchType = Fields.KeywordMatchType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Match type of a keyword. i.e. the way we match a keyword string with search - /// queries. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum KeywordMatchType - { - /// Exact match - /// - EXACT = 0, - /// Phrase match - /// - PHRASE = 1, - /// Broad match - /// - BROAD = 2, - } - - - /// Criterion used for IP exclusions. We allow:
  • IPv4 and IPv6 - /// addresses
  • individual addresses (192.168.0.1)
  • CIDR IP address - /// blocks (e.g., 1.2.3.0/24, 2001:db8::/32).

Note that for a CIDR IP - /// address block, the specified IP address portion must be properly truncated (i.e. - /// all the host bits must be zero) or the input is considered malformed. For - /// example, "1.2.3.0/24" is accepted but "1.2.3.4/24" is not. Similarly, for IPv6, - /// "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. This is disabled for AdX when it is contained - /// within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class IpBlock : Criterion - { - private string ipAddressField; - - /// This field can be selected using the value - /// "IpAddress".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string ipAddress - { - get - { - return this.ipAddressField; - } - set - { - this.ipAddressField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field IpAddress = new Field("IpAddress", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field IpAddress = Fields.IpAddress; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field IpAddress = Fields.IpAddress; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Income range criterion allows to target and exclude predefined income percentile - /// ranges.

A criterion of this type can only be created using an ID. A criterion - /// of this type can be either targeted or excluded. This is disabled for AdX when it is contained within Operators: ADD, - /// SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class IncomeRange : Criterion - { - private IncomeRangeIncomeRangeType incomeRangeTypeField; - - private bool incomeRangeTypeFieldSpecified; - - /// This field can be selected using the value - /// "IncomeRangeType". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public IncomeRangeIncomeRangeType incomeRangeType - { - get - { - return this.incomeRangeTypeField; - } - set - { - this.incomeRangeTypeField = value; - this.incomeRangeTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool incomeRangeTypeSpecified - { - get - { - return this.incomeRangeTypeFieldSpecified; - } - set - { - this.incomeRangeTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field IncomeRangeType = new Field("IncomeRangeType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field IncomeRangeType = Fields.IncomeRangeType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Income percentile ranges. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "IncomeRange.IncomeRangeType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum IncomeRangeIncomeRangeType - { - /// Users for which income range is undetermined. - /// - INCOME_RANGE_UNDETERMINED = 0, - /// Users in [0%, 50%) income percentile range. - /// - INCOME_RANGE_0_50 = 1, - /// Users in [50%, 60%) income percentile range. - /// - INCOME_RANGE_50_60 = 2, - /// Users in [60%, 70%) income percentile range. - /// - INCOME_RANGE_60_70 = 3, - /// Users in [70%, 80%) income percentile range. - /// - INCOME_RANGE_70_80 = 4, - /// Users in [80%, 90%) income percentile range. - /// - INCOME_RANGE_80_90 = 5, - /// Users in [90%, 100%] income percentile range. - /// - INCOME_RANGE_90_UP = 6, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 7, - } - - - /// Represents a Gender criterion.

A criterion of this type can only be created - /// using an ID. A criterion of this type can be either targeted or excluded. This is disabled for AdX when it is contained - /// within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Gender : Criterion - { - private GenderGenderType genderTypeField; - - private bool genderTypeFieldSpecified; - - /// This field can be selected using the value - /// "GenderType". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public GenderGenderType genderType - { - get - { - return this.genderTypeField; - } - set - { - this.genderTypeField = value; - this.genderTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool genderTypeSpecified - { - get - { - return this.genderTypeFieldSpecified; - } - set - { - this.genderTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field GenderType = new Field("GenderType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field GenderType = Fields.GenderType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Gender.GenderType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum GenderGenderType - { - GENDER_MALE = 0, - GENDER_FEMALE = 1, - GENDER_UNDETERMINED = 2, - } - - - /// Content Label for category exclusion. This - /// is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ContentLabel : Criterion - { - private ContentLabelType contentLabelTypeField; - - private bool contentLabelTypeFieldSpecified; - - /// Content label type This field can be - /// selected using the value "ContentLabelType".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ContentLabelType contentLabelType - { - get - { - return this.contentLabelTypeField; - } - set - { - this.contentLabelTypeField = value; - this.contentLabelTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool contentLabelTypeSpecified - { - get - { - return this.contentLabelTypeFieldSpecified; - } - set - { - this.contentLabelTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ContentLabelType = new Field("ContentLabelType", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ContentLabelType = Fields.ContentLabelType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ContentLabelType = Fields.ContentLabelType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Content label type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ContentLabelType - { - /// Sexually suggestive content - /// - ADULTISH = 0, - /// Error pages

Note: Starting with v201710, this label is - /// deprecated and can only be removed from campaigns - it can no longer be added. A - /// future release will remove this label entirely.

- ///
- AFE = 1, - /// Below the fold placements - /// - BELOW_THE_FOLD = 2, - /// Military & international conflict

Note: Starting with - /// v201710, this label is deprecated and can only be removed from campaigns - it - /// can no longer be added. A future release will remove this label entirely. Please - /// use the TRAGEDY label instead of this one going forward.

- ///
- CONFLICT = 3, - /// Parked domains - /// - DP = 4, - /// Embedded video - /// - EMBEDDED_VIDEO = 5, - /// Games - /// - GAMES = 6, - /// Sensational & shocking - /// - JUVENILE = 7, - /// Profanity & rough language - /// - PROFANITY = 8, - /// Forums

Note: Starting with v201710, this label is - /// deprecated and can only be removed from campaigns - it can no longer be added. A - /// future release will remove this label entirely.

- ///
- UGC_FORUMS = 9, - /// Image-sharing pages

Note: Starting with v201710, this - /// label is deprecated and can only be removed from campaigns - it can no longer be - /// added. A future release will remove this label entirely.

- ///
- UGC_IMAGES = 10, - /// Social networks

Note: Starting with v201710, this label - /// is deprecated and can only be removed from campaigns - it can no longer be - /// added. A future release will remove this label entirely.

- ///
- UGC_SOCIAL = 11, - /// Video-sharing pages

Note: Starting with v201710, this - /// label is deprecated and can only be removed from campaigns - it can no longer be - /// added. A future release will remove this label entirely.

- ///
- UGC_VIDEOS = 12, - /// Crime, police & emergency

Note: Starting with - /// v201710, this label is deprecated and can only be removed from campaigns - it - /// can no longer be added. A future release will remove this label entirely. Please - /// use the TRAGEDY label instead of this one going forward.

- ///
- SIRENS = 13, - /// Tragedy & conflict - /// - TRAGEDY = 14, - /// Video - /// - VIDEO = 15, - /// Content rating: G - /// - VIDEO_RATING_DV_G = 16, - /// Content rating: PG - /// - VIDEO_RATING_DV_PG = 17, - /// Content rating: T - /// - VIDEO_RATING_DV_T = 18, - /// Content rating: MA - /// - VIDEO_RATING_DV_MA = 19, - /// Content rating: not yet rated - /// - VIDEO_NOT_YET_RATED = 20, - /// Live streaming video - /// - LIVE_STREAMING_VIDEO = 21, - /// Allowed gambling content.

Note: Starting with v201710, - /// this label is deprecated and can only be removed from campaigns - it can no - /// longer be added. A future release will remove this label entirely.

- ///
- ALLOWED_GAMBLING_CONTENT = 22, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 23, - } - - - /// Represents a Carrier Criterion.

A criterion of this type can only be created - /// using an ID. A criterion of this type can be either targeted or excluded. This is enabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Carrier : Criterion - { - private string nameField; - - private string countryCodeField; - - /// Name of the carrier. This field can be - /// selected using the value "CarrierName". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Country code of the carrier. Can be null if not applicable, e.g., - /// for Carrier "Wifi". This field can be - /// selected using the value "CarrierCountryCode". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string countryCode - { - get - { - return this.countryCodeField; - } - set - { - this.countryCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CarrierName = new Field("CarrierName", false, true); - - public static readonly Field CarrierCountryCode = new Field("CarrierCountryCode", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CarrierName = Fields.CarrierName; - - public static readonly Field CarrierCountryCode = Fields.CarrierCountryCode; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an Age Range criterion.

A criterion of this type can only be - /// created using an ID. A criterion of this type can be either targeted or - /// excluded. This is disabled for AdX when it - /// is contained within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AgeRange : Criterion - { - private AgeRangeAgeRangeType ageRangeTypeField; - - private bool ageRangeTypeFieldSpecified; - - /// This field can be selected using the value - /// "AgeRangeType". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AgeRangeAgeRangeType ageRangeType - { - get - { - return this.ageRangeTypeField; - } - set - { - this.ageRangeTypeField = value; - this.ageRangeTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool ageRangeTypeSpecified - { - get - { - return this.ageRangeTypeFieldSpecified; - } - set - { - this.ageRangeTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AgeRangeType = new Field("AgeRangeType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AgeRangeType = Fields.AgeRangeType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AgeRange.AgeRangeType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AgeRangeAgeRangeType - { - AGE_RANGE_18_24 = 0, - AGE_RANGE_25_34 = 1, - AGE_RANGE_35_44 = 2, - AGE_RANGE_45_54 = 3, - AGE_RANGE_55_64 = 4, - AGE_RANGE_65_UP = 5, - AGE_RANGE_UNDETERMINED = 6, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 7, - } - - - /// Represents an AdSchedule Criterion. AdSchedule is specified as day and time of - /// the week criteria to target the Ads.

Note: An AdSchedule may not have - /// more than six intervals in a day.

This is enabled for AdX. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdSchedule : Criterion - { - private DayOfWeek dayOfWeekField; - - private bool dayOfWeekFieldSpecified; - - private int startHourField; - - private bool startHourFieldSpecified; - - private MinuteOfHour startMinuteField; - - private bool startMinuteFieldSpecified; - - private int endHourField; - - private bool endHourFieldSpecified; - - private MinuteOfHour endMinuteField; - - private bool endMinuteFieldSpecified; - - /// Day of the week the schedule applies to. This field can be selected using the value "DayOfWeek". This field is read only and will be ignored when - /// sent to the API for the following Operators: REMOVE and - /// SET. This field is required and should - /// not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DayOfWeek dayOfWeek - { - get - { - return this.dayOfWeekField; - } - set - { - this.dayOfWeekField = value; - this.dayOfWeekSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool dayOfWeekSpecified - { - get - { - return this.dayOfWeekFieldSpecified; - } - set - { - this.dayOfWeekFieldSpecified = value; - } - } - - /// Starting hour in 24 hour time. This field - /// can be selected using the value "StartHour". This field must be between 0 and 23, inclusive. This field is read only and will be ignored when - /// sent to the API for the following Operators: REMOVE and - /// SET. This field is required and should - /// not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int startHour - { - get - { - return this.startHourField; - } - set - { - this.startHourField = value; - this.startHourSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool startHourSpecified - { - get - { - return this.startHourFieldSpecified; - } - set - { - this.startHourFieldSpecified = value; - } - } - - /// Interval starts these minutes after the starting hour. The value can be 0, 15, - /// 30, and 45. This field can be selected using - /// the value "StartMinute". This field is - /// read only and will be ignored when sent to the API for the following Operators: REMOVE and SET. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public MinuteOfHour startMinute - { - get - { - return this.startMinuteField; - } - set - { - this.startMinuteField = value; - this.startMinuteSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool startMinuteSpecified - { - get - { - return this.startMinuteFieldSpecified; - } - set - { - this.startMinuteFieldSpecified = value; - } - } - - /// Ending hour in 24 hour time; 24 signifies end of the day. This field can be selected using the value - /// "EndHour". This field must be between 0 - /// and 24, inclusive. This field is read - /// only and will be ignored when sent to the API for the following Operators: REMOVE and SET. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int endHour - { - get - { - return this.endHourField; - } - set - { - this.endHourField = value; - this.endHourSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool endHourSpecified - { - get - { - return this.endHourFieldSpecified; - } - set - { - this.endHourFieldSpecified = value; - } - } - - /// Interval ends these minutes after the ending hour. The value can be 0, 15, 30, - /// and 45. This field can be selected using the - /// value "EndMinute". This field is read - /// only and will be ignored when sent to the API for the following Operators: REMOVE and SET. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public MinuteOfHour endMinute - { - get - { - return this.endMinuteField; - } - set - { - this.endMinuteField = value; - this.endMinuteSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool endMinuteSpecified - { - get - { - return this.endMinuteFieldSpecified; - } - set - { - this.endMinuteFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field DayOfWeek = new Field("DayOfWeek", false, true); - - public static readonly Field StartHour = new Field("StartHour", false, true); - - public static readonly Field StartMinute = new Field("StartMinute", false, true); - - public static readonly Field EndHour = new Field("EndHour", false, true); - - public static readonly Field EndMinute = new Field("EndMinute", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field DayOfWeek = Fields.DayOfWeek; - - public static readonly Field StartHour = Fields.StartHour; - - public static readonly Field StartMinute = Fields.StartMinute; - - public static readonly Field EndHour = Fields.EndHour; - - public static readonly Field EndMinute = Fields.EndMinute; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Days of the week. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DayOfWeek - { - /// The day of week named Monday. - /// - MONDAY = 0, - /// The day of week named Tuesday. - /// - TUESDAY = 1, - /// The day of week named Wednesday. - /// - WEDNESDAY = 2, - /// The day of week named Thursday. - /// - THURSDAY = 3, - /// The day of week named Friday. - /// - FRIDAY = 4, - /// The day of week named Saturday. - /// - SATURDAY = 5, - /// The day of week named Sunday. - /// - SUNDAY = 6, - } - - - /// Minutes in an hour. Currently only 0, 15, 30, and 45 are supported - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MinuteOfHour - { - /// Zero minutes past hour. - /// - ZERO = 0, - /// Fifteen minutes past hour. - /// - FIFTEEN = 1, - /// Thirty minutes past hour. - /// - THIRTY = 2, - /// Forty-five minutes past hour. - /// - FORTY_FIVE = 3, - } - - - /// Represents a campaign level criterion. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NegativeCampaignCriterion))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignCriterion - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private bool isNegativeField; - - private bool isNegativeFieldSpecified; - - private Criterion criterionField; - - private double bidModifierField; - - private bool bidModifierFieldSpecified; - - private CampaignCriterionCampaignCriterionStatus campaignCriterionStatusField; - - private bool campaignCriterionStatusFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private String_StringMapEntry[] forwardCompatibilityMapField; - - private string campaignCriterionTypeField; - - /// The campaign that the criterion is in. This - /// field can be selected using the value "CampaignId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "IsNegative".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool isNegative - { - get - { - return this.isNegativeField; - } - set - { - this.isNegativeField = value; - this.isNegativeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isNegativeSpecified - { - get - { - return this.isNegativeFieldSpecified; - } - set - { - this.isNegativeFieldSpecified = value; - } - } - - /// The criterion part of the campaign criterion. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// The modifier for bids when the criterion matches.

Valid modifier values range - /// from 0.1 to 10.0, with 0.0 reserved for - /// opting out of platform criterion.

To clear an existing bid modifier, - /// specify -1.0 (invalid for initial ADD operations). - /// This field can be selected using the value - /// "BidModifier".This field can be - /// filtered on. This field may not be - /// set for campaign channel type SHOPPING with campaign channel subtype - /// SHOPPING_GOAL_OPTIMIZED_ADS.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public double bidModifier - { - get - { - return this.bidModifierField; - } - set - { - this.bidModifierField = value; - this.bidModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSpecified - { - get - { - return this.bidModifierFieldSpecified; - } - set - { - this.bidModifierFieldSpecified = value; - } - } - - /// The status for criteria. This field can be - /// selected using the value "CampaignCriterionStatus".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public CampaignCriterionCampaignCriterionStatus campaignCriterionStatus - { - get - { - return this.campaignCriterionStatusField; - } - set - { - this.campaignCriterionStatusField = value; - this.campaignCriterionStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignCriterionStatusSpecified - { - get - { - return this.campaignCriterionStatusFieldSpecified; - } - set - { - this.campaignCriterionStatusFieldSpecified = value; - } - } - - /// ID of the base campaign from which this draft/trial campaign criterion was - /// created. This field is only returned on get requests. This field can be selected using the value - /// "BaseCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// This Map provides a place to put new features and settings in older versions of - /// the AdWords API in the rare instance we need to introduce a new feature in an - /// older version. It is presently unused. Do not set a value. - /// - [System.Xml.Serialization.XmlElementAttribute("forwardCompatibilityMap", Order = 6)] - public String_StringMapEntry[] forwardCompatibilityMap - { - get - { - return this.forwardCompatibilityMapField; - } - set - { - this.forwardCompatibilityMapField = value; - } - } - - /// Indicates that this instance is a subtype of CampaignCriterion. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("CampaignCriterion.Type", Order = 7)] - public string CampaignCriterionType - { - get - { - return this.campaignCriterionTypeField; - } - set - { - this.campaignCriterionTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field IsNegative = new Field("IsNegative", true, true); - - public static readonly Field BidModifier = new Field("BidModifier", true, true); - - public static readonly Field CampaignCriterionStatus = new Field("CampaignCriterionStatus", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field IsNegative = Fields.IsNegative; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field CampaignCriterionStatus = Fields.CampaignCriterionStatus; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field IsNegative = Fields.IsNegative; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field CampaignCriterionStatus = Fields.CampaignCriterionStatus; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The status of the campaign criteria. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignCriterion.CampaignCriterionStatus", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignCriterionCampaignCriterionStatus - { - ACTIVE = 0, - REMOVED = 1, - PAUSED = 2, - } - - - /// A negative campaign criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NegativeCampaignCriterion : CampaignCriterion - { - } - - - /// Contains a subset of campaign criteria resulting from a call to CampaignCriterionService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignCriterionPage : Page - { - private CampaignCriterion[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignCriterion[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A list of all errors associated with the @RegionCode constraints. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RegionCodeError : ApiError - { - private RegionCodeErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RegionCodeErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the validation error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RegionCodeError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RegionCodeErrorReason - { - INVALID_REGION_CODE = 0, - } - - - /// Error class used for reporting criteria related errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionError : ApiError - { - private CriterionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CriterionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CriterionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CriterionErrorReason - { - /// Concrete type of criterion is required for ADD and SET operations. - /// - CONCRETE_TYPE_REQUIRED = 0, - /// The category requested for exclusion is invalid. - /// - INVALID_EXCLUDED_CATEGORY = 1, - /// Invalid keyword criteria text. - /// - INVALID_KEYWORD_TEXT = 2, - /// Keyword text should be less than 80 chars. - /// - KEYWORD_TEXT_TOO_LONG = 3, - /// Keyword text has too many words. - /// - KEYWORD_HAS_TOO_MANY_WORDS = 4, - /// Keyword text has invalid characters or symbols. - /// - KEYWORD_HAS_INVALID_CHARS = 5, - /// Invalid placement URL. - /// - INVALID_PLACEMENT_URL = 6, - /// Invalid user list criterion. - /// - INVALID_USER_LIST = 7, - /// Invalid user interest criterion. - /// - INVALID_USER_INTEREST = 8, - /// Placement URL has wrong format. - /// - INVALID_FORMAT_FOR_PLACEMENT_URL = 9, - /// Placement URL is too long. - /// - PLACEMENT_URL_IS_TOO_LONG = 10, - /// Indicates the URL contains an illegal character. - /// - PLACEMENT_URL_HAS_ILLEGAL_CHAR = 11, - /// Indicates the URL contains multiple comma separated URLs. - /// - PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 12, - /// Indicates the domain is blacklisted. - /// - PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 13, - /// Invalid vertical path. - /// - INVALID_VERTICAL_PATH = 14, - /// The YouTube Channel Id is invalid. - /// - INVALID_YOUTUBE_CHANNEL_ID = 80, - /// The YouTube Video Id is invalid. - /// - INVALID_YOUTUBE_VIDEO_ID = 81, - /// Indicates the placement is a YouTube vertical channel, which is no longer - /// supported. - /// - YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 15, - /// Indicates the placement is a YouTube demographic channel, which is no longer - /// supported. - /// - YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 16, - /// YouTube urls are not supported in Placement criterion. Use YouTubeChannel and - /// YouTubeVideo criterion instead. - /// - YOUTUBE_URL_UNSUPPORTED = 17, - /// Criteria type can not be excluded by the customer, like AOL account type cannot - /// target site type criteria. - /// - CANNOT_EXCLUDE_CRITERIA_TYPE = 18, - /// Criteria type can not be targeted. - /// - CANNOT_ADD_CRITERIA_TYPE = 19, - /// Product filter in the product criteria has invalid characters. Operand and the - /// argument in the filter can not have "==" or "&+". - /// - INVALID_PRODUCT_FILTER = 20, - /// Product filter in the product criteria is translated to a string as - /// operand1==argument1&+operand2==argument2, maximum allowed length for the - /// string is 255 chars. - /// - PRODUCT_FILTER_TOO_LONG = 21, - /// Not allowed to exclude similar user list. - /// - CANNOT_EXCLUDE_SIMILAR_USER_LIST = 75, - /// Not allowed to target a closed user list. - /// - CANNOT_ADD_CLOSED_USER_LIST = 77, - /// Not allowed to add display only UserLists to search only campaigns. - /// - CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 22, - /// Not allowed to add display only UserLists to search plus campaigns. - /// - CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 73, - /// Not allowed to add display only UserLists to shopping campaigns. - /// - CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 79, - /// Not allowed to add User interests to search only campaigns. - /// - CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 74, - /// Not allowed to set bids for this criterion type in search campaigns - /// - CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 23, - /// Final URLs, URL Templates and CustomParameters cannot be set for the criterion - /// types of Gender, AgeRange, UserList, Placement, MobileApp, and MobileAppCategory - /// in search campaigns and shopping campaigns. - /// - CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 78, - /// IP address is not valid. - /// - INVALID_IP_ADDRESS = 25, - /// IP format is not valid. - /// - INVALID_IP_FORMAT = 26, - /// Mobile application is not valid. - /// - INVALID_MOBILE_APP = 27, - /// Mobile application category is not valid. - /// - INVALID_MOBILE_APP_CATEGORY = 28, - /// The CriterionId does not exist or is of the incorrect type. - /// - INVALID_CRITERION_ID = 29, - /// The Criterion is not allowed to be targeted. - /// - CANNOT_TARGET_CRITERION = 30, - /// The criterion is not allowed to be targeted as it is deprecated. - /// - CANNOT_TARGET_OBSOLETE_CRITERION = 31, - /// The CriterionId is not valid for the type. - /// - CRITERION_ID_AND_TYPE_MISMATCH = 32, - /// Distance for the radius for the proximity criterion is invalid. - /// - INVALID_PROXIMITY_RADIUS = 33, - /// Units for the distance for the radius for the proximity criterion is invalid. - /// - INVALID_PROXIMITY_RADIUS_UNITS = 34, - /// Street address is too short. - /// - INVALID_STREETADDRESS_LENGTH = 35, - /// City name in the address is too short. - /// - INVALID_CITYNAME_LENGTH = 36, - /// Region code in the address is too short. - /// - INVALID_REGIONCODE_LENGTH = 37, - /// Region name in the address is not valid. - /// - INVALID_REGIONNAME_LENGTH = 38, - /// Postal code in the address is not valid. - /// - INVALID_POSTALCODE_LENGTH = 39, - /// Country code in the address is not valid. - /// - INVALID_COUNTRY_CODE = 40, - /// Latitude for the GeoPoint is not valid. - /// - INVALID_LATITUDE = 41, - /// Longitude for the GeoPoint is not valid. - /// - INVALID_LONGITUDE = 42, - /// The Proximity input is not valid. Both address and geoPoint cannot be null. - /// - PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 43, - /// The Proximity address cannot be geocoded to a valid lat/long. - /// - INVALID_PROXIMITY_ADDRESS = 44, - /// User domain name is not valid. - /// - INVALID_USER_DOMAIN_NAME = 45, - /// The combination of operand and operator in webpage condition is invalid. - /// - INVALID_WEBPAGE_CONDITION = 82, - /// The URL of webpage condition is invalid. - /// - INVALID_WEBPAGE_CONDITION_URL = 83, - /// The URL of webpage condition cannot be empty or contain white space. - /// - WEBPAGE_CONDITION_URL_CANNOT_BE_EMPTY = 84, - /// The URL of webpage condition contains unsupported protocol. - /// - WEBPAGE_CONDITION_URL_UNSUPPORTED_PROTOCOL = 85, - /// The URL of webpage condition cannot be an IP address. - /// - WEBPAGE_CONDITION_URL_CANNOT_BE_IP_ADDRESS = 86, - /// The domain of the URL is not consistent with the domain in campaign setting. - /// - WEBPAGE_CONDITION_URL_DOMAIN_NOT_CONSISTENT_WITH_CAMPAIGN_SETTING = 87, - /// The URL of webpage condition cannot be a public suffix itself. - /// - WEBPAGE_CONDITION_URL_CANNOT_BE_PUBLIC_SUFFIX = 88, - /// The URL of webpage condition has an invalid public suffix. - /// - WEBPAGE_CONDITION_URL_INVALID_PUBLIC_SUFFIX = 89, - /// Value track parameter is not supported in webpage condition URL. - /// - WEBPAGE_CONDITION_URL_VALUE_TRACK_VALUE_NOT_SUPPORTED = 90, - /// Only one URL-EQUALS webpage condition is allowed in a webpage criterion and it - /// cannot be combined with other conditions. - /// - WEBPAGE_CRITERION_URL_EQUALS_CAN_HAVE_ONLY_ONE_CONDITION = 91, - /// Only allow smart targeting on non-DSA ad groups. - /// - WEBPAGE_CRITERION_CANNOT_ADD_NON_SMART_TARGETING_TO_NON_DSA_AD_GROUP = 92, - /// Length of serialized criterion parameter exceeded size limit. - /// - CRITERION_PARAMETER_TOO_LONG = 46, - /// Time interval in the AdSchedule overlaps with another AdSchedule. - /// - AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 47, - /// AdSchedule time interval cannot span multiple days. - /// - AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 48, - /// AdSchedule time interval specified is invalid, endTime cannot be earlier than - /// startTime. - /// - AD_SCHEDULE_INVALID_TIME_INTERVAL = 49, - /// The number of AdSchedule entries in a day exceeds the limit. - /// - AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 50, - /// CriteriaId does not match the interval of the AdSchedule specified. - /// - AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 51, - /// Cannot set bid modifier for this criterion type. - /// - CANNOT_BID_MODIFY_CRITERION_TYPE = 52, - /// Cannot bid modify criterion, since it is opted out of the campaign. - /// - CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 53, - /// Cannot set bid modifier for a negative criterion. - /// - CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 54, - /// Bid Modifier already exists. Use SET operation to update. - /// - BID_MODIFIER_ALREADY_EXISTS = 55, - /// Feed Id is not allowed in these Location Groups. - /// - FEED_ID_NOT_ALLOWED = 56, - /// The account may not use the requested criteria type. For example, some accounts - /// are restricted to keywords only. - /// - ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 57, - /// The requested criteria type cannot be used with campaign or ad group bidding - /// strategy. - /// - CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 58, - /// The Criterion is not allowed to be excluded. - /// - CANNOT_EXCLUDE_CRITERION = 59, - /// The criterion is not allowed to be removed. For example, we cannot remove any of - /// the platform criterion. - /// - CANNOT_REMOVE_CRITERION = 60, - /// The combined length of product dimension values of the product scope criterion - /// is too long. - /// - PRODUCT_SCOPE_TOO_LONG = 61, - /// Product scope contains too many dimensions. - /// - PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 62, - /// The combined length of product dimension values of the product partition - /// criterion is too long. - /// - PRODUCT_PARTITION_TOO_LONG = 63, - /// Product partition contains too many dimensions. - /// - PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 64, - /// The product dimension is invalid (e.g. dimension contains illegal value, - /// dimension type is represented with wrong class, etc). Product dimension value - /// can not contain "==" or "&+". - /// - INVALID_PRODUCT_DIMENSION = 65, - /// Product dimension type is either invalid for campaigns of this type or cannot be - /// used in the current context. BIDDING_CATEGORY_Lx and PRODUCT_TYPE_Lx product - /// dimensions must be used in ascending order of their levels: L1, L2, L3, L4, - /// L5... The levels must be specified sequentially and start from L1. Furthermore, - /// an "others" product partition cannot be subdivided with a dimension of the same - /// type but of a higher level ("others" BIDDING_CATEGORY_L3 can be subdivided with - /// BRAND but not with BIDDING_CATEGORY_L4). - /// - INVALID_PRODUCT_DIMENSION_TYPE = 66, - /// Bidding categories do not form a valid path in the Shopping bidding category - /// taxonomy. - /// - INVALID_PRODUCT_BIDDING_CATEGORY = 67, - /// ShoppingSetting must be added to the campaign before ProductScope criteria can - /// be added. - /// - MISSING_SHOPPING_SETTING = 68, - /// Matching function is invalid. - /// - INVALID_MATCHING_FUNCTION = 69, - /// Filter parameters not allowed for location groups targeting. - /// - LOCATION_FILTER_NOT_ALLOWED = 70, - /// Given location filter parameter is invalid for location groups targeting. - /// - LOCATION_FILTER_INVALID = 71, - /// Criteria type cannot be associated with a campaign and its ad group(s) - /// simultaneously. - /// - CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 76, - UNKNOWN = 72, - } - - - /// Base error class for Campaign Criterion Service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignCriterionError : ApiError - { - private CampaignCriterionErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignCriterionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignCriterionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignCriterionErrorReason - { - /// Concrete type of criterion (keyword v.s. placement) is required for ADD and SET - /// operations. - /// - CONCRETE_TYPE_REQUIRED = 0, - /// Invalid placement URL. - /// - INVALID_PLACEMENT_URL = 1, - /// Criteria type can not be excluded for the campaign by the customer. like AOL - /// account type cannot target site type criteria - /// - CANNOT_EXCLUDE_CRITERIA_TYPE = 2, - /// Cannot set the campaign criterion status for this criteria type. - /// - CANNOT_SET_STATUS_FOR_CRITERIA_TYPE = 9, - /// Cannot set the campaign criterion status for an excluded criteria. - /// - CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA = 10, - /// Cannot target and exclude the same criterion. - /// - CANNOT_TARGET_AND_EXCLUDE = 3, - /// The #mutate operation contained too many operations. - /// - TOO_MANY_OPERATIONS = 4, - /// This operator cannot be applied to a criterion of this type. - /// - OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE = 5, - /// The Shopping campaign sales country is not supported for ProductSalesChannel - /// targeting. - /// - SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL = 6, - UNKNOWN = 7, - /// The existing field can't be updated with ADD operation. It can be updated with - /// SET operation only. - /// - CANNOT_ADD_EXISTING_FIELD = 8, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignCriterionServiceInterface")] - public interface CampaignCriterionServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignCriterionService.mutateResponse mutate(Wrappers.CampaignCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignCriterionPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Generic operation (add, remove and set) for campaign criteria. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignCriterionOperation : Operation - { - private CampaignCriterion operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignCriterion operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignCriterionService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignCriterionReturnValue : ListReturnValue - { - private CampaignCriterion[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignCriterion[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignCriterionServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignCriterionServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage campaign-level criteria.

A campaign-level negative - /// criterion prevents the campaign's ads from showing on specific placements, - /// specific keywords, demographics, and so on.

Additionally, the service can - /// be used to target criteria such as location, language, carrier, platform, and so on. The targeting criteria - /// can be added using the Criterion Id listed in the documentation.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignCriterionService : AdWordsSoapClient, ICampaignCriterionService - { - /// Creates a new instance of the - /// class. - public CampaignCriterionService() - { - } - - /// Creates a new instance of the - /// class. - public CampaignCriterionService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public CampaignCriterionService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignCriterionService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignCriterionService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Gets campaign criteria. - /// The selector specifying the CampaignCriterions to return. - /// A list of campaign criteria. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignCriterionService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignCriterionServiceInterface.mutate(Wrappers.CampaignCriterionService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, removes or updates campaign criteria. - /// The operations to apply. - /// The added campaign criteria (without any optional parts). - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignCriterionOperation[] operations) - { - Wrappers.CampaignCriterionService.mutateRequest inValue = new Wrappers.CampaignCriterionService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignCriterionService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignCriterionServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignCriterionServiceInterface.mutateAsync(Wrappers.CampaignCriterionService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignCriterionOperation[] operations) - { - Wrappers.CampaignCriterionService.mutateRequest inValue = new Wrappers.CampaignCriterionService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignCriterionServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of campaign criteria that match the query. - /// The SQL-like AWQL query string. - /// A list of campaign criteria. - /// if problems occur while parsing the query - /// or fetching campaign criteria. - public virtual Google.Api.Ads.AdWords.v201806.CampaignCriterionPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignReturnValue rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabel", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignLabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateLabelRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelRequest(Google.Api.Ads.AdWords.v201806.CampaignLabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabelResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignLabelReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateLabelResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelResponse(Google.Api.Ads.AdWords.v201806.CampaignLabelReturnValue rval) - { - this.rval = rval; - } - } - } - /// Selected set of conversion types or a selective optimization set id for - /// optimizing campaigns. For e.g. For universal app campaigns, these are the set of - /// in-app actions to optimize the campaign towards. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SelectiveOptimization - { - private long[] conversionTypeIdsField; - - private ListOperations conversionTypeIdsOpsField; - - /// The selected conversion ids for selective optimization. - /// - [System.Xml.Serialization.XmlElementAttribute("conversionTypeIds", Order = 0)] - public long[] conversionTypeIds - { - get - { - return this.conversionTypeIdsField; - } - set - { - this.conversionTypeIdsField = value; - } - } - - /// The selected conversion ids ops for selective optimization. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ListOperations conversionTypeIdsOps - { - get - { - return this.conversionTypeIdsOpsField; - } - set - { - this.conversionTypeIdsOpsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Describes the behavior of elements in a list. Instances of ListOperations will - /// always be defined alongside some list in an API POJO. The number of operators in - /// the ListOperations must be equal to the number of elements in the POJO list. - /// Each operator, together with its corresponding list element, describe an - /// intended change.

For example, if in a request Campaign.selectiveOptimization - /// contains 2 conversionTypeIds, and the conversionTypeIdsOps is non-null, it must - /// contain 2 operators. If those operators are {PUT, REMOVE} then the API will add - /// the first conversionTypeId (if it doesn't already exist) and remove the second - /// conversionTypeId (if it exists).

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ListOperations - { - private bool clearField; - - private bool clearFieldSpecified; - - private ListOperationsListOperator[] operatorsField; - - /// Indicates that all contents of the list should be deleted. If this is true, the - /// list will be cleared first, then proceed to the operators. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool clear - { - get - { - return this.clearField; - } - set - { - this.clearField = value; - this.clearSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool clearSpecified - { - get - { - return this.clearFieldSpecified; - } - set - { - this.clearFieldSpecified = value; - } - } - - /// The desired behavior of each element in the POJO list that this ListOperation - /// corresponds to. This will contain the same number of elements as the - /// corresponding List<>. - /// - [System.Xml.Serialization.XmlElementAttribute("operators", Order = 1)] - public ListOperationsListOperator[] operators - { - get - { - return this.operatorsField; - } - set - { - this.operatorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies the intended behavior for a list element. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ListOperations.ListOperator", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ListOperationsListOperator - { - /// Adds to a list, or overrides an existing element if it exists. - /// - PUT = 0, - /// Removes this element from the list. - /// - REMOVE = 1, - /// Updates this element with the existing behavior of null fields inside the list - /// element being a no-op. If the element doesn't exist it is added. - /// - UPDATE = 2, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 3, - } - - - /// Describes how unbranded pharma ads will be displayed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class VanityPharma - { - private VanityPharmaDisplayUrlMode vanityPharmaDisplayUrlModeField; - - private bool vanityPharmaDisplayUrlModeFieldSpecified; - - private VanityPharmaText vanityPharmaTextField; - - private bool vanityPharmaTextFieldSpecified; - - /// The display mode for vanity pharma URLs. This field can be selected using the value - /// "VanityPharmaDisplayUrlMode".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public VanityPharmaDisplayUrlMode vanityPharmaDisplayUrlMode - { - get - { - return this.vanityPharmaDisplayUrlModeField; - } - set - { - this.vanityPharmaDisplayUrlModeField = value; - this.vanityPharmaDisplayUrlModeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool vanityPharmaDisplayUrlModeSpecified - { - get - { - return this.vanityPharmaDisplayUrlModeFieldSpecified; - } - set - { - this.vanityPharmaDisplayUrlModeFieldSpecified = value; - } - } - - /// The text that will be displayed in display URL of the text ad when website - /// description is the selected display mode for vanity pharma URLs. This field can be selected using the value - /// "VanityPharmaText".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public VanityPharmaText vanityPharmaText - { - get - { - return this.vanityPharmaTextField; - } - set - { - this.vanityPharmaTextField = value; - this.vanityPharmaTextSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool vanityPharmaTextSpecified - { - get - { - return this.vanityPharmaTextFieldSpecified; - } - set - { - this.vanityPharmaTextFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field VanityPharmaDisplayUrlMode = new Field("VanityPharmaDisplayUrlMode", true, true); - - public static readonly Field VanityPharmaText = new Field("VanityPharmaText", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field VanityPharmaDisplayUrlMode = Fields.VanityPharmaDisplayUrlMode; - - public static readonly Field VanityPharmaText = Fields.VanityPharmaText; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field VanityPharmaDisplayUrlMode = Fields.VanityPharmaDisplayUrlMode; - - public static readonly Field VanityPharmaText = Fields.VanityPharmaText; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Mode of display URL for pharma related text ads. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum VanityPharmaDisplayUrlMode - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Replace vanity pharma URL with manufacturer website url. - /// - MANUFACTURER_WEBSITE_URL = 1, - /// Replace vanity pharma URL with description of the website. - /// - WEBSITE_DESCRIPTION = 2, - } - - - /// Static text for Vanity Pharma URLs. This text with website descriptions will be - /// shown in the display URL when website description option for vanity pharma URLs - /// is selected. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum VanityPharmaText - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Prescription treatment website - /// - PRESCRIPTION_TREATMENT_WEBSITE_EN = 1, - /// Sitio de tratamientos con receta - /// - PRESCRIPTION_TREATMENT_WEBSITE_ES = 2, - /// Prescription device website - /// - PRESCRIPTION_DEVICE_WEBSITE_EN = 3, - /// Sitio de dispositivos con receta - /// - PRESCRIPTION_DEVICE_WEBSITE_ES = 4, - /// Medical device website - /// - MEDICAL_DEVICE_WEBSITE_EN = 5, - /// Sitio de dispositivos m?dicos - /// - MEDICAL_DEVICE_WEBSITE_ES = 6, - /// Preventative treatment website - /// - PREVENTATIVE_TREATMENT_WEBSITE_EN = 7, - /// Sitio de tratamientos preventivos - /// - PREVENTATIVE_TREATMENT_WEBSITE_ES = 8, - /// Prescription contraception website - /// - PRESCRIPTION_CONTRACEPTION_WEBSITE_EN = 9, - /// Sitio de anticonceptivos con receta - /// - PRESCRIPTION_CONTRACEPTION_WEBSITE_ES = 10, - /// Prescription vaccine website - /// - PRESCRIPTION_VACCINE_WEBSITE_EN = 11, - /// Sitio de vacunas con receta - /// - PRESCRIPTION_VACCINE_WEBSITE_ES = 12, - } - - - /// Base class for all bids. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CpmBid))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CpcBid))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CpaBid))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class Bids - { - private string bidsTypeField; - - /// Indicates that this instance is a subtype of Bids. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Bids.Type", Order = 0)] - public string BidsType - { - get - { - return this.bidsTypeField; - } - set - { - this.bidsTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manual impression based bids. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CpmBid : Bids - { - private Money bidField; - - private BidSource cpmBidSourceField; - - private bool cpmBidSourceFieldSpecified; - - /// Max CPM (cost per thousand impressions) bid. This field can be selected using the value "CpmBid".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money bid - { - get - { - return this.bidField; - } - set - { - this.bidField = value; - } - } - - /// The level (ad group or criterion) at which the bid was set. This is applicable - /// only at the criteria level. This field can - /// be selected using the value "CpmBidSource".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public BidSource cpmBidSource - { - get - { - return this.cpmBidSourceField; - } - set - { - this.cpmBidSourceField = value; - this.cpmBidSourceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool cpmBidSourceSpecified - { - get - { - return this.cpmBidSourceFieldSpecified; - } - set - { - this.cpmBidSourceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Bids.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CpmBid = new Field("CpmBid", true, true); - - public static readonly Field CpmBidSource = new Field("CpmBidSource", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Bids.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CpmBid = Fields.CpmBid; - - public static readonly Field CpmBidSource = Fields.CpmBidSource; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Bids.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CpmBid = Fields.CpmBid; - - public static readonly Field CpmBidSource = Fields.CpmBidSource; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a money amount. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Money : ComparableValue - { - private long microAmountField; - - private bool microAmountFieldSpecified; - - /// Amount in micros. One million is equivalent to one unit. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long microAmount - { - get - { - return this.microAmountField; - } - set - { - this.microAmountField = value; - this.microAmountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool microAmountSpecified - { - get - { - return this.microAmountFieldSpecified; - } - set - { - this.microAmountFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ComparableValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ComparableValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ComparableValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Comparable types for constructing ranges with. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NumberValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LongValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DoubleValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(Money))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MoneyWithCurrency))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RemarketingMoneyWithCurrency))] - public abstract partial class ComparableValue - { - private string comparableValueTypeField; - - /// Indicates that this instance is a subtype of ComparableValue. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ComparableValue.Type", Order = 0)] - public string ComparableValueType - { - get - { - return this.comparableValueTypeField; - } - set - { - this.comparableValueTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Number value types for constructing number valued ranges. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LongValue))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DoubleValue))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class NumberValue : ComparableValue - { - } - - - /// Number value type for constructing long valued ranges. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LongValue : NumberValue - { - private long numberField; - - private bool numberFieldSpecified; - - /// the underlying long value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long number - { - get - { - return this.numberField; - } - set - { - this.numberField = value; - this.numberSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool numberSpecified - { - get - { - return this.numberFieldSpecified; - } - set - { - this.numberFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NumberValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NumberValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NumberValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Number value type for constructing double valued ranges. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DoubleValue : NumberValue - { - private double numberField; - - private bool numberFieldSpecified; - - /// the underlying double value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public double number - { - get - { - return this.numberField; - } - set - { - this.numberField = value; - this.numberSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool numberSpecified - { - get - { - return this.numberFieldSpecified; - } - set - { - this.numberFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NumberValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NumberValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NumberValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Indicate where a criterion's bid came from: criterion or the adgroup it belongs - /// to. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BidSource - { - /// Effective Bid is Adgroup level bid - /// - ADGROUP = 0, - /// Effective Bid is Keyword level bid - /// - CRITERION = 1, - /// Effective Bid is inherited from Adgroup Bidding Strategy - /// - ADGROUP_BIDDING_STRATEGY = 2, - /// Effective Bid is inherited from Campaign Bidding Strategy - /// - CAMPAIGN_BIDDING_STRATEGY = 3, - } - - - /// Manual click based bids. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CpcBid : Bids - { - private Money bidField; - - private BidSource cpcBidSourceField; - - private bool cpcBidSourceFieldSpecified; - - /// Max CPC (cost per click) bid. At the ad group level, this represents the default - /// bid applicable for
  • keyword targeting on search network.
  • - ///
  • keywords & placements for content targeting.
At the ad group - /// criteria level, this is the max cpc bid. This field can be selected using the value "CpcBid".This field can be filtered on. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money bid - { - get - { - return this.bidField; - } - set - { - this.bidField = value; - } - } - - /// The level (ad group or criterion) at which the bid was set. This is applicable - /// only at the criteria level. This field can - /// be selected using the value "CpcBidSource".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public BidSource cpcBidSource - { - get - { - return this.cpcBidSourceField; - } - set - { - this.cpcBidSourceField = value; - this.cpcBidSourceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool cpcBidSourceSpecified - { - get - { - return this.cpcBidSourceFieldSpecified; - } - set - { - this.cpcBidSourceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Bids.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CpcBid = new Field("CpcBid", true, true); - - public static readonly Field CpcBidSource = new Field("CpcBidSource", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Bids.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CpcBid = Fields.CpcBid; - - public static readonly Field CpcBidSource = Fields.CpcBidSource; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Bids.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CpcBid = Fields.CpcBid; - - public static readonly Field CpcBidSource = Fields.CpcBidSource; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// CPA Bids. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CpaBid : Bids - { - private Money bidField; - - private BidSource bidSourceField; - - private bool bidSourceFieldSpecified; - - /// Target cost per acquisition (CPA). This is applicable only at the ad group - /// level.

If an ad group-level target is not set and the strategy type is - /// TARGET_CPA, the strategy level target will be used. To set the strategy-level - /// target, set the TargetCpaBiddingScheme#targetCpa on - /// the strategy's BiddingStrategyConfiguration#biddingScheme.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money bid - { - get - { - return this.bidField; - } - set - { - this.bidField = value; - } - } - - /// The level (ad group, ad group strategy, or campaign strategy) at which the bid - /// was set. This is applicable only at the ad group level. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public BidSource bidSource - { - get - { - return this.bidSourceField; - } - set - { - this.bidSourceField = value; - this.bidSourceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidSourceSpecified - { - get - { - return this.bidSourceFieldSpecified; - } - set - { - this.bidSourceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Bids.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TargetCpaBid = new Field("TargetCpaBid", true, true); - - public static readonly Field TargetCpaBidSource = new Field("TargetCpaBidSource", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Bids.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TargetCpaBid = Fields.TargetCpaBid; - - public static readonly Field TargetCpaBidSource = Fields.TargetCpaBidSource; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Bids.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TargetCpaBid = Fields.TargetCpaBid; - - public static readonly Field TargetCpaBidSource = Fields.TargetCpaBidSource; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Base class for all bidding schemes. This is - /// disabled for AdX. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetSpendBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetRoasBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetOutrankShareBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetCpaBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PageOnePromotedBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaximizeConversionsBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaximizeConversionValueBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManualCpmBiddingScheme))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManualCpcBiddingScheme))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class BiddingScheme - { - private string biddingSchemeTypeField; - - /// Indicates that this instance is a subtype of BiddingScheme. Although this field - /// is returned in the response, it is ignored on input and cannot be selected. - /// Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("BiddingScheme.Type", Order = 0)] - public string BiddingSchemeType - { - get - { - return this.biddingSchemeTypeField; - } - set - { - this.biddingSchemeTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Target Spend is - /// an automated bid strategy that sets your bids to help get as many clicks as - /// possible within your budget. This is - /// disabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TargetSpendBiddingScheme : BiddingScheme - { - private Money bidCeilingField; - - private Money spendTargetField; - - /// The largest max CPC bid that can be set by the TargetSpend bidder. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money bidCeiling - { - get - { - return this.bidCeilingField; - } - set - { - this.bidCeilingField = value; - } - } - - /// A spend target under which to maximize clicks. The TargetSpend bidder will - /// attempt to spend the smaller of this value or the natural throttling spend - /// amount. If not specified, the budget is used as the spend target. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Money spendTarget - { - get - { - return this.spendTargetField; - } - set - { - this.spendTargetField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TargetSpendBidCeiling = new Field("TargetSpendBidCeiling", false, true); - - public static readonly Field TargetSpendSpendTarget = new Field("TargetSpendSpendTarget", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TargetSpendBidCeiling = Fields.TargetSpendBidCeiling; - - public static readonly Field TargetSpendSpendTarget = Fields.TargetSpendSpendTarget; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Target Roas bidding strategy helps you maximize revenue while averaging a - /// specific target return on average spend (ROAS).

For example: If TargetRoas is - /// 1.5, the strategy will create as much revenue as possible while ensuring that - /// every $1.00 of clicks provides $1.50 in conversion value.

Note that - /// campaigns must meet specific eligibility - /// requirements before they can use the TargetRoasBiddingScheme - /// bidding strategy. This is disabled for - /// AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TargetRoasBiddingScheme : BiddingScheme - { - private double targetRoasField; - - private bool targetRoasFieldSpecified; - - private Money bidCeilingField; - - private Money bidFloorField; - - /// The target return on average spend (ROAS). This - /// field must be between 0.01 and 1000.0, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public double targetRoas - { - get - { - return this.targetRoasField; - } - set - { - this.targetRoasField = value; - this.targetRoasSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetRoasSpecified - { - get - { - return this.targetRoasFieldSpecified; - } - set - { - this.targetRoasFieldSpecified = value; - } - } - - /// Maximum bid limit that applies to all keywords managed by the strategy. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Money bidCeiling - { - get - { - return this.bidCeilingField; - } - set - { - this.bidCeilingField = value; - } - } - - /// Minimum bid limit that applies to all keywords managed by the strategy. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Money bidFloor - { - get - { - return this.bidFloorField; - } - set - { - this.bidFloorField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TargetRoas = new Field("TargetRoas", false, true); - - public static readonly Field TargetRoasBidCeiling = new Field("TargetRoasBidCeiling", false, true); - - public static readonly Field TargetRoasBidFloor = new Field("TargetRoasBidFloor", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TargetRoas = Fields.TargetRoas; - - public static readonly Field TargetRoasBidCeiling = Fields.TargetRoasBidCeiling; - - public static readonly Field TargetRoasBidFloor = Fields.TargetRoasBidFloor; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Target Outrank Share bidding strategy is an automated bidding strategy which - /// automatically sets bids so that the customer's ads appear above a specified - /// competitors' ads for a specified target fraction of the advertiser's eligible - /// impressions on Google.com. This is disabled - /// for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TargetOutrankShareBiddingScheme : BiddingScheme - { - private int targetOutrankShareField; - - private bool targetOutrankShareFieldSpecified; - - private string competitorDomainField; - - private Money maxCpcBidCeilingField; - - private bool bidChangesForRaisesOnlyField; - - private bool bidChangesForRaisesOnlyFieldSpecified; - - private bool raiseBidWhenLowQualityScoreField; - - private bool raiseBidWhenLowQualityScoreFieldSpecified; - - /// Specifies the target fraction (in micros) of auctions where the advertiser - /// should outrank the competitor. The advertiser outranks the competitor in an - /// auction if either the advertiser appears above the competitor in the search - /// results, or appears in the search results when the competitor does not. This field must be between 1 and 1000000, - /// inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int targetOutrankShare - { - get - { - return this.targetOutrankShareField; - } - set - { - this.targetOutrankShareField = value; - this.targetOutrankShareSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetOutrankShareSpecified - { - get - { - return this.targetOutrankShareFieldSpecified; - } - set - { - this.targetOutrankShareFieldSpecified = value; - } - } - - /// Competitor's visible domain URL. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string competitorDomain - { - get - { - return this.competitorDomainField; - } - set - { - this.competitorDomainField = value; - } - } - - /// Ceiling on max CPC bids. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Money maxCpcBidCeiling - { - get - { - return this.maxCpcBidCeilingField; - } - set - { - this.maxCpcBidCeilingField = value; - } - } - - /// Controls whether the strategy always follows bid estimate changes, or only - /// increases. If false, always sets a keyword's new bid to the estimate that will - /// meet the target. If true, only updates a keyword's bid if the current bid - /// estimate is greater than the current bid. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool bidChangesForRaisesOnly - { - get - { - return this.bidChangesForRaisesOnlyField; - } - set - { - this.bidChangesForRaisesOnlyField = value; - this.bidChangesForRaisesOnlySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidChangesForRaisesOnlySpecified - { - get - { - return this.bidChangesForRaisesOnlyFieldSpecified; - } - set - { - this.bidChangesForRaisesOnlyFieldSpecified = value; - } - } - - /// Controls whether the strategy is allowed to raise bids on keywords with - /// lower-range quality scores. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool raiseBidWhenLowQualityScore - { - get - { - return this.raiseBidWhenLowQualityScoreField; - } - set - { - this.raiseBidWhenLowQualityScoreField = value; - this.raiseBidWhenLowQualityScoreSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool raiseBidWhenLowQualityScoreSpecified - { - get - { - return this.raiseBidWhenLowQualityScoreFieldSpecified; - } - set - { - this.raiseBidWhenLowQualityScoreFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TargetOutrankShare = new Field("TargetOutrankShare", true, true); - - public static readonly Field TargetOutrankShareCompetitorDomain = new Field("TargetOutrankShareCompetitorDomain", true, true); - - public static readonly Field TargetOutrankShareMaxCpcBidCeiling = new Field("TargetOutrankShareMaxCpcBidCeiling", true, true); - - public static readonly Field TargetOutrankShareBidChangesForRaisesOnly = new Field("TargetOutrankShareBidChangesForRaisesOnly", true, true); - - public static readonly Field TargetOutrankShareRaiseBidWhenLowQualityScore = new Field("TargetOutrankShareRaiseBidWhenLowQualityScore", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TargetOutrankShare = Fields.TargetOutrankShare; - - public static readonly Field TargetOutrankShareCompetitorDomain = Fields.TargetOutrankShareCompetitorDomain; - - public static readonly Field TargetOutrankShareMaxCpcBidCeiling = Fields.TargetOutrankShareMaxCpcBidCeiling; - - public static readonly Field TargetOutrankShareBidChangesForRaisesOnly = Fields.TargetOutrankShareBidChangesForRaisesOnly; - - public static readonly Field TargetOutrankShareRaiseBidWhenLowQualityScore = Fields.TargetOutrankShareRaiseBidWhenLowQualityScore; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TargetOutrankShare = Fields.TargetOutrankShare; - - public static readonly Field TargetOutrankShareCompetitorDomain = Fields.TargetOutrankShareCompetitorDomain; - - public static readonly Field TargetOutrankShareMaxCpcBidCeiling = Fields.TargetOutrankShareMaxCpcBidCeiling; - - public static readonly Field TargetOutrankShareBidChangesForRaisesOnly = Fields.TargetOutrankShareBidChangesForRaisesOnly; - - public static readonly Field TargetOutrankShareRaiseBidWhenLowQualityScore = Fields.TargetOutrankShareRaiseBidWhenLowQualityScore; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Target CPA is an - /// automated bid strategy that sets bids to help get as many conversions as - /// possible at the target cost per acquisition (CPA) you set.

A target CPA must be set for the strategy, but can also be - /// optionally set for individual ad groups in the strategy. Ad group targets, if - /// set, will override strategy targets.

Note that campaigns must meet specific eligibility - /// requirements before they can use the Target CPA bid strategy. This is disabled for AdX.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TargetCpaBiddingScheme : BiddingScheme - { - private Money targetCpaField; - - private Money maxCpcBidCeilingField; - - private Money maxCpcBidFloorField; - - /// Average cost per acquisition (CPA) target. This target should be greater than or - /// equal to minimum billable unit based on the currency for the account. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money targetCpa - { - get - { - return this.targetCpaField; - } - set - { - this.targetCpaField = value; - } - } - - /// Maximum cpc bid limit that applies to all keywords managed by the strategy. - /// This field must be greater than or equal to - /// 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Money maxCpcBidCeiling - { - get - { - return this.maxCpcBidCeilingField; - } - set - { - this.maxCpcBidCeilingField = value; - } - } - - /// Minimum cpc bid limit that applies to all keywords managed by the strategy. - /// This field must be greater than or equal to - /// 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Money maxCpcBidFloor - { - get - { - return this.maxCpcBidFloorField; - } - set - { - this.maxCpcBidFloorField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TargetCpa = new Field("TargetCpa", true, true); - - public static readonly Field TargetCpaMaxCpcBidCeiling = new Field("TargetCpaMaxCpcBidCeiling", true, true); - - public static readonly Field TargetCpaMaxCpcBidFloor = new Field("TargetCpaMaxCpcBidFloor", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TargetCpa = Fields.TargetCpa; - - public static readonly Field TargetCpaMaxCpcBidCeiling = Fields.TargetCpaMaxCpcBidCeiling; - - public static readonly Field TargetCpaMaxCpcBidFloor = Fields.TargetCpaMaxCpcBidFloor; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TargetCpa = Fields.TargetCpa; - - public static readonly Field TargetCpaMaxCpcBidCeiling = Fields.TargetCpaMaxCpcBidCeiling; - - public static readonly Field TargetCpaMaxCpcBidFloor = Fields.TargetCpaMaxCpcBidFloor; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Page-One Promoted bidding scheme, which sets max cpc bids to target impressions - /// on page one or page one promoted slots on google.com. This is disabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PageOnePromotedBiddingScheme : BiddingScheme - { - private PageOnePromotedBiddingSchemeStrategyGoal strategyGoalField; - - private bool strategyGoalFieldSpecified; - - private Money bidCeilingField; - - private double bidModifierField; - - private bool bidModifierFieldSpecified; - - private bool bidChangesForRaisesOnlyField; - - private bool bidChangesForRaisesOnlyFieldSpecified; - - private bool raiseBidWhenBudgetConstrainedField; - - private bool raiseBidWhenBudgetConstrainedFieldSpecified; - - private bool raiseBidWhenLowQualityScoreField; - - private bool raiseBidWhenLowQualityScoreFieldSpecified; - - /// Specifies the strategy goal: where impressions are desired to be shown on search - /// result pages. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PageOnePromotedBiddingSchemeStrategyGoal strategyGoal - { - get - { - return this.strategyGoalField; - } - set - { - this.strategyGoalField = value; - this.strategyGoalSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool strategyGoalSpecified - { - get - { - return this.strategyGoalFieldSpecified; - } - set - { - this.strategyGoalFieldSpecified = value; - } - } - - /// Strategy maximum bid limit in advertiser local currency micro units. This upper - /// limit applies to all keywords managed by the strategy. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Money bidCeiling - { - get - { - return this.bidCeilingField; - } - set - { - this.bidCeilingField = value; - } - } - - /// Bid Multiplier to be applied to the relevant bid estimate (depending on the - /// strategyGoal) in determining a keyword's new max cpc bid. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public double bidModifier - { - get - { - return this.bidModifierField; - } - set - { - this.bidModifierField = value; - this.bidModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSpecified - { - get - { - return this.bidModifierFieldSpecified; - } - set - { - this.bidModifierFieldSpecified = value; - } - } - - /// Controls whether the strategy always follows bid estimate changes, or only - /// increases. If false, always set a keyword's new bid to the current bid estimate. - /// If true, only updates a keyword's bid if the current bid estimate is greater - /// than the current bid. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool bidChangesForRaisesOnly - { - get - { - return this.bidChangesForRaisesOnlyField; - } - set - { - this.bidChangesForRaisesOnlyField = value; - this.bidChangesForRaisesOnlySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidChangesForRaisesOnlySpecified - { - get - { - return this.bidChangesForRaisesOnlyFieldSpecified; - } - set - { - this.bidChangesForRaisesOnlyFieldSpecified = value; - } - } - - /// Controls whether the strategy is allowed to raise bids when the throttling rate - /// of the budget it is serving out of rises above a threshold. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool raiseBidWhenBudgetConstrained - { - get - { - return this.raiseBidWhenBudgetConstrainedField; - } - set - { - this.raiseBidWhenBudgetConstrainedField = value; - this.raiseBidWhenBudgetConstrainedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool raiseBidWhenBudgetConstrainedSpecified - { - get - { - return this.raiseBidWhenBudgetConstrainedFieldSpecified; - } - set - { - this.raiseBidWhenBudgetConstrainedFieldSpecified = value; - } - } - - /// Controls whether the strategy is allowed to raise bids on keywords with - /// lower-range quality scores. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool raiseBidWhenLowQualityScore - { - get - { - return this.raiseBidWhenLowQualityScoreField; - } - set - { - this.raiseBidWhenLowQualityScoreField = value; - this.raiseBidWhenLowQualityScoreSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool raiseBidWhenLowQualityScoreSpecified - { - get - { - return this.raiseBidWhenLowQualityScoreFieldSpecified; - } - set - { - this.raiseBidWhenLowQualityScoreFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field PageOnePromotedStrategyGoal = new Field("PageOnePromotedStrategyGoal", false, true); - - public static readonly Field PageOnePromotedBidCeiling = new Field("PageOnePromotedBidCeiling", false, true); - - public static readonly Field PageOnePromotedBidModifier = new Field("PageOnePromotedBidModifier", false, true); - - public static readonly Field PageOnePromotedBidChangesForRaisesOnly = new Field("PageOnePromotedBidChangesForRaisesOnly", false, true); - - public static readonly Field PageOnePromotedRaiseBidWhenBudgetConstrained = new Field("PageOnePromotedRaiseBidWhenBudgetConstrained", false, true); - - public static readonly Field PageOnePromotedRaiseBidWhenLowQualityScore = new Field("PageOnePromotedRaiseBidWhenLowQualityScore", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field PageOnePromotedStrategyGoal = Fields.PageOnePromotedStrategyGoal; - - public static readonly Field PageOnePromotedBidCeiling = Fields.PageOnePromotedBidCeiling; - - public static readonly Field PageOnePromotedBidModifier = Fields.PageOnePromotedBidModifier; - - public static readonly Field PageOnePromotedBidChangesForRaisesOnly = Fields.PageOnePromotedBidChangesForRaisesOnly; - - public static readonly Field PageOnePromotedRaiseBidWhenBudgetConstrained = Fields.PageOnePromotedRaiseBidWhenBudgetConstrained; - - public static readonly Field PageOnePromotedRaiseBidWhenLowQualityScore = Fields.PageOnePromotedRaiseBidWhenLowQualityScore; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PageOnePromotedBiddingScheme.StrategyGoal", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PageOnePromotedBiddingSchemeStrategyGoal - { - /// First page on google.com. - /// - PAGE_ONE = 0, - /// Top slots of the first page on google.com. - /// - PAGE_ONE_PROMOTED = 1, - } - - - /// Maximize conversions is an automated bidding strategy that automatically sets - /// bids to help get the most conversions for your campaign while spending your - /// budget. This is disabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MaximizeConversionsBiddingScheme : BiddingScheme - { - } - - - /// Maximize Conversion Value bidding strategy is an automated bidding strategy - /// which tries to maximize conversion value given a daily budget. This is disabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MaximizeConversionValueBiddingScheme : BiddingScheme - { - private double targetRoasField; - - private bool targetRoasFieldSpecified; - - /// The target return on ad spend (ROAS). This is optional. If set, the bid strategy - /// will maximize revenue while averaging the target return on ad spend. If the - /// target ROAS is high, the bid strategy may not be able to spend the full budget. - /// If the target ROAS is not set, the bid strategy will aim to achieve the highest - /// possible ROAS for the budget. This field must - /// be between 0.0 and 1.7976931348623157E308, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public double targetRoas - { - get - { - return this.targetRoasField; - } - set - { - this.targetRoasField = value; - this.targetRoasSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetRoasSpecified - { - get - { - return this.targetRoasFieldSpecified; - } - set - { - this.targetRoasFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field MaximizeConversionValueTargetRoas = new Field("MaximizeConversionValueTargetRoas", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field MaximizeConversionValueTargetRoas = Fields.MaximizeConversionValueTargetRoas; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field MaximizeConversionValueTargetRoas = Fields.MaximizeConversionValueTargetRoas; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manual impression based bidding where user pays per thousand impressions. This is enabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ManualCpmBiddingScheme : BiddingScheme - { - private bool viewableCpmEnabledField; - - private bool viewableCpmEnabledFieldSpecified; - - /// This read-only field denotes whether Viewable CPM is enabled, and is computed - /// based on the advertising channel type and subtype. Null unless the bidding - /// strategy type is CPM. Only selectable in CampaignService, using the value - /// ViewableCpmEnabled. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool viewableCpmEnabled - { - get - { - return this.viewableCpmEnabledField; - } - set - { - this.viewableCpmEnabledField = value; - this.viewableCpmEnabledSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool viewableCpmEnabledSpecified - { - get - { - return this.viewableCpmEnabledFieldSpecified; - } - set - { - this.viewableCpmEnabledFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ViewableCpmEnabled = new Field("ViewableCpmEnabled", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ViewableCpmEnabled = Fields.ViewableCpmEnabled; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ViewableCpmEnabled = Fields.ViewableCpmEnabled; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manual click based bidding where user pays per click. This is disabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ManualCpcBiddingScheme : BiddingScheme - { - private bool enhancedCpcEnabledField; - - private bool enhancedCpcEnabledFieldSpecified; - - /// The enhanced CPC bidding option for the campaign, which enables bids to be - /// enhanced based on conversion optimizer data. For more information about enhanced - /// CPC, see the AdWords Help - /// Center. This field can be selected using - /// the value "EnhancedCpcEnabled".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool enhancedCpcEnabled - { - get - { - return this.enhancedCpcEnabledField; - } - set - { - this.enhancedCpcEnabledField = value; - this.enhancedCpcEnabledSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool enhancedCpcEnabledSpecified - { - get - { - return this.enhancedCpcEnabledFieldSpecified; - } - set - { - this.enhancedCpcEnabledFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BiddingScheme.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field EnhancedCpcEnabled = new Field("EnhancedCpcEnabled", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BiddingScheme.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field EnhancedCpcEnabled = Fields.EnhancedCpcEnabled; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BiddingScheme.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field EnhancedCpcEnabled = Fields.EnhancedCpcEnabled; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Encapsulates the information about bids and bidding strategies.

Note: Starting with v201705, bidding strategies can only be - /// set on campaigns. In earlier versions, bidding strategies can be set on - /// campaigns, ad groups and ad group criteria.

A bidding strategy can be set - /// using one of the following:

If the bidding strategy type is used, - /// then schemes are created using default values.

Bids can be set only on ad - /// groups and ad group criteria. They cannot be set on campaigns. Multiple bids can - /// be set at the same time. Only the bids that apply to the effective bidding - /// strategy will be used. Effective bidding strategy is considered to be the - /// directly attached strategy or inherited strategy from above level(s) when there - /// is no directly attached strategy.

For more information on flexible - /// bidding, visit the Help Center.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddingStrategyConfiguration - { - private long biddingStrategyIdField; - - private bool biddingStrategyIdFieldSpecified; - - private string biddingStrategyNameField; - - private BiddingStrategyType biddingStrategyTypeField; - - private bool biddingStrategyTypeFieldSpecified; - - private BiddingStrategySource biddingStrategySourceField; - - private bool biddingStrategySourceFieldSpecified; - - private BiddingScheme biddingSchemeField; - - private Bids[] bidsField; - - private double targetRoasOverrideField; - - private bool targetRoasOverrideFieldSpecified; - - /// Id of the bidding strategy to be associated with the campaign, ad group or ad - /// group criteria. A bidding strategy is created using the BiddingStrategyService - /// ADD operation and is assigned a BiddingStrategyId. The BiddingStrategyId can be - /// shared across campaigns, ad groups and ad group criteria.

Starting with - /// v201705, this field cannot be set at the ad group or ad group criterion level. - /// This field can be selected using the value - /// "BiddingStrategyId".This field can be - /// filtered on. This is disabled for - /// AdX. This field may not be - /// set.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long biddingStrategyId - { - get - { - return this.biddingStrategyIdField; - } - set - { - this.biddingStrategyIdField = value; - this.biddingStrategyIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool biddingStrategyIdSpecified - { - get - { - return this.biddingStrategyIdFieldSpecified; - } - set - { - this.biddingStrategyIdFieldSpecified = value; - } - } - - /// Name of the bidding strategy. This is applicable only for flexible bidding - /// strategies. This field can be selected using - /// the value "BiddingStrategyName".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string biddingStrategyName - { - get - { - return this.biddingStrategyNameField; - } - set - { - this.biddingStrategyNameField = value; - } - } - - /// The type of the bidding strategy to be attached.

For details on portfolio vs. - /// standard availability, see the bidding - /// guide.

Starting with v201705, this field cannot be set at the ad - /// group or ad group criterion level to any value other than . This field can be selected using the value - /// "BiddingStrategyType".This field can - /// be filtered on. This field may only - /// be set to NONE.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public BiddingStrategyType biddingStrategyType - { - get - { - return this.biddingStrategyTypeField; - } - set - { - this.biddingStrategyTypeField = value; - this.biddingStrategyTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool biddingStrategyTypeSpecified - { - get - { - return this.biddingStrategyTypeFieldSpecified; - } - set - { - this.biddingStrategyTypeFieldSpecified = value; - } - } - - /// Indicates where the bidding strategy is associated i.e. campaign, ad group or ad - /// group criterion. This field can be selected - /// using the value "BiddingStrategySource".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public BiddingStrategySource biddingStrategySource - { - get - { - return this.biddingStrategySourceField; - } - set - { - this.biddingStrategySourceField = value; - this.biddingStrategySourceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool biddingStrategySourceSpecified - { - get - { - return this.biddingStrategySourceFieldSpecified; - } - set - { - this.biddingStrategySourceFieldSpecified = value; - } - } - - /// The bidding strategy metadata. Bidding strategy can be associated using the BiddingStrategyConfiguration#biddingStrategyType or the bidding - /// scheme.

For details on portfolio vs. standard availability, see the bidding - /// guide.

Starting with v201705, this field cannot be set at the ad - /// group or ad group criterion level. This - /// field may not be set.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public BiddingScheme biddingScheme - { - get - { - return this.biddingSchemeField; - } - set - { - this.biddingSchemeField = value; - } - } - - /// Specifies the bids. Bids can be set only on ad groups and ad group criteria. - /// Bids cannot be set on campaign. Default CPC and CPM bid values will be set if - /// they are not provided during AdGroup creation. Default CPC - /// and CPM values are minimal billable amounts in local currencies. For example, - /// for US Dollars CPC and CPM default values are $0.01 and $0.01, respectively. - /// - [System.Xml.Serialization.XmlElementAttribute("bids", Order = 5)] - public Bids[] bids - { - get - { - return this.bidsField; - } - set - { - this.bidsField = value; - } - } - - /// The target return on average spend (ROAS). This target can only be set on ad - /// groups. If this ad group's effective bidding strategy is a standard - /// TARGET_ROAS strategy attached to the campaign, then the target - /// overrides the target roas specified in the campaign's bidding strategy. - /// Otherwise, this value is ignored. This - /// field may not be set. This field must be - /// between 0.01 and 1000.0, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public double targetRoasOverride - { - get - { - return this.targetRoasOverrideField; - } - set - { - this.targetRoasOverrideField = value; - this.targetRoasOverrideSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetRoasOverrideSpecified - { - get - { - return this.targetRoasOverrideFieldSpecified; - } - set - { - this.targetRoasOverrideFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field BiddingStrategyId = new Field("BiddingStrategyId", true, true); - - public static readonly Field BiddingStrategyName = new Field("BiddingStrategyName", true, true); - - public static readonly Field BiddingStrategyType = new Field("BiddingStrategyType", true, true); - - public static readonly Field BiddingStrategySource = new Field("BiddingStrategySource", true, true); - - public static readonly Field TargetRoasOverride = new Field("TargetRoasOverride", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field BiddingStrategyId = Fields.BiddingStrategyId; - - public static readonly Field BiddingStrategyName = Fields.BiddingStrategyName; - - public static readonly Field BiddingStrategyType = Fields.BiddingStrategyType; - - public static readonly Field BiddingStrategySource = Fields.BiddingStrategySource; - - public static readonly Field TargetRoasOverride = Fields.TargetRoasOverride; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field BiddingStrategyId = Fields.BiddingStrategyId; - - public static readonly Field BiddingStrategyName = Fields.BiddingStrategyName; - - public static readonly Field BiddingStrategyType = Fields.BiddingStrategyType; - - public static readonly Field BiddingStrategySource = Fields.BiddingStrategySource; - - public static readonly Field TargetRoasOverride = Fields.TargetRoasOverride; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The bidding strategy type. See BiddingStrategyConfiguration for - /// additional information. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BiddingStrategyType - { - /// Manual click based bidding where user pays per click. See ManualCpcBiddingScheme for more details. - /// - MANUAL_CPC = 2, - /// Manual impression based bidding where user pays per thousand impressions. See ManualCpmBiddingScheme for more details. - /// - MANUAL_CPM = 3, - /// Page-One Promoted is an automated bid strategy that sets max CPC bids to target - /// impressions on page one or page one promoted slots on google.com. See PageOnePromotedBiddingScheme for more - /// details. - /// - PAGE_ONE_PROMOTED = 4, - /// Target Spend (Maximize Clicks) is an automated bid strategy that sets your bids - /// to help get as many clicks as possible within your budget. See TargetSpendBiddingScheme for more details. - /// - TARGET_SPEND = 5, - /// Target CPA is an automated bid strategy that sets bids to help get as many - /// conversions as possible at the target cost per acquisition (CPA) you set. See TargetCpaBiddingScheme for more details. - /// - TARGET_CPA = 7, - /// Target ROAS is an automated bidding strategy that helps you maximize revenue - /// while averaging a specific target return on average spend (ROAS). See TargetRoasBiddingScheme for more details. - /// - TARGET_ROAS = 8, - /// Maximize conversions is an automated bidding strategy that automatically sets - /// bids to help get the most conversions for your campaign while spending your - /// budget. See MaximizeConversionsBiddingScheme for - /// more details. - /// - MAXIMIZE_CONVERSIONS = 12, - /// Maximize conversion value is an automated bidding strategy that automatically - /// sets bids to maximize revenue while spending your budget. See MaximizeConversionValueBiddingScheme - /// for more details. - /// - MAXIMIZE_CONVERSION_VALUE = 13, - /// Target Outrank Share is an automated bidding strategy that sets bids based on - /// the target fraction of auctions where the advertiser should outrank a specific - /// competitor. See TargetOutrankShareBiddingScheme for - /// more details. - /// - TARGET_OUTRANK_SHARE = 9, - /// Special bidding strategy type used to reset the bidding strategy at AdGroup and - /// AdGroupCriterion. - /// - NONE = 10, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 11, - } - - - /// Indicates where bidding strategy came from: campaign, adgroup or criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BiddingStrategySource - { - /// Bidding strategy is defined on campaign level. - /// - CAMPAIGN = 0, - /// Bidding strategy is defined on adgroup level. - /// - ADGROUP = 1, - /// Bidding strategy is defined on criterion level. - /// - CRITERION = 2, - } - - - /// Network settings for a Campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NetworkSetting - { - private bool targetGoogleSearchField; - - private bool targetGoogleSearchFieldSpecified; - - private bool targetSearchNetworkField; - - private bool targetSearchNetworkFieldSpecified; - - private bool targetContentNetworkField; - - private bool targetContentNetworkFieldSpecified; - - private bool targetPartnerSearchNetworkField; - - private bool targetPartnerSearchNetworkFieldSpecified; - - /// Ads will be served with Google.com search results. This field can be selected using the value - /// "TargetGoogleSearch".This field can - /// be filtered on. This is disabled for - /// AdX. This field may only be set to - /// true for campaign channel type SEARCH. This field may only be set to true for campaign channel type - /// MULTI_CHANNEL. This field may only - /// be set to false for campaign channel type DISPLAY. This field may only be set to true for campaign - /// channel subtype SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool targetGoogleSearch - { - get - { - return this.targetGoogleSearchField; - } - set - { - this.targetGoogleSearchField = value; - this.targetGoogleSearchSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetGoogleSearchSpecified - { - get - { - return this.targetGoogleSearchFieldSpecified; - } - set - { - this.targetGoogleSearchFieldSpecified = value; - } - } - - /// Ads will be served on partner sites in the Google Search Network (requires - /// GOOGLE_SEARCH). This field can - /// be selected using the value "TargetSearchNetwork".This field can be filtered on. This is disabled for AdX. This field may only be set to true for campaign channel type - /// MULTI_CHANNEL. This field may only - /// be set to true for campaign channel subtype SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool targetSearchNetwork - { - get - { - return this.targetSearchNetworkField; - } - set - { - this.targetSearchNetworkField = value; - this.targetSearchNetworkSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetSearchNetworkSpecified - { - get - { - return this.targetSearchNetworkFieldSpecified; - } - set - { - this.targetSearchNetworkFieldSpecified = value; - } - } - - /// Ads will be served on specified placements in the Google Display Network. - /// Placements are specified using Placement criteria. This field can be selected using the value - /// "TargetContentNetwork".This field can - /// be filtered on. This field may only - /// be set to true for campaign channel type MULTI_CHANNEL. This field may only be set to false for campaign - /// channel subtype SEARCH_MOBILE_APP. This field may only be set to true for campaign channel type - /// DISPLAY with campaign channel subtype DISPLAY_SMART_CAMPAIGN. This field may only be set to true for campaign - /// channel subtype SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool targetContentNetwork - { - get - { - return this.targetContentNetworkField; - } - set - { - this.targetContentNetworkField = value; - this.targetContentNetworkSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetContentNetworkSpecified - { - get - { - return this.targetContentNetworkFieldSpecified; - } - set - { - this.targetContentNetworkFieldSpecified = value; - } - } - - /// Ads will be served on the Google Partner Network. This is available to only some - /// specific Google partner accounts. This field - /// can be selected using the value "TargetPartnerSearchNetwork".This field can be filtered on. This is disabled for AdX. This field may only be set to false for campaign - /// channel type MULTI_CHANNEL. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool targetPartnerSearchNetwork - { - get - { - return this.targetPartnerSearchNetworkField; - } - set - { - this.targetPartnerSearchNetworkField = value; - this.targetPartnerSearchNetworkSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetPartnerSearchNetworkSpecified - { - get - { - return this.targetPartnerSearchNetworkFieldSpecified; - } - set - { - this.targetPartnerSearchNetworkFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TargetGoogleSearch = new Field("TargetGoogleSearch", true, true); - - public static readonly Field TargetSearchNetwork = new Field("TargetSearchNetwork", true, true); - - public static readonly Field TargetContentNetwork = new Field("TargetContentNetwork", true, true); - - public static readonly Field TargetPartnerSearchNetwork = new Field("TargetPartnerSearchNetwork", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TargetGoogleSearch = Fields.TargetGoogleSearch; - - public static readonly Field TargetSearchNetwork = Fields.TargetSearchNetwork; - - public static readonly Field TargetContentNetwork = Fields.TargetContentNetwork; - - public static readonly Field TargetPartnerSearchNetwork = Fields.TargetPartnerSearchNetwork; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TargetGoogleSearch = Fields.TargetGoogleSearch; - - public static readonly Field TargetSearchNetwork = Fields.TargetSearchNetwork; - - public static readonly Field TargetContentNetwork = Fields.TargetContentNetwork; - - public static readonly Field TargetPartnerSearchNetwork = Fields.TargetPartnerSearchNetwork; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies if criteria of this type group should be used to restrict targeting, - /// or if ads can serve anywhere and criteria are only used in determining the bid. - ///

For more information, see Targeting - /// Settings.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TargetingSettingDetail - { - private CriterionTypeGroup criterionTypeGroupField; - - private bool criterionTypeGroupFieldSpecified; - - private bool targetAllField; - - private bool targetAllFieldSpecified; - - /// The criterion type group that these settings apply to. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CriterionTypeGroup criterionTypeGroup - { - get - { - return this.criterionTypeGroupField; - } - set - { - this.criterionTypeGroupField = value; - this.criterionTypeGroupSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionTypeGroupSpecified - { - get - { - return this.criterionTypeGroupFieldSpecified; - } - set - { - this.criterionTypeGroupFieldSpecified = value; - } - } - - /// If true, criteria of this type can be used to modify bidding but will not - /// restrict targeting of ads. This is equivalent to "Bid only" in the AdWords user - /// interface. If false, restricts your ads to showing only for the criteria you - /// have selected for this CriterionTypeGroup. This is equivalent to "Target and - /// Bid" in the AdWords user interface. The default setting for a CriterionTypeGroup - /// is false ("Target and Bid"). This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool targetAll - { - get - { - return this.targetAllField; - } - set - { - this.targetAllField = value; - this.targetAllSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetAllSpecified - { - get - { - return this.targetAllFieldSpecified; - } - set - { - this.targetAllFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The list of groupings of criteria types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CriterionTypeGroup - { - /// Criteria for targeting keywords. e.g. 'mars cruise' KEYWORD may be used as a - /// content bid dimension. Keywords are always a targeting dimension, so may not be - /// set as a target "ALL" dimension with TargetRestriction. - /// - KEYWORD = 0, - /// Criteria for targeting lists of users. Lists may represent users with particular - /// interests, or they may represent users who have interacted with an advertiser's - /// site in particular ways. - /// - USER_INTEREST_AND_LIST = 1, - /// Criteria for targeting similar categories of placements, e.g. - /// 'category::Animals>Pets' Used only for content network targeting. - /// - VERTICAL = 2, - /// Criteria for targeting gender. - /// - GENDER = 3, - /// Criteria for targeting age ranges. - /// - AGE_RANGE = 4, - /// Criteria for targeting placements. aka Website. e.g. 'www.flowers4sale.com' This - /// group also includes mobile applications and mobile app categories. - /// - PLACEMENT = 5, - /// Criteria for parental status targeting. - /// - PARENT = 8, - /// Criteria for income range targeting. - /// - INCOME_RANGE = 9, - /// Special criteria type group used to reset the existing value of AdGroup's - /// contentBidCriterionTypeGroup. - /// - NONE = 6, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 7, - } - - - /// Contains Universal App Campaign Ads Policy decisions with asset identifier - /// information, where available. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UniversalAppCampaignAdsPolicyDecisions - { - private UniversalAppCampaignAsset universalAppCampaignAssetField; - - private bool universalAppCampaignAssetFieldSpecified; - - private string assetIdField; - - private PolicyTopicEntry[] policyTopicEntriesField; - - /// Used to identify assets that are associated with the Ads Policy decisions. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UniversalAppCampaignAsset universalAppCampaignAsset - { - get - { - return this.universalAppCampaignAssetField; - } - set - { - this.universalAppCampaignAssetField = value; - this.universalAppCampaignAssetSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool universalAppCampaignAssetSpecified - { - get - { - return this.universalAppCampaignAssetFieldSpecified; - } - set - { - this.universalAppCampaignAssetFieldSpecified = value; - } - } - - /// Unique identifier, which when combined with the UniversalAppCampaignAsset, can - /// be used to uniquely identify the exact asset.

For example, in the case of UniversalAppCampaignAsset.VIDEO - the id - /// could be used to identify the individual video.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string assetId - { - get - { - return this.assetIdField; - } - set - { - this.assetIdField = value; - } - } - - /// List of policy decisions associated with the asset(s). - /// - [System.Xml.Serialization.XmlElementAttribute("policyTopicEntries", Order = 2)] - public PolicyTopicEntry[] policyTopicEntries - { - get - { - return this.policyTopicEntriesField; - } - set - { - this.policyTopicEntriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the individual assets that are utilized as part of the campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum UniversalAppCampaignAsset - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Identifies a combination of assets. - /// - COMBINATION = 1, - /// Identifies the app destination. - /// - APP_DESTINATION = 2, - /// Identifies the app related data, like app name, app icon, developer name - /// including translations of the content. - /// - APP_ASSETS = 3, - /// Identifies the campaign setting's description1 field. - /// - DESCRIPTION_1 = 4, - /// Identifies the campaign setting's description2 field. - /// - DESCRIPTION_2 = 5, - /// Identifies the campaign setting's description3 field. - /// - DESCRIPTION_3 = 6, - /// Identifies the campaign setting's description4 field. - /// - DESCRIPTION_4 = 7, - /// Identifies the campaign setting's video fields. - /// - VIDEO = 8, - /// Identifies the campaign setting's image fields. - /// - IMAGE = 9, - } - - - /// Page feeds associated with DynamicSearchAdsSetting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PageFeed - { - private long[] feedIdsField; - - /// A list of page feeds associated with this campaign's dynamic search ads setting. - /// - [System.Xml.Serialization.XmlElementAttribute("feedIds", Order = 0)] - public long[] feedIds - { - get - { - return this.feedIdsField; - } - set - { - this.feedIdsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Base type for AdWords campaign settings. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TrackingSetting))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(TargetingSetting))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ShoppingSetting))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RealTimeBiddingSetting))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UniversalAppCampaignSetting))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(GeoTargetTypeSetting))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DynamicSearchAdsSetting))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExplorerAutoOptimizerSetting))] - public abstract partial class Setting - { - private string settingTypeField; - - /// Indicates that this instance is a subtype of Setting. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Setting.Type", Order = 0)] - public string SettingType - { - get - { - return this.settingTypeField; - } - set - { - this.settingTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Campaign level settings for tracking information. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrackingSetting : Setting - { - private string trackingUrlField; - - /// The url used for dynamic tracking. For more information, see the article Use dynamic tracking - /// URLs. Specify "NONE" to clear existing url. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string trackingUrl - { - get - { - return this.trackingUrlField; - } - set - { - this.trackingUrlField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Setting for targeting related features. This is applicable at Campaign and - /// AdGroup level. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TargetingSetting : Setting - { - private TargetingSettingDetail[] detailsField; - - /// The list of per-criterion-type-group targeting settings. - /// - [System.Xml.Serialization.XmlElementAttribute("details", Order = 0)] - public TargetingSettingDetail[] details - { - get - { - return this.detailsField; - } - set - { - this.detailsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Setting for shopping campaigns. Defines the universe of products covered by the - /// campaign. Encapsulates a merchant ID, sales country, and campaign priority. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ShoppingSetting : Setting - { - private long merchantIdField; - - private bool merchantIdFieldSpecified; - - private string salesCountryField; - - private int campaignPriorityField; - - private bool campaignPriorityFieldSpecified; - - private bool enableLocalField; - - private bool enableLocalFieldSpecified; - - /// ID of the Merchant Center account. This field - /// is required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long merchantId - { - get - { - return this.merchantIdField; - } - set - { - this.merchantIdField = value; - this.merchantIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool merchantIdSpecified - { - get - { - return this.merchantIdFieldSpecified; - } - set - { - this.merchantIdFieldSpecified = value; - } - } - - /// Sales country of products to include in the campaign. This must be set to 'ZZ' - /// for Campaigns of types other than AdvertisingChannelType#SHOPPING This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string salesCountry - { - get - { - return this.salesCountryField; - } - set - { - this.salesCountryField = value; - } - } - - /// Priority of the campaign. Campaigns with numerically higher priorities take - /// precedence over those with lower priorities. This field may only be set to 3 for campaign channel type SHOPPING - /// with campaign channel subtype SHOPPING_GOAL_OPTIMIZED_ADS. This field must be between 0 and 2, inclusive. - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int campaignPriority - { - get - { - return this.campaignPriorityField; - } - set - { - this.campaignPriorityField = value; - this.campaignPrioritySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignPrioritySpecified - { - get - { - return this.campaignPriorityFieldSpecified; - } - set - { - this.campaignPriorityFieldSpecified = value; - } - } - - /// Enable local inventory ads. This field may - /// only be set to false for campaign channel type SHOPPING with campaign channel - /// subtype SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool enableLocal - { - get - { - return this.enableLocalField; - } - set - { - this.enableLocalField = value; - this.enableLocalSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool enableLocalSpecified - { - get - { - return this.enableLocalFieldSpecified; - } - set - { - this.enableLocalFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Settings for Real-Time Bidding, a feature only available for campaigns targeting - /// the Ad Exchange network. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RealTimeBiddingSetting : Setting - { - private bool optInField; - - private bool optInFieldSpecified; - - /// Whether the campaign is opted in to real-time bidding. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool optIn - { - get - { - return this.optInField; - } - set - { - this.optInField = value; - this.optInSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool optInSpecified - { - get - { - return this.optInFieldSpecified; - } - set - { - this.optInFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Setting for storing the mobile app to advertise and creative assets for - /// Universal app campaigns. This setting is required for Campaigns with advertising - /// channel subtype UNIVERSAL_APP_CAMPAIGN and can only be attached to such - /// Campaigns. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UniversalAppCampaignSetting : Setting - { - private string appIdField; - - private MobileApplicationVendor appVendorField; - - private bool appVendorFieldSpecified; - - private string description1Field; - - private string description2Field; - - private string description3Field; - - private string description4Field; - - private long[] youtubeVideoMediaIdsField; - - private long[] imageMediaIdsField; - - private UniversalAppBiddingStrategyGoalType universalAppBiddingStrategyGoalTypeField; - - private bool universalAppBiddingStrategyGoalTypeFieldSpecified; - - private ListOperations youtubeVideoMediaIdsOpsField; - - private ListOperations imageMediaIdsOpsField; - - private UniversalAppCampaignAdsPolicyDecisions[] adsPolicyDecisionsField; - - /// A string that uniquely identifies a mobile application. The appId should be the - /// same as the vendor native id for the app. For example the Android Application - /// "Color Drips" - /// (https://play.google.com/store/apps/details?id=com.labpixies.colordrips) would - /// have the appId - "com.labpixies.colordrips". This field can be filtered on using the value - /// "UniversalAppCampaignSettingAppId". This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string appId - { - get - { - return this.appIdField; - } - set - { - this.appIdField = value; - } - } - - /// The vendor, i.e. application store that distributes this specific app, as - /// identified by the app_id.

This field is required and should not be null when - /// it is contained within Operators : ADD. This - /// field is read only and will be ignored when sent to the API for the following Operators: REMOVE.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public MobileApplicationVendor appVendor - { - get - { - return this.appVendorField; - } - set - { - this.appVendorField = value; - this.appVendorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool appVendorSpecified - { - get - { - return this.appVendorFieldSpecified; - } - set - { - this.appVendorFieldSpecified = value; - } - } - - /// A description line of your mobile application promotion ad(s). Description must not contain any '{' or '}' - /// characters. This is checked by the regular expression '[^\{\}]*'. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. The length of this string - /// should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string description1 - { - get - { - return this.description1Field; - } - set - { - this.description1Field = value; - } - } - - /// A description line of your mobile application promotion ad(s). Description must not contain any '{' or '}' - /// characters. This is checked by the regular expression '[^\{\}]*'. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. The length of this string - /// should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string description2 - { - get - { - return this.description2Field; - } - set - { - this.description2Field = value; - } - } - - /// A description line of your mobile application promotion ad(s). Description must not contain any '{' or '}' - /// characters. This is checked by the regular expression '[^\{\}]*'. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. The length of this string - /// should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string description3 - { - get - { - return this.description3Field; - } - set - { - this.description3Field = value; - } - } - - /// A description line of your mobile application promotion ad(s). Description must not contain any '{' or '}' - /// characters. This is checked by the regular expression '[^\{\}]*'. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. The length of this string - /// should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string description4 - { - get - { - return this.description4Field; - } - set - { - this.description4Field = value; - } - } - - /// MediaIds for YouTube videos to be shown to users when advertising on video - /// networks. - /// - [System.Xml.Serialization.XmlElementAttribute("youtubeVideoMediaIds", Order = 6)] - public long[] youtubeVideoMediaIds - { - get - { - return this.youtubeVideoMediaIdsField; - } - set - { - this.youtubeVideoMediaIdsField = value; - } - } - - /// MediaIds for landscape images to be used in creatives to be shown to users when - /// advertising on display networks. - /// - [System.Xml.Serialization.XmlElementAttribute("imageMediaIds", Order = 7)] - public long[] imageMediaIds - { - get - { - return this.imageMediaIdsField; - } - set - { - this.imageMediaIdsField = value; - } - } - - /// Represents the goal towards which the bidding strategy, of this universal app - /// campaign, should optimize for. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public UniversalAppBiddingStrategyGoalType universalAppBiddingStrategyGoalType - { - get - { - return this.universalAppBiddingStrategyGoalTypeField; - } - set - { - this.universalAppBiddingStrategyGoalTypeField = value; - this.universalAppBiddingStrategyGoalTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool universalAppBiddingStrategyGoalTypeSpecified - { - get - { - return this.universalAppBiddingStrategyGoalTypeFieldSpecified; - } - set - { - this.universalAppBiddingStrategyGoalTypeFieldSpecified = value; - } - } - - /// Operations for YouTube Video MediaIds. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public ListOperations youtubeVideoMediaIdsOps - { - get - { - return this.youtubeVideoMediaIdsOpsField; - } - set - { - this.youtubeVideoMediaIdsOpsField = value; - } - } - - /// Operations for Image MediaIds. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public ListOperations imageMediaIdsOps - { - get - { - return this.imageMediaIdsOpsField; - } - set - { - this.imageMediaIdsOpsField = value; - } - } - - /// Ads policy decisions associated with asset(s). - /// - [System.Xml.Serialization.XmlElementAttribute("adsPolicyDecisions", Order = 11)] - public UniversalAppCampaignAdsPolicyDecisions[] adsPolicyDecisions - { - get - { - return this.adsPolicyDecisionsField; - } - set - { - this.adsPolicyDecisionsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field UniversalAppCampaignSettingAppId = new Field("UniversalAppCampaignSettingAppId", true, false); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field UniversalAppCampaignSettingAppId = Fields.UniversalAppCampaignSettingAppId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field UniversalAppCampaignSettingAppId = Fields.UniversalAppCampaignSettingAppId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The Vendor, i.e. application store that distributes mobile applications. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MobileApplicationVendor - { - VENDOR_UNKNOWN = 0, - /// Mobile application vendor for apple app store. - /// - VENDOR_APPLE_APP_STORE = 1, - /// Mobile application vendor for google market. - /// - VENDOR_GOOGLE_MARKET = 2, - } - - - /// Represents the goal towards which the bidding strategy, of a universal app - /// campaign, should optimize for. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum UniversalAppBiddingStrategyGoalType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The bidding strategy of the universal app campaign should aim to maximize - /// installation of the app. - /// - OPTIMIZE_FOR_INSTALL_CONVERSION_VOLUME = 1, - /// The bidding strategy of the universal app campaign should aim to maximize the - /// selected in-app conversions' volume. - /// - OPTIMIZE_FOR_IN_APP_CONVERSION_VOLUME = 2, - /// The bidding strategy of the universal app campaign should aim to maximize all - /// conversions' value, i.e., install + selected in-app conversions. NOTE: This - /// value cannot be set by external clients, but it can be retrieved using get. - /// - OPTIMIZE_FOR_TOTAL_CONVERSION_VALUE = 3, - /// The bidding strategy of the universal app campaign should aim to maximize just - /// the selected in-app conversion's volume, while achieving or exceeding target - /// cost per in-app conversion. - /// - OPTIMIZE_FOR_TARGET_IN_APP_CONVERSION = 4, - /// The bidding strategy of the universal app campaign should aim to maximize all - /// conversions' value, i.e., install + selected in-app conversions while achieving - /// or exceeding target return on advertising spend. - /// - OPTIMIZE_FOR_RETURN_ON_ADVERTISING_SPEND = 5, - } - - - /// Represents a collection of settings related to ads geotargeting.

AdWords ads - /// can be geotargeted using Location of Presence (LOP), Area of - /// Interest (AOI), or both. LOP is the physical location of the user - /// performing the search; AOI is the geographical region in which the searcher is - /// interested. For example, if a user in New York City performs a search "hotels - /// california", their LOP is New York City and their AOI is California.

- ///

Additionally, ads can be positively or negatively geotargeted. - /// An ad that is positively geotargeted to New York City only appears to users - /// whose location is related (via AOI or LOP) to New York City. An ad that is - /// negatively geotargeted to New York City appears for all users - /// except those whose location is related to New York City. Ads can only be - /// negatively geotargeted if a positive geotargeting is also supplied, and the - /// negatively geotargeted region must be contained within the positive region.

- ///

Geotargeting settings allow ads to be targeted in the following way:

    - ///
  • Positively geotargeted using solely AOI, solely LOP, or either.
  • - ///
  • Negatively geotargeted using solely LOP, or both.
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GeoTargetTypeSetting : Setting - { - private GeoTargetTypeSettingPositiveGeoTargetType positiveGeoTargetTypeField; - - private bool positiveGeoTargetTypeFieldSpecified; - - private GeoTargetTypeSettingNegativeGeoTargetType negativeGeoTargetTypeField; - - private bool negativeGeoTargetTypeFieldSpecified; - - /// The setting used for positive geotargeting in this particular campaign. - ///

Again, the campaign can be positively targeted using solely LOP, solely AOI, - /// or either. Positive targeting triggers ads only for users whose location - /// is related to the given locations.

The default value is DONT_CARE.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public GeoTargetTypeSettingPositiveGeoTargetType positiveGeoTargetType - { - get - { - return this.positiveGeoTargetTypeField; - } - set - { - this.positiveGeoTargetTypeField = value; - this.positiveGeoTargetTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool positiveGeoTargetTypeSpecified - { - get - { - return this.positiveGeoTargetTypeFieldSpecified; - } - set - { - this.positiveGeoTargetTypeFieldSpecified = value; - } - } - - /// The setting used for negative geotargeting in this particular campaign. - ///

Again, the campaign can be negatively targeted using solely LOP or both AOI - /// and LOP. Negative targeting triggers ads for all users except - /// those whose location is related to the given locations.

The default value - /// is DONT_CARE.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public GeoTargetTypeSettingNegativeGeoTargetType negativeGeoTargetType - { - get - { - return this.negativeGeoTargetTypeField; - } - set - { - this.negativeGeoTargetTypeField = value; - this.negativeGeoTargetTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool negativeGeoTargetTypeSpecified - { - get - { - return this.negativeGeoTargetTypeFieldSpecified; - } - set - { - this.negativeGeoTargetTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The various signals a positive location target may use. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "GeoTargetTypeSetting.PositiveGeoTargetType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum GeoTargetTypeSettingPositiveGeoTargetType - { - /// Specifies that either AOI or LOP may trigger the ad. - /// - DONT_CARE = 0, - /// Specifies that the ad is triggered only if the user's AOI matches. - /// - AREA_OF_INTEREST = 1, - /// Specifies that the ad is triggered only if the user's LOP matches. - /// - LOCATION_OF_PRESENCE = 2, - } - - - /// The various signals a negative location target may use. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "GeoTargetTypeSetting.NegativeGeoTargetType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum GeoTargetTypeSettingNegativeGeoTargetType - { - /// Specifies that a user is excluded from seeing the ad if either their AOI or - /// their LOP matches the geo target. - /// - DONT_CARE = 0, - /// Specifies that a user is excluded from seeing the ad only if their LOP matches - /// the geo target. - /// - LOCATION_OF_PRESENCE = 1, - } - - - /// Setting for controlling Dynamic Search Ads (DSA). Contains the domain name and - /// the language used by the DSA system to automatically generate landing pages and - /// keywords for a campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DynamicSearchAdsSetting : Setting - { - private string domainNameField; - - private string languageCodeField; - - private bool useSuppliedUrlsOnlyField; - - private bool useSuppliedUrlsOnlyFieldSpecified; - - private PageFeed pageFeedField; - - /// The Internet domain name that this setting represents. E.g. "google.com" or - /// "www.google.com". This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string domainName - { - get - { - return this.domainNameField; - } - set - { - this.domainNameField = value; - } - } - - /// A language code that indicates what language the contents of the domain is in. - /// E.g. "en" This field is required and should - /// not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string languageCode - { - get - { - return this.languageCodeField; - } - set - { - this.languageCodeField = value; - } - } - - /// A toggle for the advertiser to decide if they want this campaign to use the - /// advertiser supplied URLs only. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool useSuppliedUrlsOnly - { - get - { - return this.useSuppliedUrlsOnlyField; - } - set - { - this.useSuppliedUrlsOnlyField = value; - this.useSuppliedUrlsOnlySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool useSuppliedUrlsOnlySpecified - { - get - { - return this.useSuppliedUrlsOnlyFieldSpecified; - } - set - { - this.useSuppliedUrlsOnlyFieldSpecified = value; - } - } - - /// Page feeds associated with this campaign. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public PageFeed pageFeed - { - get - { - return this.pageFeedField; - } - set - { - this.pageFeedField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A frequency cap is the maximum number of times an ad (or some set of ads) can be - /// shown to a user over a particular time period. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FrequencyCap - { - private long impressionsField; - - private bool impressionsFieldSpecified; - - private TimeUnit timeUnitField; - - private bool timeUnitFieldSpecified; - - private Level levelField; - - private bool levelFieldSpecified; - - /// Maximum number of impressions allowed during the time range by this cap. To - /// remove the frequency cap on a campaign, set this field to 0. This field can be selected using the value - /// "FrequencyCapMaxImpressions".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long impressions - { - get - { - return this.impressionsField; - } - set - { - this.impressionsField = value; - this.impressionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool impressionsSpecified - { - get - { - return this.impressionsFieldSpecified; - } - set - { - this.impressionsFieldSpecified = value; - } - } - - /// Unit of time the cap is defined at. Only the Day, Week and Month time units are - /// supported. This field can be selected using - /// the value "TimeUnit".This field can - /// be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public TimeUnit timeUnit - { - get - { - return this.timeUnitField; - } - set - { - this.timeUnitField = value; - this.timeUnitSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool timeUnitSpecified - { - get - { - return this.timeUnitFieldSpecified; - } - set - { - this.timeUnitFieldSpecified = value; - } - } - - /// The level on which the cap is to be applied (creative/adgroup). Cap is applied - /// to all the entities of this level in the campaign. This field can be selected using the value "Level".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Level level - { - get - { - return this.levelField; - } - set - { - this.levelField = value; - this.levelSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool levelSpecified - { - get - { - return this.levelFieldSpecified; - } - set - { - this.levelFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FrequencyCapMaxImpressions = new Field("FrequencyCapMaxImpressions", true, true); - - public static readonly Field TimeUnit = new Field("TimeUnit", true, true); - - public static readonly Field Level = new Field("Level", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FrequencyCapMaxImpressions = Fields.FrequencyCapMaxImpressions; - - public static readonly Field TimeUnit = Fields.TimeUnit; - - public static readonly Field Level = Fields.Level; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FrequencyCapMaxImpressions = Fields.FrequencyCapMaxImpressions; - - public static readonly Field TimeUnit = Fields.TimeUnit; - - public static readonly Field Level = Fields.Level; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Unit of time the cap is defined at. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum TimeUnit - { - MINUTE = 0, - HOUR = 1, - DAY = 2, - WEEK = 3, - MONTH = 4, - LIFETIME = 5, - } - - - /// The level on which the cap is to be applied. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum Level - { - /// The cap is applied at the creative level. - /// - CREATIVE = 0, - /// The cap is applied at the ad group level. - /// - ADGROUP = 1, - /// The cap is applied at the campaign level. - /// - CAMPAIGN = 2, - /// This value cannot be set by the user and sent to the AdWords API servers, as it - /// would generate a RejectedError. It can only be received by the user from the - /// AdWords API servers and it means that a new value available in a newer API - /// release version is not known in the current API release version. If the user - /// encounters this value, it means an upgrade is required in order to take - /// advantage of the latest AdWords API functionality. Used for return value only. An enumeration could not be processed, - /// typically due to incompatibility with your WSDL version. - /// - UNKNOWN = 3, - } - - - /// Eligibility data for Campaign to transition to Conversion Optimizer - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConversionOptimizerEligibility - { - private bool eligibleField; - - private bool eligibleFieldSpecified; - - private ConversionOptimizerEligibilityRejectionReason[] rejectionReasonsField; - - /// If the campaign is eligible to enter conversion optimizer. This field can be selected using the value - /// "Eligible". This field is read only and - /// will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool eligible - { - get - { - return this.eligibleField; - } - set - { - this.eligibleField = value; - this.eligibleSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool eligibleSpecified - { - get - { - return this.eligibleFieldSpecified; - } - set - { - this.eligibleFieldSpecified = value; - } - } - - /// Reason why a campaign would be rejected for conversion optimizer. This field can be selected using the value - /// "RejectionReasons". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("rejectionReasons", Order = 1)] - public ConversionOptimizerEligibilityRejectionReason[] rejectionReasons - { - get - { - return this.rejectionReasonsField; - } - set - { - this.rejectionReasonsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Eligible = new Field("Eligible", false, true); - - public static readonly Field RejectionReasons = new Field("RejectionReasons", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Eligible = Fields.Eligible; - - public static readonly Field RejectionReasons = Fields.RejectionReasons; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConversionOptimizerEligibility.RejectionReason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConversionOptimizerEligibilityRejectionReason - { - /// Campaign is not active - /// - CAMPAIGN_IS_NOT_ACTIVE = 0, - /// Conversion optimizer is available to only Manual CPC campaign - /// - NOT_CPC_CAMPAIGN = 1, - /// Conversion tracking is not enabled for the Campaign - /// - CONVERSION_TRACKING_NOT_ENABLED = 2, - /// The campaign does not meet the requirement to have a sufficient count of - /// conversions. - /// - NOT_ENOUGH_CONVERSIONS = 3, - UNKNOWN = 4, - } - - - /// Budgets are used for managing the amount of money spent on AdWords. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Budget - { - private long budgetIdField; - - private bool budgetIdFieldSpecified; - - private string nameField; - - private Money amountField; - - private BudgetBudgetDeliveryMethod deliveryMethodField; - - private bool deliveryMethodFieldSpecified; - - private int referenceCountField; - - private bool referenceCountFieldSpecified; - - private bool isExplicitlySharedField; - - private bool isExplicitlySharedFieldSpecified; - - private BudgetBudgetStatus statusField; - - private bool statusFieldSpecified; - - /// A Budget is created using the BudgetService ADD operation and is assigned a - /// BudgetId. The BudgetId is used when modifying the Budget with BudgetService, or - /// associating the Budget to a Campaign with CampaignService. A BudgetId can be - /// shared across different campaigns--the system will then allocate the Budget - /// among the Campaigns to get the optimum result. This field can be selected using the value "BudgetId".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long budgetId - { - get - { - return this.budgetIdField; - } - set - { - this.budgetIdField = value; - this.budgetIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool budgetIdSpecified - { - get - { - return this.budgetIdFieldSpecified; - } - set - { - this.budgetIdFieldSpecified = value; - } - } - - /// Name of the Budget. When creating a Budget through BudgetService, every - /// explicitly shared Budget must have a non-null non-empty name. In addition, all - /// explicitly shared Budget names owned by an account must be distinct. Budgets - /// that are not explicitly shared derive their name from the attached Campaign's - /// name. This field can be selected using the - /// value "BudgetName".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: REMOVE. The length of this string should be between 1 and 255, inclusive, - /// in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Amount of budget in the local currency for the account. This value represents an - /// average daily budget amount; the actual daily costs might vary. See Charges and your daily - /// budget. This field can be selected using - /// the value "Amount".This field can be - /// filtered on. This field must be greater - /// than or equal to 1. This field is read - /// only and will be ignored when sent to the API for the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Money amount - { - get - { - return this.amountField; - } - set - { - this.amountField = value; - } - } - - /// Delivery method for the Budget which determines the rate at which the Budget is - /// spent. Defaults to STANDARD and can be changed through BudgetService ADD or SET - /// operations. This field can be selected using - /// the value "DeliveryMethod". This field - /// is read only and will be ignored when sent to the API for the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public BudgetBudgetDeliveryMethod deliveryMethod - { - get - { - return this.deliveryMethodField; - } - set - { - this.deliveryMethodField = value; - this.deliveryMethodSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool deliveryMethodSpecified - { - get - { - return this.deliveryMethodFieldSpecified; - } - set - { - this.deliveryMethodFieldSpecified = value; - } - } - - /// Number of campaigns actively using this budget. This field is only populated for - /// Get operations. This field can be selected - /// using the value "BudgetReferenceCount".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public int referenceCount - { - get - { - return this.referenceCountField; - } - set - { - this.referenceCountField = value; - this.referenceCountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool referenceCountSpecified - { - get - { - return this.referenceCountFieldSpecified; - } - set - { - this.referenceCountFieldSpecified = value; - } - } - - /// If true, this budget was created with the purpose of sharing this budget across - /// one or more campaigns.

If false, this budget was created with the intention - /// to be dedicatedly used with a single campaign, and the Budget's name and status - /// will stay in the sync with the associated Campaign's name and status. Attempting - /// to share this budget with a second Campaign will result in an error.

This field can be selected using the value - /// "IsBudgetExplicitlyShared".This field - /// can be filtered on. This field is read - /// only and will be ignored when sent to the API for the following Operators: REMOVE. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool isExplicitlyShared - { - get - { - return this.isExplicitlySharedField; - } - set - { - this.isExplicitlySharedField = value; - this.isExplicitlySharedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isExplicitlySharedSpecified - { - get - { - return this.isExplicitlySharedFieldSpecified; - } - set - { - this.isExplicitlySharedFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "BudgetStatus".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public BudgetBudgetStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field BudgetId = new Field("BudgetId", true, true); - - public static readonly Field BudgetName = new Field("BudgetName", true, true); - - public static readonly Field Amount = new Field("Amount", true, true); - - public static readonly Field DeliveryMethod = new Field("DeliveryMethod", false, true); - - public static readonly Field BudgetReferenceCount = new Field("BudgetReferenceCount", true, true); - - public static readonly Field IsBudgetExplicitlyShared = new Field("IsBudgetExplicitlyShared", true, true); - - public static readonly Field BudgetStatus = new Field("BudgetStatus", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field BudgetId = Fields.BudgetId; - - public static readonly Field BudgetName = Fields.BudgetName; - - public static readonly Field Amount = Fields.Amount; - - public static readonly Field DeliveryMethod = Fields.DeliveryMethod; - - public static readonly Field BudgetReferenceCount = Fields.BudgetReferenceCount; - - public static readonly Field IsBudgetExplicitlyShared = Fields.IsBudgetExplicitlyShared; - - public static readonly Field BudgetStatus = Fields.BudgetStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field BudgetId = Fields.BudgetId; - - public static readonly Field BudgetName = Fields.BudgetName; - - public static readonly Field Amount = Fields.Amount; - - public static readonly Field BudgetReferenceCount = Fields.BudgetReferenceCount; - - public static readonly Field IsBudgetExplicitlyShared = Fields.IsBudgetExplicitlyShared; - - public static readonly Field BudgetStatus = Fields.BudgetStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Budget delivery methods. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Budget.BudgetDeliveryMethod", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BudgetBudgetDeliveryMethod - { - /// The budget server will throttle serving evenly across the entire time period. - /// - STANDARD = 0, - /// The budget server will not throttle serving, and ads will serve as fast as - /// possible. - /// - ACCELERATED = 1, - UNKNOWN = 2, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Budget.BudgetStatus", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BudgetBudgetStatus - { - ENABLED = 0, - REMOVED = 1, - UNKNOWN = 2, - } - - - /// Data representing an AdWords campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Campaign - { - private long idField; - - private bool idFieldSpecified; - - private long campaignGroupIdField; - - private bool campaignGroupIdFieldSpecified; - - private string nameField; - - private CampaignStatus statusField; - - private bool statusFieldSpecified; - - private ServingStatus servingStatusField; - - private bool servingStatusFieldSpecified; - - private string startDateField; - - private string endDateField; - - private Budget budgetField; - - private ConversionOptimizerEligibility conversionOptimizerEligibilityField; - - private AdServingOptimizationStatus adServingOptimizationStatusField; - - private bool adServingOptimizationStatusFieldSpecified; - - private FrequencyCap frequencyCapField; - - private Setting[] settingsField; - - private AdvertisingChannelType advertisingChannelTypeField; - - private bool advertisingChannelTypeFieldSpecified; - - private AdvertisingChannelSubType advertisingChannelSubTypeField; - - private bool advertisingChannelSubTypeFieldSpecified; - - private NetworkSetting networkSettingField; - - private Label[] labelsField; - - private BiddingStrategyConfiguration biddingStrategyConfigurationField; - - private CampaignTrialType campaignTrialTypeField; - - private bool campaignTrialTypeFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private String_StringMapEntry[] forwardCompatibilityMapField; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private CustomParameters urlCustomParametersField; - - private VanityPharma vanityPharmaField; - - private SelectiveOptimization selectiveOptimizationField; - - /// ID of this campaign. This field can be - /// selected using the value "Id".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Id of the campaign group this campaign belongs to. This field can be selected using the value - /// "CampaignGroupId".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long campaignGroupId - { - get - { - return this.campaignGroupIdField; - } - set - { - this.campaignGroupIdField = value; - this.campaignGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignGroupIdSpecified - { - get - { - return this.campaignGroupIdFieldSpecified; - } - set - { - this.campaignGroupIdFieldSpecified = value; - } - } - - /// Name of this campaign. This field is required and should not be - /// null for ADD operations. For SET and REMOVE operations, this can be - /// used to address the campaign by name when the campaign is ENABLED or PAUSED. - /// Removed campaigns cannot be addressed by name. If you wish to rename a campaign, - /// you must provide the ID. This field can be - /// selected using the value "Name".This - /// field can be filtered on. Campaign - /// names must not contain any null (code point 0x0), NL line feed (code point 0xA) - /// or carriage return (code point 0xD) characters. This is checked by the regular - /// expression '[^\x00\x0A\x0D]*'. This - /// string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Status of this campaign. On add, defaults to ENABLED. This field can be selected using the value - /// "Status".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public CampaignStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Serving status. This field can be selected - /// using the value "ServingStatus".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public ServingStatus servingStatus - { - get - { - return this.servingStatusField; - } - set - { - this.servingStatusField = value; - this.servingStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool servingStatusSpecified - { - get - { - return this.servingStatusFieldSpecified; - } - set - { - this.servingStatusFieldSpecified = value; - } - } - - /// Date the campaign begins. On add, defaults to the current day in the parent - /// account's local timezone. The date's format should be YYYYMMDD. This field can be selected using the value - /// "StartDate".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string startDate - { - get - { - return this.startDateField; - } - set - { - this.startDateField = value; - } - } - - /// Date the campaign ends. On add, defaults to 20371230, which means - /// the campaign will run indefinitely. To set an existing campaign to run - /// indefinitely, set this field to 20371230. The date's format - /// should be YYYYMMDD. This field can be - /// selected using the value "EndDate".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string endDate - { - get - { - return this.endDateField; - } - set - { - this.endDateField = value; - } - } - - /// Current base budget of campaign; default if no custom budgets are enabled. This - /// field is readonly for draft campaigns and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public Budget budget - { - get - { - return this.budgetField; - } - set - { - this.budgetField = value; - } - } - - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public ConversionOptimizerEligibility conversionOptimizerEligibility - { - get - { - return this.conversionOptimizerEligibilityField; - } - set - { - this.conversionOptimizerEligibilityField = value; - } - } - - /// Ad serving optimization status. This field - /// can be selected using the value "AdServingOptimizationStatus". This field may only be set to - /// CONVERSION_OPTIMIZE for campaign channel subtype UNIVERSAL_APP_CAMPAIGN. - /// This field may only be set to - /// CONVERSION_OPTIMIZE for campaign channel type DISPLAY with campaign channel - /// subtype DISPLAY_SMART_CAMPAIGN. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public AdServingOptimizationStatus adServingOptimizationStatus - { - get - { - return this.adServingOptimizationStatusField; - } - set - { - this.adServingOptimizationStatusField = value; - this.adServingOptimizationStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adServingOptimizationStatusSpecified - { - get - { - return this.adServingOptimizationStatusFieldSpecified; - } - set - { - this.adServingOptimizationStatusFieldSpecified = value; - } - } - - /// Frequency cap for this campaign. This - /// field may not be set for campaign channel subtypes: DISPLAY_SMART_CAMPAIGN, - /// UNIVERSAL_APP_CAMPAIGN, SEARCH_MOBILE_APP. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public FrequencyCap frequencyCap - { - get - { - return this.frequencyCapField; - } - set - { - this.frequencyCapField = value; - } - } - - /// List of settings for the campaign. This - /// field can be selected using the value "Settings". - /// - [System.Xml.Serialization.XmlElementAttribute("settings", Order = 11)] - public Setting[] settings - { - get - { - return this.settingsField; - } - set - { - this.settingsField = value; - } - } - - /// The primary serving target for ads within this campaign. The targeting options - /// can be refined in NetworkSetting. May only be set for new campaigns. This field - /// is required and should not be when it is contained within Operators : ADD This - /// field can be selected using the value "AdvertisingChannelType".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public AdvertisingChannelType advertisingChannelType - { - get - { - return this.advertisingChannelTypeField; - } - set - { - this.advertisingChannelTypeField = value; - this.advertisingChannelTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool advertisingChannelTypeSpecified - { - get - { - return this.advertisingChannelTypeFieldSpecified; - } - set - { - this.advertisingChannelTypeFieldSpecified = value; - } - } - - /// Optional refinement of advertisingChannelType. Must be a valid sub-type of the - /// parent channel type. May only be set for new campaigns and cannot be changed - /// once set. This field can be selected using - /// the value "AdvertisingChannelSubType".This field can be filtered on. This field is read only and will be ignored when sent to the API for - /// the following Operators: SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public AdvertisingChannelSubType advertisingChannelSubType - { - get - { - return this.advertisingChannelSubTypeField; - } - set - { - this.advertisingChannelSubTypeField = value; - this.advertisingChannelSubTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool advertisingChannelSubTypeSpecified - { - get - { - return this.advertisingChannelSubTypeFieldSpecified; - } - set - { - this.advertisingChannelSubTypeFieldSpecified = value; - } - } - - /// Network settings for the campaign indicating where the campaign will serve. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public NetworkSetting networkSetting - { - get - { - return this.networkSettingField; - } - set - { - this.networkSettingField = value; - } - } - - /// Labels that are attached to the campaign. To associate an existing Label to an existing Campaign, use CampaignService#mutateLabel with the ADD - /// operator. To remove an associated Label from the Campaign, use CampaignService#mutateLabel with the - /// REMOVE operator. To filter on Labels, use one of Predicate.Operator#CONTAINS_ALL, Predicate.Operator#CONTAINS_ANY, Predicate.Operator#CONTAINS_NONE - /// operators with a list of Label ids. This field can be selected using the value "Labels".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: REMOVE and - /// SET. - /// - [System.Xml.Serialization.XmlElementAttribute("labels", Order = 15)] - public Label[] labels - { - get - { - return this.labelsField; - } - set - { - this.labelsField = value; - } - } - - /// Bidding configuration for this campaign. To change an existing campaign's - /// bidding strategy, set the BiddingStrategyConfiguration#biddingStrategyType - /// or BiddingStrategyConfiguration#biddingScheme. - /// This field is required and should not be null when it is contained - /// within Operators : ADD - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 16)] - public BiddingStrategyConfiguration biddingStrategyConfiguration - { - get - { - return this.biddingStrategyConfigurationField; - } - set - { - this.biddingStrategyConfigurationField = value; - } - } - - /// Indicates if this campaign is a normal campaign, a draft campaign, or a trial - /// campaign. This field can be selected using - /// the value "CampaignTrialType".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 17)] - public CampaignTrialType campaignTrialType - { - get - { - return this.campaignTrialTypeField; - } - set - { - this.campaignTrialTypeField = value; - this.campaignTrialTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignTrialTypeSpecified - { - get - { - return this.campaignTrialTypeFieldSpecified; - } - set - { - this.campaignTrialTypeFieldSpecified = value; - } - } - - /// ID of the base campaign of the draft or trial campaign. For base campaigns, this - /// is equal to the campaign ID. This field is only returned on get requests. This field can be selected using the value - /// "BaseCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 18)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// This Map provides a place to put new features and settings in older versions of - /// the AdWords API in the rare instance we need to introduce a new feature in an - /// older version. It is presently unused. Do not set a value. - /// - [System.Xml.Serialization.XmlElementAttribute("forwardCompatibilityMap", Order = 19)] - public String_StringMapEntry[] forwardCompatibilityMap - { - get - { - return this.forwardCompatibilityMapField; - } - set - { - this.forwardCompatibilityMapField = value; - } - } - - /// URL template for constructing a tracking URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "TrackingUrlTemplate".This field can be filtered on. This field may not be set for campaign channel subtype - /// UNIVERSAL_APP_CAMPAIGN.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 20)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// URL template for appending params to Final URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "FinalUrlSuffix".This field can be filtered on. This field may not be set for campaign channel type - /// MULTI_CHANNEL.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 21)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. This field can be selected using the value - /// "UrlCustomParameters". This field - /// may not be set for campaign channel subtype UNIVERSAL_APP_CAMPAIGN. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 22)] - public CustomParameters urlCustomParameters - { - get - { - return this.urlCustomParametersField; - } - set - { - this.urlCustomParametersField = value; - } - } - - /// Describes how unbranded pharma ads will be displayed. This field may not be set for campaign channel subtype - /// UNIVERSAL_APP_CAMPAIGN. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 23)] - public VanityPharma vanityPharma - { - get - { - return this.vanityPharmaField; - } - set - { - this.vanityPharmaField = value; - } - } - - /// Selective optimization setting for this campaign, which includes a set of - /// conversion types to optimize this campaign towards. This field can be selected using the value - /// "SelectiveOptimization". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 24)] - public SelectiveOptimization selectiveOptimization - { - get - { - return this.selectiveOptimizationField; - } - set - { - this.selectiveOptimizationField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field CampaignGroupId = new Field("CampaignGroupId", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field ServingStatus = new Field("ServingStatus", true, true); - - public static readonly Field StartDate = new Field("StartDate", true, true); - - public static readonly Field EndDate = new Field("EndDate", true, true); - - public static readonly Field AdServingOptimizationStatus = new Field("AdServingOptimizationStatus", false, true); - - public static readonly Field Settings = new Field("Settings", false, true); - - public static readonly Field AdvertisingChannelType = new Field("AdvertisingChannelType", true, true); - - public static readonly Field AdvertisingChannelSubType = new Field("AdvertisingChannelSubType", true, true); - - public static readonly Field Labels = new Field("Labels", true, true); - - public static readonly Field CampaignTrialType = new Field("CampaignTrialType", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field TrackingUrlTemplate = new Field("TrackingUrlTemplate", true, true); - - public static readonly Field FinalUrlSuffix = new Field("FinalUrlSuffix", true, true); - - public static readonly Field UrlCustomParameters = new Field("UrlCustomParameters", false, true); - - public static readonly Field SelectiveOptimization = new Field("SelectiveOptimization", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CampaignGroupId = Fields.CampaignGroupId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field ServingStatus = Fields.ServingStatus; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static readonly Field AdServingOptimizationStatus = Fields.AdServingOptimizationStatus; - - public static readonly Field Settings = Fields.Settings; - - public static readonly Field AdvertisingChannelType = Fields.AdvertisingChannelType; - - public static readonly Field AdvertisingChannelSubType = Fields.AdvertisingChannelSubType; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field CampaignTrialType = Fields.CampaignTrialType; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field TrackingUrlTemplate = Fields.TrackingUrlTemplate; - - public static readonly Field FinalUrlSuffix = Fields.FinalUrlSuffix; - - public static readonly Field UrlCustomParameters = Fields.UrlCustomParameters; - - public static readonly Field SelectiveOptimization = Fields.SelectiveOptimization; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CampaignGroupId = Fields.CampaignGroupId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field ServingStatus = Fields.ServingStatus; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static readonly Field AdvertisingChannelType = Fields.AdvertisingChannelType; - - public static readonly Field AdvertisingChannelSubType = Fields.AdvertisingChannelSubType; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field CampaignTrialType = Fields.CampaignTrialType; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field TrackingUrlTemplate = Fields.TrackingUrlTemplate; - - public static readonly Field FinalUrlSuffix = Fields.FinalUrlSuffix; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Campaign status. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Campaign is currently serving ads depending on budget information. - /// - ENABLED = 1, - /// Campaign has been paused by the user. - /// - PAUSED = 2, - /// Campaign has been removed. - /// - REMOVED = 3, - } - - - /// Campaign serving status. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ServingStatus - { - /// The campaign is currently serving ads. - /// - SERVING = 0, - /// This is the catch-all if none of the other statuses make sense. Such a campaign - /// is not serving, but none of the other statuses are sensible options. - /// - NONE = 1, - /// The campaign end date has been past. - /// - ENDED = 2, - /// The campaign start date has not yet been reached. - /// - PENDING = 3, - /// The campaign has been suspended probably from lack of allocated funds. - /// - SUSPENDED = 4, - } - - - /// Ad serving status of campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdServingOptimizationStatus - { - /// Ad serving is optimized based on CTR for the campaign. - /// - OPTIMIZE = 0, - /// Ad serving is optimized based on CTR * Conversion for the campaign. If the - /// campaign is not in the conversion optimizer bidding strategy, it will default to - /// OPTIMIZED. - /// - CONVERSION_OPTIMIZE = 1, - /// Ads are rotated evenly for 90 days, then optimized for clicks. - /// - ROTATE = 2, - /// Show lower performing ads more evenly with higher performing ads, and do not - /// optimize. - /// - ROTATE_INDEFINITELY = 3, - /// Ad serving optimization status is not available. - /// - UNAVAILABLE = 4, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 5, - } - - - /// The channel type a campaign may target to serve on. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdvertisingChannelType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Search Network. Includes display bundled, and Search+ campaigns. - /// - SEARCH = 1, - /// Google Display Network only. - /// - DISPLAY = 2, - /// Shopping campaigns serve on the shopping property and on google.com search - /// results. - /// - SHOPPING = 3, - /// Universal app campaigns that target multiple channels across search, display, - /// youtube, etc. - /// - MULTI_CHANNEL = 4, - } - - - /// A non-mutable specialization of an Advertising Channel. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdvertisingChannelSubType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Mobile App Campaigns for Search - /// - SEARCH_MOBILE_APP = 1, - /// Mobile App Campaigns for Display - /// - DISPLAY_MOBILE_APP = 2, - /// AdWords Express campaigns for search. - /// - SEARCH_EXPRESS = 3, - /// AdWords Express campaigns for display. - /// - DISPLAY_EXPRESS = 4, - /// Campaigns specialized for advertising mobile app installations, that targets - /// multiple advertising channels across search, display and youtube. Google manages - /// the keywords and ads for these campaigns. - /// - UNIVERSAL_APP_CAMPAIGN = 5, - /// Smart display campaign - /// - DISPLAY_SMART_CAMPAIGN = 8, - /// Campaigns specialized for retail advertising, that target multiple advertising - /// channels across Search, Google Display Network, and YouTube. These campaigns - /// optimize automatically towards the retailer's business objectives. - /// - SHOPPING_GOAL_OPTIMIZED_ADS = 9, - /// Gmail Ad Campaigns - /// - DISPLAY_GMAIL_AD = 7, - } - - - /// This enum is used to indicate if this campaign is a normal campaign, a draft - /// campaign, or a trial campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignTrialType - { - /// Invalid type. Should not be used except for detecting values that are incorrect, - /// or values that are not yet known to the user. Used for return value only. An enumeration could not be processed, - /// typically due to incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// This is a regular campaign created by the advertiser. - /// - BASE = 1, - /// This is a draft version of a campaign. It has some modifications from a base - /// campaign, but it does not serve or accrue stats. - /// - DRAFT = 2, - /// This is a trial version of a campaign. It has some modifications from a base - /// campaign, and a percentage of traffic is being diverted from the BASE campaign - /// to this trial campaign. - /// - TRIAL = 3, - } - - - /// Contains a set of campaigns resulting from the filtering and paging of the CampaignService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignPage : Page - { - private Campaign[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Campaign[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Indicates a problem with campaign settings. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SettingError : ApiError - { - private SettingErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The setting error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SettingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the setting error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SettingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SettingErrorReason - { - /// The campaign already has a setting of the type that is being added. - /// - DUPLICATE_SETTING_TYPE = 0, - /// The campaign setting is not available for this AdWords account. - /// - SETTING_TYPE_IS_NOT_AVAILABLE = 1, - /// The setting is not compatible with the campaign. - /// - SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN = 2, - /// The supplied TargetingSetting contains an invalid CriterionTypeGroup. See CriterionTypeGroup documentation for - /// CriterionTypeGroups allowed in Campaign or AdGroup TargetingSettings. - /// - TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP = 3, - /// Starting with AdWords API v201802, TargetingSetting must not explicitly set any - /// of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, INCOME_RANGE) - /// to false (it's okay to not set them at all, in which case the system will set - /// them to true automatically). - /// - TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = 18, - /// Starting with AdWords API v201802,TargetingSetting cannot change any of the - /// Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, INCOME_RANGE) from - /// true to false. - /// - TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = 19, - /// At least one feed id should be present. - /// - DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 17, - /// The supplied DynamicSearchAdsSetting contains an invalid domain name. - /// - DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME = 4, - /// The supplied DynamicSearchAdsSetting contains a subdomain name. - /// - DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME = 20, - /// The supplied DynamicSearchAdsSetting contains an invalid language code. - /// - DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE = 5, - /// TargetingSettings in search campaigns should not have - /// CriterionTypeGroup.PLACEMENT set to targetAll. - /// - TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN = 6, - /// Duplicate description in universal app setting description field. - /// - UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13, - /// Description line width is too long in universal app setting description field. - /// - UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14, - /// Universal app setting appId field cannot be modified for COMPLETE campaigns. - /// - UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15, - /// YoutubeVideoMediaIds in universal app setting cannot exceed size limit. - /// - TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 11, - /// ImageMediaIds in universal app setting cannot exceed size limit. - /// - TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 12, - /// Media is incompatible for universal app campaign. - /// - MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 16, - /// Too many exclamation marks in universal app campaign ad text ideas. - /// - TOO_MANY_EXCLAMATION_MARKS = 21, - /// Unspecified campaign setting error. Used for - /// return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 7, - } - - - /// Errors that can occur when making changes to a list using ListOperations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ListError : ApiError - { - private ListErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ListErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reason for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ListError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ListErrorReason - { - /// A request attempted to clear a list that does not support being cleared. - /// - CLEAR_UNSUPPORTED = 0, - /// The operator is invalid for the list or list element the operator was applied - /// to. - /// - INVALID_OPERATOR = 1, - /// An UPDATE or REMOVE was requested for a list element that does not exist. - /// - INVALID_ELEMENT = 2, - /// The operator list has different a size compared to the element list. - /// - LIST_LENGTH_MISMATCH = 3, - /// Duplicate elements inside list. - /// - DUPLICATE_ELEMENT = 4, - /// The API operator of the mutate being performed on the entity containing this - /// list is not supported. - /// - MUTATE_UNSUPPORTED = 5, - UNKNOWN = 6, - } - - - /// A list of all the error codes being used for date range error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DateRangeError : ApiError - { - private DateRangeErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DateRangeErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the date range error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DateRangeError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DateRangeErrorReason - { - DATE_RANGE_ERROR = 0, - /// Invalid date. - /// - INVALID_DATE = 1, - /// The start date was after the end date. - /// - START_DATE_AFTER_END_DATE = 2, - /// Cannot set date to past time - /// - CANNOT_SET_DATE_TO_PAST = 3, - /// A date was used that is past the system "last" date. - /// - AFTER_MAXIMUM_ALLOWABLE_DATE = 4, - /// Trying to change start date on a campaign that has started. - /// - CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 5, - } - - - /// Base error class for Campaign Service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignError : ApiError - { - private CampaignErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignErrorReason - { - /// A complete campaign cannot go back to being incomplete - /// - CANNOT_GO_BACK_TO_INCOMPLETE = 0, - /// Cannot target content network. - /// - CANNOT_TARGET_CONTENT_NETWORK = 20, - /// Cannot target search network. - /// - CANNOT_TARGET_SEARCH_NETWORK = 21, - /// Cannot cover search network without google search network. - /// - CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH = 22, - /// Cannot target Google Search network for a CPM campaign. - /// - CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN = 23, - /// Must target at least one network. - /// - CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK = 24, - /// Only some Google partners are allowed to target partner search network. - /// - CANNOT_TARGET_PARTNER_SEARCH_NETWORK = 25, - /// Cannot target content network only as campaign has criteria-level bidding - /// strategy. - /// - CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY = 26, - /// Cannot modify the start or end date such that the campaign duration would not - /// contain the durations of all runnable trials. - /// - CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS = 27, - /// Cannot modify dates, budget or campaign name of a trial campaign. - /// - CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN = 28, - /// Trying to modify the name of an active or paused campaign, where the name is - /// already assigned to another active or paused campaign. - /// - DUPLICATE_CAMPAIGN_NAME = 2, - /// Two fields are in conflicting modes. - /// - INCOMPATIBLE_CAMPAIGN_FIELD = 3, - /// Campaign name cannot be used. - /// - INVALID_CAMPAIGN_NAME = 4, - /// Given status is invalid. - /// - INVALID_AD_SERVING_OPTIMIZATION_STATUS = 5, - /// Error in the campaign level tracking url. - /// - INVALID_TRACKING_URL = 6, - /// Cannot set both tracking url template and tracking setting. An user has to clear - /// legacy tracking setting in order to add tracking url template. - /// - CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 7, - /// The maximum number of impressions for Frequency Cap should be an integer greater - /// than 0. - /// - MAX_IMPRESSIONS_NOT_IN_RANGE = 8, - /// Only the Day, Week and Month time units are supported. - /// - TIME_UNIT_NOT_SUPPORTED = 9, - /// Operation not allowed on a campaign whose serving status has ended - /// - INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED = 10, - /// This budget is exclusively linked to a Campaign that is using @link{Experiment}s - /// so it cannot be shared. - /// - BUDGET_CANNOT_BE_SHARED = 11, - /// Campaigns using @link{Experiment}s cannot use a shared budget. - /// - CAMPAIGN_CANNOT_USE_SHARED_BUDGET = 12, - /// A different budget cannot be assigned to a campaign when there are running or - /// scheduled trials. - /// - CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS = 29, - /// No link found between the campaign and the label. - /// - CAMPAIGN_LABEL_DOES_NOT_EXIST = 13, - /// The label has already been attached to the campaign. - /// - CAMPAIGN_LABEL_ALREADY_EXISTS = 14, - /// A ShoppingSetting was not found when creating a shopping campaign. - /// - MISSING_SHOPPING_SETTING = 15, - /// The country in shopping setting is not an allowed country. - /// - INVALID_SHOPPING_SALES_COUNTRY = 16, - /// Shopping merchant is not enabled for Purchases on Google. - /// - SHOPPING_MERCHANT_NOT_ALLOWED_FOR_PURCHASES_ON_GOOGLE = 32, - /// Purchases on Google not enabled for the shopping campaign's sales country. - /// - PURCHASES_ON_GOOGLE_NOT_SUPPORTED_FOR_SHOPPING_SALES_COUNTRY = 33, - /// A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a - /// UniversalAppCampaignSetting specified. - /// - MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 31, - /// The requested channel type is not available according to the customer's account - /// setting. - /// - ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 17, - /// The AdvertisingChannelSubType is not a valid subtype of the primary channel - /// type. - /// - INVALID_ADVERTISING_CHANNEL_SUB_TYPE = 18, - /// At least one conversion must be selected. - /// - AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED = 30, - /// Setting ad rotation mode for a campaign is not allowed. Ad rotation mode at - /// campaign is deprecated. - /// - CANNOT_SET_AD_ROTATION_MODE = 34, - /// Default error Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 19, - } - - - /// A list of all the error codes being used by the common budget domain package. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BudgetError : ApiError - { - private BudgetErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BudgetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the budget error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BudgetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BudgetErrorReason - { - /// The requested budget no longer exists. - /// - BUDGET_REMOVED = 0, - /// Default budget error. - /// - BUDGET_ERROR = 1, - /// The budget is associated with at least one campaign, and so the budget cannot be - /// removed. - /// - BUDGET_IN_USE = 2, - /// Customer is not whitelisted for this budget period. - /// - BUDGET_PERIOD_NOT_AVAILABLE = 3, - /// Customer cannot use CampaignService to edit a shared budget. - /// - CANNOT_EDIT_SHARED_BUDGET = 4, - /// This field is not mutable on implicitly shared budgets - /// - CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_BUDGET = 5, - /// Cannot change explicitly shared budgets back to implicitly shared ones. - /// - CANNOT_UPDATE_BUDGET_TO_IMPLICITLY_SHARED = 6, - /// An implicit budget without a name cannot be changed to explicitly shared budget. - /// - CANNOT_UPDATE_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME = 7, - /// Cannot change an implicitly shared budget to an explicitly shared one. - /// - CANNOT_UPDATE_BUDGET_TO_EXPLICITLY_SHARED = 15, - /// Only explicitly shared budgets can be used with multiple campaigns. - /// - CANNOT_USE_IMPLICITLY_SHARED_BUDGET_WITH_MULTIPLE_CAMPAIGNS = 8, - /// A budget with this name already exists. - /// - DUPLICATE_NAME = 9, - /// A money amount was not in the expected currency. - /// - MONEY_AMOUNT_IN_WRONG_CURRENCY = 10, - /// A money amount was less than the minimum CPC for currency. - /// - MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC = 11, - /// A money amount was greater than the maximum allowed. - /// - MONEY_AMOUNT_TOO_LARGE = 12, - /// A money amount was negative. - /// - NEGATIVE_MONEY_AMOUNT = 13, - /// A money amount was not a multiple of a minimum unit. - /// - NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 14, - } - - - /// Represents error codes for bidding strategy entities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddingErrors : ApiError - { - private BiddingErrorsReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BiddingErrorsReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BiddingErrors.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BiddingErrorsReason - { - /// Cannot transition to new bidding strategy. - /// - BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED = 0, - /// Bidding strategy cannot be overridden by current ad group bidding strategy. - /// - BIDDING_STRATEGY_NOT_COMPATIBLE_WITH_ADGROUP_OVERRIDES = 1, - /// Bidding strategy cannot be overridden by current criteria bidding strategy. - /// - BIDDING_STRATEGY_NOT_COMPATIBLE_WITH_ADGROUP_CRITERIA_OVERRIDES = 2, - /// Cannot override campaign bidding strategy. - /// - CAMPAIGN_BIDDING_STRATEGY_CANNOT_BE_OVERRIDDEN = 3, - /// Cannot override ad group bidding strategy. - /// - ADGROUP_BIDDING_STRATEGY_CANNOT_BE_OVERRIDDEN = 4, - /// Cannot attach bidding strategy to campaign. - /// - CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN = 5, - /// Cannot attach bidding strategy to ad group. - /// - CANNOT_ATTACH_BIDDING_STRATEGY_TO_ADGROUP = 6, - /// Cannot attach bidding strategy to criteria. - /// - CANNOT_ATTACH_BIDDING_STRATEGY_TO_ADGROUP_CRITERIA = 7, - /// Bidding strategy is not supported or cannot be used as anonymous. - /// - INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE = 8, - /// No bids may be set. The bid list must be null or empty. - /// - BIDS_NOT_ALLLOWED = 9, - /// The bid list contains two or more bids of the same type. - /// - DUPLICATE_BIDS = 10, - /// The bidding scheme does not match the bidding strategy type. - /// - INVALID_BIDDING_SCHEME = 11, - /// The type does not match the named strategy's type. - /// - INVALID_BIDDING_STRATEGY_TYPE = 12, - /// The bidding strategy type is missing. - /// - MISSING_BIDDING_STRATEGY_TYPE = 13, - /// The bid list contains a null entry. - /// - NULL_BID = 14, - /// The bid is invalid. - /// - INVALID_BID = 15, - /// Bidding strategy is not available for the account type. - /// - BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 16, - /// Conversion tracking is not enabled for the campaign for VBB transition. - /// - CONVERSION_TRACKING_NOT_ENABLED = 17, - /// Not enough conversions tracked for VBB transitions. - /// - NOT_ENOUGH_CONVERSIONS = 18, - /// Campaign can not be created with given bidding strategy. It can be transitioned - /// to the strategy, once eligible. - /// - CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY = 33, - /// Cannot target content network only as ad group uses Page One Promoted bidding - /// strategy. - /// - CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_AD_GROUP_LEVEL_POP_BIDDING_STRATEGY = 20, - /// Cannot target content network only as campaign uses Page One Promoted bidding - /// strategy. - /// - CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = 21, - /// Budget Optimizer and Target Spend bidding strategies are not supported for - /// campaigns with AdSchedule targeting. - /// - BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE = 22, - /// Pay per conversion is not available to all the customer, only few whitelisted - /// customers can use this. - /// - PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER = 23, - /// Pay per conversion is not allowed with Target CPA. - /// - PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA = 24, - /// Cannot set bidding strategy to Manual CPM for search network only campaigns. - /// - BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS = 25, - /// The bidding strategy is not supported for use in drafts or experiments. - /// - BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS = 34, - /// Bidding strategy type does not support product type ad group criterion. - /// - BIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION = 28, - /// Bid amount is too small. - /// - BID_TOO_SMALL = 29, - /// Bid amount is too big. - /// - BID_TOO_BIG = 30, - /// Bid has too many fractional digit precision. - /// - BID_TOO_MANY_FRACTIONAL_DIGITS = 31, - /// EnhancedCpcEnabled cannot be set on portfolio Target Spend strategies. - /// - ENHANCED_CPC_ENABLED_NOT_SUPPORTED_ON_PORTFOLIO_TARGET_SPEND_STRATEGY = 35, - UNKNOWN = 32, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignServiceInterface")] - public interface CampaignServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignService.mutateResponse mutate(Wrappers.CampaignService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignService.mutateRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignService.mutateLabelResponse mutateLabel(Wrappers.CampaignService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateLabelAsync(Wrappers.CampaignService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// An operation on an AdWords campaign.

Note: The - /// REMOVE operator is not supported. To remove a campaign, set its status to REMOVED.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignOperation : Operation - { - private Campaign operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Campaign operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operations for adding/removing labels from Campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignLabelOperation : Operation - { - private CampaignLabel operandField; - - /// CampaignLabel to operate on. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignLabel operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manages the labels associated with a campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignLabel - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private long labelIdField; - - private bool labelIdFieldSpecified; - - /// The id of the campaign that the label is applied to. This field is required and should not be null when it is - /// contained within Operators : ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// The id of an existing label to be applied to the campaign. This field is required and should not be - /// null when it is contained within Operators : - /// ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long labelId - { - get - { - return this.labelIdField; - } - set - { - this.labelIdField = value; - this.labelIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool labelIdSpecified - { - get - { - return this.labelIdFieldSpecified; - } - set - { - this.labelIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignReturnValue : ListReturnValue - { - private Campaign[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Campaign[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignService#mutateLabel call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignLabelReturnValue : ListReturnValue - { - private CampaignLabel[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignLabel[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage campaigns. A campaign - /// organizes one or more ad groups together and has its own budget, bidding - /// strategy, serving date range, and targeting settings (managed using CampaignCriterionService). You can also set - /// campaign-wide ad extensions using CampaignExtensionSettingService. - ///

Note: CampaignService does not support video campaigns.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignService : AdWordsSoapClient, ICampaignService - { - /// Creates a new instance of the class. - /// - public CampaignService() - { - } - - /// Creates a new instance of the class. - /// - public CampaignService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public CampaignService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CampaignService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CampaignService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the list of campaigns that meet the selector criteria. - /// the selector specifying the Campaigns to return. - /// A list of campaigns. - /// if problems occurred while fetching - /// campaign information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignServiceInterface.mutate(Wrappers.CampaignService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates, or removes campaigns.

Note: CampaignOperation does not support the - /// REMOVE operator. To remove a campaign, set its status to REMOVED.

- ///
A list of unique operations. The same campaign cannot - /// be specified in more than one operation. - /// The list of updated campaigns, returned in the same order as the - /// operations array. - /// if problems occurred while updating - /// campaign information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignOperation[] operations) - { - Wrappers.CampaignService.mutateRequest inValue = new Wrappers.CampaignService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignServiceInterface.mutateAsync(Wrappers.CampaignService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignOperation[] operations) - { - Wrappers.CampaignService.mutateRequest inValue = new Wrappers.CampaignService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignService.mutateLabelResponse Google.Api.Ads.AdWords.v201806.CampaignServiceInterface.mutateLabel(Wrappers.CampaignService.mutateLabelRequest request) - { - return base.Channel.mutateLabel(request); - } - - /// Adds labels to the campaign or removes labels from the campaign.

Add - Apply - /// an existing label to an existing campaign. The - /// campaignId must reference an existing Campaign. The labelId must reference an - /// existing label.

Remove - Removes the link between the - /// specified campaign and label.

- ///
the operations to apply. - /// a list of CampaignLabels where each entry - /// in the list is the result of applying the operation in the input list with the - /// same index. For an add operation, the returned CampaignLabel contains the - /// CampaignId and the LabelId. In the case of a remove operation, the returned - /// CampaignLabel will only have CampaignId. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.CampaignLabelOperation[] operations) - { - Wrappers.CampaignService.mutateLabelRequest inValue = new Wrappers.CampaignService.mutateLabelRequest(); - inValue.operations = operations; - Wrappers.CampaignService.mutateLabelResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignServiceInterface) (this)).mutateLabel(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignServiceInterface.mutateLabelAsync(Wrappers.CampaignService.mutateLabelRequest request) - { - return base.Channel.mutateLabelAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.CampaignLabelOperation[] operations) - { - Wrappers.CampaignService.mutateLabelRequest inValue = new Wrappers.CampaignService.mutateLabelRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignServiceInterface) (this)).mutateLabelAsync(inValue)).Result.rval); - } - - /// Returns the list of campaigns that match the query. - /// The SQL-like AWQL query string. - /// A list of campaigns. - /// if problems occur while parsing the query - /// or fetching campaign information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignBidModifierService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignBidModifierOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignBidModifierOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignBidModifierReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignBidModifierReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents an InteractionType criterion.

Possible IDs: 8000 - /// (CALLS).

A criterion of this type can only be created using - /// an ID. This is disabled for AdX when it is - /// contained within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class InteractionType : Criterion - { - } - - - /// Represents a bid-modifiable only criterion at the campaign level. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignBidModifier - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private Criterion criterionField; - - private string campaignNameField; - - private AdvertisingChannelType advertisingChannelTypeField; - - private bool advertisingChannelTypeFieldSpecified; - - private double bidModifierField; - - private bool bidModifierFieldSpecified; - - /// The campaign that the criterion is in. This - /// field can be selected using the value "CampaignId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// The criterion to which the bid modifier is applied. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// The name of the campaign the criterion is in. This field can be selected using the value - /// "CampaignName".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string campaignName - { - get - { - return this.campaignNameField; - } - set - { - this.campaignNameField = value; - } - } - - /// The advertising channel type of the campaign the criterion is in. This field can be selected using the value - /// "AdvertisingChannelType".This field - /// can be filtered on. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public AdvertisingChannelType advertisingChannelType - { - get - { - return this.advertisingChannelTypeField; - } - set - { - this.advertisingChannelTypeField = value; - this.advertisingChannelTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool advertisingChannelTypeSpecified - { - get - { - return this.advertisingChannelTypeFieldSpecified; - } - set - { - this.advertisingChannelTypeFieldSpecified = value; - } - } - - /// The bid modifier for bids when the criterion matches.

Valid modifier values - /// range from 0.1 to 10.0. This field can be selected using the value - /// "BidModifier".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD, SET.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public double bidModifier - { - get - { - return this.bidModifierField; - } - set - { - this.bidModifierField = value; - this.bidModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSpecified - { - get - { - return this.bidModifierFieldSpecified; - } - set - { - this.bidModifierFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field CampaignName = new Field("CampaignName", true, true); - - public static readonly Field AdvertisingChannelType = new Field("AdvertisingChannelType", true, true); - - public static readonly Field BidModifier = new Field("BidModifier", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static readonly Field AdvertisingChannelType = Fields.AdvertisingChannelType; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static readonly Field AdvertisingChannelType = Fields.AdvertisingChannelType; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Subset of campaign bid modifiers resulting from a call to CampaignBidModifierService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignBidModifierPage : Page - { - private CampaignBidModifier[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignBidModifier[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Base error class for CampaignBidModifier Service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignBidModifierError : ApiError - { - private CampaignBidModifierErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignBidModifierErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignBidModifierError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignBidModifierErrorReason - { - CAMPAIGN_BID_MODIFIER_ERROR = 0, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignBidModifierServiceInterface")] - public interface CampaignBidModifierServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignBidModifierPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignBidModifierService.mutateResponse mutate(Wrappers.CampaignBidModifierService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignBidModifierService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignBidModifierPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a CampaignBidModifier. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignBidModifierOperation : Operation - { - private CampaignBidModifier operandField; - - /// The CampaignBidModifier to create or mutate. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignBidModifier operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignBidModifierService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignBidModifierReturnValue : ListReturnValue - { - private CampaignBidModifier[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignBidModifier[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignBidModifierServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignBidModifierServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage campaign level bidmodifiable-only criteria. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignBidModifierService : AdWordsSoapClient, ICampaignBidModifierService - { - /// Creates a new instance of the - /// class. - public CampaignBidModifierService() - { - } - - /// Creates a new instance of the - /// class. - public CampaignBidModifierService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public CampaignBidModifierService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignBidModifierService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignBidModifierService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the list of campaign bid modifiers that meet the selector criteria. - /// specifying the CampaignBidModifiers to return. - /// A list of campaign bid modifiers. - /// if problems occurred while fetching - /// campaign bid modifier information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignBidModifierPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignBidModifierService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignBidModifierServiceInterface.mutate(Wrappers.CampaignBidModifierService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates, or deletes campaign bid modifiers. - /// A list of unique operations. - /// The list of updated campaign bid modifiers, returned in the same order - /// as the operations array. - /// if problems occurred while updating - /// campaign bid modifiers information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignBidModifierReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignBidModifierOperation[] operations) - { - Wrappers.CampaignBidModifierService.mutateRequest inValue = new Wrappers.CampaignBidModifierService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignBidModifierService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignBidModifierServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignBidModifierServiceInterface.mutateAsync(Wrappers.CampaignBidModifierService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignBidModifierOperation[] operations) - { - Wrappers.CampaignBidModifierService.mutateRequest inValue = new Wrappers.CampaignBidModifierService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignBidModifierServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of CampaignBidModifiers that - /// match the query. - /// The SQL-like AWQL query string. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignBidModifierPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// An operand in a function referring to a value in the request context. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class RequestContextOperand : FunctionArgumentOperand - { - private RequestContextOperandContextType contextTypeField; - - private bool contextTypeFieldSpecified; - - /// Type of value to be referred in the request context. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RequestContextOperandContextType contextType - { - get - { - return this.contextTypeField; - } - set - { - this.contextTypeField = value; - this.contextTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool contextTypeSpecified - { - get - { - return this.contextTypeFieldSpecified; - } - set - { - this.contextTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RequestContextOperand.ContextType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RequestContextOperandContextType - { - /// Feed item id in the request context. - /// - FEED_ITEM_ID = 0, - /// The device's platform (possible values are 'Desktop' or 'Mobile'). - /// - DEVICE_PLATFORM = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// A function operand in a matching function. Used to represent nested functions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FunctionOperand : FunctionArgumentOperand - { - private Function valueField; - - /// The function held in this operand. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Function value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a feed attribute reference to use in a function. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedAttributeOperand : FunctionArgumentOperand - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private long feedAttributeIdField; - - private bool feedAttributeIdFieldSpecified; - - /// Id of associated feed. This field is required - /// and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Id of the referenced feed attribute. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long feedAttributeId - { - get - { - return this.feedAttributeIdField; - } - set - { - this.feedAttributeIdField = value; - this.feedAttributeIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedAttributeIdSpecified - { - get - { - return this.feedAttributeIdFieldSpecified; - } - set - { - this.feedAttributeIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FunctionArgumentOperand.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FunctionArgumentOperand.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FunctionArgumentOperand.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// CampaignFeeds are used to link a feed to a campaign using a matching function, - /// making the feed's feed items available in the campaign's ads for substitution. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignFeed - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private Function matchingFunctionField; - - private int[] placeholderTypesField; - - private CampaignFeedStatus statusField; - - private bool statusFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - /// Id of the Feed associated with the CampaignFeed. This field can be selected using the value "FeedId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Id of the Campaign associated with the CampaignFeed. This field can be selected using the value "CampaignId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// Matching function associated with the CampaignFeed. The matching function will - /// return true/false indicating which feed items may serve. This field can be selected using the value - /// "MatchingFunction". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Function matchingFunction - { - get - { - return this.matchingFunctionField; - } - set - { - this.matchingFunctionField = value; - } - } - - /// Indicates which placeholder - /// types the feed may populate under the connected Campaign. This field can be selected using the value - /// "PlaceholderTypes".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("placeholderTypes", Order = 3)] - public int[] placeholderTypes - { - get - { - return this.placeholderTypesField; - } - set - { - this.placeholderTypesField = value; - } - } - - /// Status of the CampaignFeed. This field can - /// be selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public CampaignFeedStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// ID of the base campaign from which this draft/trial feed was created. This field - /// is only returned on get requests. This field - /// can be selected using the value "BaseCampaignId".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field MatchingFunction = new Field("MatchingFunction", false, true); - - public static readonly Field PlaceholderTypes = new Field("PlaceholderTypes", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field MatchingFunction = Fields.MatchingFunction; - - public static readonly Field PlaceholderTypes = Fields.PlaceholderTypes; - - public static readonly Field Status = Fields.Status; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field PlaceholderTypes = Fields.PlaceholderTypes; - - public static readonly Field Status = Fields.Status; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the CampaignFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignFeed.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignFeedStatus - { - /// This CampaignFeed's data is currently being used. - /// - ENABLED = 0, - /// This CampaignFeed's data is not used anymore. - /// - REMOVED = 1, - /// Unknown status. Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 2, - } - - - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignFeedPage))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupFeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CustomerFeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedMappingPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignSharedSetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SharedSetPage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DraftPage))] - public abstract partial class NullStatsPage : Page - { - } - - - /// The result of a call to CampaignFeedService#get. Contains a list of - /// associations between campaign and feeds. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignFeedPage : NullStatsPage - { - private CampaignFeed[] entriesField; - - /// The resulting CampaignFeeds. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignFeed[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an error for the CampaignFeedService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignFeedError : ApiError - { - private CampaignFeedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignFeedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignFeedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignFeedErrorReason - { - /// An active feed already exists for this campaign and place holder type. - /// - FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 0, - /// The specified id does not exist. - /// - INVALID_ID = 1, - /// The specified feed is deleted. - /// - CANNOT_ADD_FOR_DELETED_FEED = 2, - /// The CampaignFeed already exists. SET should be used to modify the existing - /// CampaignFeed. - /// - CANNOT_ADD_ALREADY_EXISTING_CAMPAIGN_FEED = 3, - /// Cannot operate on deleted campaign feed. - /// - CANNOT_OPERATE_ON_REMOVED_CAMPAIGN_FEED = 4, - /// Invalid placeholder type ids. - /// - INVALID_PLACEHOLDER_TYPES = 5, - /// Feed mapping for this placeholder type does not exist. - /// - MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 6, - /// Location CampaignFeeds cannot be created unless there is a location CustomerFeed - /// for the specified feed. - /// - NO_EXISTING_LOCATION_CUSTOMER_FEED = 7, - UNKNOWN = 8, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignFeedServiceInterface")] - public interface CampaignFeedServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignFeedService.mutateResponse mutate(Wrappers.CampaignFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignFeedPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a CampaignFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignFeedOperation : Operation - { - private CampaignFeed operandField; - - /// CampaignFeed operand. This field is required - /// and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to CampaignFeedService#mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignFeedReturnValue : ListReturnValue - { - private CampaignFeed[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// The resulting CampaignFeeds. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage campaign feed links, and matching functions. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignFeedService : AdWordsSoapClient, ICampaignFeedService - { - /// Creates a new instance of the class. - /// - public CampaignFeedService() - { - } - - /// Creates a new instance of the class. - /// - public CampaignFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public CampaignFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CampaignFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CampaignFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of CampaignFeeds that meet the selector criteria. - /// Determines which CampaignFeeds to return. If empty all - /// Campaign feeds are returned. - /// The list of CampaignFeeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignFeedServiceInterface.mutate(Wrappers.CampaignFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, sets or removes CampaignFeeds. - /// The operations to apply. - /// The resulting Feeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignFeedOperation[] operations) - { - Wrappers.CampaignFeedService.mutateRequest inValue = new Wrappers.CampaignFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignFeedServiceInterface.mutateAsync(Wrappers.CampaignFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignFeedOperation[] operations) - { - Wrappers.CampaignFeedService.mutateRequest inValue = new Wrappers.CampaignFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of CampaignFeeds inside a CampaignFeedPage that matches the query. - /// The SQL-like AWQL query string. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignFeedPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignGroupService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignGroupOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignGroupOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignGroupReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignGroupReturnValue rval) - { - this.rval = rval; - } - } - } - /// Data representing an AdWords campaign group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroup - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private CampaignGroupStatus statusField; - - private bool statusFieldSpecified; - - /// Id of this Campaign Group. This field can be - /// selected using the value "Id".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API for the following Operators: ADD. This field is required and should not be null when it is - /// contained within Operators : REMOVE, SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Name of this campaign group. This field is required and should not be - /// null for ADD operations.

For SET and REMOVE operations, this can - /// be used to address the campaign group by name when the campaign group is ACTIVE - /// or PAUSED. Removed campaign groups cannot be addressed by name. If you wish to - /// rename a campaign group, you must provide the ID. This field can be selected using the value "Name".This field can be filtered on. Campaign group names must not contain any null - /// (code point 0x0), NL line feed (code point 0xA) or carriage return (code point - /// 0xD) characters. This is checked by the regular expression - /// '[^\x00\x0A\x0D]*'. This field is - /// required and should not be null when it is contained within Operators : ADD. This string must not be empty, (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Status of this campaign group. On add, defaults to ACTIVE. On - /// remove, changes to DELETED. This field can be selected using the value "Status".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public CampaignGroupStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the Campaign Group - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignGroupStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The campaign group is active. - /// - ENABLED = 4, - /// The campaign group has been removed. - /// - REMOVED = 5, - } - - - /// Contains a subset of campaign groups resulting from the filtering and paging of - /// the CampaignGroupService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupPage : Page - { - private CampaignGroup[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignGroup[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Base error class for Campaign Group Service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupError : ApiError - { - private CampaignGroupErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignGroupErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the campaign group error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignGroupError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignGroupErrorReason - { - /// Cannot delete a campaign group which is associated with active or paused - /// campaigns. - /// - CANNOT_DELETE_CAMPAIGN_GROUP_WITH_ACTIVE_OR_PAUSED_CAMPAIGNS = 0, - /// Cannot modify a deleted campaign group. - /// - CANNOT_MODIFY_DELETED_CAMPAIGN_GROUP = 1, - /// Trying to modify the name of an active or paused campaign group, where the name - /// is already assigned to another active or paused campaign group. - /// - DUPLICATE_NAME = 2, - /// Default error Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 3, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignGroupServiceInterface")] - public interface CampaignGroupServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignGroupPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignGroupService.mutateResponse mutate(Wrappers.CampaignGroupService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignGroupService.mutateRequest request); - } - - - /// An operation on an AdWords Campaign Group.

Note: The - /// REMOVE operator is not supported. To remove a Campaign Group, set - /// its status to REMOVED.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupOperation : Operation - { - private CampaignGroup operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignGroup operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignGroupService mutate calls. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupReturnValue : ListReturnValue - { - private CampaignGroup[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of returned CampaignGroup values - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignGroup[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignGroupServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignGroupServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage campaign groups. A CampaignGroup organizes one or more campaigns together - /// and has its own budget. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignGroupService : AdWordsSoapClient, ICampaignGroupService - { - /// Creates a new instance of the - /// class. - public CampaignGroupService() - { - } - - /// Creates a new instance of the - /// class. - public CampaignGroupService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public CampaignGroupService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignGroupService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignGroupService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the list of campaign groups that meet the selector criteria. - /// specifying the CampaignGroups - /// to return. - /// A list of campaign groups. - /// if problems occurred while fetching - /// campaign group information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignGroupPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignGroupService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignGroupServiceInterface.mutate(Wrappers.CampaignGroupService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates, or deletes campaign groups. - /// A list of unique operations. - /// The list of updated campaign groups, returned in the same order as the - /// operations array. - /// if problems occurred while updating - /// campaign group information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignGroupReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignGroupOperation[] operations) - { - Wrappers.CampaignGroupService.mutateRequest inValue = new Wrappers.CampaignGroupService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignGroupService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignGroupServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignGroupServiceInterface.mutateAsync(Wrappers.CampaignGroupService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignGroupOperation[] operations) - { - Wrappers.CampaignGroupService.mutateRequest inValue = new Wrappers.CampaignGroupService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignGroupServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.CampaignGroupPerformanceTargetService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetReturnValue rval) - { - this.rval = rval; - } - } - } - /// This class is used to configure various Performance Targets. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PerformanceTarget - { - private VolumeGoalType volumeGoalTypeField; - - private bool volumeGoalTypeFieldSpecified; - - private long volumeTargetValueField; - - private bool volumeTargetValueFieldSpecified; - - private EfficiencyTargetType efficiencyTargetTypeField; - - private bool efficiencyTargetTypeFieldSpecified; - - private double efficiencyTargetValueField; - - private bool efficiencyTargetValueFieldSpecified; - - private Money spendTargetField; - - private SpendTargetType spendTargetTypeField; - - private bool spendTargetTypeFieldSpecified; - - private PerformanceTargetStatus forecastStatusField; - - private bool forecastStatusFieldSpecified; - - private bool hasPromotedSuggestionsField; - - private bool hasPromotedSuggestionsFieldSpecified; - - private string startDateField; - - private string endDateField; - - /// The volume goal of the performance target. This property defines the way stats - /// data will be reported for the time period specified. This field can be selected using the value - /// "VolumeGoalType".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public VolumeGoalType volumeGoalType - { - get - { - return this.volumeGoalTypeField; - } - set - { - this.volumeGoalTypeField = value; - this.volumeGoalTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool volumeGoalTypeSpecified - { - get - { - return this.volumeGoalTypeFieldSpecified; - } - set - { - this.volumeGoalTypeFieldSpecified = value; - } - } - - /// The value of the volume target. This corresponds directly to the - /// volume_goal_type property and defines a target that the advertiser intends to - /// reach during the time the performance target is active. As an example, if the - /// volume_goal is MAXIMIZE_CONVERSIONS and the volume target is 3000, then the - /// advertiser intends to reach at least 3000 conversions between start and end - /// dates of the performance target. This field - /// can be selected using the value "VolumeTargetValue".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long volumeTargetValue - { - get - { - return this.volumeTargetValueField; - } - set - { - this.volumeTargetValueField = value; - this.volumeTargetValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool volumeTargetValueSpecified - { - get - { - return this.volumeTargetValueFieldSpecified; - } - set - { - this.volumeTargetValueFieldSpecified = value; - } - } - - /// This property specifies desired outcomes for some clicks, conversions or - /// impressions statistic for the given time period. It's usually a constraint on - /// the volume goal of the performance target, usually in terms of spending.

Only - /// specific efficiency target types are allowed for a volume goal type. The - /// following mapping explicitly specifies all allowed combinations. Volume Goal - /// Type : List of Efficiency Target Types MAXIMIZE_CLICKS : - /// CPC_LESS_THAN_OR_EQUAL_TO MAXIMIZE_CONVERSIONS : CPA_LESS_THAN_OR_EQUAL_TO This field can be selected using the value - /// "EfficiencyTargetType".This field can - /// be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public EfficiencyTargetType efficiencyTargetType - { - get - { - return this.efficiencyTargetTypeField; - } - set - { - this.efficiencyTargetTypeField = value; - this.efficiencyTargetTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool efficiencyTargetTypeSpecified - { - get - { - return this.efficiencyTargetTypeFieldSpecified; - } - set - { - this.efficiencyTargetTypeFieldSpecified = value; - } - } - - /// The numerical value that goes along with the expression specified by the - /// efficiency target type. This field can be - /// selected using the value "EfficiencyTargetValue".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public double efficiencyTargetValue - { - get - { - return this.efficiencyTargetValueField; - } - set - { - this.efficiencyTargetValueField = value; - this.efficiencyTargetValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool efficiencyTargetValueSpecified - { - get - { - return this.efficiencyTargetValueFieldSpecified; - } - set - { - this.efficiencyTargetValueFieldSpecified = value; - } - } - - /// A numerical value specifying just how much money the advertiser is willing to - /// spend during the time period of this performance target. This does not affect - /// serving. The spend target is always in micros of the customer's currency. This field can be selected using the value - /// "SpendTarget".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Money spendTarget - { - get - { - return this.spendTargetField; - } - set - { - this.spendTargetField = value; - } - } - - /// This field can be selected using the value - /// "SpendTargetType".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public SpendTargetType spendTargetType - { - get - { - return this.spendTargetTypeField; - } - set - { - this.spendTargetTypeField = value; - this.spendTargetTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool spendTargetTypeSpecified - { - get - { - return this.spendTargetTypeFieldSpecified; - } - set - { - this.spendTargetTypeFieldSpecified = value; - } - } - - /// The forecast status specifies how well the campaigns of a performance targets - /// are doing or have done in the past in relation to the targets set on the - /// performance target. This field can be - /// selected using the value "ForecastStatus".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public PerformanceTargetStatus forecastStatus - { - get - { - return this.forecastStatusField; - } - set - { - this.forecastStatusField = value; - this.forecastStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool forecastStatusSpecified - { - get - { - return this.forecastStatusFieldSpecified; - } - set - { - this.forecastStatusFieldSpecified = value; - } - } - - /// Specifies whether this performance target has promoted suggestions associated - /// with it. This field can be selected using - /// the value "HasPromotedSuggestions".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public bool hasPromotedSuggestions - { - get - { - return this.hasPromotedSuggestionsField; - } - set - { - this.hasPromotedSuggestionsField = value; - this.hasPromotedSuggestionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool hasPromotedSuggestionsSpecified - { - get - { - return this.hasPromotedSuggestionsFieldSpecified; - } - set - { - this.hasPromotedSuggestionsFieldSpecified = value; - } - } - - /// The start date for the performance target. This field can be selected using the value "StartDate".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public string startDate - { - get - { - return this.startDateField; - } - set - { - this.startDateField = value; - } - } - - /// The end date for the performance target. This field can be selected using the value "EndDate".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public string endDate - { - get - { - return this.endDateField; - } - set - { - this.endDateField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field VolumeGoalType = new Field("VolumeGoalType", true, true); - - public static readonly Field VolumeTargetValue = new Field("VolumeTargetValue", true, true); - - public static readonly Field EfficiencyTargetType = new Field("EfficiencyTargetType", true, true); - - public static readonly Field EfficiencyTargetValue = new Field("EfficiencyTargetValue", true, true); - - public static readonly Field SpendTarget = new Field("SpendTarget", true, true); - - public static readonly Field SpendTargetType = new Field("SpendTargetType", true, true); - - public static readonly Field ForecastStatus = new Field("ForecastStatus", true, true); - - public static readonly Field HasPromotedSuggestions = new Field("HasPromotedSuggestions", true, true); - - public static readonly Field StartDate = new Field("StartDate", true, true); - - public static readonly Field EndDate = new Field("EndDate", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field VolumeGoalType = Fields.VolumeGoalType; - - public static readonly Field VolumeTargetValue = Fields.VolumeTargetValue; - - public static readonly Field EfficiencyTargetType = Fields.EfficiencyTargetType; - - public static readonly Field EfficiencyTargetValue = Fields.EfficiencyTargetValue; - - public static readonly Field SpendTarget = Fields.SpendTarget; - - public static readonly Field SpendTargetType = Fields.SpendTargetType; - - public static readonly Field ForecastStatus = Fields.ForecastStatus; - - public static readonly Field HasPromotedSuggestions = Fields.HasPromotedSuggestions; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field VolumeGoalType = Fields.VolumeGoalType; - - public static readonly Field VolumeTargetValue = Fields.VolumeTargetValue; - - public static readonly Field EfficiencyTargetType = Fields.EfficiencyTargetType; - - public static readonly Field EfficiencyTargetValue = Fields.EfficiencyTargetValue; - - public static readonly Field SpendTarget = Fields.SpendTarget; - - public static readonly Field SpendTargetType = Fields.SpendTargetType; - - public static readonly Field ForecastStatus = Fields.ForecastStatus; - - public static readonly Field HasPromotedSuggestions = Fields.HasPromotedSuggestions; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A volume goal type of a performance target. This drives the way the performance - /// target stats data is reported, and the types of forecasting and hints that the - /// system will provide to the advertiser. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum VolumeGoalType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// A volume goal that indicates that the performance target is meant to display - /// progress in terms of maximizing conversions. - /// - MAXIMIZE_CONVERSIONS = 1, - /// A volume goal that indicates that the performance target is meant to display - /// progress in terms of maximizing clicks. - /// - MAXIMIZE_CLICKS = 2, - } - - - /// An efficiency target specifies desired outcomes for clicks, conversions or - /// impressions stats for the time period that the performance target is active. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum EfficiencyTargetType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// A value that is used to clear an efficiency target when it has already been set. - /// This value will never be persisted. - /// - NONE = 1, - /// An efficiency target that aims for average CPA over the runtime of the - /// performance target to be less than or equal to some value. - /// - CPA_LESS_THAN_OR_EQUAL_TO = 2, - /// An efficiency target that aims for average CPC over the runtime of the - /// performance target to be less than or equal to some value. - /// - CPC_LESS_THAN_OR_EQUAL_TO = 3, - } - - - /// A spend target type specifies whether a particular spend target serves as the - /// maximum or the minimum spend that a particular performance target should aim - /// for. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SpendTargetType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// A value that is used to clear a spend target type when it has already been set. - /// This value will never be persisted. - /// - NONE = 1, - /// A spend target that indicates that over the course of the performance target at - /// least the specified amount of money should be spent. - /// - MINIMUM = 2, - /// A spend target that indicates that over the course of the performance target at - /// most the specified amount of money should be spent. - /// - MAXIMUM = 3, - } - - - /// The status of a performance target that reflects how well it?s performing as - /// compared to actual performance. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PerformanceTargetStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// A status that describes an active performance target that is likely to miss its - /// targets. - /// - ACTIVE_NEEDS_ATTENTION = 1, - /// A status that describes an active performance target that is on track to meet - /// its targets. - /// - ACTIVE_ON_TRACK = 2, - /// A status that describes an active performance target with a defined spend or - /// volume target that has already been met. - /// - ACTIVE_TARGET_MET = 3, - /// A status that describes an active performance target for which we are not able - /// to make a status determination with certainty. - /// - ACTIVE_INCONCLUSIVE = 4, - /// A status that describes an active performance target that does not have any - /// targets set. It is not possible to make a status determination for such - /// performance targets. - /// - ACTIVE_NO_TARGETS = 5, - /// A status that describes a performance target that has ended and missed the - /// targets that were set for it. - /// - PAST_TARGET_MISSED = 6, - /// A status that describes a performance target that has ended and met the targets - /// that were set for it. - /// - PAST_TARGET_MET = 7, - /// A status that describes a performance target that has recently ended, but we do - /// not yet have all the information necessary to make a target met or missed - /// determination. - /// - PAST_INCONCLUSIVE = 8, - /// A status that describes a performance target that has ended and has no stats - /// information in its time range and therefore cannot cannot make a target met or - /// missed determination. - /// - PAST_MISSING_DATA = 9, - /// A status that describes a performance target that has ended but does not have - /// any targets defined for it. - /// - PAST_NO_TARGETS = 10, - /// A status that describes a performance target that has not yet started. - /// - NOT_YET_STARTED = 11, - } - - - /// Data representing a campaign group performance target. A campaign group - /// performance target is an entity that specifies a time range for a campaign group - /// and various metrics by which the performance of that campaign group can be - /// measured for the time period that the performance target is active. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupPerformanceTarget - { - private long idField; - - private bool idFieldSpecified; - - private long campaignGroupIdField; - - private bool campaignGroupIdFieldSpecified; - - private PerformanceTarget performanceTargetField; - - /// Id of this campaign group performance target. This field can be selected using the value "Id".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: ADD. - /// This field is required and should not be - /// null when it is contained within Operators : - /// REMOVE, SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Id of the campaign group that this performance target is for. This field can be selected using the value - /// "CampaignGroupId".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long campaignGroupId - { - get - { - return this.campaignGroupIdField; - } - set - { - this.campaignGroupIdField = value; - this.campaignGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignGroupIdSpecified - { - get - { - return this.campaignGroupIdFieldSpecified; - } - set - { - this.campaignGroupIdFieldSpecified = value; - } - } - - /// The main configuration of the performance target. This field is required and should not be null when it is - /// contained within Operators : ADD, SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public PerformanceTarget performanceTarget - { - get - { - return this.performanceTargetField; - } - set - { - this.performanceTargetField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field CampaignGroupId = new Field("CampaignGroupId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CampaignGroupId = Fields.CampaignGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CampaignGroupId = Fields.CampaignGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of campaign group performance targets resulting from the - /// filtering and paging of the {CampaignGroupPerformanceTargetService#get} call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupPerformanceTargetPage : Page - { - private CampaignGroupPerformanceTarget[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignGroupPerformanceTarget[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Base error class for all performance target related errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PerformanceTargetError : ApiError - { - private PerformanceTargetErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PerformanceTargetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the performance target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "PerformanceTargetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PerformanceTargetErrorReason - { - /// Spend target requires both start date and end date to be specified. - /// - SPEND_TARGET_REQUIRES_DATE_RANGE = 0, - /// Volume target value requires both start date and end date to be specified. - /// - VOLUME_TARGET_VALUE_REQUIRES_DATE_RANGE = 1, - /// The end date is before the start date. - /// - START_DATE_AFTER_END_DATE = 2, - /// The efficiency target type is incompatible with the volume goal type. The - /// following mapping describes which volume goal types are compatibe with which - /// efficiency target types. If a volume goal does not appear in the mapping, then - /// no efficiency target types are compatible with it. Volume Goal Type : List of - /// Efficiency Target Types MAXIMIZE_CLICKS : CPC_LESS_THAN_OR_EQUAL_TO - /// MAXIMIZE_CONVERSIONS : CPA_LESS_THAN_OR_EQUAL_TO - /// - INCOMPATIBLE_EFFICIENCY_TARGET_TYPE = 3, - /// Efficiency target value and type have to both be null or set to some value. - /// - EFFICIENCY_TARGET_VALUE_AND_TYPE_ARE_MUTUALLY_REQUIRED = 4, - /// A modified or newly added performance target's date range overlaps with one or - /// more other date ranges of other performance targets assigned to the same parent. - /// - OVERLAPPING_DATE_RANGE = 5, - /// It is not possible to set performance targets that have already ended. If - /// modifications are needed, remove the performance target first and re-create it - /// with the desired settings. - /// - HISTORICAL_PERFORMANCE_TARGETS_CANNOT_BE_MODIFIED = 6, - /// Spend target and spend target type have to both be null or set to some value. - /// - SPEND_TARGET_AND_SPEND_TARGET_TYPE_ARE_MUTUALLY_REQUIRED = 7, - /// Default error Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - PERFORMANCE_TARGET_ERROR = 8, - } - - - /// Base error class for CampaignGroupPerformanceTargetService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupPerformanceTargetError : ApiError - { - private CampaignGroupPerformanceTargetErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignGroupPerformanceTargetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignGroupPerformanceTargetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignGroupPerformanceTargetErrorReason - { - /// Default error. Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 0, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetServiceInterface")] - public interface CampaignGroupPerformanceTargetServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignGroupPerformanceTargetService.mutateResponse mutate(Wrappers.CampaignGroupPerformanceTargetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignGroupPerformanceTargetService.mutateRequest request); - } - - - /// An operation on a campaign group performance target. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupPerformanceTargetOperation : Operation - { - private CampaignGroupPerformanceTarget operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignGroupPerformanceTarget operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignGroupPerformanceTargetService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignGroupPerformanceTargetReturnValue : ListReturnValue - { - private CampaignGroupPerformanceTarget[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of returned CampaignGroupPerformanceTarget values. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignGroupPerformanceTarget[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignGroupPerformanceTargetServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage campaign group performance targets. A CampaignGroupPerformanceTarget is an - /// entity that specifies a time range for a campaign group and various metrics by - /// which the performance of that campaign group can be measured for the time period - /// that the performance target is active. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignGroupPerformanceTargetService : AdWordsSoapClient, ICampaignGroupPerformanceTargetService - { - /// Creates a new instance of the class. - public CampaignGroupPerformanceTargetService() - { - } - - /// Creates a new instance of the class. - public CampaignGroupPerformanceTargetService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public CampaignGroupPerformanceTargetService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CampaignGroupPerformanceTargetService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CampaignGroupPerformanceTargetService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the list of campaign group performance targets that meet the selector - /// criteria. - /// specifying the CampaignGroupPerformanceTargets to - /// return. - /// A list of campaign group performance targets. - /// if problems occurred while fetching - /// campaign group performance target information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignGroupPerformanceTargetService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetServiceInterface.mutate(Wrappers.CampaignGroupPerformanceTargetService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates, or deletes campaign group performance targets. - /// A list of unique operations. - /// The list of updated campaign groups performance targets, returned in - /// the same order as the operations array. - /// if problems occurred while updating - /// campaign group performance target information. - public virtual Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetOperation[] operations) - { - Wrappers.CampaignGroupPerformanceTargetService.mutateRequest inValue = new Wrappers.CampaignGroupPerformanceTargetService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignGroupPerformanceTargetService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetServiceInterface.mutateAsync(Wrappers.CampaignGroupPerformanceTargetService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetOperation[] operations) - { - Wrappers.CampaignGroupPerformanceTargetService.mutateRequest inValue = new Wrappers.CampaignGroupPerformanceTargetService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.ConstantDataService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getAgeRangeCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getAgeRangeCriterionRequest - { - /// Creates a new instance of the class. - public getAgeRangeCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getAgeRangeCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getAgeRangeCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.AgeRange[] rval; - - /// Creates a new instance of the class. - public getAgeRangeCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getAgeRangeCriterionResponse(Google.Api.Ads.AdWords.v201806.AgeRange[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getCarrierCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getCarrierCriterionRequest - { - /// Creates a new instance of the - /// class. - public getCarrierCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getCarrierCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getCarrierCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.Carrier[] rval; - - /// Creates a new instance of the class. - public getCarrierCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getCarrierCriterionResponse(Google.Api.Ads.AdWords.v201806.Carrier[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getGenderCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getGenderCriterionRequest - { - /// Creates a new instance of the - /// class. - public getGenderCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getGenderCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getGenderCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.Gender[] rval; - - /// Creates a new instance of the - /// class. - public getGenderCriterionResponse() - { - } - - /// Creates a new instance of the - /// class. - public getGenderCriterionResponse(Google.Api.Ads.AdWords.v201806.Gender[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getLanguageCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getLanguageCriterionRequest - { - /// Creates a new instance of the class. - public getLanguageCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getLanguageCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getLanguageCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.Language[] rval; - - /// Creates a new instance of the class. - public getLanguageCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getLanguageCriterionResponse(Google.Api.Ads.AdWords.v201806.Language[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getMobileAppCategoryCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getMobileAppCategoryCriterionRequest - { - /// Creates a new instance of the class. - public getMobileAppCategoryCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getMobileAppCategoryCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getMobileAppCategoryCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.MobileAppCategory[] rval; - - /// Creates a new instance of the class. - public getMobileAppCategoryCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getMobileAppCategoryCriterionResponse(Google.Api.Ads.AdWords.v201806.MobileAppCategory[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getMobileDeviceCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getMobileDeviceCriterionRequest - { - /// Creates a new instance of the class. - public getMobileDeviceCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getMobileDeviceCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getMobileDeviceCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.MobileDevice[] rval; - - /// Creates a new instance of the class. - public getMobileDeviceCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getMobileDeviceCriterionResponse(Google.Api.Ads.AdWords.v201806.MobileDevice[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getOperatingSystemVersionCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getOperatingSystemVersionCriterionRequest - { - /// Creates a new instance of the class. - public getOperatingSystemVersionCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getOperatingSystemVersionCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getOperatingSystemVersionCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.OperatingSystemVersion[] rval; - - /// Creates a new instance of the class. - public getOperatingSystemVersionCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getOperatingSystemVersionCriterionResponse(Google.Api.Ads.AdWords.v201806.OperatingSystemVersion[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getProductBiddingCategoryData", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getProductBiddingCategoryDataRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.Selector selector; - - /// Creates a new instance of the class. - public getProductBiddingCategoryDataRequest() - { - } - - /// Creates a new instance of the class. - public getProductBiddingCategoryDataRequest(Google.Api.Ads.AdWords.v201806.Selector selector) - { - this.selector = selector; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getProductBiddingCategoryDataResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getProductBiddingCategoryDataResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.ProductBiddingCategoryData[] rval; - - /// Creates a new instance of the class. - public getProductBiddingCategoryDataResponse() - { - } - - /// Creates a new instance of the class. - public getProductBiddingCategoryDataResponse(Google.Api.Ads.AdWords.v201806.ProductBiddingCategoryData[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getUserInterestCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getUserInterestCriterionRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.ConstantDataServiceUserInterestTaxonomyType userInterestTaxonomyType; - - /// Creates a new instance of the class. - public getUserInterestCriterionRequest() - { - } - - /// Creates a new instance of the class. - public getUserInterestCriterionRequest(Google.Api.Ads.AdWords.v201806.ConstantDataServiceUserInterestTaxonomyType userInterestTaxonomyType) - { - this.userInterestTaxonomyType = userInterestTaxonomyType; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getUserInterestCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getUserInterestCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.CriterionUserInterest[] rval; - - /// Creates a new instance of the class. - public getUserInterestCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getUserInterestCriterionResponse(Google.Api.Ads.AdWords.v201806.CriterionUserInterest[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getVerticalCriterion", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getVerticalCriterionRequest - { - /// Creates a new instance of the class. - public getVerticalCriterionRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getVerticalCriterionResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getVerticalCriterionResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.Vertical[] rval; - - /// Creates a new instance of the class. - public getVerticalCriterionResponse() - { - } - - /// Creates a new instance of the class. - public getVerticalCriterionResponse(Google.Api.Ads.AdWords.v201806.Vertical[] rval) - { - this.rval = rval; - } - } - } - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface")] - public interface ConstantDataServiceInterface - { - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getAgeRangeCriterionResponse getAgeRangeCriterion(Wrappers.ConstantDataService.getAgeRangeCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getAgeRangeCriterionAsync(Wrappers.ConstantDataService.getAgeRangeCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getCarrierCriterionResponse getCarrierCriterion(Wrappers.ConstantDataService.getCarrierCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getCarrierCriterionAsync(Wrappers.ConstantDataService.getCarrierCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getGenderCriterionResponse getGenderCriterion(Wrappers.ConstantDataService.getGenderCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getGenderCriterionAsync(Wrappers.ConstantDataService.getGenderCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getLanguageCriterionResponse getLanguageCriterion(Wrappers.ConstantDataService.getLanguageCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getLanguageCriterionAsync(Wrappers.ConstantDataService.getLanguageCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getMobileAppCategoryCriterionResponse getMobileAppCategoryCriterion(Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getMobileAppCategoryCriterionAsync(Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getMobileDeviceCriterionResponse getMobileDeviceCriterion(Wrappers.ConstantDataService.getMobileDeviceCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getMobileDeviceCriterionAsync(Wrappers.ConstantDataService.getMobileDeviceCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getOperatingSystemVersionCriterionResponse getOperatingSystemVersionCriterion(Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getOperatingSystemVersionCriterionAsync(Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getProductBiddingCategoryDataResponse getProductBiddingCategoryData(Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getProductBiddingCategoryDataAsync(Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getUserInterestCriterionResponse getUserInterestCriterion(Wrappers.ConstantDataService.getUserInterestCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getUserInterestCriterionAsync(Wrappers.ConstantDataService.getUserInterestCriterionRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConstantDataService.getVerticalCriterionResponse getVerticalCriterion(Wrappers.ConstantDataService.getVerticalCriterionRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getVerticalCriterionAsync(Wrappers.ConstantDataService.getVerticalCriterionRequest request); - } - - - /// The taxonomy of ProductBiddingCategory dimension values.

Clients use this to - /// convert between human-readable category names / display strings and - /// ProductBiddingCategory instances.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductBiddingCategoryData : ConstantData - { - private ProductBiddingCategory dimensionValueField; - - private ProductBiddingCategory parentDimensionValueField; - - private string countryField; - - private ShoppingBiddingDimensionStatus statusField; - - private bool statusFieldSpecified; - - private String_StringMapEntry[] displayValueField; - - /// The dimension value that corresponds to this category. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ProductBiddingCategory dimensionValue - { - get - { - return this.dimensionValueField; - } - set - { - this.dimensionValueField = value; - } - } - - /// The dimension value that corresponds to parent category. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ProductBiddingCategory parentDimensionValue - { - get - { - return this.parentDimensionValueField; - } - set - { - this.parentDimensionValueField = value; - } - } - - /// The country of the taxonomy. It applies to all categories from the taxonomy. - /// This field can be selected using the value - /// "Country".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string country - { - get - { - return this.countryField; - } - set - { - this.countryField = value; - } - } - - /// The status of the taxonomy. It applies to all categories from the taxonomy. - /// This field can be selected using the value - /// "BiddingCategoryStatus".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public ShoppingBiddingDimensionStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// A map of displayValues by their language code. The language code is a 2-letter - /// string conforming with ISO 639-1 standard. - /// - [System.Xml.Serialization.XmlElementAttribute("displayValue", Order = 4)] - public String_StringMapEntry[] displayValue - { - get - { - return this.displayValueField; - } - set - { - this.displayValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ConstantData.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Country = new Field("Country", true, true); - - public static readonly Field BiddingCategoryStatus = new Field("BiddingCategoryStatus", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ConstantData.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Country = Fields.Country; - - public static readonly Field BiddingCategoryStatus = Fields.BiddingCategoryStatus; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ConstantData.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Country = Fields.Country; - - public static readonly Field BiddingCategoryStatus = Fields.BiddingCategoryStatus; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of a bidding dimension (category) in a bidding taxonomy. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ShoppingBiddingDimensionStatus - { - /// Default status. Should not be used. Used for - /// return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// The dimension is active and it can be used for bidding. - /// - ACTIVE = 1, - /// The dimension is deprecated and should not be used for bidding. - /// - OBSOLETE = 2, - } - - - /// Marker interface for ConstantDataService objects. This is primarily required for - /// field catalog generation. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductBiddingCategoryData))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConstantData - { - private string constantDataTypeField; - - /// Indicates that this instance is a subtype of ConstantData. Although this field - /// is returned in the response, it is ignored on input and cannot be selected. - /// Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ConstantData.Type", Order = 0)] - public string ConstantDataType - { - get - { - return this.constantDataTypeField; - } - set - { - this.constantDataTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An enumeration of possible user interest taxonomy types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConstantDataService.UserInterestTaxonomyType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConstantDataServiceUserInterestTaxonomyType - { - /// The brand for this user interest. - /// - BRAND = 0, - /// The market for this user interest. - /// - IN_MARKET = 1, - /// Users known to have installed applications in the specified categories. - /// - MOBILE_APP_INSTALL_USER = 2, - /// The geographical location of the interest-based vertical. - /// - VERTICAL_GEO = 3, - /// User interest criteria for new smart phone users. - /// - NEW_SMART_PHONE_USER = 4, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface ConstantDataServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// A service to return constant data. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class ConstantDataService : AdWordsSoapClient, IConstantDataService - { - /// Creates a new instance of the class. - /// - public ConstantDataService() - { - } - - /// Creates a new instance of the class. - /// - public ConstantDataService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public ConstantDataService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public ConstantDataService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public ConstantDataService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getAgeRangeCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getAgeRangeCriterion(Wrappers.ConstantDataService.getAgeRangeCriterionRequest request) - { - return base.Channel.getAgeRangeCriterion(request); - } - - /// Returns a list of all age range criteria. - /// A list of age ranges. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AgeRange[] getAgeRangeCriterion() - { - Wrappers.ConstantDataService.getAgeRangeCriterionRequest inValue = new Wrappers.ConstantDataService.getAgeRangeCriterionRequest(); - Wrappers.ConstantDataService.getAgeRangeCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getAgeRangeCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getAgeRangeCriterionAsync(Wrappers.ConstantDataService.getAgeRangeCriterionRequest request) - { - return base.Channel.getAgeRangeCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getAgeRangeCriterionAsync() - { - Wrappers.ConstantDataService.getAgeRangeCriterionRequest inValue = new Wrappers.ConstantDataService.getAgeRangeCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getAgeRangeCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getCarrierCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getCarrierCriterion(Wrappers.ConstantDataService.getCarrierCriterionRequest request) - { - return base.Channel.getCarrierCriterion(request); - } - - /// Returns a list of all carrier criteria. - /// A list of carriers. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.Carrier[] getCarrierCriterion() - { - Wrappers.ConstantDataService.getCarrierCriterionRequest inValue = new Wrappers.ConstantDataService.getCarrierCriterionRequest(); - Wrappers.ConstantDataService.getCarrierCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getCarrierCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getCarrierCriterionAsync(Wrappers.ConstantDataService.getCarrierCriterionRequest request) - { - return base.Channel.getCarrierCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getCarrierCriterionAsync() - { - Wrappers.ConstantDataService.getCarrierCriterionRequest inValue = new Wrappers.ConstantDataService.getCarrierCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getCarrierCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getGenderCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getGenderCriterion(Wrappers.ConstantDataService.getGenderCriterionRequest request) - { - return base.Channel.getGenderCriterion(request); - } - - /// Returns a list of all gender criteria. - /// A list of genders. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.Gender[] getGenderCriterion() - { - Wrappers.ConstantDataService.getGenderCriterionRequest inValue = new Wrappers.ConstantDataService.getGenderCriterionRequest(); - Wrappers.ConstantDataService.getGenderCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getGenderCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getGenderCriterionAsync(Wrappers.ConstantDataService.getGenderCriterionRequest request) - { - return base.Channel.getGenderCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getGenderCriterionAsync() - { - Wrappers.ConstantDataService.getGenderCriterionRequest inValue = new Wrappers.ConstantDataService.getGenderCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getGenderCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getLanguageCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getLanguageCriterion(Wrappers.ConstantDataService.getLanguageCriterionRequest request) - { - return base.Channel.getLanguageCriterion(request); - } - - /// Returns a list of all language criteria. - /// A list of languages. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.Language[] getLanguageCriterion() - { - Wrappers.ConstantDataService.getLanguageCriterionRequest inValue = new Wrappers.ConstantDataService.getLanguageCriterionRequest(); - Wrappers.ConstantDataService.getLanguageCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getLanguageCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getLanguageCriterionAsync(Wrappers.ConstantDataService.getLanguageCriterionRequest request) - { - return base.Channel.getLanguageCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getLanguageCriterionAsync() - { - Wrappers.ConstantDataService.getLanguageCriterionRequest inValue = new Wrappers.ConstantDataService.getLanguageCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getLanguageCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getMobileAppCategoryCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getMobileAppCategoryCriterion(Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest request) - { - return base.Channel.getMobileAppCategoryCriterion(request); - } - - /// Returns a list of all mobile app category criteria. - /// A list of mobile app categories. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.MobileAppCategory[] getMobileAppCategoryCriterion() - { - Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest inValue = new Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest(); - Wrappers.ConstantDataService.getMobileAppCategoryCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getMobileAppCategoryCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getMobileAppCategoryCriterionAsync(Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest request) - { - return base.Channel.getMobileAppCategoryCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getMobileAppCategoryCriterionAsync() - { - Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest inValue = new Wrappers.ConstantDataService.getMobileAppCategoryCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getMobileAppCategoryCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getMobileDeviceCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getMobileDeviceCriterion(Wrappers.ConstantDataService.getMobileDeviceCriterionRequest request) - { - return base.Channel.getMobileDeviceCriterion(request); - } - - /// Returns a list of all mobile devices. - /// A list of mobile devices. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.MobileDevice[] getMobileDeviceCriterion() - { - Wrappers.ConstantDataService.getMobileDeviceCriterionRequest inValue = new Wrappers.ConstantDataService.getMobileDeviceCriterionRequest(); - Wrappers.ConstantDataService.getMobileDeviceCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getMobileDeviceCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getMobileDeviceCriterionAsync(Wrappers.ConstantDataService.getMobileDeviceCriterionRequest request) - { - return base.Channel.getMobileDeviceCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getMobileDeviceCriterionAsync() - { - Wrappers.ConstantDataService.getMobileDeviceCriterionRequest inValue = new Wrappers.ConstantDataService.getMobileDeviceCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getMobileDeviceCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getOperatingSystemVersionCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getOperatingSystemVersionCriterion(Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest request) - { - return base.Channel.getOperatingSystemVersionCriterion(request); - } - - /// Returns a list of all operating system version criteria. - /// A list of operating system versions. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.OperatingSystemVersion[] getOperatingSystemVersionCriterion() - { - Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest inValue = new Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest(); - Wrappers.ConstantDataService.getOperatingSystemVersionCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getOperatingSystemVersionCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getOperatingSystemVersionCriterionAsync(Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest request) - { - return base.Channel.getOperatingSystemVersionCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getOperatingSystemVersionCriterionAsync() - { - Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest inValue = new Wrappers.ConstantDataService.getOperatingSystemVersionCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getOperatingSystemVersionCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getProductBiddingCategoryDataResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getProductBiddingCategoryData(Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest request) - { - return base.Channel.getProductBiddingCategoryData(request); - } - - /// Returns a list of shopping bidding categories. A country predicate must be - /// included in the selector, only Predicate.Operator#EQUALS and Predicate.Operator#IN with a single value are - /// supported in the country predicate. An empty parentDimensionType predicate will - /// filter for root categories. - /// A list of shopping bidding categories. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.ProductBiddingCategoryData[] getProductBiddingCategoryData(Google.Api.Ads.AdWords.v201806.Selector selector) - { - Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest inValue = new Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest(); - inValue.selector = selector; - Wrappers.ConstantDataService.getProductBiddingCategoryDataResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getProductBiddingCategoryData(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getProductBiddingCategoryDataAsync(Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest request) - { - return base.Channel.getProductBiddingCategoryDataAsync(request); - } - - public virtual System.Threading.Tasks.Task getProductBiddingCategoryDataAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest inValue = new Wrappers.ConstantDataService.getProductBiddingCategoryDataRequest(); - inValue.selector = selector; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getProductBiddingCategoryDataAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getUserInterestCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getUserInterestCriterion(Wrappers.ConstantDataService.getUserInterestCriterionRequest request) - { - return base.Channel.getUserInterestCriterion(request); - } - - /// Returns a list of user interests. - /// The type of taxonomy to use when - /// requesting user interests. - /// A list of user interests. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CriterionUserInterest[] getUserInterestCriterion(Google.Api.Ads.AdWords.v201806.ConstantDataServiceUserInterestTaxonomyType userInterestTaxonomyType) - { - Wrappers.ConstantDataService.getUserInterestCriterionRequest inValue = new Wrappers.ConstantDataService.getUserInterestCriterionRequest(); - inValue.userInterestTaxonomyType = userInterestTaxonomyType; - Wrappers.ConstantDataService.getUserInterestCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getUserInterestCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getUserInterestCriterionAsync(Wrappers.ConstantDataService.getUserInterestCriterionRequest request) - { - return base.Channel.getUserInterestCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getUserInterestCriterionAsync(Google.Api.Ads.AdWords.v201806.ConstantDataServiceUserInterestTaxonomyType userInterestTaxonomyType) - { - Wrappers.ConstantDataService.getUserInterestCriterionRequest inValue = new Wrappers.ConstantDataService.getUserInterestCriterionRequest(); - inValue.userInterestTaxonomyType = userInterestTaxonomyType; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getUserInterestCriterionAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConstantDataService.getVerticalCriterionResponse Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getVerticalCriterion(Wrappers.ConstantDataService.getVerticalCriterionRequest request) - { - return base.Channel.getVerticalCriterion(request); - } - - /// Returns a list of content verticals. - /// A list of verticals. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.Vertical[] getVerticalCriterion() - { - Wrappers.ConstantDataService.getVerticalCriterionRequest inValue = new Wrappers.ConstantDataService.getVerticalCriterionRequest(); - Wrappers.ConstantDataService.getVerticalCriterionResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getVerticalCriterion(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface.getVerticalCriterionAsync(Wrappers.ConstantDataService.getVerticalCriterionRequest request) - { - return base.Channel.getVerticalCriterionAsync(request); - } - - public virtual System.Threading.Tasks.Task getVerticalCriterionAsync() - { - Wrappers.ConstantDataService.getVerticalCriterionRequest inValue = new Wrappers.ConstantDataService.getVerticalCriterionRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConstantDataServiceInterface) (this)).getVerticalCriterionAsync(inValue)).Result.rval); - } - } - namespace Wrappers.ConversionTrackerService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.ConversionTrackerOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.ConversionTrackerOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.ConversionTrackerReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.ConversionTrackerReturnValue rval) - { - this.rval = rval; - } - } - } - /// An abstract Conversion base class. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(WebsiteCallMetricsConversion))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UploadConversion))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(UploadCallConversion))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AppConversion))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdWordsConversionTracker))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdCallMetricsConversion))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class ConversionTracker - { - private long idField; - - private bool idFieldSpecified; - - private long originalConversionTypeIdField; - - private bool originalConversionTypeIdFieldSpecified; - - private string nameField; - - private ConversionTrackerStatus statusField; - - private bool statusFieldSpecified; - - private ConversionTrackerCategory categoryField; - - private bool categoryFieldSpecified; - - private string googleEventSnippetField; - - private string googleGlobalSiteTagField; - - private DataDrivenModelStatus dataDrivenModelStatusField; - - private bool dataDrivenModelStatusFieldSpecified; - - private long conversionTypeOwnerCustomerIdField; - - private bool conversionTypeOwnerCustomerIdFieldSpecified; - - private int viewthroughLookbackWindowField; - - private bool viewthroughLookbackWindowFieldSpecified; - - private int ctcLookbackWindowField; - - private bool ctcLookbackWindowFieldSpecified; - - private ConversionDeduplicationMode countingTypeField; - - private bool countingTypeFieldSpecified; - - private double defaultRevenueValueField; - - private bool defaultRevenueValueFieldSpecified; - - private string defaultRevenueCurrencyCodeField; - - private bool alwaysUseDefaultRevenueValueField; - - private bool alwaysUseDefaultRevenueValueFieldSpecified; - - private bool excludeFromBiddingField; - - private bool excludeFromBiddingFieldSpecified; - - private AttributionModelType attributionModelTypeField; - - private bool attributionModelTypeFieldSpecified; - - private string mostRecentConversionDateField; - - private string lastReceivedRequestTimeField; - - private string conversionTrackerTypeField; - - /// ID of this conversion tracker, null when creating a new one. - ///

There are some system-defined conversion trackers that are available for all - /// customers to use. See ConversionTrackerService#mutate for - /// more information about how to modify these types.

  • 179 - Calls from - /// Ads
  • 214 - Android Downloads
  • 239 - Store Visits
- /// This field can be selected using the value - /// "Id".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API for the following Operators: - /// ADD. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// The ID of the original conversion type on which this ConversionType is based. - /// This is used to facilitate a connection between an existing shared conversion - /// type (e.g. Calls from ads) and an advertiser-specific conversion type. This may - /// only be specified for ADD operations, and can never be modified once a - /// ConversionType is created. This field can be - /// selected using the value "OriginalConversionTypeId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long originalConversionTypeId - { - get - { - return this.originalConversionTypeIdField; - } - set - { - this.originalConversionTypeIdField = value; - this.originalConversionTypeIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool originalConversionTypeIdSpecified - { - get - { - return this.originalConversionTypeIdFieldSpecified; - } - set - { - this.originalConversionTypeIdFieldSpecified = value; - } - } - - /// Name of this conversion tracker. This field - /// can be selected using the value "Name".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Status of this conversion tracker. This - /// field can be selected using the value "Status".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public ConversionTrackerStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// The category of conversion that is being tracked. This field can be selected using the value "Category".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public ConversionTrackerCategory category - { - get - { - return this.categoryField; - } - set - { - this.categoryField = value; - this.categorySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool categorySpecified - { - get - { - return this.categoryFieldSpecified; - } - set - { - this.categoryFieldSpecified = value; - } - } - - /// The event snippet that works with the global site tag to track actions that - /// should be counted as conversions. Returns an empty string if the conversion - /// tracker does not use snippets. This field - /// can be selected using the value "GoogleEventSnippet".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string googleEventSnippet - { - get - { - return this.googleEventSnippetField; - } - set - { - this.googleEventSnippetField = value; - } - } - - /// The global site tag that adds visitors to your basic remarketing lists and sets - /// new cookies on your domain, which will store information about the ad click that - /// brought a user to your website. Returns an empty string if the conversion - /// tracker does not use snippets. This field - /// can be selected using the value "GoogleGlobalSiteTag".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string googleGlobalSiteTag - { - get - { - return this.googleGlobalSiteTagField; - } - set - { - this.googleGlobalSiteTagField = value; - } - } - - /// The status of the data-driven attribution model for the conversion type. This field can be selected using the value - /// "DataDrivenModelStatus".This field - /// can be filtered on. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public DataDrivenModelStatus dataDrivenModelStatus - { - get - { - return this.dataDrivenModelStatusField; - } - set - { - this.dataDrivenModelStatusField = value; - this.dataDrivenModelStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool dataDrivenModelStatusSpecified - { - get - { - return this.dataDrivenModelStatusFieldSpecified; - } - set - { - this.dataDrivenModelStatusFieldSpecified = value; - } - } - - /// The external customer ID of the conversion type owner, or 0 if this is a - /// system-defined conversion type. Only the conversion type owner may edit - /// properties of the conversion type. This - /// field can be selected using the value - /// "ConversionTypeOwnerCustomerId".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public long conversionTypeOwnerCustomerId - { - get - { - return this.conversionTypeOwnerCustomerIdField; - } - set - { - this.conversionTypeOwnerCustomerIdField = value; - this.conversionTypeOwnerCustomerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool conversionTypeOwnerCustomerIdSpecified - { - get - { - return this.conversionTypeOwnerCustomerIdFieldSpecified; - } - set - { - this.conversionTypeOwnerCustomerIdFieldSpecified = value; - } - } - - /// Lookback window for view-through conversions in days. This is the length of time - /// in which a conversion without a click can be attributed to an impression. This field can be selected using the value - /// "ViewthroughLookbackWindow".This - /// field can be filtered on. This field - /// must be between 1 and 30, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public int viewthroughLookbackWindow - { - get - { - return this.viewthroughLookbackWindowField; - } - set - { - this.viewthroughLookbackWindowField = value; - this.viewthroughLookbackWindowSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool viewthroughLookbackWindowSpecified - { - get - { - return this.viewthroughLookbackWindowFieldSpecified; - } - set - { - this.viewthroughLookbackWindowFieldSpecified = value; - } - } - - /// The click-through conversion (ctc) lookback window is the maximum number of days - /// between the time a conversion event happens and the previous corresponding ad - /// click.

Conversion events that occur more than this many days after the click - /// are ignored.

This field is only editable for Adwords Conversions and - /// Upload Conversions, but has a system defined default for other types of - /// conversions. The allowed range of values for this window depends on the type of - /// conversion and may expand, but 1-90 days is the currently allowed range. This field can be selected using the value - /// "CtcLookbackWindow".This field can be - /// filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public int ctcLookbackWindow - { - get - { - return this.ctcLookbackWindowField; - } - set - { - this.ctcLookbackWindowField = value; - this.ctcLookbackWindowSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool ctcLookbackWindowSpecified - { - get - { - return this.ctcLookbackWindowFieldSpecified; - } - set - { - this.ctcLookbackWindowFieldSpecified = value; - } - } - - /// How to count events for this conversion tracker. If countingType is - /// MANY_PER_CLICK, then all conversion events are counted. If countingType is - /// ONE_PER_CLICK, then only the first conversion event of this type following a - /// given click will be counted. More information is available at - /// https://support.google.com/adwords/answer/3438531 This field can be selected using the value - /// "CountingType".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public ConversionDeduplicationMode countingType - { - get - { - return this.countingTypeField; - } - set - { - this.countingTypeField = value; - this.countingTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool countingTypeSpecified - { - get - { - return this.countingTypeFieldSpecified; - } - set - { - this.countingTypeFieldSpecified = value; - } - } - - /// The value to use when the tag for this conversion tracker sends conversion - /// events without values. This value is applied on the server side, and is - /// applicable to all ConversionTracker subclasses.

See also the corresponding ConversionTracker#defaultRevenueCurrencyCode, - /// and see ConversionTracker#alwaysUseDefaultRevenueValue - /// for details about when this value is used. This field can be selected using the value - /// "DefaultRevenueValue".This field can - /// be filtered on. This field must be - /// between 0 and 1000000000000, inclusive.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public double defaultRevenueValue - { - get - { - return this.defaultRevenueValueField; - } - set - { - this.defaultRevenueValueField = value; - this.defaultRevenueValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool defaultRevenueValueSpecified - { - get - { - return this.defaultRevenueValueFieldSpecified; - } - set - { - this.defaultRevenueValueFieldSpecified = value; - } - } - - /// The currency code to use when the tag for this conversion tracker sends - /// conversion events without currency codes. This code is applied on the server - /// side, and is applicable to all ConversionTracker subclasses. It must be a valid - /// ISO4217 3-character code, such as USD.

This code is used if the code in the - /// tag is not supplied or is unsupported, or if ConversionTracker#alwaysUseDefaultRevenueValue - /// is set to true. If this default code is not set the currency code of the account - /// is used as the default code.

Set the default code to XXX in order to - /// specify that this conversion type does not have units of a currency (that is, it - /// is unitless). In this case no currency conversion will occur even if a currency - /// code is set in the tag. This field can be - /// selected using the value "DefaultRevenueCurrencyCode".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public string defaultRevenueCurrencyCode - { - get - { - return this.defaultRevenueCurrencyCodeField; - } - set - { - this.defaultRevenueCurrencyCodeField = value; - } - } - - /// Controls whether conversion event values and currency codes are taken from the - /// tag snippet or from ConversionTracker#defaultRevenueValue - /// and ConversionTracker#defaultRevenueCurrencyCode. - /// If alwaysUseDefaultRevenueValue is true, then conversion events will always use - /// defaultRevenueValue and defaultRevenueCurrencyCode, even if the tag has supplied - /// a value and/or code when reporting the conversion event. If - /// alwaysUseDefaultRevenueValue is false, then defaultRevenueValue and - /// defaultRevenueCurrencyCode are only used if the tag does not supply a value, or - /// the tag's value is unparseable. This field - /// can be selected using the value "AlwaysUseDefaultRevenueValue".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public bool alwaysUseDefaultRevenueValue - { - get - { - return this.alwaysUseDefaultRevenueValueField; - } - set - { - this.alwaysUseDefaultRevenueValueField = value; - this.alwaysUseDefaultRevenueValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool alwaysUseDefaultRevenueValueSpecified - { - get - { - return this.alwaysUseDefaultRevenueValueFieldSpecified; - } - set - { - this.alwaysUseDefaultRevenueValueFieldSpecified = value; - } - } - - /// Whether this conversion tracker should be excluded from the "Conversions" - /// columns in reports.

If true, the conversion tracker will not be counted - /// towards Conversions. If false, it will be counted in Conversions. This is the - /// default.

Either way, conversions will still be counted in the - /// "AllConversions" columns in reports. This - /// field can be selected using the value "ExcludeFromBidding".This field can be filtered on. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 15)] - public bool excludeFromBidding - { - get - { - return this.excludeFromBiddingField; - } - set - { - this.excludeFromBiddingField = value; - this.excludeFromBiddingSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool excludeFromBiddingSpecified - { - get - { - return this.excludeFromBiddingFieldSpecified; - } - set - { - this.excludeFromBiddingFieldSpecified = value; - } - } - - /// Attribution models describing how to distribute credit for a particular - /// conversion across potentially many prior interactions. See - /// https://support.google.com/adwords/answer/6259715 for more information about - /// attribution modeling in AdWords. This field - /// can be selected using the value "AttributionModelType". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 16)] - public AttributionModelType attributionModelType - { - get - { - return this.attributionModelTypeField; - } - set - { - this.attributionModelTypeField = value; - this.attributionModelTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool attributionModelTypeSpecified - { - get - { - return this.attributionModelTypeFieldSpecified; - } - set - { - this.attributionModelTypeFieldSpecified = value; - } - } - - /// The date of the most recent ad click that led to a conversion of this conversion - /// type.

This date is in the advertiser's defined time zone.

This field can be selected using the value - /// "MostRecentConversionDate". This field - /// is read only and will be ignored when sent to the API. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 17)] - public string mostRecentConversionDate - { - get - { - return this.mostRecentConversionDateField; - } - set - { - this.mostRecentConversionDateField = value; - } - } - - /// The last time a conversion tag for this conversion type successfully fired and - /// was seen by AdWords. This firing event may not have been the result of an - /// attributable conversion (ex: because the tag was fired from a browser that did - /// not previously click an ad from the appropriate advertiser).

This datetime is - /// in UTC, not the advertiser's time zone.

This field can be selected using the value - /// "LastReceivedRequestTime". This field - /// is read only and will be ignored when sent to the API. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 18)] - public string lastReceivedRequestTime - { - get - { - return this.lastReceivedRequestTimeField; - } - set - { - this.lastReceivedRequestTimeField = value; - } - } - - /// Indicates that this instance is a subtype of ConversionTracker. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ConversionTracker.Type", Order = 19)] - public string ConversionTrackerType - { - get - { - return this.conversionTrackerTypeField; - } - set - { - this.conversionTrackerTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field OriginalConversionTypeId = new Field("OriginalConversionTypeId", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field Category = new Field("Category", true, true); - - public static readonly Field GoogleEventSnippet = new Field("GoogleEventSnippet", true, true); - - public static readonly Field GoogleGlobalSiteTag = new Field("GoogleGlobalSiteTag", true, true); - - public static readonly Field DataDrivenModelStatus = new Field("DataDrivenModelStatus", true, true); - - public static readonly Field ConversionTypeOwnerCustomerId = new Field("ConversionTypeOwnerCustomerId", true, true); - - public static readonly Field ViewthroughLookbackWindow = new Field("ViewthroughLookbackWindow", true, true); - - public static readonly Field CtcLookbackWindow = new Field("CtcLookbackWindow", true, true); - - public static readonly Field CountingType = new Field("CountingType", true, true); - - public static readonly Field DefaultRevenueValue = new Field("DefaultRevenueValue", true, true); - - public static readonly Field DefaultRevenueCurrencyCode = new Field("DefaultRevenueCurrencyCode", true, true); - - public static readonly Field AlwaysUseDefaultRevenueValue = new Field("AlwaysUseDefaultRevenueValue", true, true); - - public static readonly Field ExcludeFromBidding = new Field("ExcludeFromBidding", true, true); - - public static readonly Field AttributionModelType = new Field("AttributionModelType", false, true); - - public static readonly Field MostRecentConversionDate = new Field("MostRecentConversionDate", false, true); - - public static readonly Field LastReceivedRequestTime = new Field("LastReceivedRequestTime", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field OriginalConversionTypeId = Fields.OriginalConversionTypeId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Category = Fields.Category; - - public static readonly Field GoogleEventSnippet = Fields.GoogleEventSnippet; - - public static readonly Field GoogleGlobalSiteTag = Fields.GoogleGlobalSiteTag; - - public static readonly Field DataDrivenModelStatus = Fields.DataDrivenModelStatus; - - public static readonly Field ConversionTypeOwnerCustomerId = Fields.ConversionTypeOwnerCustomerId; - - public static readonly Field ViewthroughLookbackWindow = Fields.ViewthroughLookbackWindow; - - public static readonly Field CtcLookbackWindow = Fields.CtcLookbackWindow; - - public static readonly Field CountingType = Fields.CountingType; - - public static readonly Field DefaultRevenueValue = Fields.DefaultRevenueValue; - - public static readonly Field DefaultRevenueCurrencyCode = Fields.DefaultRevenueCurrencyCode; - - public static readonly Field AlwaysUseDefaultRevenueValue = Fields.AlwaysUseDefaultRevenueValue; - - public static readonly Field ExcludeFromBidding = Fields.ExcludeFromBidding; - - public static readonly Field AttributionModelType = Fields.AttributionModelType; - - public static readonly Field MostRecentConversionDate = Fields.MostRecentConversionDate; - - public static readonly Field LastReceivedRequestTime = Fields.LastReceivedRequestTime; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field OriginalConversionTypeId = Fields.OriginalConversionTypeId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Category = Fields.Category; - - public static readonly Field GoogleEventSnippet = Fields.GoogleEventSnippet; - - public static readonly Field GoogleGlobalSiteTag = Fields.GoogleGlobalSiteTag; - - public static readonly Field DataDrivenModelStatus = Fields.DataDrivenModelStatus; - - public static readonly Field ConversionTypeOwnerCustomerId = Fields.ConversionTypeOwnerCustomerId; - - public static readonly Field ViewthroughLookbackWindow = Fields.ViewthroughLookbackWindow; - - public static readonly Field CtcLookbackWindow = Fields.CtcLookbackWindow; - - public static readonly Field CountingType = Fields.CountingType; - - public static readonly Field DefaultRevenueValue = Fields.DefaultRevenueValue; - - public static readonly Field DefaultRevenueCurrencyCode = Fields.DefaultRevenueCurrencyCode; - - public static readonly Field AlwaysUseDefaultRevenueValue = Fields.AlwaysUseDefaultRevenueValue; - - public static readonly Field ExcludeFromBidding = Fields.ExcludeFromBidding; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the conversion tracker. The user cannot ADD or SET the status to - /// HIDDEN. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConversionTracker.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConversionTrackerStatus - { - /// Visits to the conversion page will be recorded. - /// - ENABLED = 0, - /// Visits to the conversion page will not be recorded. - /// - DISABLED = 1, - /// Conversions will be recorded, but the conversion tracker will not appear in the - /// UI. - /// - HIDDEN = 2, - } - - - /// The category of conversion tracker that is being tracked. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConversionTracker.Category", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConversionTrackerCategory - { - DEFAULT = 0, - PAGE_VIEW = 1, - PURCHASE = 2, - SIGNUP = 3, - LEAD = 4, - REMARKETING = 5, - /// Download is applicable only to AppConversion types, - /// and is an error to use in conjunction with other types. AppConversions must use - /// download only if they also specify AppConversion#appConversionType as - /// DOWNLOAD or FIRST_OPEN. If any other appConversionType is used, then some other - /// category besides DOWNLOAD must be used. - /// - DOWNLOAD = 6, - } - - - /// Enumerates data driven model statuses. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DataDrivenModelStatus - { - /// The data driven model status is unknown. - /// - UNKNOWN = 0, - /// A data driven model is available. - /// - AVAILABLE = 1, - /// The data driven model is stale. It hasn't been updated for at least 7 days. It - /// is still being used, but will become expired if it does not get updated for 30 - /// days. - /// - STALE = 2, - /// The data driven model expired. It hasn't been updated for at least 30 days and - /// cannot be used. Most commonly this is because there haven't been the required - /// number of events in a recent 30-day period. - /// - EXPIRED = 3, - /// A data driven model has never been generated. Most commonly this is because - /// there has never been the required number of events in any 30-day period. - /// - NEVER_GENERATED = 4, - } - - - /// Conversion deduplication mode for Conversion Optimizer. That is, whether to - /// optimize for number of clicks that get at least one conversion, or total number - /// of conversions per click. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConversionDeduplicationMode - { - /// Number of clicks that get at least one conversion. - /// - ONE_PER_CLICK = 0, - /// Total number of conversions per click. - /// - MANY_PER_CLICK = 1, - } - - - /// Attribution models describing how to distribute credit for a particular - /// conversion across potentially many prior interactions. See - /// https://support.google.com/adwords/answer/6259715 for more information about - /// attribution modeling in AdWords. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AttributionModelType - { - UNKNOWN = 0, - /// Attributes all credit for a conversion to its last click. - /// - LAST_CLICK = 1, - /// Attributes all credit for a conversion to its first click. - /// - FIRST_CLICK = 2, - /// Attributes credit for a conversion equally across all of its clicks. - /// - LINEAR = 3, - /// Attributes exponentially more credit for a conversion to its more recent clicks - /// (half-life is 1 week). - /// - TIME_DECAY = 4, - /// Attributes 40% of the credit for a conversion to its first and last clicks. - /// Remaining 20% is evenly distributed across all other clicks. - /// - U_SHAPED = 5, - /// Flexible model that uses machine learning to determine the appropriate - /// distribution of credit among clicks. - /// - DATA_DRIVEN = 6, - } - - - /// A conversion that happens when a user performs the following sequence of - /// actions:
  • Clicks on an advertiser's ad
  • Proceeds to the - /// advertiser's website, where special javascript installed on the page produces a - /// dynamically-generated phone number,
  • Calls that number from their home - /// (or other) phone
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class WebsiteCallMetricsConversion : ConversionTracker - { - private long phoneCallDurationField; - - private bool phoneCallDurationFieldSpecified; - - /// This field can be selected using the value - /// "WebsitePhoneCallDuration". This field - /// must be between 0 and 10000, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long phoneCallDuration - { - get - { - return this.phoneCallDurationField; - } - set - { - this.phoneCallDurationField = value; - this.phoneCallDurationSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool phoneCallDurationSpecified - { - get - { - return this.phoneCallDurationFieldSpecified; - } - set - { - this.phoneCallDurationFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ConversionTracker.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field WebsitePhoneCallDuration = new Field("WebsitePhoneCallDuration", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ConversionTracker.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field WebsitePhoneCallDuration = Fields.WebsitePhoneCallDuration; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ConversionTracker.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A conversion type that receives conversions by having them uploaded through the - /// OfflineConversionFeedService. After successfully creating a new - /// UploadConversion, send the name of this conversion type along with your - /// conversion details to the OfflineConversionFeedService to attribute those - /// conversions to this conversion type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UploadConversion : ConversionTracker - { - private bool isExternallyAttributedField; - - private bool isExternallyAttributedFieldSpecified; - - /// Whether this conversion is using an external attribution model. This field is read only and will be ignored when - /// sent to the API for the following Operators: SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool isExternallyAttributed - { - get - { - return this.isExternallyAttributedField; - } - set - { - this.isExternallyAttributedField = value; - this.isExternallyAttributedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isExternallyAttributedSpecified - { - get - { - return this.isExternallyAttributedFieldSpecified; - } - set - { - this.isExternallyAttributedFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ConversionTracker.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ConversionTracker.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ConversionTracker.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A conversion that happens when a user performs one the following sequences of - /// actions:
  • User clicks on an advertiser's ad which takes the user to the - /// advertiser's website, where special javascript installed on the page produces a - /// dynamically-generated phone number. Then, user calls that number from their home - /// (or other) phone
  • User makes a phone call from - /// conversion-tracked call extensions
After successfully creating a new - /// UploadCallConversion, send the name of this conversion type along with your - /// conversion details to the OfflineCallConversionFeedService to attribute those - /// conversions to this conversion type. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UploadCallConversion : ConversionTracker - { - } - - - /// A ConversionTracker for mobile apps. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AppConversion : ConversionTracker - { - private string appIdField; - - private AppConversionAppPlatform appPlatformField; - - private bool appPlatformFieldSpecified; - - private string snippetField; - - private AppConversionAppConversionType appConversionTypeField; - - private bool appConversionTypeFieldSpecified; - - private string appPostbackUrlField; - - /// App ID of the app conversion tracker. This field is required for certain - /// conversion types, in particular, Android app install (first open) and Android - /// app install (from Google Play). This field - /// can be selected using the value "AppId".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string appId - { - get - { - return this.appIdField; - } - set - { - this.appIdField = value; - } - } - - /// App platform of the app conversion tracker. This field defaults to NONE. Once it - /// is set to a value other than NONE it cannot be changed again. It must be set at - /// the same time as AppConversionType. This - /// field can be selected using the value "AppPlatform".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public AppConversionAppPlatform appPlatform - { - get - { - return this.appPlatformField; - } - set - { - this.appPlatformField = value; - this.appPlatformSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool appPlatformSpecified - { - get - { - return this.appPlatformFieldSpecified; - } - set - { - this.appPlatformFieldSpecified = value; - } - } - - /// The generated snippet for this conversion tracker. This snippet is - /// auto-generated by the API, and will be ignored in mutate operands. This field - /// will always be returned for conversion trackers using snippets. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string snippet - { - get - { - return this.snippetField; - } - set - { - this.snippetField = value; - } - } - - /// The type of AppConversion, which identifies a conversion as being either - /// download or in-app purchase. This field can only be set once and future reads - /// will populate the type appropriately. It is an error to change the value once it - /// is set. This field must be set at the same time as AppPlatform. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public AppConversionAppConversionType appConversionType - { - get - { - return this.appConversionTypeField; - } - set - { - this.appConversionTypeField = value; - this.appConversionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool appConversionTypeSpecified - { - get - { - return this.appConversionTypeFieldSpecified; - } - set - { - this.appConversionTypeFieldSpecified = value; - } - } - - /// The postback URL. When the conversion type specifies a postback url, Google will - /// send information about each conversion event to that url as they happen. - /// Details, including formatting requirements for this field: - /// https://developers.google.com/app-conversion-tracking/docs/app-install-feedback - /// This field can be selected using the value - /// "AppPostbackUrl".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string appPostbackUrl - { - get - { - return this.appPostbackUrlField; - } - set - { - this.appPostbackUrlField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ConversionTracker.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AppId = new Field("AppId", true, true); - - public static readonly Field AppPlatform = new Field("AppPlatform", true, true); - - public static readonly Field AppPostbackUrl = new Field("AppPostbackUrl", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ConversionTracker.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AppId = Fields.AppId; - - public static readonly Field AppPlatform = Fields.AppPlatform; - - public static readonly Field AppPostbackUrl = Fields.AppPostbackUrl; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ConversionTracker.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AppId = Fields.AppId; - - public static readonly Field AppPlatform = Fields.AppPlatform; - - public static readonly Field AppPostbackUrl = Fields.AppPostbackUrl; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// App platform for the AppConversionTracker. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AppConversion.AppPlatform", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AppConversionAppPlatform - { - NONE = 0, - ITUNES = 1, - ANDROID_MARKET = 2, - MOBILE_APP_CHANNEL = 3, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AppConversion.AppConversionType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AppConversionAppConversionType - { - NONE = 0, - DOWNLOAD = 1, - IN_APP_PURCHASE = 2, - FIRST_OPEN = 3, - } - - - /// A conversion tracker created through AdWords Conversion Tracking. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdWordsConversionTracker : ConversionTracker - { - private AdWordsConversionTrackerTrackingCodeType trackingCodeTypeField; - - private bool trackingCodeTypeFieldSpecified; - - /// Tracking code to use for the conversion type. This field can be selected using the value - /// "TrackingCodeType".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdWordsConversionTrackerTrackingCodeType trackingCodeType - { - get - { - return this.trackingCodeTypeField; - } - set - { - this.trackingCodeTypeField = value; - this.trackingCodeTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool trackingCodeTypeSpecified - { - get - { - return this.trackingCodeTypeFieldSpecified; - } - set - { - this.trackingCodeTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ConversionTracker.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TrackingCodeType = new Field("TrackingCodeType", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ConversionTracker.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TrackingCodeType = Fields.TrackingCodeType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ConversionTracker.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TrackingCodeType = Fields.TrackingCodeType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Type of snippet code to generate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdWordsConversionTracker.TrackingCodeType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdWordsConversionTrackerTrackingCodeType - { - /// The snippet that is fired as a result of a website page loading. - /// - WEBPAGE = 0, - /// The snippet contains a JavaScript function which fires the tag. This function is - /// typically called from an onClick handler added to a link or button element on - /// the page. - /// - WEBPAGE_ONCLICK = 1, - /// For embedding on a (mobile) webpage. The snippet contains a JavaScript function - /// which fires the tag. This function is typically called from an onClick handler - /// added to a link or button element on the page that also instructs a mobile - /// device to dial the advertiser's phone number. - /// - CLICK_TO_CALL = 2, - } - - - /// A ConversionTracker for phone calls from conversion-tracked call extensions and - /// call-only ads.

A call made from the call extension is reported as a - /// conversion if it lasts longer than N seconds. This duration is 60 seconds by - /// default. Each call extension can specify the desired conversion - /// configuration.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCallMetricsConversion : ConversionTracker - { - private long phoneCallDurationField; - - private bool phoneCallDurationFieldSpecified; - - /// The phone-call duration (in seconds) after which a conversion should be reported - /// for this AdCallMetricsConversion. This field - /// can be selected using the value "PhoneCallDuration".This field can be filtered on. This field must be between 0 and 10000, - /// inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long phoneCallDuration - { - get - { - return this.phoneCallDurationField; - } - set - { - this.phoneCallDurationField = value; - this.phoneCallDurationSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool phoneCallDurationSpecified - { - get - { - return this.phoneCallDurationFieldSpecified; - } - set - { - this.phoneCallDurationFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ConversionTracker.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field PhoneCallDuration = new Field("PhoneCallDuration", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ConversionTracker.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field PhoneCallDuration = Fields.PhoneCallDuration; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ConversionTracker.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field PhoneCallDuration = Fields.PhoneCallDuration; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConversionTrackerPage))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionBidLandscapePage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidLandscapePage))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LabelPage))] - public abstract partial class NoStatsPage : Page - { - } - - - /// Contains a subset of ConversionTrackers - /// resulting from the filtering and paging of the ConversionTrackerService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConversionTrackerPage : NoStatsPage - { - private ConversionTracker[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public ConversionTracker[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NoStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NoStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NoStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An error that can occur during calls to the ConversionTypeService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConversionTrackingError : ApiError - { - private ConversionTrackingErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ConversionTrackingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Enumerates all the possible reasons for a ConversionTypeError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ConversionTrackingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ConversionTrackingErrorReason - { - /// An attempt to make a forked conversion type from a global conversion type was - /// made, but there already exists a conversion type forked from this global - /// conversion type. - /// - ALREADY_CREATED_CUSTOM_CONVERSION_TYPE = 0, - /// This user is not whitelisted for the import of Analytics goals and profiles, and - /// yet requested to mutate an Analytics conversion type. - /// - ANALYTICS_NOT_ALLOWED = 1, - /// Cannot execute an ADD operation on this subclass of ConversionType (currently, - /// only instances of AdWordsConversionType may be added). - /// - CANNOT_ADD_CONVERSION_TYPE_SUBCLASS = 2, - /// Creating an upload conversion type with isExternallyAttributedConversion and - /// isSalesforceConversion both set is not allowed. - /// - CANNOT_ADD_EXTERNALLY_ATTRIBUTED_SALESFORCE_CONVERSION = 37, - /// AppConversions cannot change app conversion types once it has been set. - /// - CANNOT_CHANGE_APP_CONVERSION_TYPE = 3, - /// AppConversions cannot change app platforms once it has been set. - /// - CANNOT_CHANGE_APP_PLATFORM = 4, - /// Cannot change between subclasses of ConversionType - /// - CANNNOT_CHANGE_CONVERSION_SUBCLASS = 5, - /// If a conversion type's status is initially non-hidden, it may not be changed to - /// Hidden; nor may hidden conversion types be created through the API. Hidden - /// conversion types are typically created by backend processes. - /// - CANNOT_SET_HIDDEN_STATUS = 6, - /// The user attempted to change the Category when it was uneditable. - /// - CATEGORY_IS_UNEDITABLE = 28, - /// The attribution model of the conversion type is uneditable. - /// - ATTRIBUTION_MODEL_IS_UNEDITABLE = 30, - /// The attribution model of the conversion type cannot be unknown. - /// - ATTRIBUTION_MODEL_CANNOT_BE_UNKNOWN = 38, - /// The attribution model cannot be set to DATA_DRIVEN because a data-driven model - /// has never been generated. - /// - DATA_DRIVEN_MODEL_WAS_NEVER_GENERATED = 31, - /// The attribution model cannot be set to DATA_DRIVEN because the data-driven model - /// is expired. - /// - DATA_DRIVEN_MODEL_IS_EXPIRED = 32, - /// The attribution model cannot be set to DATA_DRIVEN because the data-driven model - /// is stale. - /// - DATA_DRIVEN_MODEL_IS_STALE = 33, - /// The attribution model cannot be set to DATA_DRIVEN because the data-driven model - /// is unavailable or the conversion type was newly added. - /// - DATA_DRIVEN_MODEL_IS_UNKNOWN = 34, - /// An attempt to access a conversion type failed because no conversion type with - /// this ID exists for this account. - /// - CONVERSION_TYPE_NOT_FOUND = 7, - /// The user attempted to change the click-through conversion (ctc) lookback window - /// when it is not editable. - /// - CTC_LOOKBACK_WINDOW_IS_UNEDITABLE = 29, - /// An exception occurred in the domain layer during an attempt to process a - /// ConversionTypeOperation. - /// - DOMAIN_EXCEPTION = 8, - /// An attempt was made to set a counting type inconsistent with other properties. - /// Currently, AppConversion with appConversionType = DOWNLOAD and appPlatform = - /// ANDROID_MARKET cannot have a countingType of MANY_PER_CLICK - /// - INCONSISTENT_COUNTING_TYPE = 9, - /// The user specified two identical app ids when attempting to create or modify a - /// conversion type. - /// - DUPLICATE_APP_ID = 10, - /// The user is trying to enter a double bidding conflict. A double bidding conflict - /// is when 2 conversion types both measure downloads for the same app ID. - /// - TWO_CONVERSION_TYPES_BIDDING_ON_SAME_APP_DOWNLOAD = 35, - /// The user is trying to enter a double bidding conflict with the global type. The - /// conversion type being created/editied and the global type (or forked global - /// download type) are both measuring downloads for the same app ID. - /// - CONVERSION_TYPE_BIDDING_ON_SAME_APP_DOWNLOAD_AS_GLOBAL_TYPE = 36, - /// The user specified two identical names when attempting to create or rename - /// multiple conversion types. - /// - DUPLICATE_NAME = 11, - /// An error occurred while the server was sending the email. - /// - EMAIL_FAILED = 12, - /// The maximum number of active conversion types for this account has been - /// exceeded. - /// - EXCEEDED_CONVERSION_TYPE_LIMIT = 13, - /// The user requested to modify an existing conversion type, but did not supply an - /// ID. - /// - ID_IS_NULL = 14, - /// App ids must adhere to valid Java package naming requirements. - /// - INVALID_APP_ID = 15, - /// App id can not be set to forked system-defined Android download conversion type. - /// - CANNOT_SET_APP_ID = 16, - /// The user attempted to set category which is not applicable to provided - /// conversion type. - /// - INVALID_CATEGORY = 39, - /// The user entered an invalid background color. The background color must be a - /// valid HTML hex color code, such as "99ccff". - /// - INVALID_COLOR = 17, - /// The date range specified in the stats selector is invalid. - /// - INVALID_DATE_RANGE = 18, - /// The email address of the sender or the recipient of a snippet email was invalid. - /// - INVALID_EMAIL_ADDRESS = 19, - /// Editing the settings for the system-wide default conversion trackers is not - /// permitted in AdWords API. - /// - INVALID_ORIGINAL_CONVERSION_TYPE_ID = 20, - /// The AppPlatform and AppConversionType must be set at the same time. It is an - /// error to set just one or the other. - /// - MUST_SET_APP_PLATFORM_AND_APP_CONVERSION_TYPE_TOGETHER = 21, - /// The user attempted to create a new conversion type, or to rename an existing - /// conversion type, whose new name matches one of the other conversion types for - /// his account. - /// - NAME_ALREADY_EXISTS = 22, - /// The user asked to send a notification email, but specified no recipients. - /// - NO_RECIPIENTS = 23, - /// The requested conversion type has no snippet, and thus its snippet email cannot - /// be sent. - /// - NO_SNIPPET = 24, - /// The requested date range contains too many webpages to be processed. - /// - TOO_MANY_WEBPAGES = 25, - /// An unknown sorting type was specified in the selector. - /// - UNKNOWN_SORTING_TYPE = 26, - /// AppConversionType cannot be set to DOWNLOAD when AppPlatform is ITUNES. - /// - UNSUPPORTED_APP_CONVERSION_TYPE = 27, - } - - - /// Errors returned when App Postback Url is invalid. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AppPostbackUrlError : ApiError - { - private AppPostbackUrlErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AppPostbackUrlErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AppPostbackUrlError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AppPostbackUrlErrorReason - { - /// Invalid Url format. - /// - INVALID_URL_FORMAT = 0, - /// Invalid domain. - /// - INVALID_DOMAIN = 1, - /// Some of the required macros were not found. - /// - REQUIRED_MACRO_NOT_FOUND = 2, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.ConversionTrackerServiceInterface")] - public interface ConversionTrackerServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.ConversionTrackerPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ConversionTrackerService.mutateResponse mutate(Wrappers.ConversionTrackerService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.ConversionTrackerService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.ConversionTrackerPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operations for conversion tracker. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConversionTrackerOperation : Operation - { - private ConversionTracker operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ConversionTracker operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the ConversionTrackerService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ConversionTrackerReturnValue : ListReturnValue - { - private ConversionTracker[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public ConversionTracker[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface ConversionTrackerServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.ConversionTrackerServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage conversion trackers. A conversion tracker provides a - /// snippet of code which records every time a user visits a page that contains it. - /// The data this provides can be used to gauge the effectiveness of your ads and - /// keywords. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class ConversionTrackerService : AdWordsSoapClient, IConversionTrackerService - { - /// Creates a new instance of the - /// class. - public ConversionTrackerService() - { - } - - /// Creates a new instance of the - /// class. - public ConversionTrackerService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public ConversionTrackerService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public ConversionTrackerService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public ConversionTrackerService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of the conversion trackers that match the selector. The actual - /// objects contained in the page's list of entries will be specific subclasses of - /// the abstract ConversionTracker class. - /// The selector specifying the ConversionTrackers to return. - /// List of conversion trackers specified by the selector. - /// if problems occurred while retrieving - /// results. - public virtual Google.Api.Ads.AdWords.v201806.ConversionTrackerPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ConversionTrackerService.mutateResponse Google.Api.Ads.AdWords.v201806.ConversionTrackerServiceInterface.mutate(Wrappers.ConversionTrackerService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations such as adding or updating conversion - /// trackers.

Note: ConversionTrackerOperation does not - /// support the REMOVE operator. In order to 'disable' a conversion - /// type, send a SET operation for the conversion tracker with the - /// status property set to DISABLED

You can mutate - /// any ConversionTracker that belongs to your account. You may not mutate a - /// ConversionTracker that belongs to some other account. You may not directly - /// mutate a system-defined ConversionTracker, but you can create a mutable copy of - /// it in your account by sending a mutate request with an ADD operation specifying - /// an originalConversionTypeId matching a system-defined conversion tracker's ID. - /// That new ADDed ConversionTracker will inherit the statistics and properties of - /// the system-defined type, but will be editable as usual.

- ///
A list of mutate operations to perform. - /// The list of the conversion trackers as they appear after mutation, in - /// the same order as they appeared in the list of operations. - /// if problems occurred while updating the - /// data. - public virtual Google.Api.Ads.AdWords.v201806.ConversionTrackerReturnValue mutate(Google.Api.Ads.AdWords.v201806.ConversionTrackerOperation[] operations) - { - Wrappers.ConversionTrackerService.mutateRequest inValue = new Wrappers.ConversionTrackerService.mutateRequest(); - inValue.operations = operations; - Wrappers.ConversionTrackerService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.ConversionTrackerServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ConversionTrackerServiceInterface.mutateAsync(Wrappers.ConversionTrackerService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.ConversionTrackerOperation[] operations) - { - Wrappers.ConversionTrackerService.mutateRequest inValue = new Wrappers.ConversionTrackerService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ConversionTrackerServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of conversion trackers that match the query. - /// The SQL-like AWQL query string. - /// A list of conversion trackers. - /// if problems occur while parsing the query - /// or fetching conversion trackers. - public virtual Google.Api.Ads.AdWords.v201806.ConversionTrackerPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CustomerNegativeCriterionService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a criterion exclusion on a customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerNegativeCriterion - { - private Criterion criterionField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a list of customer level criteria exclusions filtered and sorted as - /// specified in the CustomerExclusionCriterionService#get - /// call - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerNegativeCriterionPage : Page - { - private CustomerNegativeCriterion[] entriesField; - - /// The result entries in this page - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CustomerNegativeCriterion[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents error codes for the CustomerExclusionCriterionService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerNegativeCriterionError : ApiError - { - private CustomerNegativeCriterionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerNegativeCriterionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Error reasons - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomerNegativeCriterionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CustomerNegativeCriterionErrorReason - { - INVALID_CRITERION_TYPE = 0, - /// Cannot create a criterion with a deleted SharedSet. - /// - SHARED_SET_IS_DELETED = 1, - /// Cannot create a criterion with an invalid SharedSetType. - /// - INVALID_SHARED_SET_TYPE = 2, - PLACEMENT_LIST_TYPE_ONLY_ALLOWED_FOR_XBID = 3, - /// Manager customer is not allowed to add customer exclusion criteria. - /// - MANAGER_CUSTOMER_CANNOT_ADD = 4, - CUSTOMER_EXCLUSION_CRITERION_ERROR = 5, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionServiceInterface")] - public interface CustomerNegativeCriterionServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomerNegativeCriterionService.mutateResponse mutate(Wrappers.CustomerNegativeCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CustomerNegativeCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation for adding/removing a criterion associated to a customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerNegativeCriterionOperation : Operation - { - private CustomerNegativeCriterion operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerNegativeCriterion operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Container for the return value from the CustomerExclusionCriterionService mutate - /// calls. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerNegativeCriterionReturnValue : ListReturnValue - { - private CustomerNegativeCriterion[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CustomerNegativeCriterion[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CustomerNegativeCriterionServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Manages criteria negatives for customer. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CustomerNegativeCriterionService : AdWordsSoapClient, ICustomerNegativeCriterionService - { - /// Creates a new instance of the class. - public CustomerNegativeCriterionService() - { - } - - /// Creates a new instance of the class. - public CustomerNegativeCriterionService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public CustomerNegativeCriterionService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CustomerNegativeCriterionService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CustomerNegativeCriterionService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of CustomerNegativeCriterion that meets the selector criteria - /// filters the criteria returned - /// The list of CustomerNegativeCriterion - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomerNegativeCriterionService.mutateResponse Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionServiceInterface.mutate(Wrappers.CustomerNegativeCriterionService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, removes negative criteria for a customer. These negative criteria apply to - /// all campaigns of the customer. - /// A list of operations to apply - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionOperation[] operations) - { - Wrappers.CustomerNegativeCriterionService.mutateRequest inValue = new Wrappers.CustomerNegativeCriterionService.mutateRequest(); - inValue.operations = operations; - Wrappers.CustomerNegativeCriterionService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionServiceInterface.mutateAsync(Wrappers.CustomerNegativeCriterionService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionOperation[] operations) - { - Wrappers.CustomerNegativeCriterionService.mutateRequest inValue = new Wrappers.CustomerNegativeCriterionService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of CustomerNegativeCriterion that match the query. - /// The SQL-like AWQL query string. - /// A list of CustomerNegativeCriterion. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CustomerService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getCustomers", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class getCustomersRequest - { - /// Creates a new instance of the class. - /// - public getCustomersRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getCustomersResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class getCustomersResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.Customer[] rval; - - /// Creates a new instance of the - /// class. - public getCustomersResponse() - { - } - - /// Creates a new instance of the - /// class. - public getCustomersResponse(Google.Api.Ads.AdWords.v201806.Customer[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getServiceLinks", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class getServiceLinksRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.Selector selector; - - /// Creates a new instance of the - /// class. - public getServiceLinksRequest() - { - } - - /// Creates a new instance of the - /// class. - public getServiceLinksRequest(Google.Api.Ads.AdWords.v201806.Selector selector) - { - this.selector = selector; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getServiceLinksResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class getServiceLinksResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.ServiceLink[] rval; - - /// Creates a new instance of the - /// class. - public getServiceLinksResponse() - { - } - - /// Creates a new instance of the - /// class. - public getServiceLinksResponse(Google.Api.Ads.AdWords.v201806.ServiceLink[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateServiceLinks", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateServiceLinksRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.ServiceLinkOperation[] operations; - - /// Creates a new instance of the - /// class. - public mutateServiceLinksRequest() - { - } - - /// Creates a new instance of the - /// class. - public mutateServiceLinksRequest(Google.Api.Ads.AdWords.v201806.ServiceLinkOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateServiceLinksResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateServiceLinksResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.ServiceLink[] rval; - - /// Creates a new instance of the - /// class. - public mutateServiceLinksResponse() - { - } - - /// Creates a new instance of the - /// class. - public mutateServiceLinksResponse(Google.Api.Ads.AdWords.v201806.ServiceLink[] rval) - { - this.rval = rval; - } - } - } - /// Customer-wide settings related to AdWords remarketing. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class RemarketingSettings - { - private string snippetField; - - private string googleGlobalSiteTagField; - - /// The Adwords remarketing tag snippet for the customer. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string snippet - { - get - { - return this.snippetField; - } - set - { - this.snippetField = value; - } - } - - /// The google one global site tag for the customer. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string googleGlobalSiteTag - { - get - { - return this.googleGlobalSiteTagField; - } - set - { - this.googleGlobalSiteTagField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A collection of customer-wide settings related to AdWords Conversion Tracking. - /// Settings that apply at the conversion type level can be accessed and modified - /// though . - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ConversionTrackingSettings - { - private long effectiveConversionTrackingIdField; - - private bool effectiveConversionTrackingIdFieldSpecified; - - private bool usesCrossAccountConversionTrackingField; - - private bool usesCrossAccountConversionTrackingFieldSpecified; - - /// With Cross-Account Conversion Tracking, a manager can share its conversion - /// tracking ID among the clients it manages. If a customer is using a manager's - /// conversion tracking ID we store it as the customer's effective conversion - /// tracking ID.

This is the conversion tracking ID used for this customer. If - /// this is 0, the customer is not using conversion tracking. If the customer is - /// using cross-account conversion tracking, this conversion tracking ID has been - /// shared from the manager's account. Otherwise, for a customer who is not using - /// cross-account conversion tracking, this is the customer's own conversion - /// tracking ID. This field is read only and will - /// be ignored when sent to the API.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long effectiveConversionTrackingId - { - get - { - return this.effectiveConversionTrackingIdField; - } - set - { - this.effectiveConversionTrackingIdField = value; - this.effectiveConversionTrackingIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool effectiveConversionTrackingIdSpecified - { - get - { - return this.effectiveConversionTrackingIdFieldSpecified; - } - set - { - this.effectiveConversionTrackingIdFieldSpecified = value; - } - } - - /// True if a customer is using cross-account conversion tracking. False if the - /// customer is not using conversion tracking, or if the customer is using his own - /// conversion tracking ID. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool usesCrossAccountConversionTracking - { - get - { - return this.usesCrossAccountConversionTrackingField; - } - set - { - this.usesCrossAccountConversionTrackingField = value; - this.usesCrossAccountConversionTrackingSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool usesCrossAccountConversionTrackingSpecified - { - get - { - return this.usesCrossAccountConversionTrackingFieldSpecified; - } - set - { - this.usesCrossAccountConversionTrackingFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a customer for the CustomerService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class Customer - { - private long customerIdField; - - private bool customerIdFieldSpecified; - - private string currencyCodeField; - - private string dateTimeZoneField; - - private string descriptiveNameField; - - private bool canManageClientsField; - - private bool canManageClientsFieldSpecified; - - private bool testAccountField; - - private bool testAccountFieldSpecified; - - private bool autoTaggingEnabledField; - - private bool autoTaggingEnabledFieldSpecified; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private bool parallelTrackingEnabledField; - - private bool parallelTrackingEnabledFieldSpecified; - - private ConversionTrackingSettings conversionTrackingSettingsField; - - private RemarketingSettings remarketingSettingsField; - - /// The 10-digit AdWords Customer ID. This field - /// is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long customerId - { - get - { - return this.customerIdField; - } - set - { - this.customerIdField = value; - this.customerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customerIdSpecified - { - get - { - return this.customerIdFieldSpecified; - } - set - { - this.customerIdFieldSpecified = value; - } - } - - /// The currency in which this account operates. We support a subset of the currency - /// codes derived from the ISO 4217 standard. See - /// Currency Codes for the currently supported currencies. This field is read only and will be ignored when - /// sent to the API. The length of this - /// string should be between 3 and 3, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string currencyCode - { - get - { - return this.currencyCodeField; - } - set - { - this.currencyCodeField = value; - } - } - - /// The local timezone ID for this customer. See Time - /// Zone Codes for the currently supported list. This field is read only and will be ignored when sent to the - /// API. This string must not be - /// empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string dateTimeZone - { - get - { - return this.dateTimeZoneField; - } - set - { - this.dateTimeZoneField = value; - } - } - - /// An optional, non-unique descriptive name for this customer. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string descriptiveName - { - get - { - return this.descriptiveNameField; - } - set - { - this.descriptiveNameField = value; - } - } - - /// Whether this customer can manage other AdWords customers This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool canManageClients - { - get - { - return this.canManageClientsField; - } - set - { - this.canManageClientsField = value; - this.canManageClientsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool canManageClientsSpecified - { - get - { - return this.canManageClientsFieldSpecified; - } - set - { - this.canManageClientsFieldSpecified = value; - } - } - - /// Whether this customer's account is a test account. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool testAccount - { - get - { - return this.testAccountField; - } - set - { - this.testAccountField = value; - this.testAccountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool testAccountSpecified - { - get - { - return this.testAccountFieldSpecified; - } - set - { - this.testAccountFieldSpecified = value; - } - } - - /// Whether auto-tagging is enabled for this customer. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public bool autoTaggingEnabled - { - get - { - return this.autoTaggingEnabledField; - } - set - { - this.autoTaggingEnabledField = value; - this.autoTaggingEnabledSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool autoTaggingEnabledSpecified - { - get - { - return this.autoTaggingEnabledFieldSpecified; - } - set - { - this.autoTaggingEnabledFieldSpecified = value; - } - } - - /// URL template for constructing a tracking URL.

On update, empty string ("") - /// indicates to clear the field.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// URL template for appending params to Final URL.

On update, empty string ("") - /// indicates to clear the field.

This field is supported only in test - /// accounts.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// Whether parallel tracking is enabled for this customer. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public bool parallelTrackingEnabled - { - get - { - return this.parallelTrackingEnabledField; - } - set - { - this.parallelTrackingEnabledField = value; - this.parallelTrackingEnabledSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool parallelTrackingEnabledSpecified - { - get - { - return this.parallelTrackingEnabledFieldSpecified; - } - set - { - this.parallelTrackingEnabledFieldSpecified = value; - } - } - - /// Customer-level AdWords Conversion Tracking settings - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public ConversionTrackingSettings conversionTrackingSettings - { - get - { - return this.conversionTrackingSettingsField; - } - set - { - this.conversionTrackingSettingsField = value; - } - } - - /// Customer-level AdWords Remarketing settings This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public RemarketingSettings remarketingSettings - { - get - { - return this.remarketingSettingsField; - } - set - { - this.remarketingSettingsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Possible error codes in CustomerService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class CustomerError : ApiError - { - private CustomerErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The ApiErrorReason for a CustomerError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomerError.Reason", Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum CustomerErrorReason - { - /// Referenced service link does not exist - /// - INVALID_SERVICE_LINK = 2, - /// An ACTIVE link cannot be made PENDING - /// - INVALID_STATUS = 3, - /// CustomerService cannot get an account that - /// is not fully set up. - /// - ACCOUNT_NOT_SET_UP = 1, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CustomerServiceInterface")] - public interface CustomerServiceInterface - { - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomerService.getCustomersResponse getCustomers(Wrappers.CustomerService.getCustomersRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getCustomersAsync(Wrappers.CustomerService.getCustomersRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomerService.getServiceLinksResponse getServiceLinks(Wrappers.CustomerService.getServiceLinksRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getServiceLinksAsync(Wrappers.CustomerService.getServiceLinksRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.Customer mutate(Google.Api.Ads.AdWords.v201806.Customer customer); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.Customer customer); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomerService.mutateServiceLinksResponse mutateServiceLinks(Wrappers.CustomerService.mutateServiceLinksRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateServiceLinksAsync(Wrappers.CustomerService.mutateServiceLinksRequest request); - } - - - /// A data-sharing connection between an AdWords customer and another Google - /// service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ServiceLink - { - private ServiceType serviceTypeField; - - private bool serviceTypeFieldSpecified; - - private long serviceLinkIdField; - - private bool serviceLinkIdFieldSpecified; - - private ServiceLinkLinkStatus linkStatusField; - - private bool linkStatusFieldSpecified; - - private string nameField; - - /// The service being linked. This field can be - /// filtered on using the value "ServiceType". This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ServiceType serviceType - { - get - { - return this.serviceTypeField; - } - set - { - this.serviceTypeField = value; - this.serviceTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool serviceTypeSpecified - { - get - { - return this.serviceTypeFieldSpecified; - } - set - { - this.serviceTypeFieldSpecified = value; - } - } - - /// An ID uniquely identifying this link within a given serviceType. This field - /// is required and should not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long serviceLinkId - { - get - { - return this.serviceLinkIdField; - } - set - { - this.serviceLinkIdField = value; - this.serviceLinkIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool serviceLinkIdSpecified - { - get - { - return this.serviceLinkIdFieldSpecified; - } - set - { - this.serviceLinkIdFieldSpecified = value; - } - } - - /// Status of the link. This field is required and - /// should not be null when it is contained within Operators : SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public ServiceLinkLinkStatus linkStatus - { - get - { - return this.linkStatusField; - } - set - { - this.linkStatusField = value; - this.linkStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool linkStatusSpecified - { - get - { - return this.linkStatusFieldSpecified; - } - set - { - this.linkStatusFieldSpecified = value; - } - } - - /// An identifier for the service account to which the AdWords account is linked. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ServiceType = new Field("ServiceType", true, false); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ServiceType = Fields.ServiceType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ServiceType = Fields.ServiceType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Services whose links to AdWords accounts are visible in CustomerServicee - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum ServiceType - { - /// Data from Google Merchant Center accounts can be linked for use in shopping - /// campaigns. For more information, visit this Help Center - /// article. - /// - MERCHANT_CENTER = 0, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 1, - } - - - /// Status of the link - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ServiceLink.LinkStatus", Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum ServiceLinkLinkStatus - { - /// Link is enabled and data sharing is allowed. - /// - ACTIVE = 0, - /// Link was requested from the other service and is awaiting approval. To approve - /// the link, change the status to ACTIVE via a SET - /// operation. - /// - PENDING = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// An operation on an AdWords link. See ServiceType for - /// information on the various linking types supported. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ServiceLinkOperation : Operation - { - private ServiceLink operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ServiceLink operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CustomerServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CustomerServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service to access basic details about any customer. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CustomerService : AdWordsSoapClient, ICustomerService - { - /// Creates a new instance of the class. - /// - public CustomerService() - { - } - - /// Creates a new instance of the class. - /// - public CustomerService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public CustomerService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CustomerService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CustomerService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomerService.getCustomersResponse Google.Api.Ads.AdWords.v201806.CustomerServiceInterface.getCustomers(Wrappers.CustomerService.getCustomersRequest request) - { - return base.Channel.getCustomers(request); - } - - /// Returns details of all the customers directly accessible by the user - /// authenticating the call.

Note: This method will return only test accounts if - /// the developer token used has not been approved.

Starting with v201607, if - /// clientCustomerId is specified in the request header, only details - /// of that customer will be returned. To do this for prior versions, use the - /// get() method instead.

- ///
- public virtual Google.Api.Ads.AdWords.v201806.Customer[] getCustomers() - { - Wrappers.CustomerService.getCustomersRequest inValue = new Wrappers.CustomerService.getCustomersRequest(); - Wrappers.CustomerService.getCustomersResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomerServiceInterface) (this)).getCustomers(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomerServiceInterface.getCustomersAsync(Wrappers.CustomerService.getCustomersRequest request) - { - return base.Channel.getCustomersAsync(request); - } - - public virtual System.Threading.Tasks.Task getCustomersAsync() - { - Wrappers.CustomerService.getCustomersRequest inValue = new Wrappers.CustomerService.getCustomersRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomerServiceInterface) (this)).getCustomersAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomerService.getServiceLinksResponse Google.Api.Ads.AdWords.v201806.CustomerServiceInterface.getServiceLinks(Wrappers.CustomerService.getServiceLinksRequest request) - { - return base.Channel.getServiceLinks(request); - } - - /// Retrieves the list of service links for the authorized customer. See ServiceType for information on the various linking types - /// supported. - /// describing which links to retrieve - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.ServiceLink[] getServiceLinks(Google.Api.Ads.AdWords.v201806.Selector selector) - { - Wrappers.CustomerService.getServiceLinksRequest inValue = new Wrappers.CustomerService.getServiceLinksRequest(); - inValue.selector = selector; - Wrappers.CustomerService.getServiceLinksResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomerServiceInterface) (this)).getServiceLinks(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomerServiceInterface.getServiceLinksAsync(Wrappers.CustomerService.getServiceLinksRequest request) - { - return base.Channel.getServiceLinksAsync(request); - } - - public virtual System.Threading.Tasks.Task getServiceLinksAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - Wrappers.CustomerService.getServiceLinksRequest inValue = new Wrappers.CustomerService.getServiceLinksRequest(); - inValue.selector = selector; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomerServiceInterface) (this)).getServiceLinksAsync(inValue)).Result.rval); - } - - /// Update the authorized customer.

While there are a limited set of properties - /// available to update, please read this help center article - /// on auto-tagging before updating .

- ///
the requested updated value for the customer. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.Customer mutate(Google.Api.Ads.AdWords.v201806.Customer customer) - { - return base.Channel.mutate(customer); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.Customer customer) - { - return base.Channel.mutateAsync(customer); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomerService.mutateServiceLinksResponse Google.Api.Ads.AdWords.v201806.CustomerServiceInterface.mutateServiceLinks(Wrappers.CustomerService.mutateServiceLinksRequest request) - { - return base.Channel.mutateServiceLinks(request); - } - - /// Modifies links to other services for the authorized customer. See ServiceType for information on the various linking types - /// supported. - /// to perform - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.ServiceLink[] mutateServiceLinks(Google.Api.Ads.AdWords.v201806.ServiceLinkOperation[] operations) - { - Wrappers.CustomerService.mutateServiceLinksRequest inValue = new Wrappers.CustomerService.mutateServiceLinksRequest(); - inValue.operations = operations; - Wrappers.CustomerService.mutateServiceLinksResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomerServiceInterface) (this)).mutateServiceLinks(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomerServiceInterface.mutateServiceLinksAsync(Wrappers.CustomerService.mutateServiceLinksRequest request) - { - return base.Channel.mutateServiceLinksAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateServiceLinksAsync(Google.Api.Ads.AdWords.v201806.ServiceLinkOperation[] operations) - { - Wrappers.CustomerService.mutateServiceLinksRequest inValue = new Wrappers.CustomerService.mutateServiceLinksRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomerServiceInterface) (this)).mutateServiceLinksAsync(inValue)).Result.rval); - } - } - namespace Wrappers.AdGroupFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdGroupFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdGroupFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// AdGroupFeeds are used to link a feed to an adgroup using a matching function, - /// making the feed's feed items available in the adgroup's ads for substitution. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupFeed - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private Function matchingFunctionField; - - private int[] placeholderTypesField; - - private AdGroupFeedStatus statusField; - - private bool statusFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - /// Id of the Feed associated with the AdGroupFeed. This field can be selected using the value "FeedId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Id of the AdGroup associated with the AdGroupFeed. This field can be selected using the value "AdGroupId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// Matching function associated with the AdGroupFeed. The matching function will - /// return true/false indicating which feed items may serve. This field can be selected using the value - /// "MatchingFunction". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Function matchingFunction - { - get - { - return this.matchingFunctionField; - } - set - { - this.matchingFunctionField = value; - } - } - - /// Indicates which placeholder types the feed may populate under the connected - /// AdGroup. This field can be selected using - /// the value "PlaceholderTypes".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("placeholderTypes", Order = 3)] - public int[] placeholderTypes - { - get - { - return this.placeholderTypesField; - } - set - { - this.placeholderTypesField = value; - } - } - - /// Status of the AdGroupFeed. This field can be - /// selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public AdGroupFeedStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// ID of the base campaign from which this draft/trial ad group feed was created. - /// This field is only returned on get requests. This field can be selected using the value - /// "BaseCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// ID of the base ad group from which this draft/trial ad group feed was created. - /// For base ad groups this is equal to the ad group ID. If the ad group was created - /// in the draft or trial and has no corresponding base ad group, this field is - /// null. This field is only returned on get requests. This field can be selected using the value - /// "BaseAdGroupId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field MatchingFunction = new Field("MatchingFunction", false, true); - - public static readonly Field PlaceholderTypes = new Field("PlaceholderTypes", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field MatchingFunction = Fields.MatchingFunction; - - public static readonly Field PlaceholderTypes = Fields.PlaceholderTypes; - - public static readonly Field Status = Fields.Status; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field PlaceholderTypes = Fields.PlaceholderTypes; - - public static readonly Field Status = Fields.Status; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the AdGroupFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupFeed.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupFeedStatus - { - /// This AdGroupFeed's data is currently being used. - /// - ENABLED = 0, - /// This AdGroupFeed's data is not used anymore. - /// - REMOVED = 1, - /// Unknown status. Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 2, - } - - - /// The result of a call to AdGroupFeedService#get. Contains a list of associations - /// between ad groups and feeds. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupFeedPage : NullStatsPage - { - private AdGroupFeed[] entriesField; - - /// The resulting AdGroupFeeds. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroupFeed[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an error for the AdGroupFeedService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupFeedError : ApiError - { - private AdGroupFeedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupFeedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupFeedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupFeedErrorReason - { - /// An active feed already exists for this adgroup and place holder type. - /// - FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 0, - /// The specified id does not exist. - /// - INVALID_ID = 1, - /// The specified feed is deleted. - /// - CANNOT_ADD_FOR_DELETED_FEED = 2, - /// The AdGroupFeed already exists. SET should be used to modify the existing - /// AdGroupFeed. - /// - CANNOT_ADD_ALREADY_EXISTING_ADGROUP_FEED = 3, - /// Cannot operate on removed adgroup feed. - /// - CANNOT_OPERATE_ON_REMOVED_ADGROUP_FEED = 4, - /// Invalid placeholder type ids. - /// - INVALID_PLACEHOLDER_TYPES = 5, - /// Feed mapping for this placeholder type does not exist. - /// - MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 6, - /// Location AdGroupFeeds cannot be created unless there is a location CustomerFeed - /// for the specified feed. - /// - NO_EXISTING_LOCATION_CUSTOMER_FEED = 7, - UNKNOWN = 8, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdGroupFeedServiceInterface")] - public interface AdGroupFeedServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupFeedService.mutateResponse mutate(Wrappers.AdGroupFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdGroupFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupFeedPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate an AdGroupFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupFeedOperation : Operation - { - private AdGroupFeed operandField; - - /// AdGroupFeed to operate on. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to AdGroupFeedService#mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupFeedReturnValue : ListReturnValue - { - private AdGroupFeed[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// The resulting AdGroupFeeds. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdGroupFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdGroupFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage adgroup feed links, and matching functions. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdGroupFeedService : AdWordsSoapClient, IAdGroupFeedService - { - /// Creates a new instance of the class. - /// - public AdGroupFeedService() - { - } - - /// Creates a new instance of the class. - /// - public AdGroupFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of AdGroupFeeds that meet the selector criteria. - /// Determines which AdGroupFeeds to return. If empty all - /// adgroup feeds are returned. - /// The list of AdgroupFeeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.AdGroupFeedServiceInterface.mutate(Wrappers.AdGroupFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates or removes AdGroupFeeds. - /// The operations to apply. - /// The resulting Feeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupFeedOperation[] operations) - { - Wrappers.AdGroupFeedService.mutateRequest inValue = new Wrappers.AdGroupFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdGroupFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupFeedServiceInterface.mutateAsync(Wrappers.AdGroupFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupFeedOperation[] operations) - { - Wrappers.AdGroupFeedService.mutateRequest inValue = new Wrappers.AdGroupFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of AdGroupFeeds that match the query. - /// The SQL-like AWQL query string. - /// s A list of AdGroupFeed. - /// if problems occur while parsing the query - /// or fetching AdGroupFeed. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupFeedPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CustomerSyncService - { - } - /// Holds information about a changed feed and any feeds items within the feed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public partial class FeedChangeData - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private ChangeStatus feedChangeStatusField; - - private bool feedChangeStatusFieldSpecified; - - private long[] changedFeedItemsField; - - private long[] removedFeedItemsField; - - /// The feed ID. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Whether or not the fields of this feed have changed. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ChangeStatus feedChangeStatus - { - get - { - return this.feedChangeStatusField; - } - set - { - this.feedChangeStatusField = value; - this.feedChangeStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedChangeStatusSpecified - { - get - { - return this.feedChangeStatusFieldSpecified; - } - set - { - this.feedChangeStatusFieldSpecified = value; - } - } - - /// A list of feed item IDs that have been added or modified within the the feed. If - /// a feed item is deleted after a modification, it will not be included in this - /// list. - /// - [System.Xml.Serialization.XmlElementAttribute("changedFeedItems", Order = 2)] - public long[] changedFeedItems - { - get - { - return this.changedFeedItemsField; - } - set - { - this.changedFeedItemsField = value; - } - } - - /// A list feed item IDs that have been removed from the feed. - /// - [System.Xml.Serialization.XmlElementAttribute("removedFeedItems", Order = 3)] - public long[] removedFeedItems - { - get - { - return this.removedFeedItemsField; - } - set - { - this.removedFeedItemsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An enum used to classify the types of changes that have been made to an - /// adgroup/campaign during a specified date range. This only refers to the field of - /// the entity itself, and not its children.

For example, if an AdGroup name - /// changed, this status would be FIELDS_CHANGED, but if only bids on keywords - /// belonging an AdGroup were changed this status would be FIELDS_UNCHANGED.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public enum ChangeStatus - { - /// The fields of this entity have not changed, but there may still be changes to - /// its children. - /// - FIELDS_UNCHANGED = 0, - /// The fields of this entity have changed, for example the name of an adgroup. - /// - FIELDS_CHANGED = 1, - /// This entity was created during the time frame we're looking at. We will not - /// enumerate all of the individual changes to this entity and its children. Instead - /// it should be loaded from the appropriate service. - /// - NEW = 2, - } - - - /// Holds information about a changed adgroup - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public partial class AdGroupChangeData - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private ChangeStatus adGroupChangeStatusField; - - private bool adGroupChangeStatusFieldSpecified; - - private long[] changedAdsField; - - private long[] changedCriteriaField; - - private long[] removedCriteriaField; - - private long[] changedFeedsField; - - private long[] removedFeedsField; - - private long[] changedAdGroupBidModifierCriteriaField; - - private long[] removedAdGroupBidModifierCriteriaField; - - /// The ad group ID. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// Whether or not the fields of this adgroup have changed, for example the AdGroup - /// name. Changes to the Ads and Criteria are enumerated in their respective lists - /// and will not be reflected in this status. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ChangeStatus adGroupChangeStatus - { - get - { - return this.adGroupChangeStatusField; - } - set - { - this.adGroupChangeStatusField = value; - this.adGroupChangeStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupChangeStatusSpecified - { - get - { - return this.adGroupChangeStatusFieldSpecified; - } - set - { - this.adGroupChangeStatusFieldSpecified = value; - } - } - - /// The IDs of any changed ads of this ad group. This includes ads that have been - /// deleted. - /// - [System.Xml.Serialization.XmlElementAttribute("changedAds", Order = 2)] - public long[] changedAds - { - get - { - return this.changedAdsField; - } - set - { - this.changedAdsField = value; - } - } - - /// The IDs of any changed criterion of this ad group. - /// - [System.Xml.Serialization.XmlElementAttribute("changedCriteria", Order = 3)] - public long[] changedCriteria - { - get - { - return this.changedCriteriaField; - } - set - { - this.changedCriteriaField = value; - } - } - - /// The IDs of any deleted criterion of this ad group. - /// - [System.Xml.Serialization.XmlElementAttribute("removedCriteria", Order = 4)] - public long[] removedCriteria - { - get - { - return this.removedCriteriaField; - } - set - { - this.removedCriteriaField = value; - } - } - - /// A list of feed IDs for AdGroupFeeds that have been changed in this ad group. If - /// an AdGroupFeed is deleted after a modification, it will not be included in this - /// list. - /// - [System.Xml.Serialization.XmlElementAttribute("changedFeeds", Order = 5)] - public long[] changedFeeds - { - get - { - return this.changedFeedsField; - } - set - { - this.changedFeedsField = value; - } - } - - /// A list of feed IDs for AdGroupFeeds that have been removed from the ad group. - /// - [System.Xml.Serialization.XmlElementAttribute("removedFeeds", Order = 6)] - public long[] removedFeeds - { - get - { - return this.removedFeedsField; - } - set - { - this.removedFeedsField = value; - } - } - - /// Set of campaign criterion that have a bid modifier override at ad group level. - /// If the associated bid modifier override is deleted after a modification, it will - /// not be included in this list. - /// - [System.Xml.Serialization.XmlElementAttribute("changedAdGroupBidModifierCriteria", Order = 7)] - public long[] changedAdGroupBidModifierCriteria - { - get - { - return this.changedAdGroupBidModifierCriteriaField; - } - set - { - this.changedAdGroupBidModifierCriteriaField = value; - } - } - - /// Set of campaign criterion whose bid modifier override at ad group level has been - /// removed. - /// - [System.Xml.Serialization.XmlElementAttribute("removedAdGroupBidModifierCriteria", Order = 8)] - public long[] removedAdGroupBidModifierCriteria - { - get - { - return this.removedAdGroupBidModifierCriteriaField; - } - set - { - this.removedAdGroupBidModifierCriteriaField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Holds information about a changed campaign and any ad groups under that have - /// changed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public partial class CampaignChangeData - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private ChangeStatus campaignChangeStatusField; - - private bool campaignChangeStatusFieldSpecified; - - private AdGroupChangeData[] changedAdGroupsField; - - private long[] addedCampaignCriteriaField; - - private long[] removedCampaignCriteriaField; - - private long[] changedFeedsField; - - private long[] removedFeedsField; - - /// The campaign ID. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// Whether or not the fields of this campaign have changed. Changes to campaign - /// level criteria and ad extensions are enumerated in their respective lists and - /// will not be reflected in this status. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ChangeStatus campaignChangeStatus - { - get - { - return this.campaignChangeStatusField; - } - set - { - this.campaignChangeStatusField = value; - this.campaignChangeStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignChangeStatusSpecified - { - get - { - return this.campaignChangeStatusFieldSpecified; - } - set - { - this.campaignChangeStatusFieldSpecified = value; - } - } - - /// A list of change information for all changed adgroups belonging to the campaign. - /// - [System.Xml.Serialization.XmlElementAttribute("changedAdGroups", Order = 2)] - public AdGroupChangeData[] changedAdGroups - { - get - { - return this.changedAdGroupsField; - } - set - { - this.changedAdGroupsField = value; - } - } - - /// A list of criteria IDs that have been added as campaign criteria. This list - /// includes any criteria that can be downloaded using CampaignCriterionService. - /// - [System.Xml.Serialization.XmlElementAttribute("addedCampaignCriteria", Order = 3)] - public long[] addedCampaignCriteria - { - get - { - return this.addedCampaignCriteriaField; - } - set - { - this.addedCampaignCriteriaField = value; - } - } - - /// A list of criteria IDs that have been deleted as campaign criteria. This list - /// includes any criteria that can be downloaded using CampaignCriterionService. - /// - [System.Xml.Serialization.XmlElementAttribute("removedCampaignCriteria", Order = 4)] - public long[] removedCampaignCriteria - { - get - { - return this.removedCampaignCriteriaField; - } - set - { - this.removedCampaignCriteriaField = value; - } - } - - /// A list of feed IDs for CampaignFeeds that have been changed in this campaign. If - /// a CampaignFeed is deleted after a modification, it will not be included in this - /// list. - /// - [System.Xml.Serialization.XmlElementAttribute("changedFeeds", Order = 5)] - public long[] changedFeeds - { - get - { - return this.changedFeedsField; - } - set - { - this.changedFeedsField = value; - } - } - - /// A list of feed IDs for CampaignFeeds that have been removed from the campaign. - /// - [System.Xml.Serialization.XmlElementAttribute("removedFeeds", Order = 6)] - public long[] removedFeeds - { - get - { - return this.removedFeedsField; - } - set - { - this.removedFeedsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Holds information about changes to a customer - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public partial class CustomerChangeData - { - private CampaignChangeData[] changedCampaignsField; - - private FeedChangeData[] changedFeedsField; - - private string lastChangeTimestampField; - - /// A list of campaign changes for the customer, as specified by the selector. If a - /// campaign is included in the selector it will be included in this list, even if - /// the campaign did not change. - /// - [System.Xml.Serialization.XmlElementAttribute("changedCampaigns", Order = 0)] - public CampaignChangeData[] changedCampaigns - { - get - { - return this.changedCampaignsField; - } - set - { - this.changedCampaignsField = value; - } - } - - /// A list of feed changes for the customer as specified in the selector. If a feed - /// is included in the selector then it will be included in this list, even if the - /// feed did not change. - /// - [System.Xml.Serialization.XmlElementAttribute("changedFeeds", Order = 1)] - public FeedChangeData[] changedFeeds - { - get - { - return this.changedFeedsField; - } - set - { - this.changedFeedsField = value; - } - } - - /// The timestamp for the last changed processed for this customer. It is important - /// that this timestamp be used for subsequent requests to avoid missing any - /// changes. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string lastChangeTimestamp - { - get - { - return this.lastChangeTimestampField; - } - set - { - this.lastChangeTimestampField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DateTimeRange - { - private string minField; - - private string maxField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string min - { - get - { - return this.minField; - } - set - { - this.minField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string max - { - get - { - return this.maxField; - } - set - { - this.maxField = value; - } - } - } - - - /// A filter for selecting change history data for a customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public partial class CustomerSyncSelector - { - private DateTimeRange dateTimeRangeField; - - private long[] campaignIdsField; - - private long[] feedIdsField; - - /// Only return entities that have changed during the specified time range. String - /// Format: yyyyMMdd HHmmss (for example, 20100609 150223 - /// America/New_York). See the Timezones - /// page for the complete list of Timezone IDs. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DateTimeRange dateTimeRange - { - get - { - return this.dateTimeRangeField; - } - set - { - this.dateTimeRangeField = value; - } - } - - /// Return entities belonging to these campaigns. This field must contain distinct elements. - /// - [System.Xml.Serialization.XmlElementAttribute("campaignIds", Order = 1)] - public long[] campaignIds - { - get - { - return this.campaignIdsField; - } - set - { - this.campaignIdsField = value; - } - } - - /// Return entities belonging to these feeds. This field must contain distinct elements. - /// - [System.Xml.Serialization.XmlElementAttribute("feedIds", Order = 2)] - public long[] feedIds - { - get - { - return this.feedIdsField; - } - set - { - this.feedIdsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents CustomerSyncService specific errors - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public partial class CustomerSyncError : ApiError - { - private CustomerSyncErrorReason reasonField; - - private bool reasonFieldSpecified; - - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerSyncErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomerSyncError.Reason", Namespace = "https://adwords.google.com/api/adwords/ch/v201806")] - public enum CustomerSyncErrorReason - { - /// The request attempted to access a campaign that either does not exist or belongs - /// to a different account. - /// - INVALID_CAMPAIGN_ID = 0, - /// The request attempted to access a feed that either does not exist or belongs to - /// a different account. - /// - INVALID_FEED_ID = 1, - /// The request asked for an invalid date range - /// - INVALID_DATE_RANGE = 2, - /// There have been too many changes to sync the campaign over the requested - /// date/time range. To avoid this error, try specifying a smaller date/time range. - /// If this does not work, you should assume that everything has changed and - /// retrieve the objects using their respective services. - /// - TOO_MANY_CHANGES = 3, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/ch/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CustomerSyncServiceInterface")] - public interface CustomerSyncServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerChangeData get(Google.Api.Ads.AdWords.v201806.CustomerSyncSelector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.CustomerSyncSelector selector); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CustomerSyncServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CustomerSyncServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to retrieve the changed entities for a customer account or - /// campaign based on the given date range.

Note: There will - /// be some delay in changes becoming visible to this service; thus, use - /// from the response to determine the validity period for the - /// data.

Note: CustomerSyncService only supports queries - /// for dates within the last 90 days.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CustomerSyncService : AdWordsSoapClient, ICustomerSyncService - { - /// Creates a new instance of the class. - /// - public CustomerSyncService() - { - } - - /// Creates a new instance of the class. - /// - public CustomerSyncService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public CustomerSyncService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CustomerSyncService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CustomerSyncService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns information about changed entities inside a customer's account. - /// Specifies the filter for selecting changehistory events - /// for a customer. - /// A Customer->Campaign->AdGroup hierarchy containing information - /// about the objects changed at each level. All Campaigns that are requested in the - /// selector will be returned, regardless of whether or not they have changed, but - /// unchanged AdGroups will be ignored. - public virtual Google.Api.Ads.AdWords.v201806.CustomerChangeData get(Google.Api.Ads.AdWords.v201806.CustomerSyncSelector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.CustomerSyncSelector selector) - { - return base.Channel.getAsync(selector); - } - } - namespace Wrappers.CustomerFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CustomerFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CustomerFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CustomerFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CustomerFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// CustomerFeeds are used to link a feed to the customer using a matching function, - /// making the feed's feed items available in the customer's ads for substitution. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerFeed - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private Function matchingFunctionField; - - private int[] placeholderTypesField; - - private CustomerFeedStatus statusField; - - private bool statusFieldSpecified; - - /// Id of the Feed associated with the CustomerFeed. This field can be selected using the value "FeedId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Matching function associated with the CustomerFeed. The matching function is - /// used to filter the set of feed items selected. This field can be selected using the value - /// "MatchingFunction". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Function matchingFunction - { - get - { - return this.matchingFunctionField; - } - set - { - this.matchingFunctionField = value; - } - } - - /// Indicates which placeholder - /// types the feed may populate under the connected customer. This field can be selected using the value - /// "PlaceholderTypes".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("placeholderTypes", Order = 2)] - public int[] placeholderTypes - { - get - { - return this.placeholderTypesField; - } - set - { - this.placeholderTypesField = value; - } - } - - /// Status of the CustomerFeed. This field can - /// be selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public CustomerFeedStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field MatchingFunction = new Field("MatchingFunction", false, true); - - public static readonly Field PlaceholderTypes = new Field("PlaceholderTypes", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field MatchingFunction = Fields.MatchingFunction; - - public static readonly Field PlaceholderTypes = Fields.PlaceholderTypes; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field PlaceholderTypes = Fields.PlaceholderTypes; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the CustomerFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomerFeed.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CustomerFeedStatus - { - /// Indicates that the feed is currently being used. - /// - ENABLED = 0, - /// Indicates that the feed is not used anymore. - /// - REMOVED = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// The result of a call to CustomerFeedService#get. Contains a list of - /// associations between customer and feeds. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerFeedPage : NullStatsPage - { - private CustomerFeed[] entriesField; - - /// The resulting CustomerFeeds. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CustomerFeed[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an error for the CustomerFeedService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerFeedError : ApiError - { - private CustomerFeedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerFeedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomerFeedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CustomerFeedErrorReason - { - /// An active feed already exists for this customer and place holder type. - /// - FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 0, - /// The specified id does not exist. - /// - INVALID_ID = 1, - /// The specified feed is deleted. - /// - CANNOT_ADD_FOR_DELETED_FEED = 2, - /// The CustomerFeed already exists. SET should be used to modify the existing - /// CustomerFeed. - /// - CANNOT_ADD_ALREADY_EXISTING_CUSTOMER_FEED = 3, - /// Cannot modify removed customer feed. - /// - CANNOT_MODIFY_REMOVED_CUSTOMER_FEED = 4, - /// Invalid placeholder types. - /// - INVALID_PLACEHOLDER_TYPES = 5, - /// Feed mapping for this placeholder type does not exist. - /// - MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE = 6, - /// Placeholder not allowed at the account level. - /// - PLACEHOLDER_TYPE_NOT_ALLOWED_ON_CUSTOMER_FEED = 7, - UNKNOWN = 8, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CustomerFeedServiceInterface")] - public interface CustomerFeedServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomerFeedService.mutateResponse mutate(Wrappers.CustomerFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CustomerFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerFeedPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a CustomerFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerFeedOperation : Operation - { - private CustomerFeed operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to CustomerFeedService#mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerFeedReturnValue : ListReturnValue - { - private CustomerFeed[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CustomerFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CustomerFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CustomerFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage customer feed links, and matching functions. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CustomerFeedService : AdWordsSoapClient, ICustomerFeedService - { - /// Creates a new instance of the class. - /// - public CustomerFeedService() - { - } - - /// Creates a new instance of the class. - /// - public CustomerFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public CustomerFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CustomerFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public CustomerFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of customer feeds that meet the selector criteria. - /// Determines which customer feeds to return. If empty, all - /// customer feeds are returned. - /// The list of customer feeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CustomerFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomerFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.CustomerFeedServiceInterface.mutate(Wrappers.CustomerFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, sets, or removes customer feeds. - /// The operations to apply. - /// The resulting feeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CustomerFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.CustomerFeedOperation[] operations) - { - Wrappers.CustomerFeedService.mutateRequest inValue = new Wrappers.CustomerFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.CustomerFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomerFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomerFeedServiceInterface.mutateAsync(Wrappers.CustomerFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomerFeedOperation[] operations) - { - Wrappers.CustomerFeedService.mutateRequest inValue = new Wrappers.CustomerFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomerFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of customer feeds that match the query. - /// The SQL-like AWQL query string. - /// A list of CustomerFeed. - /// If problems occur while parsing the query - /// or fetching CustomerFeed. - public virtual Google.Api.Ads.AdWords.v201806.CustomerFeedPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.DataService - { - } - /// Properties of the level of detail of the report being viewed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LevelOfDetail - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - /// This field can be selected using the value - /// "CampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A set of estimates for a criterion's performance for a specific bid amount. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BidLandscape.LandscapePoint", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BidLandscapeLandscapePoint - { - private Money bidField; - - private long clicksField; - - private bool clicksFieldSpecified; - - private Money costField; - - private long impressionsField; - - private bool impressionsFieldSpecified; - - private long promotedImpressionsField; - - private bool promotedImpressionsFieldSpecified; - - private Money requiredBudgetField; - - private double biddableConversionsField; - - private bool biddableConversionsFieldSpecified; - - private double biddableConversionsValueField; - - private bool biddableConversionsValueFieldSpecified; - - private double bidModifierField; - - private bool bidModifierFieldSpecified; - - private long totalLocalImpressionsField; - - private bool totalLocalImpressionsFieldSpecified; - - private long totalLocalClicksField; - - private bool totalLocalClicksFieldSpecified; - - private Money totalLocalCostField; - - private long totalLocalPromotedImpressionsField; - - private bool totalLocalPromotedImpressionsFieldSpecified; - - /// The bid amount used to estimate this landscape point's data. Only available for - /// ad group bid landscapes and ad group criterion bid landscapes. This field can be selected using the value - /// "Bid".This field can be filtered - /// on. This field is required and should - /// not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money bid - { - get - { - return this.bidField; - } - set - { - this.bidField = value; - } - } - - /// Estimated number of clicks at this bid. For mobile bid modifier landscapes, this - /// is the estimated number of clicks for mobile only. This field can be selected using the value - /// "LocalClicks".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long clicks - { - get - { - return this.clicksField; - } - set - { - this.clicksField = value; - this.clicksSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool clicksSpecified - { - get - { - return this.clicksFieldSpecified; - } - set - { - this.clicksFieldSpecified = value; - } - } - - /// Estimated cost at this bid. For mobile bid modifier landscapes, this is the - /// estimated cost for mobile only. This field - /// can be selected using the value "LocalCost".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Money cost - { - get - { - return this.costField; - } - set - { - this.costField = value; - } - } - - /// Estimated number of impressions at this bid. For mobile bid modifier landscapes, - /// this is the estimated number of impressions for mobile only. This field can be selected using the value - /// "LocalImpressions".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public long impressions - { - get - { - return this.impressionsField; - } - set - { - this.impressionsField = value; - this.impressionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool impressionsSpecified - { - get - { - return this.impressionsFieldSpecified; - } - set - { - this.impressionsFieldSpecified = value; - } - } - - /// Estimated number of promoted impressions. This field can be selected using the value - /// "PromotedImpressions".This field can - /// be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public long promotedImpressions - { - get - { - return this.promotedImpressionsField; - } - set - { - this.promotedImpressionsField = value; - this.promotedImpressionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool promotedImpressionsSpecified - { - get - { - return this.promotedImpressionsFieldSpecified; - } - set - { - this.promotedImpressionsFieldSpecified = value; - } - } - - /// Required daily budget to achieve the predicted stats at this bid. Only available - /// for campaign criterion bid landscapes. This - /// field can be selected using the value "RequiredBudget".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public Money requiredBudget - { - get - { - return this.requiredBudgetField; - } - set - { - this.requiredBudgetField = value; - } - } - - /// Estimated number of biddable conversions. Only available for ad group bid - /// landscapes and ad group criterion bid landscapes. This field can be selected using the value - /// "BiddableConversions".This field can - /// be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public double biddableConversions - { - get - { - return this.biddableConversionsField; - } - set - { - this.biddableConversionsField = value; - this.biddableConversionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool biddableConversionsSpecified - { - get - { - return this.biddableConversionsFieldSpecified; - } - set - { - this.biddableConversionsFieldSpecified = value; - } - } - - /// Estimated biddable conversions value. Only available for ad group bid landscapes - /// and ad group criterion bid landscapes. This - /// field can be selected using the value "BiddableConversionsValue".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public double biddableConversionsValue - { - get - { - return this.biddableConversionsValueField; - } - set - { - this.biddableConversionsValueField = value; - this.biddableConversionsValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool biddableConversionsValueSpecified - { - get - { - return this.biddableConversionsValueFieldSpecified; - } - set - { - this.biddableConversionsValueFieldSpecified = value; - } - } - - /// The bid modifier value of this point. Only available for campaign criterion bid - /// landscapes. This field can be selected using - /// the value "BidModifier".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public double bidModifier - { - get - { - return this.bidModifierField; - } - set - { - this.bidModifierField = value; - this.bidModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSpecified - { - get - { - return this.bidModifierFieldSpecified; - } - set - { - this.bidModifierFieldSpecified = value; - } - } - - /// Estimated total impressions for all devices in mobile bid modifier landscape. - /// Only available for campaign criterion bid landscapes. This field can be selected using the value - /// "TotalLocalImpressions".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public long totalLocalImpressions - { - get - { - return this.totalLocalImpressionsField; - } - set - { - this.totalLocalImpressionsField = value; - this.totalLocalImpressionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalLocalImpressionsSpecified - { - get - { - return this.totalLocalImpressionsFieldSpecified; - } - set - { - this.totalLocalImpressionsFieldSpecified = value; - } - } - - /// Estimated total clicks for all devices in mobile bid modifier landscape. Only - /// available for campaign criterion bid landscapes. This field can be selected using the value - /// "TotalLocalClicks".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public long totalLocalClicks - { - get - { - return this.totalLocalClicksField; - } - set - { - this.totalLocalClicksField = value; - this.totalLocalClicksSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalLocalClicksSpecified - { - get - { - return this.totalLocalClicksFieldSpecified; - } - set - { - this.totalLocalClicksFieldSpecified = value; - } - } - - /// Estimated total cost for all devices in mobile bid modifier landscape. Only - /// available for campaign criterion bid landscapes. This field can be selected using the value - /// "TotalLocalCost".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public Money totalLocalCost - { - get - { - return this.totalLocalCostField; - } - set - { - this.totalLocalCostField = value; - } - } - - /// Estimated total promoted impressions for all devices in mobile bid modifier - /// landscape. Only available for campaign criterion bid landscapes. This field can be selected using the value - /// "TotalLocalPromotedImpressions".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public long totalLocalPromotedImpressions - { - get - { - return this.totalLocalPromotedImpressionsField; - } - set - { - this.totalLocalPromotedImpressionsField = value; - this.totalLocalPromotedImpressionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalLocalPromotedImpressionsSpecified - { - get - { - return this.totalLocalPromotedImpressionsFieldSpecified; - } - set - { - this.totalLocalPromotedImpressionsFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Bid = new Field("Bid", true, true); - - public static readonly Field LocalClicks = new Field("LocalClicks", true, true); - - public static readonly Field LocalCost = new Field("LocalCost", true, true); - - public static readonly Field LocalImpressions = new Field("LocalImpressions", true, true); - - public static readonly Field PromotedImpressions = new Field("PromotedImpressions", true, true); - - public static readonly Field RequiredBudget = new Field("RequiredBudget", true, true); - - public static readonly Field BiddableConversions = new Field("BiddableConversions", true, true); - - public static readonly Field BiddableConversionsValue = new Field("BiddableConversionsValue", true, true); - - public static readonly Field BidModifier = new Field("BidModifier", true, true); - - public static readonly Field TotalLocalImpressions = new Field("TotalLocalImpressions", true, true); - - public static readonly Field TotalLocalClicks = new Field("TotalLocalClicks", true, true); - - public static readonly Field TotalLocalCost = new Field("TotalLocalCost", true, true); - - public static readonly Field TotalLocalPromotedImpressions = new Field("TotalLocalPromotedImpressions", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Bid = Fields.Bid; - - public static readonly Field LocalClicks = Fields.LocalClicks; - - public static readonly Field LocalCost = Fields.LocalCost; - - public static readonly Field LocalImpressions = Fields.LocalImpressions; - - public static readonly Field PromotedImpressions = Fields.PromotedImpressions; - - public static readonly Field RequiredBudget = Fields.RequiredBudget; - - public static readonly Field BiddableConversions = Fields.BiddableConversions; - - public static readonly Field BiddableConversionsValue = Fields.BiddableConversionsValue; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field TotalLocalImpressions = Fields.TotalLocalImpressions; - - public static readonly Field TotalLocalClicks = Fields.TotalLocalClicks; - - public static readonly Field TotalLocalCost = Fields.TotalLocalCost; - - public static readonly Field TotalLocalPromotedImpressions = Fields.TotalLocalPromotedImpressions; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Bid = Fields.Bid; - - public static readonly Field LocalClicks = Fields.LocalClicks; - - public static readonly Field LocalCost = Fields.LocalCost; - - public static readonly Field LocalImpressions = Fields.LocalImpressions; - - public static readonly Field PromotedImpressions = Fields.PromotedImpressions; - - public static readonly Field RequiredBudget = Fields.RequiredBudget; - - public static readonly Field BiddableConversions = Fields.BiddableConversions; - - public static readonly Field BiddableConversionsValue = Fields.BiddableConversionsValue; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field TotalLocalImpressions = Fields.TotalLocalImpressions; - - public static readonly Field TotalLocalClicks = Fields.TotalLocalClicks; - - public static readonly Field TotalLocalCost = Fields.TotalLocalCost; - - public static readonly Field TotalLocalPromotedImpressions = Fields.TotalLocalPromotedImpressions; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The base class of all return types of the table service. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DimensionProperties))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DomainCategory))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BidLandscape))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionBidLandscape))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidLandscape))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class DataEntry - { - private string dataEntryTypeField; - - /// Indicates that this instance is a subtype of DataEntry. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("DataEntry.Type", Order = 0)] - public string DataEntryType - { - get - { - return this.dataEntryTypeField; - } - set - { - this.dataEntryTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Top level class for Dimensions. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DomainCategory))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class DimensionProperties : DataEntry - { - private LevelOfDetail levelOfDetailField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public LevelOfDetail levelOfDetail - { - get - { - return this.levelOfDetailField; - } - set - { - this.levelOfDetailField = value; - } - } - } - - - /// Represents categories that AdWords finds automatically for your website.

No - /// categories available means that AdWords couldn't automatically find categories - /// for your website. To control how categories are assigned, manually add - /// breadcrumbs to your webpages.

Categories can be filtered by domain name - /// or by a set of campaign IDs.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DomainCategory : DimensionProperties - { - private string categoryField; - - private double coverageField; - - private bool coverageFieldSpecified; - - private string domainNameField; - - private string isoLanguageField; - - private Money recommendedCpcField; - - private bool hasChildField; - - private bool hasChildFieldSpecified; - - private int categoryRankField; - - private bool categoryRankFieldSpecified; - - /// Recommended category for the website domain. This field can be selected using the value "Category".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string category - { - get - { - return this.categoryField; - } - set - { - this.categoryField = value; - } - } - - /// Coverage is the number of docs that match a label / number of docs that match - /// the immediate parent label.

Example : united states/ca/sfo matches 500 docs - /// and united states/ca matches 1000 docs. The coverage will be 50%. This field can be selected using the value - /// "Coverage". This field is read only and - /// will be ignored when sent to the API.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public double coverage - { - get - { - return this.coverageField; - } - set - { - this.coverageField = value; - this.coverageSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool coverageSpecified - { - get - { - return this.coverageFieldSpecified; - } - set - { - this.coverageFieldSpecified = value; - } - } - - /// The domain for the website. Since many different domains can have the same - /// categories, the domain and the language are used to uniquely identify the - /// categories.

The domain can be specified in the DynamicSearchAdsSetting - /// required for dynamic search ads. This field - /// can be selected using the value "DomainName".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string domainName - { - get - { - return this.domainNameField; - } - set - { - this.domainNameField = value; - } - } - - /// The language for the website. Since many different domains can have the same - /// categories, the domain and the language are used to uniquely identify the - /// categories.

The language can be specified in the DynamicSearchAdsSetting - /// required for dynamic search ads. This field - /// can be selected using the value "IsoLanguage". This field is read only and will be ignored when sent to the - /// API.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string isoLanguage - { - get - { - return this.isoLanguageField; - } - set - { - this.isoLanguageField = value; - } - } - - /// The recommended cost per click for the category. This field can be selected using the value "RecommendedCpc". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Money recommendedCpc - { - get - { - return this.recommendedCpcField; - } - set - { - this.recommendedCpcField = value; - } - } - - /// Used to determine whether a category has sub-categories associated with it. - /// This field can be selected using the value - /// "HasChild". This field is read only and - /// will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool hasChild - { - get - { - return this.hasChildField; - } - set - { - this.hasChildField = value; - this.hasChildSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool hasChildSpecified - { - get - { - return this.hasChildFieldSpecified; - } - set - { - this.hasChildFieldSpecified = value; - } - } - - /// The position of this category in the recommended set of categories. This field can be selected using the value - /// "CategoryRank". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public int categoryRank - { - get - { - return this.categoryRankField; - } - set - { - this.categoryRankField = value; - this.categoryRankSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool categoryRankSpecified - { - get - { - return this.categoryRankFieldSpecified; - } - set - { - this.categoryRankFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : DimensionProperties.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Category = new Field("Category", true, true); - - public static readonly Field Coverage = new Field("Coverage", false, true); - - public static readonly Field DomainName = new Field("DomainName", true, true); - - public static readonly Field IsoLanguage = new Field("IsoLanguage", false, true); - - public static readonly Field RecommendedCpc = new Field("RecommendedCpc", false, true); - - public static readonly Field HasChild = new Field("HasChild", false, true); - - public static readonly Field CategoryRank = new Field("CategoryRank", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : DimensionProperties.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Category = Fields.Category; - - public static readonly Field Coverage = Fields.Coverage; - - public static readonly Field DomainName = Fields.DomainName; - - public static readonly Field IsoLanguage = Fields.IsoLanguage; - - public static readonly Field RecommendedCpc = Fields.RecommendedCpc; - - public static readonly Field HasChild = Fields.HasChild; - - public static readonly Field CategoryRank = Fields.CategoryRank; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : DimensionProperties.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Category = Fields.Category; - - public static readonly Field DomainName = Fields.DomainName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents data about a bid landscape for an ad group or criterion. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionBidLandscape))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupBidLandscape))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class BidLandscape : DataEntry - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private string startDateField; - - private string endDateField; - - private BidLandscapeLandscapePoint[] landscapePointsField; - - /// ID of the campaign that contains the criterion with which this bid landscape is - /// associated. This field can be selected using - /// the value "CampaignId".This field can - /// be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// ID of the ad group that contains the criterion with which this bid landscape is - /// associated. Only available for ad group bid landscapes and ad group criterion - /// bid landscapes. This field can be selected - /// using the value "AdGroupId".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// First day on which this landscape is based. Typically, it could be up to a week - /// ago. This field can be selected using the - /// value "StartDate". This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string startDate - { - get - { - return this.startDateField; - } - set - { - this.startDateField = value; - } - } - - /// Last day on which this landscape is based. This field can be selected using the value "EndDate". This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string endDate - { - get - { - return this.endDateField; - } - set - { - this.endDateField = value; - } - } - - /// List of landscape points, each corresponding to a specifid bid amount. - /// - [System.Xml.Serialization.XmlElementAttribute("landscapePoints", Order = 4)] - public BidLandscapeLandscapePoint[] landscapePoints - { - get - { - return this.landscapePointsField; - } - set - { - this.landscapePointsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : DataEntry.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field StartDate = new Field("StartDate", false, true); - - public static readonly Field EndDate = new Field("EndDate", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : DataEntry.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : DataEntry.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The bid landscape for a criterion. A bid landscape estimates how a a criterion - /// will perform based on different bid amounts. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionBidLandscape : BidLandscape - { - private long criterionIdField; - - private bool criterionIdFieldSpecified; - - /// ID of the criterion associated with this landscape. This field can be selected using the value - /// "CriterionId".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long criterionId - { - get - { - return this.criterionIdField; - } - set - { - this.criterionIdField = value; - this.criterionIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionIdSpecified - { - get - { - return this.criterionIdFieldSpecified; - } - set - { - this.criterionIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BidLandscape.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CriterionId = new Field("CriterionId", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BidLandscape.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CriterionId = Fields.CriterionId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BidLandscape.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CriterionId = Fields.CriterionId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents data about a bidlandscape for an adgroup. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupBidLandscape : BidLandscape - { - private AdGroupBidLandscapeType typeField; - - private bool typeFieldSpecified; - - private bool landscapeCurrentField; - - private bool landscapeCurrentFieldSpecified; - - /// This field can be selected using the value - /// "LandscapeType".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupBidLandscapeType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// Only applies to landscapes with landscapeType == DEFAULT. If true, - /// then this bid landscape contains the set of ad group criteria that - /// currently do not have criterion-level bid overrides. If false, then - /// this bid landscape was derived from an earlier snapshot of ad group criteria, so - /// it may contain criteria to which bid overrides were recently added, and may not - /// contain criteria from which bid overrides were recently removed. For other - /// landscapeTypes null is returned. This field can be selected using the value - /// "LandscapeCurrent".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool landscapeCurrent - { - get - { - return this.landscapeCurrentField; - } - set - { - this.landscapeCurrentField = value; - this.landscapeCurrentSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool landscapeCurrentSpecified - { - get - { - return this.landscapeCurrentFieldSpecified; - } - set - { - this.landscapeCurrentFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : BidLandscape.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field LandscapeType = new Field("LandscapeType", true, true); - - public static readonly Field LandscapeCurrent = new Field("LandscapeCurrent", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : BidLandscape.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field LandscapeType = Fields.LandscapeType; - - public static readonly Field LandscapeCurrent = Fields.LandscapeCurrent; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : BidLandscape.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field LandscapeType = Fields.LandscapeType; - - public static readonly Field LandscapeCurrent = Fields.LandscapeCurrent; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Used to specify the type of AdGroupLandscape - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupBidLandscape.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupBidLandscapeType - { - /// Signifies that the bid of this ad group was applied to all criteria under the ad - /// group. Criteria with bid overrides are included, but the overrides on - /// these criteria were ignored when generating the landscape. - /// - UNIFORM = 0, - /// Signifies that the bid of this ad group was only applied to the ad group itself. - /// Criteria with bid overrides are excluded. - /// - DEFAULT = 1, - UNKNOWN = 2, - } - - - /// Contains a subset of CriterionBidLandscapePage objects resulting - /// from the filtering and paging of DataService#getCriterionBidLandscape - /// call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionBidLandscapePage : NoStatsPage - { - private CriterionBidLandscape[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CriterionBidLandscape[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NoStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NoStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NoStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of AdGroupBidLandscape - /// objects resulting from the filtering and paging of DataService#getAdGroupBidLandscape - /// call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupBidLandscapePage : NoStatsPage - { - private AdGroupBidLandscape[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroupBidLandscape[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NoStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NoStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NoStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of DomainCategory objects - /// resulting from the filtering and paging of DataService#getDomainCategory call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DomainCategoryPage : Page - { - private DomainCategory[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public DomainCategory[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents errors thrown by the get operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DataError : ApiError - { - private DataErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DataErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Reasons for error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DataError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DataErrorReason - { - CANNOT_CREATE_TABLE_ENTRY = 0, - NO_TABLE_ENTRY_CLASS_FOR_VIEW_TYPE = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - TABLE_SERVICE_ERROR = 2, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.DataServiceInterface")] - public interface DataServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupBidLandscapePage getAdGroupBidLandscape(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAdGroupBidLandscapeAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage getCampaignCriterionBidLandscape(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getCampaignCriterionBidLandscapeAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage getCriterionBidLandscape(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getCriterionBidLandscapeAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.DomainCategoryPage getDomainCategory(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getDomainCategoryAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupBidLandscapePage queryAdGroupBidLandscape(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAdGroupBidLandscapeAsync(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage queryCampaignCriterionBidLandscape(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryCampaignCriterionBidLandscapeAsync(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage queryCriterionBidLandscape(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryCriterionBidLandscapeAsync(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(DataEntry))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.DomainCategoryPage queryDomainCategory(string query); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryDomainCategoryAsync(string query); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface DataServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.DataServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// A service to return Ads Campaign Management data matching a Selector. This is - /// disabled for AdX. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class DataService : AdWordsSoapClient, IDataService - { - /// Creates a new instance of the class. - /// - public DataService() - { - } - - /// Creates a new instance of the class. - /// - public DataService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public DataService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public DataService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public DataService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of AdGroupBidLandscapes for the - /// ad groups specified in the selector. In the result, the returned LandscapePoints are grouped into AdGroupBidLandscapes by their ad groups, and - /// numberResults of paging limits the total number of LandscapePoints instead of number of AdGroupBidLandscapes. - /// Selects the entities to return bid landscapes - /// for. - /// A list of bid landscapes. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupBidLandscapePage getAdGroupBidLandscape(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAdGroupBidLandscape(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAdGroupBidLandscapeAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAdGroupBidLandscapeAsync(serviceSelector); - } - - /// Returns a list of CriterionBidLandscapes for - /// the campaign criteria specified in the selector. In the result, the returned LandscapePoints are grouped into CriterionBidLandscapes by their campaign id and - /// criterion id, and numberResults of paging limits the total number of LandscapePoints instead of number of CriterionBidLandscapes. - /// Selects the entities to return bid landscapes - /// for. - /// A list of bid landscapes. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage getCampaignCriterionBidLandscape(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getCampaignCriterionBidLandscape(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getCampaignCriterionBidLandscapeAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getCampaignCriterionBidLandscapeAsync(serviceSelector); - } - - /// Returns a list of CriterionBidLandscapes for - /// the criteria specified in the selector. In the result, the returned LandscapePoints are grouped into CriterionBidLandscapes by their criteria, and - /// numberResults of paging limits the total number of LandscapePoints instead of number of CriterionBidLandscapes. - /// Selects the entities to return bid landscapes - /// for. - /// A list of bid landscapes. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage getCriterionBidLandscape(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getCriterionBidLandscape(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getCriterionBidLandscapeAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getCriterionBidLandscapeAsync(serviceSelector); - } - - /// Returns a list of domain categories that can be used to create WebPage criterion. - /// Selects the entities to return domain categories - /// for. - /// A list of domain categories. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.DomainCategoryPage getDomainCategory(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getDomainCategory(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getDomainCategoryAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getDomainCategoryAsync(serviceSelector); - } - - /// Returns a list of AdGroupBidLandscapes for the - /// ad groups that match the query. In the result, the returned LandscapePoints are grouped into AdGroupBidLandscapes by their ad groups, and - /// numberResults of paging limits the total number of LandscapePoints instead of number of AdGroupBidLandscapes. - /// The SQL-like AWQL query string. - /// A list of bid landscapes. - /// if problems occur while parsing the query - /// or fetching bid landscapes. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupBidLandscapePage queryAdGroupBidLandscape(string query) - { - return base.Channel.queryAdGroupBidLandscape(query); - } - - public virtual System.Threading.Tasks.Task queryAdGroupBidLandscapeAsync(string query) - { - return base.Channel.queryAdGroupBidLandscapeAsync(query); - } - - /// Returns a list of CriterionBidLandscapes for - /// the campaign criteria that match the query. In the result, the returned LandscapePoints are grouped into CriterionBidLandscapes by their campaign id and - /// criterion id, and numberResults of paging limits the total number of LandscapePoints instead of number of CriterionBidLandscapes. - /// The SQL-like AWQL query string. - /// A list of bid landscapes. - /// if problems occur while parsing the query - /// or fetching bid landscapes. - public virtual Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage queryCampaignCriterionBidLandscape(string query) - { - return base.Channel.queryCampaignCriterionBidLandscape(query); - } - - public virtual System.Threading.Tasks.Task queryCampaignCriterionBidLandscapeAsync(string query) - { - return base.Channel.queryCampaignCriterionBidLandscapeAsync(query); - } - - /// Returns a list of CriterionBidLandscapes for - /// the criteria that match the query. In the result, the returned LandscapePoints are grouped into CriterionBidLandscapes by their criteria, and - /// numberResults of paging limits the total number of LandscapePoints instead of number of CriterionBidLandscapes. - /// The SQL-like AWQL query string. - /// A list of bid landscapes. - /// if problems occur while parsing the query - /// or fetching bid landscapes. - public virtual Google.Api.Ads.AdWords.v201806.CriterionBidLandscapePage queryCriterionBidLandscape(string query) - { - return base.Channel.queryCriterionBidLandscape(query); - } - - public virtual System.Threading.Tasks.Task queryCriterionBidLandscapeAsync(string query) - { - return base.Channel.queryCriterionBidLandscapeAsync(query); - } - - /// Returns a list of domain categories that can be used to create WebPage criterion. - /// The SQL-like AWQL query string. - /// A list of domain categories. - /// if problems occur while parsing the query - /// or fetching domain categories. - public virtual Google.Api.Ads.AdWords.v201806.DomainCategoryPage queryDomainCategory(string query) - { - return base.Channel.queryDomainCategory(query); - } - - public virtual System.Threading.Tasks.Task queryDomainCategoryAsync(string query) - { - return base.Channel.queryDomainCategoryAsync(query); - } - } - namespace Wrappers.FeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.FeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.FeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.FeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.FeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// Data used for authorization using OAuth. For more information about OAuth, see: - /// "https://developers.google.com/identity/protocols/OAuth2" - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OAuthInfo - { - private string httpMethodField; - - private string httpRequestUrlField; - - private string httpAuthorizationHeaderField; - - /// The HTTP method used to obtain authorization. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string httpMethod - { - get - { - return this.httpMethodField; - } - set - { - this.httpMethodField = value; - } - } - - /// The HTTP request URL used to obtain authorization. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string httpRequestUrl - { - get - { - return this.httpRequestUrlField; - } - set - { - this.httpRequestUrlField = value; - } - } - - /// The HTTP authorization header used to obtain authorization. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string httpAuthorizationHeader - { - get - { - return this.httpAuthorizationHeaderField; - } - set - { - this.httpAuthorizationHeaderField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Chain defines chain related metadata required in order to sync features - /// belonging to a chain. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Chain - { - private long chainIdField; - - private bool chainIdFieldSpecified; - - /// Id of the chain. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long chainId - { - get - { - return this.chainIdField; - } - set - { - this.chainIdField = value; - this.chainIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool chainIdSpecified - { - get - { - return this.chainIdFieldSpecified; - } - set - { - this.chainIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Configuration data allowing feed items to be populated for a system feed. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PlacesLocationFeedData))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AffiliateLocationFeedData))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SystemFeedGenerationData - { - private string systemFeedGenerationDataTypeField; - - /// Indicates that this instance is a subtype of SystemFeedGenerationData. Although - /// this field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("SystemFeedGenerationData.Type", Order = 0)] - public string SystemFeedGenerationDataType - { - get - { - return this.systemFeedGenerationDataTypeField; - } - set - { - this.systemFeedGenerationDataTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Data used to configure a location feed populated from Google My Business - /// Locations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PlacesLocationFeedData : SystemFeedGenerationData - { - private OAuthInfo oAuthInfoField; - - private string emailAddressField; - - private string businessAccountIdentifierField; - - private string businessNameFilterField; - - private string[] categoryFiltersField; - - private string[] labelFiltersField; - - /// Required authentication token (from OAuth API) for the email.
Use the - /// following values when populating the oAuthInfo:
  • httpMethod: - /// GET
  • httpRequestUrl:
  • - ///
  • httpAuthorizationHeader: Bearer *ACCESS_TOKEN* (where - /// *ACCESS_TOKEN* is generated from OAuth credentials for the emailAddress and a - /// scope matching httpRequestUrl)
- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OAuthInfo oAuthInfo - { - get - { - return this.oAuthInfoField; - } - set - { - this.oAuthInfoField = value; - } - } - - /// Email address of a Google My Business account or email address of a manager of - /// the Google My Business account. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string emailAddress - { - get - { - return this.emailAddressField; - } - set - { - this.emailAddressField = value; - } - } - - /// Plus page ID of the managed business whose locations should be used. If this - /// field is not set, then all businesses accessible by the user (specified by the - /// emailAddress) are used. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string businessAccountIdentifier - { - get - { - return this.businessAccountIdentifierField; - } - set - { - this.businessAccountIdentifierField = value; - } - } - - /// Used to filter Google My Business listings by business name. If - /// businessNameFilter is set, only listings with a matching business name are - /// candidates to be sync'd into FeedItems. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string businessNameFilter - { - get - { - return this.businessNameFilterField; - } - set - { - this.businessNameFilterField = value; - } - } - - /// Used to filter Google My Business listings by categories. If entries exist in - /// categoryFilters, only listings that belong to any of the categories are - /// candidates to be sync'd into FeedItems. If no entries exist in categoryFilters, - /// then all listings are candidates for syncing. - /// - [System.Xml.Serialization.XmlElementAttribute("categoryFilters", Order = 4)] - public string[] categoryFilters - { - get - { - return this.categoryFiltersField; - } - set - { - this.categoryFiltersField = value; - } - } - - /// Used to filter Google My Business - /// listings by labels. If entries exist in labelFilters, only listings that has any - /// of the labels set are candidates to be synchronized into FeedItems. If no - /// entries exist in labelFilters, then all listings are candidates for syncing. - /// - [System.Xml.Serialization.XmlElementAttribute("labelFilters", Order = 5)] - public string[] labelFilters - { - get - { - return this.labelFiltersField; - } - set - { - this.labelFiltersField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SystemFeedGenerationData.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SystemFeedGenerationData.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SystemFeedGenerationData.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Data used to configure an Affiliate Location Feed populated with the specified - /// chains. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AffiliateLocationFeedData : SystemFeedGenerationData - { - private Chain[] chainsField; - - private RelationshipType relationshipTypeField; - - private bool relationshipTypeFieldSpecified; - - /// The list of chains that the Affiliate Location Feed will sync the locations - /// from. - /// - [System.Xml.Serialization.XmlElementAttribute("chains", Order = 0)] - public Chain[] chains - { - get - { - return this.chainsField; - } - set - { - this.chainsField = value; - } - } - - /// The relationship the chains have with the advertiser. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public RelationshipType relationshipType - { - get - { - return this.relationshipTypeField; - } - set - { - this.relationshipTypeField = value; - this.relationshipTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool relationshipTypeSpecified - { - get - { - return this.relationshipTypeFieldSpecified; - } - set - { - this.relationshipTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SystemFeedGenerationData.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SystemFeedGenerationData.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SystemFeedGenerationData.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Relationship type affiliate locations have with the advertiser. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum RelationshipType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// General retailer relationship - /// - GENERAL_RETAILERS = 1, - } - - - /// FeedAttributes define the types of data expected to be present in a Feed. A - /// single FeedAttribute specifies the expected type of the FeedItemAttributes with - /// the same FeedAttributeId. Optionally, a FeedAttribute can be marked as being - /// part of a FeedItem's unique key. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedAttribute - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private FeedAttributeType typeField; - - private bool typeFieldSpecified; - - private bool isPartOfKeyField; - - private bool isPartOfKeyFieldSpecified; - - /// Id of the attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// The name of the attribute. This field is - /// required and should not be null when it is contained within Operators : ADD, SET. The length of this string should be between 1 and 30, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The expected type of the data. This field is - /// required and should not be null when it is contained within Operators : ADD, SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public FeedAttributeType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// Indicates that data corresponding to this attribute is part of a FeedItem's - /// unique key. It defaults to false if it is unspecified. Note that a unique key is - /// not required in a Feed's schema, in which case the FeedItems must be referenced - /// by their FeedItemId. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool isPartOfKey - { - get - { - return this.isPartOfKeyField; - } - set - { - this.isPartOfKeyField = value; - this.isPartOfKeySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isPartOfKeySpecified - { - get - { - return this.isPartOfKeyFieldSpecified; - } - set - { - this.isPartOfKeyFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Possible data types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedAttribute.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedAttributeType - { - INT64 = 0, - FLOAT = 1, - STRING = 2, - BOOLEAN = 3, - URL = 4, - DATE_TIME = 5, - INT64_LIST = 6, - FLOAT_LIST = 7, - STRING_LIST = 8, - BOOLEAN_LIST = 9, - URL_LIST = 10, - DATE_TIME_LIST = 11, - PRICE = 13, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 12, - } - - - /// A Feed identifies a source of data and its schema. The data for the Feed can - /// either be user-entered via the FeedItemService or system-generated, in which - /// case the data is provided automatically. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Feed - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private FeedAttribute[] attributesField; - - private FeedStatus statusField; - - private bool statusFieldSpecified; - - private FeedOrigin originField; - - private bool originFieldSpecified; - - private SystemFeedGenerationData systemFeedGenerationDataField; - - /// Id of the Feed. This field can be selected - /// using the value "Id".This field can - /// be filtered on. This field is required - /// and should not be null when it is contained within Operators : REMOVE, SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Name of the Feed. This field can be selected - /// using the value "Name".This field can - /// be filtered on. This field is required - /// and should not be null when it is contained within Operators : ADD. The length of this string should be between 1 and 128, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The Feed's schema. In SET operations, these attributes will be considered new - /// attributes and will be appended to the existing list of attributes unless this - /// list is an exact copy of the existing list (as would be obtained via FeedService#get). If an empty attributes list is - /// provided, the existing list of attributes will not be changed. This field can be selected using the value - /// "Attributes". This field must - /// not contain elements. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("attributes", Order = 2)] - public FeedAttribute[] attributes - { - get - { - return this.attributesField; - } - set - { - this.attributesField = value; - } - } - - /// Status of the Feed. This field can be - /// selected using the value "FeedStatus".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public FeedStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Specifies who manages the FeedAttributes for the Feed. This field can be - /// selected using the value "Origin".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public FeedOrigin origin - { - get - { - return this.originField; - } - set - { - this.originField = value; - this.originSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool originSpecified - { - get - { - return this.originFieldSpecified; - } - set - { - this.originFieldSpecified = value; - } - } - - /// The system data for the Feed. This data specifies information for generating the - /// feed items of the system generated feed. This field can be selected using the value - /// "SystemFeedGenerationData". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public SystemFeedGenerationData systemFeedGenerationData - { - get - { - return this.systemFeedGenerationDataField; - } - set - { - this.systemFeedGenerationDataField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Attributes = new Field("Attributes", false, true); - - public static readonly Field FeedStatus = new Field("FeedStatus", true, true); - - public static readonly Field Origin = new Field("Origin", true, true); - - public static readonly Field SystemFeedGenerationData = new Field("SystemFeedGenerationData", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Attributes = Fields.Attributes; - - public static readonly Field FeedStatus = Fields.FeedStatus; - - public static readonly Field Origin = Fields.Origin; - - public static readonly Field SystemFeedGenerationData = Fields.SystemFeedGenerationData; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field FeedStatus = Fields.FeedStatus; - - public static readonly Field Origin = Fields.Origin; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the Feed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Feed.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedStatus - { - /// This Feed's data can be used in placeholders. - /// - ENABLED = 0, - /// This Feed's data is not used anymore. - /// - REMOVED = 1, - /// Unknown status. Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 2, - } - - - /// Used to Specify who manages the FeedAttributes for - /// the Feed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Feed.Origin", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedOrigin - { - /// The FeedAttributes for this Feed - /// are managed by the user. Users can add FeedAttributes to this Feed. - /// - USER = 0, - /// The FeedAttributes for an ADWORDS Feed are created by ADWORDS. Occasionally the attributes defined - /// for a particular type of Feed is expanded. In this case, - /// older Feeds of this type can be mutated to add the expanded - /// attributes. - /// - ADWORDS = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// The result of a call to FeedService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedPage : NullStatsPage - { - private Feed[] entriesField; - - /// The resulting Feeds. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Feed[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An error caused by an invalid Feed in a FeedService request. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedError : ApiError - { - private FeedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The cause of the error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedErrorReason - { - /// The names of the FeedAttributes must be unique. - /// - ATTRIBUTE_NAMES_NOT_UNIQUE = 0, - /// The attribute list must be an exact copy of the existing list if the attribute - /// id's are present. - /// - ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES = 1, - /// Origin can only be set during Feed creation. - /// - CANNOT_CHANGE_ORIGIN = 2, - /// Cannot specify USER origin for a system generated feed. - /// - CANNOT_SPECIFY_USER_ORIGIN_FOR_SYSTEM_FEED = 3, - /// Cannot specify ADWORDS origin for a non-system generated feed. - /// - CANNOT_SPECIFY_ADWORDS_ORIGIN_FOR_NON_SYSTEM_FEED = 4, - /// Cannot specify feed attributes for system feed. - /// - CANNOT_SPECIFY_FEED_ATTRIBUTES_FOR_SYSTEM_FEED = 5, - /// Cannot update FeedAttributes on feed with origin adwords. - /// - CANNOT_UPDATE_FEED_ATTRIBUTES_WITH_ORIGIN_ADWORDS = 6, - /// The given id refers to a removed Feed. Removed Feeds are immutable. - /// - FEED_REMOVED = 7, - /// The origin of the feed is not valid for the client. - /// - INVALID_ORIGIN_VALUE = 8, - /// A user can only create and modify feeds with user origin. - /// - FEED_ORIGIN_IS_NOT_USER = 9, - /// Invalid auth token for the given email - /// - INVALID_AUTH_TOKEN_FOR_EMAIL = 21, - /// Invalid email specified - /// - INVALID_EMAIL = 22, - /// Feed name matches that of another active Feed. - /// - DUPLICATE_FEED_NAME = 10, - /// Name of feed is not allowed. - /// - INVALID_FEED_NAME = 11, - /// Missing OAuthInfo - /// - MISSING_OAUTH_INFO = 12, - /// New FeedAttributes must not effect the unique key. - /// - NEW_ATTRIBUTE_CANNOT_BE_PART_OF_UNIQUE_KEY = 13, - /// Too many FeedAttributes for a Feed. - /// - TOO_MANY_FEED_ATTRIBUTES_FOR_FEED = 14, - /// The business account is not valid. - /// - INVALID_BUSINESS_ACCOUNT = 15, - /// Business account cannot access Google My Business account. - /// - BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT = 16, - /// Invalid chain id provided for affiliate location feed. - /// - INVALID_AFFILIATE_CHAIN_ID = 18, - /// Cannot change system feed generation data type - /// - CANNOT_CHANGE_SYSTEM_FEED_GENERATION_DATA_TYPE = 19, - /// Unsupported relationship type - /// - UNSUPPORTED_AFFILIATE_LOCATION_RELATIONSHIP_TYPE = 20, - UNKNOWN = 17, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.FeedServiceInterface")] - public interface FeedServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.FeedService.mutateResponse mutate(Wrappers.FeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.FeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a Feed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedOperation : Operation - { - private Feed operandField; - - /// The Feed to create or mutate. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Feed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to FeedService#mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedReturnValue : ListReturnValue - { - private Feed[] valueField; - - /// The resulting Feeds. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Feed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface FeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.FeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to get and mutate Feeds. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class FeedService : AdWordsSoapClient, IFeedService - { - /// Creates a new instance of the class. - /// - public FeedService() - { - } - - /// Creates a new instance of the class. - /// - public FeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public FeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public FeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public FeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of Feeds that meet the selector criteria. - /// Determines which Feeds to return. If empty all Feeds are - /// returned. - /// The list of Feeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.FeedService.mutateResponse Google.Api.Ads.AdWords.v201806.FeedServiceInterface.mutate(Wrappers.FeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Add, remove, and set Feeds. - /// The operations to apply. - /// The resulting Feeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedOperation[] operations) - { - Wrappers.FeedService.mutateRequest inValue = new Wrappers.FeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.FeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.FeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.FeedServiceInterface.mutateAsync(Wrappers.FeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedOperation[] operations) - { - Wrappers.FeedService.mutateRequest inValue = new Wrappers.FeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.FeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of Feed that match the query. - /// The SQL-like AWQL query string. - /// s A list of Feed. - /// if problems occur while parsing the query - /// or fetching Feed. - public virtual Google.Api.Ads.AdWords.v201806.FeedPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.FeedItemService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.FeedItemOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.FeedItemOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.FeedItemReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.FeedItemReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a FeedItem geo restriction. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemGeoRestriction - { - private GeoRestriction geoRestrictionField; - - private bool geoRestrictionFieldSpecified; - - /// The geo targeting restriction of a feed item. If null then the geo restriction - /// is cleared. This field can be selected using - /// the value "GeoTargetingRestriction".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public GeoRestriction geoRestriction - { - get - { - return this.geoRestrictionField; - } - set - { - this.geoRestrictionField = value; - this.geoRestrictionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool geoRestrictionSpecified - { - get - { - return this.geoRestrictionFieldSpecified; - } - set - { - this.geoRestrictionFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field GeoTargetingRestriction = new Field("GeoTargetingRestriction", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field GeoTargetingRestriction = Fields.GeoTargetingRestriction; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field GeoTargetingRestriction = Fields.GeoTargetingRestriction; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A restriction used to determine if the request context's geo should be matched. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum GeoRestriction - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Indicates that request context should match the physical location of the user. - /// - LOCATION_OF_PRESENCE = 1, - } - - - /// Contains validation error details for a set of feed attributes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemAttributeError - { - private long[] feedAttributeIdsField; - - private int validationErrorCodeField; - - private bool validationErrorCodeFieldSpecified; - - private string errorInformationField; - - /// Contains the set of feed attribute ids whose attributes together triggered the - /// error. Null or empty field means error code does not apply to a specific set of - /// attributes. - /// - [System.Xml.Serialization.XmlElementAttribute("feedAttributeIds", Order = 0)] - public long[] feedAttributeIds - { - get - { - return this.feedAttributeIdsField; - } - set - { - this.feedAttributeIdsField = value; - } - } - - /// Validation error code. See the list of error codes. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int validationErrorCode - { - get - { - return this.validationErrorCodeField; - } - set - { - this.validationErrorCodeField = value; - this.validationErrorCodeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool validationErrorCodeSpecified - { - get - { - return this.validationErrorCodeFieldSpecified; - } - set - { - this.validationErrorCodeFieldSpecified = value; - } - } - - /// Extra information about the error, including related field IDs. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string errorInformation - { - get - { - return this.errorInformationField; - } - set - { - this.errorInformationField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains offline validation, policy findings, and approval results for a - /// FeedItem in the context of a FeedMapping. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemPolicySummary : PolicySummaryInfo - { - private long feedMappingIdField; - - private bool feedMappingIdFieldSpecified; - - private FeedItemValidationStatus validationStatusField; - - private bool validationStatusFieldSpecified; - - private FeedItemAttributeError[] validationErrorsField; - - private FeedItemQualityApprovalStatus qualityApprovalStatusField; - - private bool qualityApprovalStatusFieldSpecified; - - private FeedItemQualityDisapprovalReasons[] qualityDisapprovalReasonsField; - - /// Id of FeedMapping used in validation/approvals checks. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedMappingId - { - get - { - return this.feedMappingIdField; - } - set - { - this.feedMappingIdField = value; - this.feedMappingIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedMappingIdSpecified - { - get - { - return this.feedMappingIdFieldSpecified; - } - set - { - this.feedMappingIdFieldSpecified = value; - } - } - - /// Validation status of feed item for a particular feed mapping. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public FeedItemValidationStatus validationStatus - { - get - { - return this.validationStatusField; - } - set - { - this.validationStatusField = value; - this.validationStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool validationStatusSpecified - { - get - { - return this.validationStatusFieldSpecified; - } - set - { - this.validationStatusFieldSpecified = value; - } - } - - /// List of error codes specifying what errors were found during validation. - /// - [System.Xml.Serialization.XmlElementAttribute("validationErrors", Order = 2)] - public FeedItemAttributeError[] validationErrors - { - get - { - return this.validationErrorsField; - } - set - { - this.validationErrorsField = value; - } - } - - /// Feed item quality evaluation approval status for a particular feed mapping. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public FeedItemQualityApprovalStatus qualityApprovalStatus - { - get - { - return this.qualityApprovalStatusField; - } - set - { - this.qualityApprovalStatusField = value; - this.qualityApprovalStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool qualityApprovalStatusSpecified - { - get - { - return this.qualityApprovalStatusFieldSpecified; - } - set - { - this.qualityApprovalStatusFieldSpecified = value; - } - } - - /// Feed item quality evaluation disapproval reasons. - /// - [System.Xml.Serialization.XmlElementAttribute("qualityDisapprovalReasons", Order = 4)] - public FeedItemQualityDisapprovalReasons[] qualityDisapprovalReasons - { - get - { - return this.qualityDisapprovalReasonsField; - } - set - { - this.qualityDisapprovalReasonsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : PolicySummaryInfo.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : PolicySummaryInfo.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : PolicySummaryInfo.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Validation status of a FeedItem. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemValidationStatus - { - /// Validation pending. - /// - UNCHECKED = 0, - /// An error was found. - /// - ERROR = 1, - /// FeedItem is semantically well-formed. - /// - VALID = 2, - } - - - /// Feed item quality evaluation approval status. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemQualityApprovalStatus - { - /// Quality evaluation pending - /// - UNKNOWN = 0, - /// Approved for quality - /// - APPROVED = 1, - /// Disapproved for quality - /// - DISAPPROVED = 2, - } - - - /// Feed item quality evaluation disapproval reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemQualityDisapprovalReasons - { - UNKNOWN = 0, - /// Price contains repetitive headers - /// - TABLE_REPETITIVE_HEADERS = 1, - /// Price contains repetitive description - /// - TABLE_REPETITIVE_DESCRIPTION = 2, - /// Price contains inconsistent items - /// - TABLE_INCONSISTENT_ROWS = 3, - /// Price qualifiers in description - /// - DESCRIPTION_HAS_PRICE_QUALIFIERS = 16, - /// Unsupported language - /// - UNSUPPORTED_LANGUAGE = 17, - /// Price item header is not relevant to the price type - /// - TABLE_ROW_HEADER_TABLE_TYPE_MISMATCH = 4, - /// Price item header has promotional text - /// - TABLE_ROW_HEADER_HAS_PROMOTIONAL_TEXT = 5, - /// Price item description is not relevant to the item header - /// - TABLE_ROW_DESCRIPTION_NOT_RELEVANT = 6, - /// Price item description contains promotional text - /// - TABLE_ROW_DESCRIPTION_HAS_PROMOTIONAL_TEXT = 7, - /// Price item header and description are repetitive - /// - TABLE_ROW_HEADER_DESCRIPTION_REPETITIVE = 8, - /// Price item is in a foreign language, nonsense, or can't be rated - /// - TABLE_ROW_UNRATEABLE = 9, - /// Price item price is invalid or inaccurate - /// - TABLE_ROW_PRICE_INVALID = 10, - /// Price item url is invalid or irrelevant - /// - TABLE_ROW_URL_INVALID = 11, - /// Header or description has price - /// - HEADER_OR_DESCRIPTION_HAS_PRICE = 18, - /// Snippet values do not match the header - /// - STRUCTURED_SNIPPETS_HEADER_POLICY_VIOLATED = 12, - /// Snippet values are repeated - /// - STRUCTURED_SNIPPETS_REPEATED_VALUES = 13, - /// Snippet values violate editorial guidelines like punctuation - /// - STRUCTURED_SNIPPETS_EDITORIAL_GUIDELINES = 14, - /// Snippets contain promotional text - /// - STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT = 15, - } - - - /// Represents a money amount with currency. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MoneyWithCurrency : ComparableValue - { - private Money moneyField; - - private string currencyCodeField; - - /// The amount of money. This field must be greater - /// than or equal to 0. This field is - /// required and should not be null when it is contained within Operators : SET, ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money money - { - get - { - return this.moneyField; - } - set - { - this.moneyField = value; - } - } - - /// Currency code. The length of this string - /// should be between 3 and 3, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string currencyCode - { - get - { - return this.currencyCodeField; - } - set - { - this.currencyCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ComparableValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ComparableValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ComparableValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a feed item's value for a particular feed attribute. A feed item's - /// value is composed of a collection of these attribute values. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemAttributeValue - { - private long feedAttributeIdField; - - private bool feedAttributeIdFieldSpecified; - - private long integerValueField; - - private bool integerValueFieldSpecified; - - private double doubleValueField; - - private bool doubleValueFieldSpecified; - - private bool booleanValueField; - - private bool booleanValueFieldSpecified; - - private string stringValueField; - - private long[] integerValuesField; - - private double[] doubleValuesField; - - private bool[] booleanValuesField; - - private string[] stringValuesField; - - private MoneyWithCurrency moneyWithCurrencyValueField; - - /// Feed attribute id - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedAttributeId - { - get - { - return this.feedAttributeIdField; - } - set - { - this.feedAttributeIdField = value; - this.feedAttributeIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedAttributeIdSpecified - { - get - { - return this.feedAttributeIdFieldSpecified; - } - set - { - this.feedAttributeIdFieldSpecified = value; - } - } - - /// Integer value. Should be set if feedAttributeId refers to a feed attribute of - /// type INT64. Leave empty to clear an existing INT64 attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long integerValue - { - get - { - return this.integerValueField; - } - set - { - this.integerValueField = value; - this.integerValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool integerValueSpecified - { - get - { - return this.integerValueFieldSpecified; - } - set - { - this.integerValueFieldSpecified = value; - } - } - - /// Double value. Should be set if feedAttributeId refers to a feed attribute of - /// type FLOAT. Leave empty to clear an existing FLOAT attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public double doubleValue - { - get - { - return this.doubleValueField; - } - set - { - this.doubleValueField = value; - this.doubleValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool doubleValueSpecified - { - get - { - return this.doubleValueFieldSpecified; - } - set - { - this.doubleValueFieldSpecified = value; - } - } - - /// Boolean value. Should be set if feedAttributeId refers to a feed attribute of - /// type BOOLEAN. Leave empty to clear an existing BOOLEAN attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool booleanValue - { - get - { - return this.booleanValueField; - } - set - { - this.booleanValueField = value; - this.booleanValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool booleanValueSpecified - { - get - { - return this.booleanValueFieldSpecified; - } - set - { - this.booleanValueFieldSpecified = value; - } - } - - /// String value. Should be set if feedAttributeId refers to a feed attribute of - /// type STRING, URL, or DATE_TIME. The format of DATE_TIME is 'YYYYMMDD hhmmss' - /// (e.g., 20130101 163031 to represent Jan 1, 2013 4:30:31pm). All date times are - /// interpreted in the account's time zone. A time zone id may be appended to the - /// date time, but it must match the account's time zone. For example '20130101 - /// 163031 America/Los_Angeles' may be specified in the above example as long as the - /// account's time zone is America/Los_Angeles. Leave empty to clear an existing - /// STRING, URL, or DATE_TIME attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string stringValue - { - get - { - return this.stringValueField; - } - set - { - this.stringValueField = value; - } - } - - /// List of integer values. Should be set if feedAttributeId refers to a feed - /// attribute of type INT64_LIST. Leave empty to clear an existing INT64_LIST - /// attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute("integerValues", Order = 5)] - public long[] integerValues - { - get - { - return this.integerValuesField; - } - set - { - this.integerValuesField = value; - } - } - - /// List of double values. Should be set if feedAttributeId refers to a feed - /// attribute of type FLOAT_LIST. Leave empty to clear an existing FLOAT_LIST - /// attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute("doubleValues", Order = 6)] - public double[] doubleValues - { - get - { - return this.doubleValuesField; - } - set - { - this.doubleValuesField = value; - } - } - - /// List of boolean values. Should be set if feedAttributeId refers to a feed - /// attribute of type BOOLEAN_LIST. Leave empty to clear an existing BOOLEAN_LIST - /// attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute("booleanValues", Order = 7)] - public bool[] booleanValues - { - get - { - return this.booleanValuesField; - } - set - { - this.booleanValuesField = value; - } - } - - /// List of string values. Should be set if feedAttributeId refers to a feed - /// attribute of type STRING_LIST, URL_LIST, or DATE_TIME_LIST. All strings in this - /// list must be of the same type and format. For example, if the type is - /// DATE_TIME_LIST, all strings in the list must be DATE_TIME formatted strings. See - /// #stringValue for specific formatting requirements. - /// - [System.Xml.Serialization.XmlElementAttribute("stringValues", Order = 8)] - public string[] stringValues - { - get - { - return this.stringValuesField; - } - set - { - this.stringValuesField = value; - } - } - - /// MoneyWithCurrency value. Should be set if feedAttributeId refers to a feed - /// attribute of type PRICE. Leave empty to clear an existing PRICE attribute value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public MoneyWithCurrency moneyWithCurrencyValue - { - get - { - return this.moneyWithCurrencyValueField; - } - set - { - this.moneyWithCurrencyValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an item in a feed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItem - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private long feedItemIdField; - - private bool feedItemIdFieldSpecified; - - private FeedItemStatus statusField; - - private bool statusFieldSpecified; - - private string startTimeField; - - private string endTimeField; - - private FeedItemAttributeValue[] attributeValuesField; - - private FeedItemPolicySummary[] policySummariesField; - - private FeedItemGeoRestriction geoTargetingRestrictionField; - - private CustomParameters urlCustomParametersField; - - /// ID of this feed item's feed This field can - /// be selected using the value "FeedId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// ID of this feed item. This may be unspecified if the user-defined key attributes - /// are specified. This field can be selected - /// using the value "FeedItemId".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long feedItemId - { - get - { - return this.feedItemIdField; - } - set - { - this.feedItemIdField = value; - this.feedItemIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedItemIdSpecified - { - get - { - return this.feedItemIdFieldSpecified; - } - set - { - this.feedItemIdFieldSpecified = value; - } - } - - /// Status of feed item This field can be - /// selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public FeedItemStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Start time in which this feed item is effective and can begin serving. The time - /// zone of startTime must either match the time zone of the account or be - /// unspecified where the time zone defaults to the account time zone. This field - /// may be null to indicate no start time restriction. The special value "00000101 - /// 000000" may be used to clear an existing start time. This field can be selected using the value "StartTime".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: - /// REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string startTime - { - get - { - return this.startTimeField; - } - set - { - this.startTimeField = value; - } - } - - /// End time in which this feed item is no longer effective and will stop serving. - /// The time zone of endTime must either match the time zone of the account or be - /// unspecified where the time zone defaults to the account time zone. This field - /// may be null to indicate no end time restriction. The special value "00000101 - /// 000000" may be used to clear an existing end time. This field can be selected using the value "EndTime".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: - /// REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string endTime - { - get - { - return this.endTimeField; - } - set - { - this.endTimeField = value; - } - } - - /// The feed item's attribute values. For any unset/unspecified feed attributes, the - /// value is considered unset/null on ADD and unchanged on SET. This field can be selected using the value - /// "AttributeValues". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("attributeValues", Order = 5)] - public FeedItemAttributeValue[] attributeValues - { - get - { - return this.attributeValuesField; - } - set - { - this.attributeValuesField = value; - } - } - - /// Summary of a feed item's offline validation, policy findings, and approval - /// results for active feed mappings. This field - /// can be selected using the value "PolicySummaries". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("policySummaries", Order = 6)] - public FeedItemPolicySummary[] policySummaries - { - get - { - return this.policySummariesField; - } - set - { - this.policySummariesField = value; - } - } - - /// Geo targeting restriction specifies the type of location that can be used for - /// targeting. Only applies if the feed item has a location FeedItemTarget. On - /// update, if the field is left unspecified, the previous geo targeting restriction - /// state will not be changed. On update, if the field is set with a null - /// GeoRestriction enum, the geo targeting restriction will be cleared. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public FeedItemGeoRestriction geoTargetingRestriction - { - get - { - return this.geoTargetingRestrictionField; - } - set - { - this.geoTargetingRestrictionField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. This field can be selected using the value - /// "UrlCustomParameters". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public CustomParameters urlCustomParameters - { - get - { - return this.urlCustomParametersField; - } - set - { - this.urlCustomParametersField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field FeedItemId = new Field("FeedItemId", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field StartTime = new Field("StartTime", true, true); - - public static readonly Field EndTime = new Field("EndTime", true, true); - - public static readonly Field AttributeValues = new Field("AttributeValues", false, true); - - public static readonly Field PolicySummaries = new Field("PolicySummaries", false, true); - - public static readonly Field UrlCustomParameters = new Field("UrlCustomParameters", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field FeedItemId = Fields.FeedItemId; - - public static readonly Field Status = Fields.Status; - - public static readonly Field StartTime = Fields.StartTime; - - public static readonly Field EndTime = Fields.EndTime; - - public static readonly Field AttributeValues = Fields.AttributeValues; - - public static readonly Field PolicySummaries = Fields.PolicySummaries; - - public static readonly Field UrlCustomParameters = Fields.UrlCustomParameters; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field FeedItemId = Fields.FeedItemId; - - public static readonly Field Status = Fields.Status; - - public static readonly Field StartTime = Fields.StartTime; - - public static readonly Field EndTime = Fields.EndTime; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedItem.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemStatus - { - /// Feed item is active - /// - ENABLED = 0, - /// Feed item is removed - /// - REMOVED = 1, - /// Unknown status Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 2, - } - - - /// Contains a subset of feed items resulting from a FeedItemService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemPage : NullStatsPage - { - private FeedItem[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public FeedItem[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// FeedItemService related errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemError : ApiError - { - private FeedItemErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedItemErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedItemError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemErrorReason - { - /// Targeted adgroup's campaign does not match the targeted campaign. - /// - CAMPAIGN_TARGETING_MISMATCH = 0, - /// Cannot convert the feed attribute value from string to its real type. - /// - CANNOT_CONVERT_ATTRIBUTE_VALUE_FROM_STRING = 1, - /// Cannot operate on removed feed item. - /// - CANNOT_OPERATE_ON_REMOVED_FEED_ITEM = 2, - /// Date time zone does not match the account's time zone. - /// - DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 3, - /// Feed item with the key attributes could not be found. - /// - KEY_ATTRIBUTES_NOT_FOUND = 4, - /// Unknown or unsupported device preference. - /// - INVALID_DEVICE_PREFERENCE = 5, - /// Invalid feed item schedule end time (i.e., endHour = 24 and endMinute != 0). - /// - INVALID_SCHEDULE_END = 6, - /// Url feed attribute value is not valid. - /// - INVALID_URL = 7, - /// Some key attributes are missing. - /// - MISSING_KEY_ATTRIBUTES = 8, - /// Feed item has same key attributes as another feed item. - /// - KEY_ATTRIBUTES_NOT_UNIQUE = 9, - /// Cannot modify key attributes on an existing feed item. - /// - CANNOT_MODIFY_KEY_ATTRIBUTE_VALUE = 10, - /// Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not allowed. - /// - OVERLAPPING_SCHEDULES = 11, - /// Feed item schedule end time must be after start time. - /// - SCHEDULE_END_NOT_AFTER_START = 12, - /// There are too many feed item schedules per day. - /// - TOO_MANY_SCHEDULES_PER_DAY = 13, - /// The feed attribute value is too large. - /// - SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE = 14, - /// Unknown error. - /// - UNKNOWN = 15, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.FeedItemServiceInterface")] - public interface FeedItemServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedItemPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.FeedItemService.mutateResponse mutate(Wrappers.FeedItemService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.FeedItemService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedItemPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// FeedItem service mutate operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemOperation : Operation - { - private FeedItem operandField; - - /// FeedItem operand This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedItem operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from FeedItemService.mutate(). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemReturnValue : ListReturnValue - { - private FeedItem[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of feed items returned from mutate. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public FeedItem[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface FeedItemServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.FeedItemServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service to operate on feed items. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class FeedItemService : AdWordsSoapClient, IFeedItemService - { - /// Creates a new instance of the class. - /// - public FeedItemService() - { - } - - /// Creates a new instance of the class. - /// - public FeedItemService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public FeedItemService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public FeedItemService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public FeedItemService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of FeedItems that meet the selector criteria. - /// Determines which FeedItems to return. If empty all - /// FeedItems are returned. - /// The list of FeedItems. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedItemPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.FeedItemService.mutateResponse Google.Api.Ads.AdWords.v201806.FeedItemServiceInterface.mutate(Wrappers.FeedItemService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Add, remove, and set FeedItems. - /// The operations to apply. - /// The resulting FeedItems. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedItemReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedItemOperation[] operations) - { - Wrappers.FeedItemService.mutateRequest inValue = new Wrappers.FeedItemService.mutateRequest(); - inValue.operations = operations; - Wrappers.FeedItemService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.FeedItemServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.FeedItemServiceInterface.mutateAsync(Wrappers.FeedItemService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedItemOperation[] operations) - { - Wrappers.FeedItemService.mutateRequest inValue = new Wrappers.FeedItemService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.FeedItemServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of FeedItems that match the query. - /// The SQL-like AWQL query string - /// s A list of FeedItems - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.FeedItemPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.FeedItemTargetService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.FeedItemTargetOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.FeedItemTargetOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.FeedItemTargetReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.FeedItemTargetReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents one target for a FeedItem. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemCriterionTarget))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NegativeFeedItemCriterionTarget))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemCampaignTarget))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FeedItemAdGroupTarget))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class FeedItemTarget - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private long feedItemIdField; - - private bool feedItemIdFieldSpecified; - - private FeedItemTargetType targetTypeField; - - private bool targetTypeFieldSpecified; - - private FeedItemTargetStatus statusField; - - private bool statusFieldSpecified; - - private string feedItemTargetTypeField; - - /// ID of the target feed item's feed. This - /// field can be selected using the value "FeedId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// ID of the target's feed item. This field can - /// be selected using the value "FeedItemId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long feedItemId - { - get - { - return this.feedItemIdField; - } - set - { - this.feedItemIdField = value; - this.feedItemIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedItemIdSpecified - { - get - { - return this.feedItemIdFieldSpecified; - } - set - { - this.feedItemIdFieldSpecified = value; - } - } - - /// Concrete subtype of FeedItemTarget. This - /// field can be selected using the value "TargetType".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public FeedItemTargetType targetType - { - get - { - return this.targetTypeField; - } - set - { - this.targetTypeField = value; - this.targetTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool targetTypeSpecified - { - get - { - return this.targetTypeFieldSpecified; - } - set - { - this.targetTypeFieldSpecified = value; - } - } - - /// Status of feed item target. This field can - /// be selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public FeedItemTargetStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of FeedItemTarget. Although this field - /// is returned in the response, it is ignored on input and cannot be selected. - /// Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("FeedItemTarget.Type", Order = 4)] - public string FeedItemTargetType - { - get - { - return this.feedItemTargetTypeField; - } - set - { - this.feedItemTargetTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field FeedItemId = new Field("FeedItemId", true, true); - - public static readonly Field TargetType = new Field("TargetType", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field FeedItemId = Fields.FeedItemId; - - public static readonly Field TargetType = Fields.TargetType; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field FeedItemId = Fields.FeedItemId; - - public static readonly Field TargetType = Fields.TargetType; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The type a FeedItemTarget. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemTargetType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// FeedItem targets a campaign. - /// - CAMPAIGN = 1, - /// FeedItem targets an ad group. - /// - AD_GROUP = 2, - /// FeedItem targets a criterion ID. - /// - CRITERION = 3, - } - - - /// The status of a FeedItemTarget. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemTargetStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - ACTIVE = 1, - REMOVED = 2, - } - - - /// Represents a feed item target for a criterion. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NegativeFeedItemCriterionTarget))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemCriterionTarget : FeedItemTarget - { - private Criterion criterionField; - - private bool isNegativeField; - - private bool isNegativeFieldSpecified; - - /// The target criterion. This field is required - /// and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// Indicates that the target criterion is negative. Used only for filtering. Use NegativeFeedItemCriterionTarget to create a negative criterion - /// target. This field can be selected using the - /// value "IsNegative".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool isNegative - { - get - { - return this.isNegativeField; - } - set - { - this.isNegativeField = value; - this.isNegativeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isNegativeSpecified - { - get - { - return this.isNegativeFieldSpecified; - } - set - { - this.isNegativeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FeedItemTarget.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field IsNegative = new Field("IsNegative", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FeedItemTarget.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field IsNegative = Fields.IsNegative; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FeedItemTarget.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field IsNegative = Fields.IsNegative; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a feed item target for a negative criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NegativeFeedItemCriterionTarget : FeedItemCriterionTarget - { - } - - - /// Represents a feed item target for a campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemCampaignTarget : FeedItemTarget - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private string campaignNameField; - - /// ID of the target campaign. This field can be - /// selected using the value "CampaignId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// Name of the target campaign. This field can - /// be selected using the value "CampaignName".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string campaignName - { - get - { - return this.campaignNameField; - } - set - { - this.campaignNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FeedItemTarget.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field CampaignName = new Field("CampaignName", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FeedItemTarget.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FeedItemTarget.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a feed item target for an ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemAdGroupTarget : FeedItemTarget - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private string adGroupNameField; - - private string parentCampaignNameField; - - /// ID of the target ad group. This field can be - /// selected using the value "AdGroupId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// Name of the target ad group. This field can - /// be selected using the value "AdGroupName".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string adGroupName - { - get - { - return this.adGroupNameField; - } - set - { - this.adGroupNameField = value; - } - } - - /// Name of the target ad group's campaign. This - /// field can be selected using the value "ParentCampaignName".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string parentCampaignName - { - get - { - return this.parentCampaignNameField; - } - set - { - this.parentCampaignNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : FeedItemTarget.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field AdGroupName = new Field("AdGroupName", true, true); - - public static readonly Field ParentCampaignName = new Field("ParentCampaignName", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : FeedItemTarget.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field AdGroupName = Fields.AdGroupName; - - public static readonly Field ParentCampaignName = Fields.ParentCampaignName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : FeedItemTarget.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field AdGroupName = Fields.AdGroupName; - - public static readonly Field ParentCampaignName = Fields.ParentCampaignName; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to FeedItemTargetService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemTargetPage : Page - { - private FeedItemTarget[] entriesField; - - /// The resulting FeedItemTargets. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public FeedItemTarget[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Errors caused by invalid usage of FeedItemTargetService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemTargetError : ApiError - { - private FeedItemTargetErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedItemTargetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedItemTargetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedItemTargetErrorReason - { - /// The criterion type given cannot be used for targeting. - /// - CRITERION_TYPE_NOT_SUPPORTED = 0, - /// The feed item target specified already exists, so it cannot be added. - /// - FEED_ITEM_TARGET_ALREADY_EXISTS = 1, - /// The type of criterion is not allowed to have negative targeting. - /// - NEGATIVE_TARGETING_NOT_SUPPORTED_FOR_CRITERION_TYPE = 2, - /// Only platform criterion with mobile targeting are supported. - /// - ONLY_MOBILE_TARGETING_IS_SUPPORTED_FOR_PLATFORM_CRITERION = 3, - /// The schedules for a given feed item cannot overlap - /// - FEED_ITEM_SCHEDULES_CANNOT_OVERLAP = 4, - /// The type of Criterion requires the criterion id to be set. - /// - CRITERION_ID_MUST_BE_SET_FOR_GIVEN_TYPE = 5, - /// Too many targets of a given type were added for a single feed item. - /// - TARGET_LIMIT_EXCEEDED_FOR_GIVEN_TYPE = 6, - /// Too many AdSchedules are active for the feed item for the given day. - /// - TOO_MANY_SCHEDULES_PER_DAY = 7, - /// A feed item may either have an active campaign target or an active ad group - /// target. - /// - CANNOT_HAVE_ACTIVE_CAMPAIGN_AND_ACTIVE_AD_GROUP_TARGETS = 8, - UNKNOWN = 9, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.FeedItemTargetServiceInterface")] - public interface FeedItemTargetServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedItemTargetPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.FeedItemTargetService.mutateResponse mutate(Wrappers.FeedItemTargetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.FeedItemTargetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedItemTargetPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create a FeedItemTarget. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemTargetOperation : Operation - { - private FeedItemTarget operandField; - - /// The FeedItemTarget to create. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedItemTarget operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from a call to call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemTargetReturnValue : ListReturnValue - { - private FeedItemTarget[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// The resulting FeedItemTargets. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public FeedItemTarget[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface FeedItemTargetServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.FeedItemTargetServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service for getting and mutating FeedItemTargets. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class FeedItemTargetService : AdWordsSoapClient, IFeedItemTargetService - { - /// Creates a new instance of the - /// class. - public FeedItemTargetService() - { - } - - /// Creates a new instance of the - /// class. - public FeedItemTargetService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public FeedItemTargetService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public FeedItemTargetService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public FeedItemTargetService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of FeedItemTargets that meet the selector criteria. - /// Determines which FeedItemTargets to return. If empty all - /// FeedItemTargets are returned. - /// The list of FeedItemTargets. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedItemTargetPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.FeedItemTargetService.mutateResponse Google.Api.Ads.AdWords.v201806.FeedItemTargetServiceInterface.mutate(Wrappers.FeedItemTargetService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Add and remove FeedItemTargets. - /// The operations to apply. - /// The resulting FeedItemTargets. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedItemTargetReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedItemTargetOperation[] operations) - { - Wrappers.FeedItemTargetService.mutateRequest inValue = new Wrappers.FeedItemTargetService.mutateRequest(); - inValue.operations = operations; - Wrappers.FeedItemTargetService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.FeedItemTargetServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.FeedItemTargetServiceInterface.mutateAsync(Wrappers.FeedItemTargetService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedItemTargetOperation[] operations) - { - Wrappers.FeedItemTargetService.mutateRequest inValue = new Wrappers.FeedItemTargetService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.FeedItemTargetServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of FeedItemTargets that match the query. - /// The SQL-like AWQL query string - /// A list of FeedItemTargets - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.FeedItemTargetPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.FeedMappingService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.FeedMappingOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.FeedMappingOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.FeedMappingReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.FeedMappingReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a mapping between a feed attribute and a placeholder field.

For a - /// list of feed placeholders, see https://developers.google.com/adwords/api/docs/appendix/placeholders

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AttributeFieldMapping - { - private long feedAttributeIdField; - - private bool feedAttributeIdFieldSpecified; - - private int fieldIdField; - - private bool fieldIdFieldSpecified; - - /// The feed attribute that this mapping references. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedAttributeId - { - get - { - return this.feedAttributeIdField; - } - set - { - this.feedAttributeIdField = value; - this.feedAttributeIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedAttributeIdSpecified - { - get - { - return this.feedAttributeIdFieldSpecified; - } - set - { - this.feedAttributeIdFieldSpecified = value; - } - } - - /// The constant placeholder field that this mapping references. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int fieldId - { - get - { - return this.fieldIdField; - } - set - { - this.fieldIdField = value; - this.fieldIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool fieldIdSpecified - { - get - { - return this.fieldIdFieldSpecified; - } - set - { - this.fieldIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A FeedMapping represents a mapping between feed attributes in a specific feed - /// and placeholder fields for a specific placeholder type. This will tell the ads - /// serving system which parts of the feed item should be used when populating a - /// placeholder. Without this mapping the placeholder cannot be populated and the - /// extension can not be displayed.

For a list of feed placeholders, see https://developers.google.com/adwords/api/docs/appendix/placeholders

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedMapping - { - private long feedMappingIdField; - - private bool feedMappingIdFieldSpecified; - - private long feedIdField; - - private bool feedIdFieldSpecified; - - private int placeholderTypeField; - - private bool placeholderTypeFieldSpecified; - - private FeedMappingStatus statusField; - - private bool statusFieldSpecified; - - private AttributeFieldMapping[] attributeFieldMappingsField; - - private int criterionTypeField; - - private bool criterionTypeFieldSpecified; - - /// ID of this FeedMapping. This field can be - /// selected using the value "FeedMappingId".This field can be filtered on. This field is read only and will be ignored when sent to the API for - /// the following Operators: ADD. This field is required and should not be - /// null when it is contained within Operators : - /// REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedMappingId - { - get - { - return this.feedMappingIdField; - } - set - { - this.feedMappingIdField = value; - this.feedMappingIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedMappingIdSpecified - { - get - { - return this.feedMappingIdFieldSpecified; - } - set - { - this.feedMappingIdFieldSpecified = value; - } - } - - /// ID of the Feed that is mapped by this mapping. This field can be selected using the value "FeedId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// The placeholder type for this mapping. This - /// field can be selected using the value "PlaceholderType".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int placeholderType - { - get - { - return this.placeholderTypeField; - } - set - { - this.placeholderTypeField = value; - this.placeholderTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool placeholderTypeSpecified - { - get - { - return this.placeholderTypeFieldSpecified; - } - set - { - this.placeholderTypeFieldSpecified = value; - } - } - - /// Status of the mapping. This field can be - /// selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public FeedMappingStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// The list of feed attributes to placeholder fields mappings. This field can be selected using the value - /// "AttributeFieldMappings". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("attributeFieldMappings", Order = 4)] - public AttributeFieldMapping[] attributeFieldMappings - { - get - { - return this.attributeFieldMappingsField; - } - set - { - this.attributeFieldMappingsField = value; - } - } - - /// The criterion type for this mapping. This field is mutually exclusive with - /// placeholderType. This field can be selected - /// using the value "CriterionType".This - /// field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public int criterionType - { - get - { - return this.criterionTypeField; - } - set - { - this.criterionTypeField = value; - this.criterionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionTypeSpecified - { - get - { - return this.criterionTypeFieldSpecified; - } - set - { - this.criterionTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedMappingId = new Field("FeedMappingId", true, true); - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field PlaceholderType = new Field("PlaceholderType", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field AttributeFieldMappings = new Field("AttributeFieldMappings", false, true); - - public static readonly Field CriterionType = new Field("CriterionType", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedMappingId = Fields.FeedMappingId; - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field PlaceholderType = Fields.PlaceholderType; - - public static readonly Field Status = Fields.Status; - - public static readonly Field AttributeFieldMappings = Fields.AttributeFieldMappings; - - public static readonly Field CriterionType = Fields.CriterionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedMappingId = Fields.FeedMappingId; - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field PlaceholderType = Fields.PlaceholderType; - - public static readonly Field Status = Fields.Status; - - public static readonly Field CriterionType = Fields.CriterionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedMapping.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedMappingStatus - { - /// This mapping is used in feeds. - /// - ENABLED = 0, - /// This mapping is not used anymore. - /// - REMOVED = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// The result of a call to FeedMappingService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedMappingPage : NullStatsPage - { - private FeedMapping[] entriesField; - - /// The resulting FeedMappings - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public FeedMapping[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Errors caused by invalid usage of FeedMappingService - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedMappingError : ApiError - { - private FeedMappingErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The cause of the error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedMappingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FeedMappingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedMappingErrorReason - { - /// The given placeholder field does not exist. - /// - INVALID_PLACEHOLDER_FIELD = 0, - /// The given criterion field does not exist. - /// - INVALID_CRITERION_FIELD = 1, - /// The given placeholder type does not exist. - /// - INVALID_PLACEHOLDER_TYPE = 2, - /// The given criterion type does not exist. - /// - INVALID_CRITERION_TYPE = 3, - /// Cannot specify both placeholder type and criterion type. - /// - CANNOT_SET_PLACEHOLDER_TYPE_AND_CRITERION_TYPE = 4, - /// A feed mapping must contain at least one attribute field mapping. - /// - NO_ATTRIBUTE_FIELD_MAPPINGS = 5, - /// The type of the feed attribute referenced in the attribute field mapping must - /// match the type of the placeholder field. - /// - FEED_ATTRIBUTE_TYPE_MISMATCH = 6, - /// A feed mapping for a system generated feed cannot be operated on. - /// - CANNOT_OPERATE_ON_MAPPINGS_FOR_SYSTEM_GENERATED_FEED = 7, - /// Only one feed mapping for a placeholder type is allowed per feed or customer - /// (depending on the placeholder type). - /// - MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_TYPE = 8, - /// Only one feed mapping for a criterion type is allowed per customer. - /// - MULTIPLE_MAPPINGS_FOR_CRITERION_TYPE = 9, - /// Only one feed attribute mapping for a placeholder field is allowed (depending on - /// the placeholder type). - /// - MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_FIELD = 10, - /// Only one feed attribute mapping for a criterion field is allowed (depending on - /// the criterion type). - /// - MULTIPLE_MAPPINGS_FOR_CRITERION_FIELD = 11, - /// This feed mapping may not contain any explicit attribute field mappings. - /// - UNEXPECTED_ATTRIBUTE_FIELD_MAPPINGS = 12, - /// Location placeholder feedmappings can only be created for Places feeds. - /// - LOCATION_PLACEHOLDER_ONLY_FOR_PLACES_FEEDS = 13, - /// Mappings for typed feeds cannot be modified. - /// - CANNOT_MODIFY_MAPPINGS_FOR_TYPED_FEED = 14, - /// The given placeholder type can only be mapped to system generated feeds. - /// - INVALID_PLACEHOLDER_TYPE_FOR_NON_SYSTEM_GENERATED_FEED = 16, - /// The given placeholder type cannot be mapped to a system generated feed with the - /// given type. - /// - INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE = 17, - UNKNOWN = 15, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.FeedMappingServiceInterface")] - public interface FeedMappingServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedMappingPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.FeedMappingService.mutateResponse mutate(Wrappers.FeedMappingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.FeedMappingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.FeedMappingPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create a FeedMapping.

The following Operators are supported: ADD, REMOVE.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedMappingOperation : Operation - { - private FeedMapping operandField; - - /// The FeedMapping to create This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedMapping operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to FeedMappingService#mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedMappingReturnValue : ListReturnValue - { - private FeedMapping[] valueField; - - /// The resulting FeedMappings. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public FeedMapping[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface FeedMappingServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.FeedMappingServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service for getting and mutating FeedMappings. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class FeedMappingService : AdWordsSoapClient, IFeedMappingService - { - /// Creates a new instance of the class. - /// - public FeedMappingService() - { - } - - /// Creates a new instance of the class. - /// - public FeedMappingService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public FeedMappingService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public FeedMappingService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public FeedMappingService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of FeedMappings that meet the selector criteria. - /// Determines which FeedMappings to return. If empty all - /// FeedMappings are returned. - /// The list of FeedMappings. - /// indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedMappingPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.FeedMappingService.mutateResponse Google.Api.Ads.AdWords.v201806.FeedMappingServiceInterface.mutate(Wrappers.FeedMappingService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Add and remove FeedMappings. The following Operators are - /// supported: ADD, REMOVE. - /// The operations to apply. - /// The resulting FeedMappings. - /// indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.FeedMappingReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedMappingOperation[] operations) - { - Wrappers.FeedMappingService.mutateRequest inValue = new Wrappers.FeedMappingService.mutateRequest(); - inValue.operations = operations; - Wrappers.FeedMappingService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.FeedMappingServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.FeedMappingServiceInterface.mutateAsync(Wrappers.FeedMappingService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedMappingOperation[] operations) - { - Wrappers.FeedMappingService.mutateRequest inValue = new Wrappers.FeedMappingService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.FeedMappingServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of FeedMappings that match the query. - /// The SQL-like AWQL query string - /// s The list of FeedMappings - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.FeedMappingPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.LocationCriterionService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "get", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.Selector selector; - - /// Creates a new instance of the class. - /// - public getRequest() - { - } - - /// Creates a new instance of the class. - /// - public getRequest(Google.Api.Ads.AdWords.v201806.Selector selector) - { - this.selector = selector; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.LocationCriterion[] rval; - - /// Creates a new instance of the class. - /// - public getResponse() - { - } - - /// Creates a new instance of the class. - /// - public getResponse(Google.Api.Ads.AdWords.v201806.LocationCriterion[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "query", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class queryRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public string query; - - /// Creates a new instance of the class. - /// - public queryRequest() - { - } - - /// Creates a new instance of the class. - /// - public queryRequest(string query) - { - this.query = query; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "queryResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class queryResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.LocationCriterion[] rval; - - /// Creates a new instance of the class. - /// - public queryResponse() - { - } - - /// Creates a new instance of the class. - /// - public queryResponse(Google.Api.Ads.AdWords.v201806.LocationCriterion[] rval) - { - this.rval = rval; - } - } - } - /// Represents data that encapsulates a location criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LocationCriterion - { - private Location locationField; - - private string canonicalNameField; - - private long reachField; - - private bool reachFieldSpecified; - - private string localeField; - - private string searchTermField; - - private string countryCodeField; - - /// Location criterion. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Location location - { - get - { - return this.locationField; - } - set - { - this.locationField = value; - } - } - - /// Canonical name of the location criterion. This field can be selected using the value "CanonicalName". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string canonicalName - { - get - { - return this.canonicalNameField; - } - set - { - this.canonicalNameField = value; - } - } - - /// Approximate user population that will be targeted, rounded to the nearest 100. - /// This field can be selected using the value - /// "Reach". This field is read only and - /// will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long reach - { - get - { - return this.reachField; - } - set - { - this.reachField = value; - this.reachSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reachSpecified - { - get - { - return this.reachFieldSpecified; - } - set - { - this.reachFieldSpecified = value; - } - } - - /// Preferred locale to be used as a hint for determining the list of locations to - /// return. This is also used for language translation. Note: If the - /// specified locale filter is invalid, or not supported, en_US will be used by - /// default. This field can be filtered on using - /// the value "Locale". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string locale - { - get - { - return this.localeField; - } - set - { - this.localeField = value; - } - } - - /// Original search term, as specified in the input request for search by name. - /// Note: This field is useful in the case that the original search name does - /// not match the official name of the location, for example, Florence -> - /// Firenze.

The number of search terms is limited to 25 per request.

This field is read only and will be ignored when - /// sent to the API. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string searchTerm - { - get - { - return this.searchTermField; - } - set - { - this.searchTermField = value; - } - } - - /// This is used as a hint and suggestions are restricted to this country when - /// applicable.

See the list of - /// countries.

This field can be - /// filtered on using the value "CountryCode". - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string countryCode - { - get - { - return this.countryCodeField; - } - set - { - this.countryCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CanonicalName = new Field("CanonicalName", false, true); - - public static readonly Field Reach = new Field("Reach", false, true); - - public static readonly Field Locale = new Field("Locale", true, false); - - public static readonly Field CountryCode = new Field("CountryCode", true, false); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CanonicalName = Fields.CanonicalName; - - public static readonly Field Reach = Fields.Reach; - - public static readonly Field Locale = Fields.Locale; - - public static readonly Field CountryCode = Fields.CountryCode; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Locale = Fields.Locale; - - public static readonly Field CountryCode = Fields.CountryCode; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents errors thrown by the LocationCriterionService#get operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LocationCriterionServiceError : ApiError - { - private LocationCriterionServiceErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public LocationCriterionServiceErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Reasons for error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "LocationCriterionServiceError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum LocationCriterionServiceErrorReason - { - REQUIRED_LOCATION_CRITERION_PREDICATE_MISSING = 0, - TOO_MANY_LOCATION_CRITERION_PREDICATES_SPECIFIED = 1, - INVALID_COUNTRY_CODE = 2, - LOCATION_NAME_TOO_LARGE = 4, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - LOCATION_CRITERION_SERVICE_ERROR = 3, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface")] - public interface LocationCriterionServiceInterface - { - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.LocationCriterionService.getResponse get(Wrappers.LocationCriterionService.getRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getAsync(Wrappers.LocationCriterionService.getRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.LocationCriterionService.queryResponse query(Wrappers.LocationCriterionService.queryRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task queryAsync(Wrappers.LocationCriterionService.queryRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface LocationCriterionServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service that returns LocationCriterion constants - /// that match a specified name or list of criterion id(s) as specified in the input - /// selector.

Please note that filtering by date range is not - /// supported.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class LocationCriterionService : AdWordsSoapClient, ILocationCriterionService - { - /// Creates a new instance of the - /// class. - public LocationCriterionService() - { - } - - /// Creates a new instance of the - /// class. - public LocationCriterionService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public LocationCriterionService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public LocationCriterionService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public LocationCriterionService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.LocationCriterionService.getResponse Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface.get(Wrappers.LocationCriterionService.getRequest request) - { - return base.Channel.get(request); - } - - /// Returns a list of LocationCriterion's that match - /// the specified selector. - /// filters the LocationCriterion to be returned. - /// A list of location criterion. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.LocationCriterion[] get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - Wrappers.LocationCriterionService.getRequest inValue = new Wrappers.LocationCriterionService.getRequest(); - inValue.selector = selector; - Wrappers.LocationCriterionService.getResponse retVal = ((Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface) (this)).get(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface.getAsync(Wrappers.LocationCriterionService.getRequest request) - { - return base.Channel.getAsync(request); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - Wrappers.LocationCriterionService.getRequest inValue = new Wrappers.LocationCriterionService.getRequest(); - inValue.selector = selector; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface) (this)).getAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.LocationCriterionService.queryResponse Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface.query(Wrappers.LocationCriterionService.queryRequest request) - { - return base.Channel.query(request); - } - - /// Returns the list of LocationCriterions that - /// match the query. - /// The SQL-like AWQL query string - /// s The list of location criteria - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.LocationCriterion[] query(string query1) - { - Wrappers.LocationCriterionService.queryRequest inValue = new Wrappers.LocationCriterionService.queryRequest(); - inValue.query = query1; - Wrappers.LocationCriterionService.queryResponse retVal = ((Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface) (this)).query(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface.queryAsync(Wrappers.LocationCriterionService.queryRequest request) - { - return base.Channel.queryAsync(request); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - Wrappers.LocationCriterionService.queryRequest inValue = new Wrappers.LocationCriterionService.queryRequest(); - inValue.query = query; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.LocationCriterionServiceInterface) (this)).queryAsync(inValue)).Result.rval); - } - } - namespace Wrappers.ManagedCustomerService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getPendingInvitations", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class getPendingInvitationsRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.PendingInvitationSelector selector; - - /// Creates a new instance of the class. - public getPendingInvitationsRequest() - { - } - - /// Creates a new instance of the class. - public getPendingInvitationsRequest(Google.Api.Ads.AdWords.v201806.PendingInvitationSelector selector) - { - this.selector = selector; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getPendingInvitationsResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class getPendingInvitationsResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.PendingInvitation[] rval; - - /// Creates a new instance of the class. - public getPendingInvitationsResponse() - { - } - - /// Creates a new instance of the class. - public getPendingInvitationsResponse(Google.Api.Ads.AdWords.v201806.PendingInvitation[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.ManagedCustomerOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.ManagedCustomerOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.ManagedCustomerReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.ManagedCustomerReturnValue rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabel", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateLabelRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.ManagedCustomerLabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateLabelRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelRequest(Google.Api.Ads.AdWords.v201806.ManagedCustomerLabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabelResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateLabelResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute("value", IsNullable = false)] - public Google.Api.Ads.AdWords.v201806.ManagedCustomerLabel[] rval; - - /// Creates a new instance of the class. - /// - public mutateLabelResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelResponse(Google.Api.Ads.AdWords.v201806.ManagedCustomerLabel[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLink", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateLinkRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.LinkOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateLinkRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateLinkRequest(Google.Api.Ads.AdWords.v201806.LinkOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLinkResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateLinkResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute("links", IsNullable = false)] - public Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] rval; - - /// Creates a new instance of the class. - /// - public mutateLinkResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateLinkResponse(Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateManager", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateManagerRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.MoveOperation[] operations; - - /// Creates a new instance of the - /// class. - public mutateManagerRequest() - { - } - - /// Creates a new instance of the - /// class. - public mutateManagerRequest(Google.Api.Ads.AdWords.v201806.MoveOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateManagerResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateManagerResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute("links", IsNullable = false)] - public Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] rval; - - /// Creates a new instance of the - /// class. - public mutateManagerResponse() - { - } - - /// Creates a new instance of the - /// class. - public mutateManagerResponse(Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] rval) - { - this.rval = rval; - } - } - } - /// Represents an AdWords manager-client link. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerLink - { - private long managerCustomerIdField; - - private bool managerCustomerIdFieldSpecified; - - private long clientCustomerIdField; - - private bool clientCustomerIdFieldSpecified; - - private LinkStatus linkStatusField; - - private bool linkStatusFieldSpecified; - - private string pendingDescriptiveNameField; - - private bool isHiddenField; - - private bool isHiddenFieldSpecified; - - /// The manager customer ID in this link. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long managerCustomerId - { - get - { - return this.managerCustomerIdField; - } - set - { - this.managerCustomerIdField = value; - this.managerCustomerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool managerCustomerIdSpecified - { - get - { - return this.managerCustomerIdFieldSpecified; - } - set - { - this.managerCustomerIdFieldSpecified = value; - } - } - - /// The client customer ID in this link. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long clientCustomerId - { - get - { - return this.clientCustomerIdField; - } - set - { - this.clientCustomerIdField = value; - this.clientCustomerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool clientCustomerIdSpecified - { - get - { - return this.clientCustomerIdFieldSpecified; - } - set - { - this.clientCustomerIdFieldSpecified = value; - } - } - - /// The status of the link. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public LinkStatus linkStatus - { - get - { - return this.linkStatusField; - } - set - { - this.linkStatusField = value; - this.linkStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool linkStatusSpecified - { - get - { - return this.linkStatusFieldSpecified; - } - set - { - this.linkStatusFieldSpecified = value; - } - } - - /// The pending descriptive name of the client for link invitations. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string pendingDescriptiveName - { - get - { - return this.pendingDescriptiveNameField; - } - set - { - this.pendingDescriptiveNameField = value; - } - } - - /// Whether the link is hidden.

Hiding accounts removes them from your manager - /// account views without unlinking them in the AdWords UI. Ads in those accounts - /// will continue running normally.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool isHidden - { - get - { - return this.isHiddenField; - } - set - { - this.isHiddenField = value; - this.isHiddenSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isHiddenSpecified - { - get - { - return this.isHiddenFieldSpecified; - } - set - { - this.isHiddenFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the link. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum LinkStatus - { - /// An active relationship. - /// - ACTIVE = 0, - /// A former active relationship. - /// - INACTIVE = 1, - /// An invitation that is active or has expired. - /// - PENDING = 2, - /// An invitation that was refused by the invitee. - /// - REFUSED = 3, - /// An invitation that was cancelled by the invitor. - /// - CANCELLED = 4, - UNKNOWN = 5, - } - - - /// A label that can be attached to accounts. A manager may attach labels to - /// accounts that s/he manages (either directly or indirectly).

Note that these - /// are not interchangeable with campaign management labels, and are owned by - /// manager customers.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class AccountLabel - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - /// ID of the label.

This field is selectable/filterable in AccountLabelService. - /// To select labels or filter by label ID in ManagedCustomerService#get, use the - /// AccountLabels field instead. This field can be selected using the value "LabelId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: ADD. - /// This field is required and should not be - /// null when it is contained within Operators : - /// SET, REMOVE.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Name of the label.

This field is selectable in AccountLabelService. To select - /// labels in ManagedCustomerService#get, - /// use the AccountLabels field instead. This field can be selected using the value "LabelName". This field is required and should not be - /// null when it is contained within Operators : - /// ADD.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field LabelId = new Field("LabelId", true, true); - - public static readonly Field LabelName = new Field("LabelName", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field LabelId = Fields.LabelId; - - public static readonly Field LabelName = Fields.LabelName; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field LabelId = Fields.LabelId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Data object that represents a managed customer. Member of ManagedCustomerPage. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomer - { - private string nameField; - - private long customerIdField; - - private bool customerIdFieldSpecified; - - private bool canManageClientsField; - - private bool canManageClientsFieldSpecified; - - private string currencyCodeField; - - private string dateTimeZoneField; - - private bool testAccountField; - - private bool testAccountFieldSpecified; - - private AccountLabel[] accountLabelsField; - - private bool excludeHiddenAccountsField; - - private bool excludeHiddenAccountsFieldSpecified; - - /// The name used by the manager to refer to the client. This field can be selected using the value "Name".This field can be filtered on. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The 10-digit ID that uniquely identifies the AdWords account. This field can be selected using the value - /// "CustomerId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long customerId - { - get - { - return this.customerIdField; - } - set - { - this.customerIdField = value; - this.customerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customerIdSpecified - { - get - { - return this.customerIdFieldSpecified; - } - set - { - this.customerIdFieldSpecified = value; - } - } - - /// Whether this account can manage clients. This - /// field is read only and will be ignored when sent to the API. This field can be selected using the value - /// "CanManageClients".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool canManageClients - { - get - { - return this.canManageClientsField; - } - set - { - this.canManageClientsField = value; - this.canManageClientsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool canManageClientsSpecified - { - get - { - return this.canManageClientsFieldSpecified; - } - set - { - this.canManageClientsFieldSpecified = value; - } - } - - /// The currency in which this account operates. We support a subset of the currency - /// codes derived from the ISO 4217 standard. See - /// Currency Codes for the currently supported currencies. This field can be selected using the value - /// "CurrencyCode".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. The length of this string should be between 3 and 3, - /// inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string currencyCode - { - get - { - return this.currencyCodeField; - } - set - { - this.currencyCodeField = value; - } - } - - /// The local timezone ID for this customer. See Time - /// Zone Codes for the currently supported list. This field can be selected using the value - /// "DateTimeZone".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string dateTimeZone - { - get - { - return this.dateTimeZoneField; - } - set - { - this.dateTimeZoneField = value; - } - } - - /// Whether this managed customer's account is a test account. This field can be selected using the value - /// "TestAccount". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool testAccount - { - get - { - return this.testAccountField; - } - set - { - this.testAccountField = value; - this.testAccountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool testAccountSpecified - { - get - { - return this.testAccountFieldSpecified; - } - set - { - this.testAccountFieldSpecified = value; - } - } - - /// The list of account labels associated with this customer. Only labels owned by - /// the requesting manager will be returned. To change the list of labels applied to - /// this customer, see ManagedCustomerService#mutateLabels. - /// This field can be selected using the value - /// "AccountLabels".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("accountLabels", Order = 6)] - public AccountLabel[] accountLabels - { - get - { - return this.accountLabelsField; - } - set - { - this.accountLabelsField = value; - } - } - - /// Specify ExcludeHiddenAccounts=true to exclude hidden accounts during traversal. - /// This field can be filtered on using the - /// value "ExcludeHiddenAccounts". This - /// field is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public bool excludeHiddenAccounts - { - get - { - return this.excludeHiddenAccountsField; - } - set - { - this.excludeHiddenAccountsField = value; - this.excludeHiddenAccountsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool excludeHiddenAccountsSpecified - { - get - { - return this.excludeHiddenAccountsFieldSpecified; - } - set - { - this.excludeHiddenAccountsFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field CustomerId = new Field("CustomerId", true, true); - - public static readonly Field CanManageClients = new Field("CanManageClients", true, true); - - public static readonly Field CurrencyCode = new Field("CurrencyCode", true, true); - - public static readonly Field DateTimeZone = new Field("DateTimeZone", true, true); - - public static readonly Field TestAccount = new Field("TestAccount", false, true); - - public static readonly Field AccountLabels = new Field("AccountLabels", true, true); - - public static readonly Field ExcludeHiddenAccounts = new Field("ExcludeHiddenAccounts", true, false); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Name = Fields.Name; - - public static readonly Field CustomerId = Fields.CustomerId; - - public static readonly Field CanManageClients = Fields.CanManageClients; - - public static readonly Field CurrencyCode = Fields.CurrencyCode; - - public static readonly Field DateTimeZone = Fields.DateTimeZone; - - public static readonly Field TestAccount = Fields.TestAccount; - - public static readonly Field AccountLabels = Fields.AccountLabels; - - public static readonly Field ExcludeHiddenAccounts = Fields.ExcludeHiddenAccounts; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Name = Fields.Name; - - public static readonly Field CustomerId = Fields.CustomerId; - - public static readonly Field CanManageClients = Fields.CanManageClients; - - public static readonly Field CurrencyCode = Fields.CurrencyCode; - - public static readonly Field DateTimeZone = Fields.DateTimeZone; - - public static readonly Field AccountLabels = Fields.AccountLabels; - - public static readonly Field ExcludeHiddenAccounts = Fields.ExcludeHiddenAccounts; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Return result of ManagedCustomerService - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerPage : Page - { - private ManagedCustomer[] entriesField; - - private ManagedCustomerLink[] linksField; - - /// Subset of the managed customers' information that are being retrieved. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public ManagedCustomer[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// Links between manager and client customers. - /// - [System.Xml.Serialization.XmlElementAttribute("links", Order = 1)] - public ManagedCustomerLink[] links - { - get - { - return this.linksField; - } - set - { - this.linksField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error for ManagedCustomerService - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerServiceError : ApiError - { - private ManagedCustomerServiceErrorReason reasonField; - - private bool reasonFieldSpecified; - - private long[] customerIdsField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ManagedCustomerServiceErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// The list of customer ids associated with the error. - /// - [System.Xml.Serialization.XmlElementAttribute("customerIds", Order = 1)] - public long[] customerIds - { - get - { - return this.customerIdsField; - } - set - { - this.customerIdsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ManagedCustomerServiceError.Reason", Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum ManagedCustomerServiceErrorReason - { - /// Unknown. - /// - UNKNOWN = 0, - /// The user is not authorized to perform the action. - /// - NOT_AUTHORIZED = 1, - /// Invalid selector - /// - INVALID_SELECTOR = 2, - /// Can't process the passed in timezone. - /// - INVALID_TIMEZONE = 3, - /// Can't process the passed in currency code. - /// - INVALID_CURRENCY = 4, - /// Can't process the passed in descriptive name. - /// - INVALID_DESCRIPTIVE_NAME = 5, - /// Generic error during add customer process. - /// - ADD_CUSTOMER_FAILURE = 6, - /// There was a problem saving the modified customers, and some of the customers may - /// not have been saved successfully. - /// - SAVE_CUSTOMERS_FAILURE = 7, - /// Attempt to establish a link with a client that is already managed by the - /// manager. - /// - ALREADY_MANAGED_BY_THIS_MANAGER = 8, - /// Attempt to invite a client that has already been invited by the manager. - /// - ALREADY_INVITED_BY_THIS_MANAGER = 9, - /// Already managed by some other manager in the hierarchy. - /// - ALREADY_MANAGED_IN_HIERARCHY = 17, - /// Client is managed by another manager for UI access already. - /// - ALREADY_MANAGED_FOR_UI_ACCESS = 18, - /// Attempt to exceed the maximum hierarchy depth. - /// - MAX_LINK_DEPTH_EXCEEDED = 19, - /// Attempt to accept an invitation that doesn't exist. - /// - NO_PENDING_INVITATION = 10, - /// Manager account has the maximum number of linked accounts. - /// - TOO_MANY_ACCOUNTS = 11, - /// Your manager's account has the maximum number of linked accounts. - /// - TOO_MANY_ACCOUNTS_AT_MANAGER = 12, - /// The invitee has already linked with max allowed number of UI and API managers. - /// - TOO_MANY_UI_API_MANAGERS = 20, - /// Error involving test accounts (mixed types) or too many child accounts. - /// - TEST_ACCOUNT_LINK_ERROR = 13, - /// Label id was not found, or is not owned by the requesting customer. - /// - INVALID_LABEL_ID = 14, - /// Deleted labels cannot be applied to customers. - /// - CANNOT_APPLY_INACTIVE_LABEL = 15, - /// A label cannot be applied to more than 1000 customers. - /// - APPLIED_LABEL_TO_TOO_MANY_ACCOUNTS = 16, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface")] - public interface ManagedCustomerServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.ManagedCustomerPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ManagedCustomerService.getPendingInvitationsResponse getPendingInvitations(Wrappers.ManagedCustomerService.getPendingInvitationsRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getPendingInvitationsAsync(Wrappers.ManagedCustomerService.getPendingInvitationsRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ManagedCustomerService.mutateResponse mutate(Wrappers.ManagedCustomerService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.ManagedCustomerService.mutateRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ManagedCustomerService.mutateLabelResponse mutateLabel(Wrappers.ManagedCustomerService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateLabelAsync(Wrappers.ManagedCustomerService.mutateLabelRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ManagedCustomerService.mutateLinkResponse mutateLink(Wrappers.ManagedCustomerService.mutateLinkRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateLinkAsync(Wrappers.ManagedCustomerService.mutateLinkRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ManagedCustomerService.mutateManagerResponse mutateManager(Wrappers.ManagedCustomerService.mutateManagerRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateManagerAsync(Wrappers.ManagedCustomerService.mutateManagerRequest request); - } - - - /// Selector for getPendingInvitations method. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class PendingInvitationSelector - { - private long[] managerCustomerIdsField; - - private long[] clientCustomerIdsField; - - /// Manager customer IDs to check for sent invitations. - /// - [System.Xml.Serialization.XmlElementAttribute("managerCustomerIds", Order = 0)] - public long[] managerCustomerIds - { - get - { - return this.managerCustomerIdsField; - } - set - { - this.managerCustomerIdsField = value; - } - } - - /// Client customer IDs to check for received invitations. - /// - [System.Xml.Serialization.XmlElementAttribute("clientCustomerIds", Order = 1)] - public long[] clientCustomerIds - { - get - { - return this.clientCustomerIdsField; - } - set - { - this.clientCustomerIdsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Pending invitation result for the getPendingInvitations method. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class PendingInvitation - { - private ManagedCustomer managerField; - - private ManagedCustomer clientField; - - private string creationDateField; - - private string expirationDateField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ManagedCustomer manager - { - get - { - return this.managerField; - } - set - { - this.managerField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ManagedCustomer client - { - get - { - return this.clientField; - } - set - { - this.clientField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string creationDate - { - get - { - return this.creationDateField; - } - set - { - this.creationDateField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string expirationDate - { - get - { - return this.expirationDateField; - } - set - { - this.expirationDateField = value; - } - } - } - - - /// An operation to create or modify a managed customer.

Note: The - /// REMOVE operator is not supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerOperation : Operation - { - private ManagedCustomer operandField; - - private string inviteeEmailField; - - private AccessRole inviteeRoleField; - - private bool inviteeRoleFieldSpecified; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ManagedCustomer operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// Email invitee.

Email address of the user who should be invited on the created - /// managed customer. Accessible to whitelisted customers only.

Note: This is only supported for ADD operator. - /// This field is read only and will be ignored - /// when sent to the API for the following Operators: REMOVE - /// and SET.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string inviteeEmail - { - get - { - return this.inviteeEmailField; - } - set - { - this.inviteeEmailField = value; - } - } - - /// Email invitee role.

The proposed role of @{code inviteeEmail} on the created - /// managed customer. Accessible to whitelisted customers only.

Note: This is only supported for ADD operator. - /// This field is read only and will be ignored - /// when sent to the API for the following Operators: REMOVE - /// and SET.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public AccessRole inviteeRole - { - get - { - return this.inviteeRoleField; - } - set - { - this.inviteeRoleField = value; - this.inviteeRoleSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool inviteeRoleSpecified - { - get - { - return this.inviteeRoleFieldSpecified; - } - set - { - this.inviteeRoleFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Access role of user on the customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum AccessRole - { - ADMINISTRATIVE = 0, - STANDARD = 1, - READ_ONLY = 2, - } - - - /// Operation for moving ManagedCustomer links. See ManagedCustomerService#mutateManager. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class MoveOperation : Operation - { - private ManagedCustomerLink operandField; - - private long oldManagerCustomerIdField; - - private bool oldManagerCustomerIdFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ManagedCustomerLink operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// The ID of the old Manager. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long oldManagerCustomerId - { - get - { - return this.oldManagerCustomerIdField; - } - set - { - this.oldManagerCustomerIdField = value; - this.oldManagerCustomerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool oldManagerCustomerIdSpecified - { - get - { - return this.oldManagerCustomerIdFieldSpecified; - } - set - { - this.oldManagerCustomerIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An operation to apply or remove an account label from a managed customer.

Note: The SET operator is not supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerLabelOperation : Operation - { - private ManagedCustomerLabel operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ManagedCustomerLabel operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A label ID and customer ID the label applies to. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerLabel - { - private long labelIdField; - - private bool labelIdFieldSpecified; - - private long customerIdField; - - private bool customerIdFieldSpecified; - - /// The ID of an existing label to be applied to the account. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long labelId - { - get - { - return this.labelIdField; - } - set - { - this.labelIdField = value; - this.labelIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool labelIdSpecified - { - get - { - return this.labelIdFieldSpecified; - } - set - { - this.labelIdFieldSpecified = value; - } - } - - /// The 10-digit customer ID that identifies this account. Note that this is a - /// long (do not include hyphens in the middle), just like ManagedCustomer#customerId. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long customerId - { - get - { - return this.customerIdField; - } - set - { - this.customerIdField = value; - this.customerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customerIdSpecified - { - get - { - return this.customerIdFieldSpecified; - } - set - { - this.customerIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation for modifying ManagedCustomer links. See ManagedCustomerService#mutateLink. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class LinkOperation : Operation - { - private ManagedCustomerLink operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ManagedCustomerLink operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the ManagedCustomerService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class ManagedCustomerReturnValue - { - private ManagedCustomer[] valueField; - - /// List of managed customers. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public ManagedCustomer[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface ManagedCustomerServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Customer Manager Service. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class ManagedCustomerService : AdWordsSoapClient, IManagedCustomerService - { - /// Creates a new instance of the - /// class. - public ManagedCustomerService() - { - } - - /// Creates a new instance of the - /// class. - public ManagedCustomerService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public ManagedCustomerService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public ManagedCustomerService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public ManagedCustomerService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the list of customers that meet the selector criteria. - /// The selector specifying the ManagedCustomers to return. - /// List of customers identified by the selector. - /// When there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.ManagedCustomerPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ManagedCustomerService.getPendingInvitationsResponse Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.getPendingInvitations(Wrappers.ManagedCustomerService.getPendingInvitationsRequest request) - { - return base.Channel.getPendingInvitations(request); - } - - /// Returns the pending invitations for the customer IDs in the selector. - /// the manager customer ids (inviters) or the client - /// customer ids (invitees) - /// when there is at least one error with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.PendingInvitation[] getPendingInvitations(Google.Api.Ads.AdWords.v201806.PendingInvitationSelector selector) - { - Wrappers.ManagedCustomerService.getPendingInvitationsRequest inValue = new Wrappers.ManagedCustomerService.getPendingInvitationsRequest(); - inValue.selector = selector; - Wrappers.ManagedCustomerService.getPendingInvitationsResponse retVal = ((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).getPendingInvitations(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.getPendingInvitationsAsync(Wrappers.ManagedCustomerService.getPendingInvitationsRequest request) - { - return base.Channel.getPendingInvitationsAsync(request); - } - - public virtual System.Threading.Tasks.Task getPendingInvitationsAsync(Google.Api.Ads.AdWords.v201806.PendingInvitationSelector selector) - { - Wrappers.ManagedCustomerService.getPendingInvitationsRequest inValue = new Wrappers.ManagedCustomerService.getPendingInvitationsRequest(); - inValue.selector = selector; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).getPendingInvitationsAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ManagedCustomerService.mutateResponse Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutate(Wrappers.ManagedCustomerService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Modifies or creates new ManagedCustomers.

Note: See ManagedCustomerOperation for available - /// operators.

- ///
List of unique operations. - /// The list of updated managed customers, returned in the same order as - /// the operations array. - public virtual Google.Api.Ads.AdWords.v201806.ManagedCustomerReturnValue mutate(Google.Api.Ads.AdWords.v201806.ManagedCustomerOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateRequest inValue = new Wrappers.ManagedCustomerService.mutateRequest(); - inValue.operations = operations; - Wrappers.ManagedCustomerService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateAsync(Wrappers.ManagedCustomerService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.ManagedCustomerOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateRequest inValue = new Wrappers.ManagedCustomerService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ManagedCustomerService.mutateLabelResponse Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateLabel(Wrappers.ManagedCustomerService.mutateLabelRequest request) - { - return base.Channel.mutateLabel(request); - } - - /// Adds AccountLabels to, and removes AccountLabels from, ManagedCustomers.

To add an AccountLabel to a ManagedCustomer, use Operator#ADD. To remove an AccountLabel from a ManagedCustomer, use Operator#REMOVE.

The label must already exist - /// (see AccountLabelService#mutate for how - /// to create them) and be owned by the authenticated user.

The ManagedCustomer must already exist and be managed by - /// the customer making the request (either directly or indirectly).

An - /// AccountLabel may be applied to at most 1000 customers.

This method does - /// not support partial failures, and will fail if any operation is invalid.

- ///
- public virtual Google.Api.Ads.AdWords.v201806.ManagedCustomerLabel[] mutateLabel(Google.Api.Ads.AdWords.v201806.ManagedCustomerLabelOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateLabelRequest inValue = new Wrappers.ManagedCustomerService.mutateLabelRequest(); - inValue.operations = operations; - Wrappers.ManagedCustomerService.mutateLabelResponse retVal = ((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateLabel(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateLabelAsync(Wrappers.ManagedCustomerService.mutateLabelRequest request) - { - return base.Channel.mutateLabelAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.ManagedCustomerLabelOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateLabelRequest inValue = new Wrappers.ManagedCustomerService.mutateLabelRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateLabelAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ManagedCustomerService.mutateLinkResponse Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateLink(Wrappers.ManagedCustomerService.mutateLinkRequest request) - { - return base.Channel.mutateLink(request); - } - - /// Modifies the ManagedCustomer forest. These actions are possible (categorized by - /// Operator + Link Status):
  • ADD + PENDING: manager extends - /// invitations
  • SET + CANCELLED: manager rescinds invitations
  • SET - /// + INACTIVE: manager/client terminates links
  • SET + ACTIVE: client - /// accepts invitations
  • SET + REFUSED: client declines invitations
  • - ///
In addition to these, active links can also be marked hidden / unhidden. - ///
  • An ACTIVE link can be marked hidden with SET + ACTIVE along with - /// setting the isHidden bit to true.
  • An ACTIVE link can be marked unhidden - /// with SET + ACTIVE along with setting the isHidden bit to false.
- ///
the list of operations - /// results for the given operations - /// with a ManagedCustomerServiceError - public virtual Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] mutateLink(Google.Api.Ads.AdWords.v201806.LinkOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateLinkRequest inValue = new Wrappers.ManagedCustomerService.mutateLinkRequest(); - inValue.operations = operations; - Wrappers.ManagedCustomerService.mutateLinkResponse retVal = ((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateLink(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateLinkAsync(Wrappers.ManagedCustomerService.mutateLinkRequest request) - { - return base.Channel.mutateLinkAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateLinkAsync(Google.Api.Ads.AdWords.v201806.LinkOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateLinkRequest inValue = new Wrappers.ManagedCustomerService.mutateLinkRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateLinkAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ManagedCustomerService.mutateManagerResponse Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateManager(Wrappers.ManagedCustomerService.mutateManagerRequest request) - { - return base.Channel.mutateManager(request); - } - - /// Moves client customers to new managers (moving links). Only the following action - /// is possible:
  • SET + ACTIVE: manager moves client customers to new - /// managers within the same manager account hierarchy
- ///
List of unique operations. - /// results for the given operations - /// with a ManagedCustomerServiceError - public virtual Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] mutateManager(Google.Api.Ads.AdWords.v201806.MoveOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateManagerRequest inValue = new Wrappers.ManagedCustomerService.mutateManagerRequest(); - inValue.operations = operations; - Wrappers.ManagedCustomerService.mutateManagerResponse retVal = ((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateManager(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface.mutateManagerAsync(Wrappers.ManagedCustomerService.mutateManagerRequest request) - { - return base.Channel.mutateManagerAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateManagerAsync(Google.Api.Ads.AdWords.v201806.MoveOperation[] operations) - { - Wrappers.ManagedCustomerService.mutateManagerRequest inValue = new Wrappers.ManagedCustomerService.mutateManagerRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ManagedCustomerServiceInterface) (this)).mutateManagerAsync(inValue)).Result.rval); - } - } - namespace Wrappers.MediaService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "upload", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class uploadRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("media")] - public Google.Api.Ads.AdWords.v201806.Media[] media; - - /// Creates a new instance of the class. - /// - public uploadRequest() - { - } - - /// Creates a new instance of the class. - /// - public uploadRequest(Google.Api.Ads.AdWords.v201806.Media[] media) - { - this.media = media; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "uploadResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class uploadResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.Media[] rval; - - /// Creates a new instance of the class. - /// - public uploadResponse() - { - } - - /// Creates a new instance of the class. - /// - public uploadResponse(Google.Api.Ads.AdWords.v201806.Media[] rval) - { - this.rval = rval; - } - } - } - /// Page of media returned by the MediaService which - /// includes the media. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MediaPage - { - private Media[] entriesField; - - private int totalNumEntriesField; - - private bool totalNumEntriesFieldSpecified; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Media[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// Total number of entries in the result that this page is a part of. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int totalNumEntries - { - get - { - return this.totalNumEntriesField; - } - set - { - this.totalNumEntriesField = value; - this.totalNumEntriesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalNumEntriesSpecified - { - get - { - return this.totalNumEntriesFieldSpecified; - } - set - { - this.totalNumEntriesFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error class for errors associated with parsing video data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class VideoError : ApiError - { - private VideoErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public VideoErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "VideoError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum VideoErrorReason - { - /// Invalid video. - /// - INVALID_VIDEO = 0, - /// Storage error. - /// - STORAGE_ERROR = 1, - /// Bad request. - /// - BAD_REQUEST = 2, - /// Server error. - /// - ERROR_GENERATING_STREAMING_URL = 3, - /// Unexpected size. - /// - UNEXPECTED_SIZE = 4, - /// Server error. - /// - SERVER_ERROR = 5, - /// File too large. - /// - FILE_TOO_LARGE = 6, - /// Video processing error. - /// - VIDEO_PROCESSING_ERROR = 7, - /// Invalid input. - /// - INVALID_INPUT = 8, - /// Problem reading file. - /// - PROBLEM_READING_FILE = 9, - /// Invalid ISCI. - /// - INVALID_ISCI = 10, - /// Invalid AD-ID. - /// - INVALID_AD_ID = 11, - } - - - /// Error class for errors associated with parsing audio data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AudioError : ApiError - { - private AudioErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AudioErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AudioError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AudioErrorReason - { - INVALID_AUDIO = 0, - PROBLEM_READING_AUDIO_FILE = 1, - ERROR_STORING_AUDIO = 2, - FILE_TOO_LARGE = 3, - UNSUPPORTED_AUDIO = 4, - ERROR_GENERATING_STREAMING_URL = 5, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.MediaServiceInterface")] - public interface MediaServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.MediaPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.MediaPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.MediaService.uploadResponse upload(Wrappers.MediaService.uploadRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task uploadAsync(Wrappers.MediaService.uploadRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface MediaServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.MediaServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage media. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class MediaService : AdWordsSoapClient, IMediaService - { - /// Creates a new instance of the class. - /// - public MediaService() - { - } - - /// Creates a new instance of the class. - /// - public MediaService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public MediaService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public MediaService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public MediaService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of media that meet the criteria specified by the selector.

Note: MediaService will not return any ImageAd image files.

- ///
Selects which media objects to return. - /// A list of Media objects. - public virtual Google.Api.Ads.AdWords.v201806.MediaPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - /// Returns the list of Media objects that match the query. - /// The SQL-like AWQL query string - /// s A list of Media objects. - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.MediaPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.MediaService.uploadResponse Google.Api.Ads.AdWords.v201806.MediaServiceInterface.upload(Wrappers.MediaService.uploadRequest request) - { - return base.Channel.upload(request); - } - - /// Uploads new media. Currently, you can upload Image files and - /// MediaBundles. - /// A list of Media objects, each containing the - /// data to be uploaded. - /// A list of uploaded media in the same order as the argument - /// list. - public virtual Google.Api.Ads.AdWords.v201806.Media[] upload(Google.Api.Ads.AdWords.v201806.Media[] media) - { - Wrappers.MediaService.uploadRequest inValue = new Wrappers.MediaService.uploadRequest(); - inValue.media = media; - Wrappers.MediaService.uploadResponse retVal = ((Google.Api.Ads.AdWords.v201806.MediaServiceInterface) (this)).upload(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.MediaServiceInterface.uploadAsync(Wrappers.MediaService.uploadRequest request) - { - return base.Channel.uploadAsync(request); - } - - public virtual System.Threading.Tasks.Task uploadAsync(Google.Api.Ads.AdWords.v201806.Media[] media) - { - Wrappers.MediaService.uploadRequest inValue = new Wrappers.MediaService.uploadRequest(); - inValue.media = media; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.MediaServiceInterface) (this)).uploadAsync(inValue)).Result.rval); - } - } - namespace Wrappers.AdGroupCriterionService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupCriterionOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdGroupCriterionOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupCriterionReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdGroupCriterionReturnValue rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabel", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateLabelRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelRequest(Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabelResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateLabelResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelResponse(Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelReturnValue rval) - { - this.rval = rval; - } - } - } - /// Wrapper POJO for a list of URLs. The list can be cleared if a request contains a - /// UrlList with an empty urls list. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class UrlList - { - private string[] urlsField; - - /// List of URLs. On SET operation, empty list indicates to clear the list. The maximum size of this collection is - /// 10. Strings in this field - /// must be non-empty (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute("urls", Order = 0)] - public string[] urls - { - get - { - return this.urlsField; - } - set - { - this.urlsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Container for criterion quality information. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class QualityInfo - { - private int qualityScoreField; - - private bool qualityScoreFieldSpecified; - - /// The keyword quality score ranges from 1 (lowest) to 10 (highest).

If there - /// aren't enough impressions or clicks to determine an appropriate quality score - /// value, the QualityInfo object is not returned. For reports, this field will - /// return null (designated by "--"). This field - /// can be selected using the value "QualityScore".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int qualityScore - { - get - { - return this.qualityScoreField; - } - set - { - this.qualityScoreField = value; - this.qualityScoreSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool qualityScoreSpecified - { - get - { - return this.qualityScoreFieldSpecified; - } - set - { - this.qualityScoreFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field QualityScore = new Field("QualityScore", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field QualityScore = Fields.QualityScore; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field QualityScore = Fields.QualityScore; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a bid of a certain amount. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Bid - { - private Money amountField; - - /// Bid amount. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money amount - { - get - { - return this.amountField; - } - set - { - this.amountField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Product partition (product group) in a shopping campaign. Depending on its type, - /// a product partition subdivides products along some product dimension, specifies - /// a bid for products, or excludes products from bidding.

Inner nodes of a - /// product partition hierarchy are always subdivisions. Each child is linked to the - /// subdivision via the parentCriterionId and defines a - /// caseValue. For all children of the same subdivision, the - /// caseValues must be mutually different but instances of the same - /// class. To create a subdivision and child node in the same API request, they - /// should refer to each other using temporary criterion IDs in the of - /// the child, and ID field of the subdivision. Temporary IDs are specified by using - /// any negative integer. Temporary IDs only exist within the scope of a single API - /// request. The API will assign real criterion IDs, and replace the temporary - /// values, and the API response will reflect this. This is disabled for AdX when it is contained within Operators: ADD, - /// SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProductPartition : Criterion - { - private ProductPartitionType partitionTypeField; - - private bool partitionTypeFieldSpecified; - - private long parentCriterionIdField; - - private bool parentCriterionIdFieldSpecified; - - private ProductDimension caseValueField; - - /// Type of the product partition. This field - /// can be selected using the value "PartitionType". This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ProductPartitionType partitionType - { - get - { - return this.partitionTypeField; - } - set - { - this.partitionTypeField = value; - this.partitionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool partitionTypeSpecified - { - get - { - return this.partitionTypeFieldSpecified; - } - set - { - this.partitionTypeFieldSpecified = value; - } - } - - /// ID of the parent product partition subdivision. Undefined for the root - /// partition. This field can be selected using - /// the value "ParentCriterionId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long parentCriterionId - { - get - { - return this.parentCriterionIdField; - } - set - { - this.parentCriterionIdField = value; - this.parentCriterionIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool parentCriterionIdSpecified - { - get - { - return this.parentCriterionIdFieldSpecified; - } - set - { - this.parentCriterionIdFieldSpecified = value; - } - } - - /// Dimension value with which this product partition is refining its parent. - /// Undefined for the root partition. This field - /// can be selected using the value "CaseValue". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public ProductDimension caseValue - { - get - { - return this.caseValueField; - } - set - { - this.caseValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field PartitionType = new Field("PartitionType", false, true); - - public static readonly Field ParentCriterionId = new Field("ParentCriterionId", false, true); - - public static readonly Field CaseValue = new Field("CaseValue", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field PartitionType = Fields.PartitionType; - - public static readonly Field ParentCriterionId = Fields.ParentCriterionId; - - public static readonly Field CaseValue = Fields.CaseValue; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Type of a product partition in a shopping campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ProductPartitionType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Subdivision of products along some product dimension. - /// - SUBDIVISION = 1, - /// Unit which either defines a bid or delegates bidding to other campaigns. - /// - UNIT = 2, - } - - - /// A Custom Intent criterion.

A criterion of this type is only targetable. This is disabled for AdX when it is contained - /// within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionCustomIntent : Criterion - { - private long customIntentIdField; - - private bool customIntentIdFieldSpecified; - - /// ID of the custom intent. This field can be - /// selected using the value "CustomIntentId".This field can be filtered on. This field must be greater than or equal to 1. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long customIntentId - { - get - { - return this.customIntentIdField; - } - set - { - this.customIntentIdField = value; - this.customIntentIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customIntentIdSpecified - { - get - { - return this.customIntentIdFieldSpecified; - } - set - { - this.customIntentIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CustomIntentId = new Field("CustomIntentId", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CustomIntentId = Fields.CustomIntentId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CustomIntentId = Fields.CustomIntentId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A Custom Affinity criterion.

A criterion of this type is only targetable. - /// This is disabled for AdX when it is - /// contained within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionCustomAffinity : Criterion - { - private long customAffinityIdField; - - private bool customAffinityIdFieldSpecified; - - /// ID of the custom affinity. This field can be - /// selected using the value "CustomAffinityId".This field can be filtered on. This field must be greater than or equal to 1. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long customAffinityId - { - get - { - return this.customAffinityIdField; - } - set - { - this.customAffinityIdField = value; - this.customAffinityIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customAffinityIdSpecified - { - get - { - return this.customAffinityIdFieldSpecified; - } - set - { - this.customAffinityIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CustomAffinityId = new Field("CustomAffinityId", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CustomAffinityId = Fields.CustomAffinityId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CustomAffinityId = Fields.CustomAffinityId; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a criterion for targeting paid apps.

Possible IDs: 30 - /// (APP_PAYMENT_MODEL_PAID).

A criterion of this type can only - /// be created using an ID. A criterion of this type is only targetable. This is disabled for AdX when it is contained - /// within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AppPaymentModel : Criterion - { - private AppPaymentModelAppPaymentModelType appPaymentModelTypeField; - - private bool appPaymentModelTypeFieldSpecified; - - /// This field can be selected using the value - /// "AppPaymentModelType". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AppPaymentModelAppPaymentModelType appPaymentModelType - { - get - { - return this.appPaymentModelTypeField; - } - set - { - this.appPaymentModelTypeField = value; - this.appPaymentModelTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool appPaymentModelTypeSpecified - { - get - { - return this.appPaymentModelTypeFieldSpecified; - } - set - { - this.appPaymentModelTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Criterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AppPaymentModelType = new Field("AppPaymentModelType", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Criterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AppPaymentModelType = Fields.AppPaymentModelType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Criterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The possible types of App Payment Model. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AppPaymentModel.AppPaymentModelType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AppPaymentModelAppPaymentModelType - { - /// Represents paid-for apps. - /// - APP_PAYMENT_MODEL_PAID = 0, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 1, - } - - - /// Represents a criterion in an ad group, used with AdGroupCriterionService. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NegativeAdGroupCriterion))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BiddableAdGroupCriterion))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterion - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private CriterionUse criterionUseField; - - private bool criterionUseFieldSpecified; - - private Criterion criterionField; - - private Label[] labelsField; - - private String_StringMapEntry[] forwardCompatibilityMapField; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - private string adGroupCriterionTypeField; - - /// The ad group this criterion is in. This - /// field can be selected using the value "AdGroupId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "CriterionUse".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public CriterionUse criterionUse - { - get - { - return this.criterionUseField; - } - set - { - this.criterionUseField = value; - this.criterionUseSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionUseSpecified - { - get - { - return this.criterionUseFieldSpecified; - } - set - { - this.criterionUseFieldSpecified = value; - } - } - - /// The criterion part of the ad group criterion. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// Labels that are attached to the AdGroupCriterion. To associate an existing Label to an existing AdGroupCriterion, use AdGroupCriterionService#mutateLabel - /// with ADD operator. To remove an associated Label from the AdGroupCriterion, use AdGroupCriterionService#mutateLabel - /// with REMOVE operator. To filter on Labels, use one of Predicate.Operator#CONTAINS_ALL, Predicate.Operator#CONTAINS_ANY, Predicate.Operator#CONTAINS_NONE - /// operators with a list of Label ids. This field can be selected using the value "Labels".This field can be filtered on. This field may not be set for campaign channel - /// subtype UNIVERSAL_APP_CAMPAIGN. This - /// field is read only and will be ignored when sent to the API for the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute("labels", Order = 3)] - public Label[] labels - { - get - { - return this.labelsField; - } - set - { - this.labelsField = value; - } - } - - /// This Map provides a place to put new features and settings in older versions of - /// the AdWords API in the rare instance we need to introduce a new feature in an - /// older version. It is presently unused. Do not set a value. - /// - [System.Xml.Serialization.XmlElementAttribute("forwardCompatibilityMap", Order = 4)] - public String_StringMapEntry[] forwardCompatibilityMap - { - get - { - return this.forwardCompatibilityMapField; - } - set - { - this.forwardCompatibilityMapField = value; - } - } - - /// ID of the base campaign from which this draft/trial ad group criterion was - /// created. This field is only returned on get requests. This field can be selected using the value - /// "BaseCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// ID of the base ad group from which this draft/trial ad group criterion was - /// created. For base ad groups this is equal to the ad group ID. If the ad group - /// was created in the draft or trial and has no corresponding base ad group, this - /// field is null. This field is only returned on get requests. This field can be selected using the value - /// "BaseAdGroupId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of AdGroupCriterion. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("AdGroupCriterion.Type", Order = 7)] - public string AdGroupCriterionType - { - get - { - return this.adGroupCriterionTypeField; - } - set - { - this.adGroupCriterionTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field CriterionUse = new Field("CriterionUse", true, true); - - public static readonly Field Labels = new Field("Labels", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field CriterionUse = Fields.CriterionUse; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field CriterionUse = Fields.CriterionUse; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The way a criterion is used - biddable or negative. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CriterionUse - { - /// Biddable (positive) criterion - /// - BIDDABLE = 0, - /// Negative criterion - /// - NEGATIVE = 1, - } - - - /// A negative criterion in an adgroup. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NegativeAdGroupCriterion : AdGroupCriterion - { - } - - - /// A biddable (positive) criterion in an adgroup. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddableAdGroupCriterion : AdGroupCriterion - { - private UserStatus userStatusField; - - private bool userStatusFieldSpecified; - - private SystemServingStatus systemServingStatusField; - - private bool systemServingStatusFieldSpecified; - - private ApprovalStatus approvalStatusField; - - private bool approvalStatusFieldSpecified; - - private string[] disapprovalReasonsField; - - private string destinationUrlField; - - private Bid firstPageCpcField; - - private Bid topOfPageCpcField; - - private Bid firstPositionCpcField; - - private QualityInfo qualityInfoField; - - private BiddingStrategyConfiguration biddingStrategyConfigurationField; - - private double bidModifierField; - - private bool bidModifierFieldSpecified; - - private UrlList finalUrlsField; - - private UrlList finalMobileUrlsField; - - private AppUrl[] finalAppUrlsField; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private CustomParameters urlCustomParametersField; - - /// Current user-set state of criterion. UserStatus may not be set to - /// REMOVED and is not supported for ProductPartition criterion. On - /// add, defaults to ENABLED if unspecified. This field can be selected using the value "Status".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UserStatus userStatus - { - get - { - return this.userStatusField; - } - set - { - this.userStatusField = value; - this.userStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userStatusSpecified - { - get - { - return this.userStatusFieldSpecified; - } - set - { - this.userStatusFieldSpecified = value; - } - } - - /// Serving status. This field can be selected - /// using the value "SystemServingStatus".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public SystemServingStatus systemServingStatus - { - get - { - return this.systemServingStatusField; - } - set - { - this.systemServingStatusField = value; - this.systemServingStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool systemServingStatusSpecified - { - get - { - return this.systemServingStatusFieldSpecified; - } - set - { - this.systemServingStatusFieldSpecified = value; - } - } - - /// Approval status. This field can be selected - /// using the value "ApprovalStatus".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public ApprovalStatus approvalStatus - { - get - { - return this.approvalStatusField; - } - set - { - this.approvalStatusField = value; - this.approvalStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool approvalStatusSpecified - { - get - { - return this.approvalStatusFieldSpecified; - } - set - { - this.approvalStatusFieldSpecified = value; - } - } - - /// List of disapproval reasons. This field can - /// be selected using the value "DisapprovalReasons". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute("disapprovalReasons", Order = 3)] - public string[] disapprovalReasons - { - get - { - return this.disapprovalReasonsField; - } - set - { - this.disapprovalReasonsField = value; - } - } - - /// Destination URL override when Ad is triggered by this criterion.

Some sample - /// valid URLs are: "http://www.website.com", "http://www.domain.com/somepath".

- ///

Set to the empty string ("") to clear the destination URL. This field can be selected using the value - /// "DestinationUrl".This field can be - /// filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string destinationUrl - { - get - { - return this.destinationUrlField; - } - set - { - this.destinationUrlField = value; - } - } - - /// First page Cpc for this criterion. This - /// field can be selected using the value "FirstPageCpc".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public Bid firstPageCpc - { - get - { - return this.firstPageCpcField; - } - set - { - this.firstPageCpcField = value; - } - } - - /// An estimate of the cpc bid needed for your ad to appear above the first page of - /// Google search results when a query matches the keywords exactly. Note that - /// meeting this estimate is not a guarantee of ad position, which may depend on - /// other factors. This field can be selected - /// using the value "TopOfPageCpc".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public Bid topOfPageCpc - { - get - { - return this.topOfPageCpcField; - } - set - { - this.topOfPageCpcField = value; - } - } - - /// An estimate of the cpc bid needed for your ad to regularly appear in the top - /// position above the search results on google.com when a query matches the - /// keywords exactly. Note that meeting this estimate is not a guarantee of ad - /// position, which may depend on other factors. This field can be selected using the value - /// "FirstPositionCpc".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public Bid firstPositionCpc - { - get - { - return this.firstPositionCpcField; - } - set - { - this.firstPositionCpcField = value; - } - } - - /// Contains quality information about the criterion. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public QualityInfo qualityInfo - { - get - { - return this.qualityInfoField; - } - set - { - this.qualityInfoField = value; - } - } - - /// Bidding configuration for this ad group criterion. To set the bids on the ad - /// groups use BiddingStrategyConfiguration#bids. - /// Multiple bids can be set on ad group criterion at the same time. Only the bids - /// that apply to the campaign's bidding strategy bidding strategy will be used. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public BiddingStrategyConfiguration biddingStrategyConfiguration - { - get - { - return this.biddingStrategyConfigurationField; - } - set - { - this.biddingStrategyConfigurationField = value; - } - } - - /// Bid modifier of the criterion which is used when the criterion is not in an - /// absolute bidding dimension. This field can - /// be selected using the value "BidModifier".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public double bidModifier - { - get - { - return this.bidModifierField; - } - set - { - this.bidModifierField = value; - this.bidModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSpecified - { - get - { - return this.bidModifierFieldSpecified; - } - set - { - this.bidModifierFieldSpecified = value; - } - } - - /// A list of possible final URLs after all cross domain redirects. This field can be selected using the value - /// "FinalUrls".This field can be - /// filtered on. This field may not be - /// set for campaign channel type SHOPPING with campaign channel subtype - /// SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public UrlList finalUrls - { - get - { - return this.finalUrlsField; - } - set - { - this.finalUrlsField = value; - } - } - - /// A list of possible final mobile URLs after all cross domain redirects. This field can be selected using the value - /// "FinalMobileUrls".This field can be - /// filtered on. This field may not be - /// set for campaign channel type SHOPPING with campaign channel subtype - /// SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public UrlList finalMobileUrls - { - get - { - return this.finalMobileUrlsField; - } - set - { - this.finalMobileUrlsField = value; - } - } - - /// A list of final app URLs that will be used on mobile if the user has the - /// specific app installed. This field can be - /// selected using the value "FinalAppUrls".This field can be filtered on. This field may not be set for campaign channel type SHOPPING with - /// campaign channel subtype SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlArrayAttribute(Order = 13)] - [System.Xml.Serialization.XmlArrayItemAttribute("appUrls", IsNullable = false)] - public AppUrl[] finalAppUrls - { - get - { - return this.finalAppUrlsField; - } - set - { - this.finalAppUrlsField = value; - } - } - - /// URL template for constructing a tracking URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "TrackingUrlTemplate".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// URL template for appending params to Final URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "FinalUrlSuffix".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 15)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. This field can be selected using the value - /// "UrlCustomParameters".This field can - /// be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 16)] - public CustomParameters urlCustomParameters - { - get - { - return this.urlCustomParametersField; - } - set - { - this.urlCustomParametersField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : AdGroupCriterion.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field SystemServingStatus = new Field("SystemServingStatus", true, true); - - public static readonly Field ApprovalStatus = new Field("ApprovalStatus", true, true); - - public static readonly Field DisapprovalReasons = new Field("DisapprovalReasons", false, true); - - public static readonly Field DestinationUrl = new Field("DestinationUrl", true, true); - - public static readonly Field FirstPageCpc = new Field("FirstPageCpc", true, true); - - public static readonly Field TopOfPageCpc = new Field("TopOfPageCpc", true, true); - - public static readonly Field FirstPositionCpc = new Field("FirstPositionCpc", true, true); - - public static readonly Field BidModifier = new Field("BidModifier", true, true); - - public static readonly Field FinalUrls = new Field("FinalUrls", true, true); - - public static readonly Field FinalMobileUrls = new Field("FinalMobileUrls", true, true); - - public static readonly Field FinalAppUrls = new Field("FinalAppUrls", true, true); - - public static readonly Field TrackingUrlTemplate = new Field("TrackingUrlTemplate", true, true); - - public static readonly Field FinalUrlSuffix = new Field("FinalUrlSuffix", true, true); - - public static readonly Field UrlCustomParameters = new Field("UrlCustomParameters", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : AdGroupCriterion.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Status = Fields.Status; - - public static readonly Field SystemServingStatus = Fields.SystemServingStatus; - - public static readonly Field ApprovalStatus = Fields.ApprovalStatus; - - public static readonly Field DisapprovalReasons = Fields.DisapprovalReasons; - - public static readonly Field DestinationUrl = Fields.DestinationUrl; - - public static readonly Field FirstPageCpc = Fields.FirstPageCpc; - - public static readonly Field TopOfPageCpc = Fields.TopOfPageCpc; - - public static readonly Field FirstPositionCpc = Fields.FirstPositionCpc; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field FinalUrls = Fields.FinalUrls; - - public static readonly Field FinalMobileUrls = Fields.FinalMobileUrls; - - public static readonly Field FinalAppUrls = Fields.FinalAppUrls; - - public static readonly Field TrackingUrlTemplate = Fields.TrackingUrlTemplate; - - public static readonly Field FinalUrlSuffix = Fields.FinalUrlSuffix; - - public static readonly Field UrlCustomParameters = Fields.UrlCustomParameters; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : AdGroupCriterion.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Status = Fields.Status; - - public static readonly Field SystemServingStatus = Fields.SystemServingStatus; - - public static readonly Field ApprovalStatus = Fields.ApprovalStatus; - - public static readonly Field DestinationUrl = Fields.DestinationUrl; - - public static readonly Field FirstPageCpc = Fields.FirstPageCpc; - - public static readonly Field TopOfPageCpc = Fields.TopOfPageCpc; - - public static readonly Field FirstPositionCpc = Fields.FirstPositionCpc; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field FinalUrls = Fields.FinalUrls; - - public static readonly Field FinalMobileUrls = Fields.FinalMobileUrls; - - public static readonly Field FinalAppUrls = Fields.FinalAppUrls; - - public static readonly Field TrackingUrlTemplate = Fields.TrackingUrlTemplate; - - public static readonly Field FinalUrlSuffix = Fields.FinalUrlSuffix; - - public static readonly Field UrlCustomParameters = Fields.UrlCustomParameters; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specified by user to pause or unpause a criterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum UserStatus - { - /// Default state of a criterion (e.g. not paused). - /// - ENABLED = 0, - /// Criterion is removed. - /// - REMOVED = 1, - /// Criterion is paused. Also used to pause a criterion. - /// - PAUSED = 2, - } - - - /// Reported by system to reflect the criterion's serving status. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SystemServingStatus - { - /// Criterion is eligible to serve. - /// - ELIGIBLE = 0, - /// Indicates low search volume.

For more information, visit Low Search - /// Volume.

- ///
- RARELY_SERVED = 1, - } - - - /// Approval status for the criterion. Note: there are more states involved but we - /// only expose two to users. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ApprovalStatus - { - /// Criterion with no reportable policy problems. - /// - APPROVED = 0, - /// Criterion that is yet to be reviewed. - /// - PENDING_REVIEW = 1, - /// Criterion that is under review. - /// - UNDER_REVIEW = 2, - /// Criterion disapproved due to policy violation. - /// - DISAPPROVED = 3, - } - - - /// Contains a subset of adgroup criteria resulting from a AdGroupCriterionService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionPage : Page - { - private AdGroupCriterion[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroupCriterion[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains the policy violations for a single BiddableAdGroupCriterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CriterionPolicyError : PolicyViolationError - { - } - - - /// Represents errors in bid multipliers. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MultiplierError : ApiError - { - private MultiplierErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MultiplierErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Reason for bidding error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "MultiplierError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MultiplierErrorReason - { - /// Multiplier value is too high - /// - MULTIPLIER_TOO_HIGH = 0, - /// Multiplier value is too low - /// - MULTIPLIER_TOO_LOW = 1, - /// Too many fractional digits - /// - TOO_MANY_FRACTIONAL_DIGITS = 2, - /// A multiplier cannot be set for this bidding strategy - /// - MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY = 3, - /// A multiplier cannot be set when there is no base bid (e.g., content max cpc) - /// - MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING = 4, - /// A bid multiplier must be specified - /// - NO_MULTIPLIER_SPECIFIED = 6, - /// Multiplier causes bid to exceed daily budget - /// - MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET = 7, - /// Multiplier causes bid to exceed monthly budget - /// - MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET = 8, - /// Multiplier causes bid to exceed custom budget - /// - MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET = 9, - /// Multiplier causes bid to exceed maximum allowed bid - /// - MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID = 10, - /// Multiplier causes bid to become less than the minimum bid allowed - /// - BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER = 11, - /// Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy - /// - MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 12, - MULTIPLIER_ERROR = 13, - } - - - /// Signals that too many criteria were added to some ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionLimitExceeded : EntityCountLimitExceeded - { - private AdGroupCriterionLimitExceededCriteriaLimitType limitTypeField; - - private bool limitTypeFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupCriterionLimitExceededCriteriaLimitType limitType - { - get - { - return this.limitTypeField; - } - set - { - this.limitTypeField = value; - this.limitTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool limitTypeSpecified - { - get - { - return this.limitTypeFieldSpecified; - } - set - { - this.limitTypeFieldSpecified = value; - } - } - } - - - /// The entity type that exceeded the limit. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupCriterionLimitExceeded.CriteriaLimitType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupCriterionLimitExceededCriteriaLimitType - { - ADGROUP_KEYWORD = 0, - ADGROUP_WEBSITE = 1, - ADGROUP_CRITERION = 2, - UNKNOWN = 3, - } - - - /// Base error class for Ad Group Criterion Service. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionError : ApiError - { - private AdGroupCriterionErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupCriterionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupCriterionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupCriterionErrorReason - { - /// No link found between the AdGroupCriterion and the label. - /// - AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST = 0, - /// The label has already been attached to the AdGroupCriterion. - /// - AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS = 1, - /// Negative AdGroupCriterion cannot have labels. - /// - CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION = 2, - /// Too many operations for a single call. - /// - TOO_MANY_OPERATIONS = 3, - /// Negative ad group criteria are not updateable. - /// - CANT_UPDATE_NEGATIVE = 4, - /// Concrete type of criterion (keyword v.s. placement) is required for ADD and SET - /// operations. - /// - CONCRETE_TYPE_REQUIRED = 5, - /// Bid is incompatible with ad group's bidding settings. - /// - BID_INCOMPATIBLE_WITH_ADGROUP = 6, - /// Cannot target and exclude the same criterion at once. - /// - CANNOT_TARGET_AND_EXCLUDE = 7, - /// The URL of a placement is invalid. - /// - ILLEGAL_URL = 8, - /// Keyword text was invalid. - /// - INVALID_KEYWORD_TEXT = 9, - /// Destination URL was invalid. - /// - INVALID_DESTINATION_URL = 10, - /// The destination url must contain at least one tag (e.g. {lpurl}) - /// - MISSING_DESTINATION_URL_TAG = 11, - /// Keyword-level cpm bid is not supported - /// - KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM = 12, - /// For example, cannot add a biddable ad group criterion that had been removed. - /// - INVALID_USER_STATUS = 13, - /// Criteria type cannot be targeted for the ad group. Either the account is - /// restricted to keywords only, the criteria type is incompatible with the - /// campaign's bidding strategy, or the criteria type can only be applied to - /// campaigns. - /// - CANNOT_ADD_CRITERIA_TYPE = 14, - /// Criteria type cannot be excluded for the ad group. Refer to the documentation - /// for a specific criterion to check if it is excludable. - /// - CANNOT_EXCLUDE_CRITERIA_TYPE = 15, - /// Ad group is invalid due to the product partitions it contains. - /// - INVALID_PRODUCT_PARTITION_HIERARCHY = 16, - /// Product partition unit cannot have children. - /// - PRODUCT_PARTITION_UNIT_CANNOT_HAVE_CHILDREN = 17, - /// Subdivided product partitions must have an "others" case. - /// - PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE = 18, - /// Dimension type of product partition must be the same as that of its siblings. - /// - PRODUCT_PARTITION_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS = 19, - /// Product partition cannot be added to the ad group because it already exists. - /// - PRODUCT_PARTITION_ALREADY_EXISTS = 20, - /// Product partition referenced in the operation was not found in the ad group. - /// - PRODUCT_PARTITION_DOES_NOT_EXIST = 21, - /// Recursive removal failed because product partition subdivision is being created - /// or modified in this request. - /// - PRODUCT_PARTITION_CANNOT_BE_REMOVED = 22, - /// Product partition type is not allowed for specified AdGroupCriterion type. - /// - INVALID_PRODUCT_PARTITION_TYPE = 23, - /// Product partition in an ADD operation specifies a non temporary CriterionId. - /// - PRODUCT_PARTITION_ADD_MAY_ONLY_USE_TEMP_ID = 24, - /// Partial failure is not supported for shopping campaign mutate operations. - /// - CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE = 25, - /// Operations in the mutate request changes too many shopping ad groups. Please - /// split requests for multiple shopping ad groups across multiple requests. - /// - OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS = 26, - /// Not allowed to modify url fields of an ad group criterion if there are duplicate - /// elements for that ad group criterion in the request. - /// - CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS = 27, - /// Cannot set url fields without also setting final urls. - /// - CANNOT_SET_WITHOUT_FINAL_URLS = 28, - /// Cannot clear final urls if final mobile urls exist. - /// - CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST = 29, - /// Cannot clear final urls if final app urls exist. - /// - CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST = 30, - /// Cannot clear final urls if tracking url template exists. - /// - CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS = 31, - /// Cannot clear final urls if url custom parameters exist. - /// - CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST = 32, - /// Cannot set both destination url and final urls. - /// - CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS = 33, - /// Cannot set both destination url and tracking url template. - /// - CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 34, - /// Final urls are not supported for this criterion type. - /// - FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 35, - /// Final mobile urls are not supported for this criterion type. - /// - FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 36, - UNKNOWN = 37, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface")] - public interface AdGroupCriterionServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupCriterionService.mutateResponse mutate(Wrappers.AdGroupCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdGroupCriterionService.mutateRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupCriterionService.mutateLabelResponse mutateLabel(Wrappers.AdGroupCriterionService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateLabelAsync(Wrappers.AdGroupCriterionService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupCriterionPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation (add, remove and set) on adgroup criteria.

If you try to ADD a - /// criterion that already exists, it will be treated as a SET operation on the - /// existing criterion.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionOperation : Operation - { - private AdGroupCriterion operandField; - - private ExemptionRequest[] exemptionRequestsField; - - /// The adgroup criterion being operated on. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupCriterion operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of exemption requests for policy violations flagged by this criterion. - ///

Only set this field when adding criteria that trigger policy violations for - /// which you wish to get exemptions for.

- ///
- [System.Xml.Serialization.XmlElementAttribute("exemptionRequests", Order = 1)] - public ExemptionRequest[] exemptionRequests - { - get - { - return this.exemptionRequestsField; - } - set - { - this.exemptionRequestsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operations for adding/removing labels from AdGroupCriterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionLabelOperation : Operation - { - private AdGroupCriterionLabel operandField; - - /// AdGroupCriterionLabel to operate on. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupCriterionLabel operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manages the labels associated with an AdGroupCriterion. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionLabel - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private long criterionIdField; - - private bool criterionIdFieldSpecified; - - private long labelIdField; - - private bool labelIdFieldSpecified; - - /// The id of the adgroup containing the criterion that the label is applied to. - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The id of the criterion that the label is applied to. This field is required and should not be null when it is - /// contained within Operators : ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long criterionId - { - get - { - return this.criterionIdField; - } - set - { - this.criterionIdField = value; - this.criterionIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionIdSpecified - { - get - { - return this.criterionIdFieldSpecified; - } - set - { - this.criterionIdFieldSpecified = value; - } - } - - /// The id of an existing label to be applied to the adgroup criterion. This field is required and should not be - /// null when it is contained within Operators : - /// ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long labelId - { - get - { - return this.labelIdField; - } - set - { - this.labelIdField = value; - this.labelIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool labelIdSpecified - { - get - { - return this.labelIdFieldSpecified; - } - set - { - this.labelIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupCriterionService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionReturnValue : ListReturnValue - { - private AdGroupCriterion[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of adgroup criteria. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupCriterion[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupCriterionService#mutateLabel - /// call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupCriterionLabelReturnValue : ListReturnValue - { - private AdGroupCriterionLabel[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupCriterionLabel[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdGroupCriterionServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage criteria (such as keywords or - /// placements). A criterion describes the conditions that - /// determine if an ad should display. Two classes of criteria are available:
    - ///
  • A biddable criterion defines - /// conditions that will cause the parent ad group's ads to display. A biddable - /// criterion can also specify a bid amount that overrides the parent ad group's - /// default bid.
  • A negative - /// criterion defines conditions that will prevent the parent ad group's ads - /// from displaying.
- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdGroupCriterionService : AdWordsSoapClient, IAdGroupCriterionService - { - /// Creates a new instance of the - /// class. - public AdGroupCriterionService() - { - } - - /// Creates a new instance of the - /// class. - public AdGroupCriterionService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public AdGroupCriterionService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdGroupCriterionService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdGroupCriterionService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Gets adgroup criteria. - /// filters the adgroup criteria to be - /// returned. - /// a page (subset) view of the criteria selected - /// when there is at least one error with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.AdGroupCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupCriterionService.mutateResponse Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface.mutate(Wrappers.AdGroupCriterionService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, removes or updates adgroup criteria. - /// operations to do during checks on keywords to be - /// added. - /// added and updated adgroup criteria (without optional parts) - /// when there is at least one error with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.AdGroupCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupCriterionOperation[] operations) - { - Wrappers.AdGroupCriterionService.mutateRequest inValue = new Wrappers.AdGroupCriterionService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdGroupCriterionService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface.mutateAsync(Wrappers.AdGroupCriterionService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupCriterionOperation[] operations) - { - Wrappers.AdGroupCriterionService.mutateRequest inValue = new Wrappers.AdGroupCriterionService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupCriterionService.mutateLabelResponse Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface.mutateLabel(Wrappers.AdGroupCriterionService.mutateLabelRequest request) - { - return base.Channel.mutateLabel(request); - } - - /// Adds labels to the AdGroupCriterion or removes labels from the AdGroupCriterion - ///

Add - Apply an existing label to an existing ad - /// group criterion. The adGroupId and criterionId - /// must reference an existing ad group criterion. - /// The labelId must reference an existing label.

Remove - Removes the link between the specified - /// ad group criterion and label.

- ///
the operations to apply - /// a list of AdGroupCriterionLabel where each entry in the list is the - /// result of applying the operation in the input list with the same index. For an - /// add operation, the returned AdGroupCriterionLabel contains the AdGroupId, - /// CriterionId and the LabelId. In the case of a remove operation, the returned - /// AdGroupCriterionLabel will only have AdGroupId and CriterionId. - /// when there are one or more errors with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelOperation[] operations) - { - Wrappers.AdGroupCriterionService.mutateLabelRequest inValue = new Wrappers.AdGroupCriterionService.mutateLabelRequest(); - inValue.operations = operations; - Wrappers.AdGroupCriterionService.mutateLabelResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface) (this)).mutateLabel(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface.mutateLabelAsync(Wrappers.AdGroupCriterionService.mutateLabelRequest request) - { - return base.Channel.mutateLabelAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelOperation[] operations) - { - Wrappers.AdGroupCriterionService.mutateLabelRequest inValue = new Wrappers.AdGroupCriterionService.mutateLabelRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupCriterionServiceInterface) (this)).mutateLabelAsync(inValue)).Result.rval); - } - - /// Returns the list of AdGroupCriterion that match the query. - /// The SQL-like AWQL query string - /// s A list of AdGroupCriterion - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupCriterionPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.OfflineConversionFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.OfflineConversionFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.OfflineConversionFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.OfflineConversionFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.OfflineConversionFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// A container for return values from the OfflineConversionFeedService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionFeedReturnValue : ListReturnValue - { - private OfflineConversionFeed[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public OfflineConversionFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an entire record in the offline conversions feed that the advertiser - /// uploads. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionFeed - { - private string googleClickIdField; - - private string conversionNameField; - - private string conversionTimeField; - - private double conversionValueField; - - private bool conversionValueFieldSpecified; - - private string conversionCurrencyCodeField; - - private double externalAttributionCreditField; - - private bool externalAttributionCreditFieldSpecified; - - private string externalAttributionModelField; - - /// The google click ID associated with this conversion, as captured from the - /// landing page.

If your account has auto-tagging turned on, the google click ID - /// can be obtained from a query parameter called 'gclid'. This field can be selected using the value - /// "GoogleClickId".This field can be - /// filtered on. This field is required and - /// should not be null. The length of this string should be between 1 and 512, inclusive, - /// (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string googleClickId - { - get - { - return this.googleClickIdField; - } - set - { - this.googleClickIdField = value; - } - } - - /// The type associated with this conversion.

It is valid to report multiple - /// conversions for the same google click ID, since visitors may trigger multiple - /// conversions for a click. These conversions names are generated in the front end - /// by advertisers. This field can be selected - /// using the value "ConversionName".This - /// field can be filtered on. This field is - /// required and should not be null. The length of this string should be between 1 and 100, inclusive, - /// (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string conversionName - { - get - { - return this.conversionNameField; - } - set - { - this.conversionNameField = value; - } - } - - /// The time that this conversion occurred at.

This has to be after the click - /// time. A time in the future is not allowed. A timezone is always required.

- ///

When a conversion for the same google click ID, conversion name and - /// conversion time is uploaded multiple times, the first one results in a - /// conversion being recorded. The duplicates are ignored and reported as successes, - /// to indicate that a conversion for this combination has been recorded. This field can be selected using the value - /// "ConversionTime".This field can be - /// filtered on. This field is required and - /// should not be null.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string conversionTime - { - get - { - return this.conversionTimeField; - } - set - { - this.conversionTimeField = value; - } - } - - /// This conversions value for the advertiser. This field can be selected using the value - /// "ConversionValue".This field can be - /// filtered on. This field must be greater - /// than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public double conversionValue - { - get - { - return this.conversionValueField; - } - set - { - this.conversionValueField = value; - this.conversionValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool conversionValueSpecified - { - get - { - return this.conversionValueFieldSpecified; - } - set - { - this.conversionValueFieldSpecified = value; - } - } - - /// The currency that the advertiser associates with the conversion value. This is - /// the ISO 4217 3-character currency code. For example: USD, EUR. This field can be selected using the value - /// "ConversionCurrencyCode".This field - /// can be filtered on. The length of - /// this string should be between 3 and 3, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string conversionCurrencyCode - { - get - { - return this.conversionCurrencyCodeField; - } - set - { - this.conversionCurrencyCodeField = value; - } - } - - /// This field can only be set for conversions actions which use external - /// attribution. It represents the fraction of the conversion that is attributed to - /// each AdWords click. Its value must be greater than 0 and less than or equal to - /// 1.

An ATTRIBUTED_CREDIT_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION - /// error will be returned if this field is used with a non-externally attributed - /// conversion action.

At this time, the externally attributed conversion - /// import feature and this field are available to whitelisted AdWords accounts - /// only. This field must be between 0 and 1, - /// inclusive.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public double externalAttributionCredit - { - get - { - return this.externalAttributionCreditField; - } - set - { - this.externalAttributionCreditField = value; - this.externalAttributionCreditSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool externalAttributionCreditSpecified - { - get - { - return this.externalAttributionCreditFieldSpecified; - } - set - { - this.externalAttributionCreditFieldSpecified = value; - } - } - - /// This field can only be set for conversions actions which use external - /// attribution. It specifies the attribution model name.

An - /// ATTRIBUTION_MODEL_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION error will - /// be returned if this field is used with a non-externally attributed conversion - /// action.

At this time, the externally attributed conversion import feature - /// and this field are available to whitelisted AdWords accounts only. The length of this string should be between 1 - /// and 100, inclusive, (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string externalAttributionModel - { - get - { - return this.externalAttributionModelField; - } - set - { - this.externalAttributionModelField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field GoogleClickId = new Field("GoogleClickId", true, true); - - public static readonly Field ConversionName = new Field("ConversionName", true, true); - - public static readonly Field ConversionTime = new Field("ConversionTime", true, true); - - public static readonly Field ConversionValue = new Field("ConversionValue", true, true); - - public static readonly Field ConversionCurrencyCode = new Field("ConversionCurrencyCode", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field GoogleClickId = Fields.GoogleClickId; - - public static readonly Field ConversionName = Fields.ConversionName; - - public static readonly Field ConversionTime = Fields.ConversionTime; - - public static readonly Field ConversionValue = Fields.ConversionValue; - - public static readonly Field ConversionCurrencyCode = Fields.ConversionCurrencyCode; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field GoogleClickId = Fields.GoogleClickId; - - public static readonly Field ConversionName = Fields.ConversionName; - - public static readonly Field ConversionTime = Fields.ConversionTime; - - public static readonly Field ConversionValue = Fields.ConversionValue; - - public static readonly Field ConversionCurrencyCode = Fields.ConversionCurrencyCode; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation for uploading OfflineConversionFeed. See OfflineConversionFeedService#mutate. - ///

Note: Only the ADD operator is supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionFeedOperation : Operation - { - private OfflineConversionFeed operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineConversionFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Errors that the OfflineConversionFeedService can throw. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionError : ApiError - { - private OfflineConversionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineConversionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for an OfflineConversionError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OfflineConversionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OfflineConversionErrorReason - { - /// This google click ID could not be decoded. - /// - UNPARSEABLE_GCLID = 0, - /// This conversion is reported to have happened before the click. - /// - CONVERSION_PRECEDES_CLICK = 1, - /// You cannot set a future conversion time. - /// - FUTURE_CONVERSION_TIME = 2, - /// This click is either too old to be imported or occurred before the conversion - /// window for the specified combination of conversion date and conversion name - /// (default is 90 days). - /// - EXPIRED_CLICK = 3, - /// This click occurred less than 24 hours ago, please try again after a day or so. - /// - TOO_RECENT_CLICK = 4, - /// This click does not exist in the system. This can occur if google click ids are - /// collected for non AdWords clicks (e.g. dart search). - /// - INVALID_CLICK = 5, - /// This customer is trying to upload conversions for a different customer that it - /// does not manage. - /// - UNAUTHORIZED_USER = 6, - /// This customer does not have an import conversion with a name that matches the - /// label of this conversion. - /// - INVALID_CONVERSION_TYPE = 7, - /// This conversion action was created too recently. Please wait for 4 hours and try - /// uploading again. - /// - TOO_RECENT_CONVERSION_TYPE = 10, - /// Cannot process clicks that occurred when none of the effective conversion types - /// in the account were enabled, to generate conversions. - /// - CLICK_MISSING_CONVERSION_LABEL = 8, - /// This conversion action is not configured to use an external attribution model, - /// but the attributed credit is set to a non-zero value. - /// - ATTRIBUTED_CREDIT_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 11, - /// This conversion action is not configured to use an external attribution model, - /// but the attribution model name is set. - /// - ATTRIBUTION_MODEL_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 12, - /// This conversion action is using an external attribution model, but the - /// attributed credit is not set. - /// - ATTRIBUTED_CREDIT_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 13, - /// This conversion action is using an external attribution model, but the - /// attributed credit is set to 0. - /// - ATTRIBUTED_CREDIT_ZERO_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 14, - /// This conversion action is using an external attribution model, but the - /// attribution model name is not set. - /// - ATTRIBUTION_MODEL_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 15, - /// This conversion action is using an external attribution model, which does not - /// accept order ids. - /// - ORDER_ID_NOT_PERMITTED_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION = 16, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 9, - } - - - /// Errors for currency codes. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CurrencyCodeError : ApiError - { - private CurrencyCodeErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CurrencyCodeErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Encodes the reason (cause) of a particular CurrencyCodeError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CurrencyCodeError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CurrencyCodeErrorReason - { - UNSUPPORTED_CURRENCY_CODE = 0, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.OfflineConversionFeedServiceInterface")] - public interface OfflineConversionFeedServiceInterface - { - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ListReturnValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Operation))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.OfflineConversionFeedService.mutateResponse mutate(Wrappers.OfflineConversionFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.OfflineConversionFeedService.mutateRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface OfflineConversionFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.OfflineConversionFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service that handles the reporting of offline conversion data from external - /// third parties.

For more information, see our - /// conversion tracking guide.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class OfflineConversionFeedService : AdWordsSoapClient, IOfflineConversionFeedService - { - /// Creates a new instance of the class. - public OfflineConversionFeedService() - { - } - - /// Creates a new instance of the class. - public OfflineConversionFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public OfflineConversionFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public OfflineConversionFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public OfflineConversionFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.OfflineConversionFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.OfflineConversionFeedServiceInterface.mutate(Wrappers.OfflineConversionFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Reports an offline conversion for each entry in operations.

This - /// bulk operation does not have any transactional guarantees. Some operations can - /// succeed while others fail.

Note: OfflineConversionFeedOperation - /// supports only the ADD operator. (SET and - /// are not supported.)

- ///
A list of offline conversion feed operations. - /// The list of offline conversion feed results (in the same order as the - /// operations). - /// if problems occurred while applying offline - /// conversions. - public virtual Google.Api.Ads.AdWords.v201806.OfflineConversionFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineConversionFeedOperation[] operations) - { - Wrappers.OfflineConversionFeedService.mutateRequest inValue = new Wrappers.OfflineConversionFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.OfflineConversionFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.OfflineConversionFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.OfflineConversionFeedServiceInterface.mutateAsync(Wrappers.OfflineConversionFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineConversionFeedOperation[] operations) - { - Wrappers.OfflineConversionFeedService.mutateRequest inValue = new Wrappers.OfflineConversionFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.OfflineConversionFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.OfflineDataUploadService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.OfflineDataUploadOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.OfflineDataUploadOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.OfflineDataUploadReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.OfflineDataUploadReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a money amount with currency. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class RemarketingMoneyWithCurrency : ComparableValue - { - private Money moneyField; - - private string currencyCodeField; - - /// The amount of money. This field must be greater - /// than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money money - { - get - { - return this.moneyField; - } - set - { - this.moneyField = value; - } - } - - /// Currency code. The length of this string - /// should be between 3 and 3, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string currencyCode - { - get - { - return this.currencyCodeField; - } - set - { - this.currencyCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ComparableValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ComparableValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ComparableValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Hashed user identifying information. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserIdentifier - { - private OfflineDataUploadUserIdentifierType userIdentifierTypeField; - - private bool userIdentifierTypeFieldSpecified; - - private string valueField; - - /// Type of user identifier. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineDataUploadUserIdentifierType userIdentifierType - { - get - { - return this.userIdentifierTypeField; - } - set - { - this.userIdentifierTypeField = value; - this.userIdentifierTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userIdentifierTypeSpecified - { - get - { - return this.userIdentifierTypeFieldSpecified; - } - set - { - this.userIdentifierTypeFieldSpecified = value; - } - } - - /// Value of identifier. Hashed using SHA-256 if needed. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Indentifier types of user information. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum OfflineDataUploadUserIdentifierType - { - /// UNKNOWN value can not be passed as input. Used - /// for return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// Indicates the email address. - /// - HASHED_EMAIL = 1, - /// Indicates the phone number. - /// - HASHED_PHONE = 2, - /// Indicates the last name. - /// - HASHED_LAST_NAME = 3, - /// Indicates the first name. - /// - HASHED_FIRST_NAME = 4, - /// Indicates the city. - /// - CITY = 5, - /// Indicates the state. - /// - STATE = 6, - /// Indicates the zip code. - /// - ZIPCODE = 7, - /// ISO two-letter country codes. - /// - COUNTRY_CODE = 8, - /// Indicates the external id like third party id. - /// - EXTERNAL_USER_ID = 9, - } - - - /// Contains store sales transaction information. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class StoreSalesTransaction - { - private UserIdentifier[] userIdentifiersField; - - private string transactionTimeField; - - private RemarketingMoneyWithCurrency transactionAmountField; - - private string conversionNameField; - - /// List of UserIdentifiers. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("userIdentifiers", Order = 0)] - public UserIdentifier[] userIdentifiers - { - get - { - return this.userIdentifiersField; - } - set - { - this.userIdentifiersField = value; - } - } - - /// Transaction time. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string transactionTime - { - get - { - return this.transactionTimeField; - } - set - { - this.transactionTimeField = value; - } - } - - /// Transaction amount. We support the ISO 4217 3-character currency code. For - /// example: USD, EUR. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public RemarketingMoneyWithCurrency transactionAmount - { - get - { - return this.transactionAmountField; - } - set - { - this.transactionAmountField = value; - } - } - - /// Conversion name configured while creating ConversionType in AdWords. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string conversionName - { - get - { - return this.conversionNameField; - } - set - { - this.conversionNameField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Interface for all offline data upload rows. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class OfflineData - { - private StoreSalesTransaction itemField; - - [System.Xml.Serialization.XmlElementAttribute("StoreSalesTransaction", Order = 0)] - public StoreSalesTransaction Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - } - - - /// Common metadata for Store Sales uploads. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ThirdPartyUploadMetadata))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(FirstPartyUploadMetadata))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public abstract partial class StoreSalesUploadCommonMetadata - { - private double loyaltyRateField; - - private bool loyaltyRateFieldSpecified; - - private double transactionUploadRateField; - - private bool transactionUploadRateFieldSpecified; - - private string storeSalesUploadCommonMetadataTypeField; - - /// This is the fraction of all transactions that are identifiable (i.e., associated - /// with any form of customer information). The fraction needs to be between 0 and 1 - /// (excluding 0). This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public double loyaltyRate - { - get - { - return this.loyaltyRateField; - } - set - { - this.loyaltyRateField = value; - this.loyaltyRateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool loyaltyRateSpecified - { - get - { - return this.loyaltyRateFieldSpecified; - } - set - { - this.loyaltyRateFieldSpecified = value; - } - } - - /// This is the ratio of sales you?re uploading compared to the overall sales that - /// you can associate with a customer. The fraction needs to be between 0 and 1. For - /// example, if you upload half the sales that you are able to associate with a - /// customer, your Transaction Upload Rate would be 0.5 (excluding 0). This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public double transactionUploadRate - { - get - { - return this.transactionUploadRateField; - } - set - { - this.transactionUploadRateField = value; - this.transactionUploadRateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool transactionUploadRateSpecified - { - get - { - return this.transactionUploadRateFieldSpecified; - } - set - { - this.transactionUploadRateFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of StoreSalesUploadCommonMetadata. - /// Although this field is returned in the response, it is ignored on input and - /// cannot be selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("StoreSalesUploadCommonMetadata.Type", Order = 2)] - public string StoreSalesUploadCommonMetadataType - { - get - { - return this.storeSalesUploadCommonMetadataTypeField; - } - set - { - this.storeSalesUploadCommonMetadataTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Metadata for a Third party Store Sales upload. Note: This is a whitelisted only - /// product. Please contact your Google business development representative for - /// details on upload configuration. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class ThirdPartyUploadMetadata : StoreSalesUploadCommonMetadata - { - private string advertiserUploadTimeField; - - private double validTransactionRateField; - - private bool validTransactionRateFieldSpecified; - - private double partnerMatchRateField; - - private bool partnerMatchRateFieldSpecified; - - private double partnerUploadRateField; - - private bool partnerUploadRateFieldSpecified; - - private string bridgeMapVersionIdField; - - private int partnerIdField; - - private bool partnerIdFieldSpecified; - - /// Advertiser upload time to partner. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string advertiserUploadTime - { - get - { - return this.advertiserUploadTimeField; - } - set - { - this.advertiserUploadTimeField = value; - } - } - - /// The fraction of transactions that are valid. Invalid transactions may include - /// invalid format, values. Range (0.0 to 1.0] This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public double validTransactionRate - { - get - { - return this.validTransactionRateField; - } - set - { - this.validTransactionRateField = value; - this.validTransactionRateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool validTransactionRateSpecified - { - get - { - return this.validTransactionRateFieldSpecified; - } - set - { - this.validTransactionRateFieldSpecified = value; - } - } - - /// The fraction of valid transactions that are matched to an external user id on - /// the partner side. Range (0.0 to 1.0] This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public double partnerMatchRate - { - get - { - return this.partnerMatchRateField; - } - set - { - this.partnerMatchRateField = value; - this.partnerMatchRateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool partnerMatchRateSpecified - { - get - { - return this.partnerMatchRateFieldSpecified; - } - set - { - this.partnerMatchRateFieldSpecified = value; - } - } - - /// The fraction of valid transactions that are uploaded by the partner to Google. - /// Range (0.0 to 1.0] This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public double partnerUploadRate - { - get - { - return this.partnerUploadRateField; - } - set - { - this.partnerUploadRateField = value; - this.partnerUploadRateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool partnerUploadRateSpecified - { - get - { - return this.partnerUploadRateFieldSpecified; - } - set - { - this.partnerUploadRateFieldSpecified = value; - } - } - - /// Indicates the version of partnerIds to be used for uploads. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string bridgeMapVersionId - { - get - { - return this.bridgeMapVersionIdField; - } - set - { - this.bridgeMapVersionIdField = value; - } - } - - /// The ID of the third party partner uploading the transaction feed. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public int partnerId - { - get - { - return this.partnerIdField; - } - set - { - this.partnerIdField = value; - this.partnerIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool partnerIdSpecified - { - get - { - return this.partnerIdFieldSpecified; - } - set - { - this.partnerIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : StoreSalesUploadCommonMetadata.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : StoreSalesUploadCommonMetadata.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : StoreSalesUploadCommonMetadata.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Metadata for a First party Store Sales upload. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class FirstPartyUploadMetadata : StoreSalesUploadCommonMetadata - { - } - - - /// Interface for metadata associated with an offline data upload. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UploadMetadata - { - private StoreSalesUploadCommonMetadata itemField; - - [System.Xml.Serialization.XmlElementAttribute("StoreSalesUploadCommonMetadata", Order = 0)] - public StoreSalesUploadCommonMetadata Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - } - - - /// Data representing offline transactions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class OfflineDataUpload - { - private long externalUploadIdField; - - private bool externalUploadIdFieldSpecified; - - private OfflineDataUploadType uploadTypeField; - - private bool uploadTypeFieldSpecified; - - private OfflineDataUploadStatus uploadStatusField; - - private bool uploadStatusFieldSpecified; - - private UploadMetadata uploadMetadataField; - - private OfflineData[] offlineDataListField; - - private OfflineDataUploadFailureReason failureReasonField; - - private bool failureReasonFieldSpecified; - - /// User specified upload id. This field can be - /// selected using the value "ExternalUploadId".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long externalUploadId - { - get - { - return this.externalUploadIdField; - } - set - { - this.externalUploadIdField = value; - this.externalUploadIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool externalUploadIdSpecified - { - get - { - return this.externalUploadIdFieldSpecified; - } - set - { - this.externalUploadIdFieldSpecified = value; - } - } - - /// Type of this upload. This field is required - /// and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public OfflineDataUploadType uploadType - { - get - { - return this.uploadTypeField; - } - set - { - this.uploadTypeField = value; - this.uploadTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool uploadTypeSpecified - { - get - { - return this.uploadTypeFieldSpecified; - } - set - { - this.uploadTypeFieldSpecified = value; - } - } - - /// Status of this upload. This field can be - /// selected using the value "UploadStatus".This field can be filtered on. This field is read only and will be ignored when sent to the API for - /// the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public OfflineDataUploadStatus uploadStatus - { - get - { - return this.uploadStatusField; - } - set - { - this.uploadStatusField = value; - this.uploadStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool uploadStatusSpecified - { - get - { - return this.uploadStatusFieldSpecified; - } - set - { - this.uploadStatusFieldSpecified = value; - } - } - - /// Metadata for this upload. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public UploadMetadata uploadMetadata - { - get - { - return this.uploadMetadataField; - } - set - { - this.uploadMetadataField = value; - } - } - - /// List of offline data in this upload. For AdWords API, each offlineDataList can - /// have at most 50 OfflineData. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute("offlineDataList", Order = 4)] - public OfflineData[] offlineDataList - { - get - { - return this.offlineDataListField; - } - set - { - this.offlineDataListField = value; - } - } - - /// Processing failure reason for get, if status is FAILURE. Used for upload level - /// failures. This field can be selected using - /// the value "FailureReason".This field - /// can be filtered on. This field is read - /// only and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public OfflineDataUploadFailureReason failureReason - { - get - { - return this.failureReasonField; - } - set - { - this.failureReasonField = value; - this.failureReasonSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool failureReasonSpecified - { - get - { - return this.failureReasonFieldSpecified; - } - set - { - this.failureReasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ExternalUploadId = new Field("ExternalUploadId", true, true); - - public static readonly Field UploadStatus = new Field("UploadStatus", true, true); - - public static readonly Field FailureReason = new Field("FailureReason", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ExternalUploadId = Fields.ExternalUploadId; - - public static readonly Field UploadStatus = Fields.UploadStatus; - - public static readonly Field FailureReason = Fields.FailureReason; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ExternalUploadId = Fields.ExternalUploadId; - - public static readonly Field UploadStatus = Fields.UploadStatus; - - public static readonly Field FailureReason = Fields.FailureReason; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Upload types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum OfflineDataUploadType - { - /// UNKNOWN value cannot be passed as input. Used - /// for return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// Indicates Store Sales Direct Upload for self service. - /// - STORE_SALES_UPLOAD_FIRST_PARTY = 1, - /// Indicates Store Sales Direct Upload for third party. - /// - STORE_SALES_UPLOAD_THIRD_PARTY = 2, - } - - - /// This indicates the status of offline upload. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum OfflineDataUploadStatus - { - /// UNKNOWN value cannot be passed as input. Used - /// for return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// Indicates the upload failed in the offline processing. - /// - FAILURE = 1, - /// Indicates the upload passed formatting checks and was accepted for offline - /// processing. - /// - IN_PROCESS = 2, - /// Indicates the upload was processed by the offline processing pipeline. - /// - SUCCESS = 3, - } - - - /// Indicates the offline data upload processing failure reason. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum OfflineDataUploadFailureReason - { - /// UNKNOWN value cannot be passed as input. Used - /// for return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// Indicates the matched transactions don?t cross the minimum threshold. - /// - INSUFFICIENT_MATCHED_TRANSACTIONS = 1, - /// Indicates the insufficient transactions uploaded. - /// - INSUFFICIENT_TRANSACTIONS = 2, - } - - - /// Contains a list of OfflineDataUpload resulting from filtering and paging of get - /// call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class OfflineDataUploadPage : Page - { - private OfflineDataUpload[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public OfflineDataUpload[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Indicates that the customer is not whitelisted for accessing the API. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class NotWhitelistedError : ApiError - { - private NotWhitelistedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public NotWhitelistedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The single reason for the whitelist error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "NotWhitelistedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum NotWhitelistedErrorReason - { - /// Customer is not whitelisted for accessing the API. - /// - CUSTOMER_NOT_WHITELISTED_FOR_API = 0, - } - - - /// Represents possible error codes from . - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class OfflineDataUploadError : ApiError - { - private OfflineDataUploadErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineDataUploadErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Reasons - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OfflineDataUploadError.Reason", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum OfflineDataUploadErrorReason - { - UNKNOWN = 0, - /// Indicates a row error due to the incompatible , like using - /// EXTERNAL_USER_ID for first party uploads or not using EXTERNAL_USER_ID for third - /// party uploads. - /// - INCOMPATIBLE_USERIDENTIFIER_TYPE = 15, - /// Indicates an upload error due to the invalid upload type. - /// - INVALID_UPLOAD_TYPE = 1, - /// Indicates an upload error due to missing metadata. - /// - MISSING_UPLOAD_METADATA = 2, - /// Indicates an upload error due to missing metadata. - /// - INVALID_UPLOAD_METADATA = 3, - /// Indicates an upload error due to invalid partner id in metadata. - /// - INVALID_PARTNER_ID = 4, - /// Indicates a row error due to missing transaction data. - /// - MISSING_TRANSACTION_INFO = 5, - /// The name specified in store_sales_attributes is used to report conversions to a - /// conversion type configured in AdWords with the same name. A row generates this - /// error if there is no such name configured in the account. - /// - INVALID_CONVERSION_TYPE = 6, - /// Indicates a row error due to a conversion with a transaction time in the future. - /// - FUTURE_TRANSACTION_TIME = 7, - /// Indicates a row error due to a negative transaction amount. - /// - NEGATIVE_TRANSACTION_AMOUNT = 8, - /// Country code hashed. - /// - COUNTRY_CODE_HASHED = 9, - /// ZIP Code hashed. - /// - ZIPCODE_HASHED = 10, - /// Email not hashed. - /// - EMAIL_NOT_HASHED = 11, - /// First Name not hashed. - /// - FIRST_NAME_NOT_HASHED = 12, - /// Last Name not hashed. - /// - LAST_NAME_NOT_HASHED = 13, - /// Phone not hashed. - /// - PHONE_NOT_HASHED = 14, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.OfflineDataUploadServiceInterface")] - public interface OfflineDataUploadServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.OfflineDataUploadPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.OfflineDataUploadService.mutateResponse mutate(Wrappers.OfflineDataUploadService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.OfflineDataUploadService.mutateRequest request); - } - - - /// Offline Data operations for uploading data.

Note: Only the - /// ADD operator is supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class OfflineDataUploadOperation : Operation - { - private OfflineDataUpload operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineDataUpload operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from OfflineDataUploadService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class OfflineDataUploadReturnValue : ListReturnValue - { - private OfflineDataUpload[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public OfflineDataUpload[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// In v201710 and previous, this field stores a list of operation level errors. - /// Starting in v201802, this field stores both operation-level and row-level - /// errors. For row-level errors, offlineDataList will be shown in the fieldPath - /// along with row index. In this case, the operation will be processed and just the - /// rows with errors will not be used. For more information about partial failure, - /// see: https://developers.google.com/adwords/api/docs/guides/partial-failure - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface OfflineDataUploadServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.OfflineDataUploadServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service to manage Offline Data uploads.

Note: This - /// service is available only on a whitelist basis.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class OfflineDataUploadService : AdWordsSoapClient, IOfflineDataUploadService - { - /// Creates a new instance of the - /// class. - public OfflineDataUploadService() - { - } - - /// Creates a new instance of the - /// class. - public OfflineDataUploadService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public OfflineDataUploadService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public OfflineDataUploadService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public OfflineDataUploadService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of OfflineDataUpload objects that match the criteria specified in - /// the selector.

Note: If an upload fails after processing, reason will - /// be reported in OfflineDataUpload#failureReason.

- ///
if problems occurred while retrieving - /// results. - public virtual Google.Api.Ads.AdWords.v201806.OfflineDataUploadPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.OfflineDataUploadService.mutateResponse Google.Api.Ads.AdWords.v201806.OfflineDataUploadServiceInterface.mutate(Wrappers.OfflineDataUploadService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies a list of mutate operations (i.e. add, set) to offline data upload: - ///

Add - uploads offline data for each entry in operations. Some operations can - /// fail for upload level errors like invalid . Check - /// OfflineDataUploadReturnValue for partial failure list.

Set - - /// updates the upload result for each upload. It is for internal use only.

- ///

Note: For AdWords API, one ADD request can have at most 2000 - /// operations.

Note: Add operation might possibly succeed even with - /// errors in OfflineData. Data errors are reported in OfflineDataUpload#partialDataErrors

- ///

Note: Supports only the ADD operator. SET - /// operator is internally used only.(REMOVE is not supported).

- ///
A list of offline data upload operations. - /// The list of offline data upload results in the same order as - /// operations. - /// if problems occur. - public virtual Google.Api.Ads.AdWords.v201806.OfflineDataUploadReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineDataUploadOperation[] operations) - { - Wrappers.OfflineDataUploadService.mutateRequest inValue = new Wrappers.OfflineDataUploadService.mutateRequest(); - inValue.operations = operations; - Wrappers.OfflineDataUploadService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.OfflineDataUploadServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.OfflineDataUploadServiceInterface.mutateAsync(Wrappers.OfflineDataUploadService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineDataUploadOperation[] operations) - { - Wrappers.OfflineDataUploadService.mutateRequest inValue = new Wrappers.OfflineDataUploadService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.OfflineDataUploadServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.OfflineCallConversionFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// A container for return values from the OfflineCallConversionFeedService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineCallConversionFeedReturnValue : ListReturnValue - { - private OfflineCallConversionFeed[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public OfflineCallConversionFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an entire record in the offline call conversions feed that the - /// advertiser uploads. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineCallConversionFeed - { - private string callerIdField; - - private string callStartTimeField; - - private string conversionNameField; - - private string conversionTimeField; - - private double conversionValueField; - - private bool conversionValueFieldSpecified; - - private string conversionCurrencyCodeField; - - /// The caller id from which this call was placed.

Caller ids in E.164 format - /// with preceding '+' sign. (e.g., "+16502531234", +443308182000), National numbers - /// which are treated as US numbers in formats like "6502531234", and International - /// Numbers with accompanying country code and preceding '+' like +64 3-331 6005 - /// This field is required and should not be - /// null. The length of - /// this string should be between 1 and 30, inclusive, (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string callerId - { - get - { - return this.callerIdField; - } - set - { - this.callerIdField = value; - } - } - - /// The time at which this call started.

A time in the future is not allowed. A - /// timezone is always required.

When a conversion for the same caller id, - /// conversion name and conversion time is uploaded multiple times, the first one - /// results in a conversion being recorded. The duplicates are ignored and reported - /// as successes, to indicate that a conversion for this combination has been - /// recorded.

String Format: yyyyMMdd HHmmss (for example, - /// 20100609 150223 America/New_York). See the Timezones - /// page for the complete list of Timezone IDs. This field is required and should not be - /// null. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string callStartTime - { - get - { - return this.callStartTimeField; - } - set - { - this.callStartTimeField = value; - } - } - - /// The type associated with this conversion.

It is valid to report multiple - /// conversions for the same call since visitors may trigger multiple conversions - /// for a call. These conversions names are generated in the front end by - /// advertisers. This field is required and should - /// not be null. The - /// length of this string should be between 1 and 100, inclusive, - /// (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string conversionName - { - get - { - return this.conversionNameField; - } - set - { - this.conversionNameField = value; - } - } - - /// The time that this conversion occurred at.

This has to be after the call - /// time. A time in the future is not allowed. A timezone is always required. - ///

When a conversion for the same caller id, conversion name and conversion - /// time is uploaded multiple times, the first one results in a conversion being - /// recorded. The duplicates are ignored and reported as successes, to indicate that - /// a conversion for this combination has been recorded.

String Format: yyyyMMdd - /// HHmmss (for example, 20100609 150223 America/New_York). See the - /// Timezones - /// page for the complete list of Timezone IDs. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string conversionTime - { - get - { - return this.conversionTimeField; - } - set - { - this.conversionTimeField = value; - } - } - - /// This conversions value for the advertiser. This - /// field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public double conversionValue - { - get - { - return this.conversionValueField; - } - set - { - this.conversionValueField = value; - this.conversionValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool conversionValueSpecified - { - get - { - return this.conversionValueFieldSpecified; - } - set - { - this.conversionValueFieldSpecified = value; - } - } - - /// The currency that the advertiser associates with the conversion value. This is - /// the ISO 4217 3-character currency code. For example: USD, EUR. The length of this string should be between 3 - /// and 3, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string conversionCurrencyCode - { - get - { - return this.conversionCurrencyCodeField; - } - set - { - this.conversionCurrencyCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation for uploading OfflineCallConversionFeed. See OfflineCallConversionFeedService#mutate. - ///

Note: Only the ADD operator is supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineCallConversionFeedOperation : Operation - { - private OfflineCallConversionFeed operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineCallConversionFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Errors that the OfflineCallConversionFeedService can - /// throw. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineCallConversionError : ApiError - { - private OfflineCallConversionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineCallConversionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for an OfflineCallConversionError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OfflineCallConversionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OfflineCallConversionErrorReason - { - /// The conversion time cannot precede the call time. - /// - CONVERSION_PRECEDES_CALL = 0, - /// You cannot set a future call start time. - /// - FUTURE_CALL_START_TIME = 1, - /// You cannot set a future conversion time. - /// - FUTURE_CONVERSION_TIME = 2, - /// The click that initiated the call is too old for this conversion to be imported. - /// - EXPIRED_CALL = 3, - /// We are still processing this call's information, please re-upload this - /// conversion in 4-6 hours. - /// - TOO_RECENT_CALL = 4, - /// The caller?s phone number cannot be parsed. Please re-upload in one of the - /// supported formats. It should be formatted either as E.164 "+16502531234", - /// International "+64 3-331 6005" or as a US national number ?6502531234?. - /// - UNPARSEABLE_CALLERS_PHONE_NUMBER = 5, - /// We are unable to import a conversion for this call, since either this call or - /// the click leading to the call was not found in our system. - /// - INVALID_CALL = 6, - /// This call belongs to an account that you are not authorized to access. - /// - UNAUTHORIZED_USER = 7, - /// We cannot find an import conversion type with this name in the target account. - /// - INVALID_CONVERSION_TYPE = 8, - /// This conversion action was created too recently. Please wait for 4 hours and try - /// uploading again. - /// - TOO_RECENT_CONVERSION_TYPE = 9, - /// Unable to upload. No AdWords call import conversion types were defined when this - /// call occurred. Please make sure you create at least one such conversion type - /// before uploading. - /// - CONVERSION_TRACKING_NOT_ENABLED_AT_CALL_TIME = 10, - /// We can't count calls from ads made by computer or tablet users as conversions. - /// - DESKTOP_CALL_NOT_SUPPORTED = 11, - /// An internal server error occurred, please try again. - /// - INTERNAL_ERROR = 12, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 13, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedServiceInterface")] - public interface OfflineCallConversionFeedServiceInterface - { - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ListReturnValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Operation))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.OfflineCallConversionFeedService.mutateResponse mutate(Wrappers.OfflineCallConversionFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.OfflineCallConversionFeedService.mutateRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface OfflineCallConversionFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service that handles the reporting of externally provided call conversions. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class OfflineCallConversionFeedService : AdWordsSoapClient, IOfflineCallConversionFeedService - { - /// Creates a new instance of the class. - public OfflineCallConversionFeedService() - { - } - - /// Creates a new instance of the class. - public OfflineCallConversionFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public OfflineCallConversionFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public OfflineCallConversionFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public OfflineCallConversionFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.OfflineCallConversionFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedServiceInterface.mutate(Wrappers.OfflineCallConversionFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Reports a call conversion for each entry in operations.

This - /// bulk operation does not have any transactional guarantees. Some operations can - /// succeed while others fail.

Note: OfflineCallConversionFeedOperation - /// supports only the ADD operator. (SET and - /// are not supported.)

- ///
A list of offline call conversion feed - /// operations. - /// The list of offline call conversion feed results (in the same order as - /// the operations). - /// if problems occurred while applying offline call - /// conversions. - public virtual Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedOperation[] operations) - { - Wrappers.OfflineCallConversionFeedService.mutateRequest inValue = new Wrappers.OfflineCallConversionFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.OfflineCallConversionFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedServiceInterface.mutateAsync(Wrappers.OfflineCallConversionFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedOperation[] operations) - { - Wrappers.OfflineCallConversionFeedService.mutateRequest inValue = new Wrappers.OfflineCallConversionFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.ReportDefinitionService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getReportFields", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getReportFieldsRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.ReportDefinitionReportType reportType; - - /// Creates a new instance of the - /// class. - public getReportFieldsRequest() - { - } - - /// Creates a new instance of the - /// class. - public getReportFieldsRequest(Google.Api.Ads.AdWords.v201806.ReportDefinitionReportType reportType) - { - this.reportType = reportType; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getReportFieldsResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class getReportFieldsResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.ReportDefinitionField[] rval; - - /// Creates a new instance of the - /// class. - public getReportFieldsResponse() - { - } - - /// Creates a new instance of the - /// class. - public getReportFieldsResponse(Google.Api.Ads.AdWords.v201806.ReportDefinitionField[] rval) - { - this.rval = rval; - } - } - } - /// Represents information about enum values. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class EnumValuePair - { - private string enumValueField; - - private string enumDisplayValueField; - - /// The api enum value. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string enumValue - { - get - { - return this.enumValueField; - } - set - { - this.enumValueField = value; - } - } - - /// The enum value displayed in the downloaded report. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string enumDisplayValue - { - get - { - return this.enumDisplayValueField; - } - set - { - this.enumDisplayValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the fields that can be used to create a ReportDefinition. This class - /// allows the user to query the list of fields applicable to a given report type. - /// Consumers of reports will be able use the retrieved fields through the ReportDefinitionService#getReportFields - /// api and run the corresponding reports. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ReportDefinitionField : IReportDefinitionField - { - private string fieldNameField; - - private string displayFieldNameField; - - private string xmlAttributeNameField; - - private string fieldTypeField; - - private string fieldBehaviorField; - - private string[] enumValuesField; - - private bool canSelectField; - - private bool canSelectFieldSpecified; - - private bool canFilterField; - - private bool canFilterFieldSpecified; - - private bool isEnumTypeField; - - private bool isEnumTypeFieldSpecified; - - private bool isBetaField; - - private bool isBetaFieldSpecified; - - private bool isZeroRowCompatibleField; - - private bool isZeroRowCompatibleFieldSpecified; - - private EnumValuePair[] enumValuePairsField; - - private string[] exclusiveFieldsField; - - /// The field name. This field is read only and - /// will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string fieldName - { - get - { - return this.fieldNameField; - } - set - { - this.fieldNameField = value; - } - } - - /// The name that is displayed in the downloaded report. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string displayFieldName - { - get - { - return this.displayFieldNameField; - } - set - { - this.displayFieldNameField = value; - } - } - - /// The XML attribute in the downloaded report. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string xmlAttributeName - { - get - { - return this.xmlAttributeNameField; - } - set - { - this.xmlAttributeNameField = value; - } - } - - /// The type of field. Useful for knowing what operation type to pass in for a given - /// field in a predicate. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string fieldType - { - get - { - return this.fieldTypeField; - } - set - { - this.fieldTypeField = value; - } - } - - /// The behavior of this field. Possible values are: "ATTRIBUTE", "METRIC" and - /// "SEGMENT". This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string fieldBehavior - { - get - { - return this.fieldBehaviorField; - } - set - { - this.fieldBehaviorField = value; - } - } - - /// List of enum values for the corresponding field if and only if the field is an - /// enum type. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("enumValues", Order = 5)] - public string[] enumValues - { - get - { - return this.enumValuesField; - } - set - { - this.enumValuesField = value; - } - } - - /// Indicates if the user can select this field. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public bool canSelect - { - get - { - return this.canSelectField; - } - set - { - this.canSelectField = value; - this.canSelectSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool canSelectSpecified - { - get - { - return this.canSelectFieldSpecified; - } - set - { - this.canSelectFieldSpecified = value; - } - } - - /// Indicates if the user can filter on this field. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public bool canFilter - { - get - { - return this.canFilterField; - } - set - { - this.canFilterField = value; - this.canFilterSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool canFilterSpecified - { - get - { - return this.canFilterFieldSpecified; - } - set - { - this.canFilterFieldSpecified = value; - } - } - - /// Indicates that the field is an enum type. This - /// field is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public bool isEnumType - { - get - { - return this.isEnumTypeField; - } - set - { - this.isEnumTypeField = value; - this.isEnumTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isEnumTypeSpecified - { - get - { - return this.isEnumTypeFieldSpecified; - } - set - { - this.isEnumTypeFieldSpecified = value; - } - } - - /// Indicates that the field is only available with beta access. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public bool isBeta - { - get - { - return this.isBetaField; - } - set - { - this.isBetaField = value; - this.isBetaSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isBetaSpecified - { - get - { - return this.isBetaFieldSpecified; - } - set - { - this.isBetaFieldSpecified = value; - } - } - - /// Indicates if the field can be selected in queries that explicitly request zero - /// rows. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public bool isZeroRowCompatible - { - get - { - return this.isZeroRowCompatibleField; - } - set - { - this.isZeroRowCompatibleField = value; - this.isZeroRowCompatibleSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isZeroRowCompatibleSpecified - { - get - { - return this.isZeroRowCompatibleFieldSpecified; - } - set - { - this.isZeroRowCompatibleFieldSpecified = value; - } - } - - /// List of enum values in api to their corresponding display values in the - /// downloaded reports. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("enumValuePairs", Order = 11)] - public EnumValuePair[] enumValuePairs - { - get - { - return this.enumValuePairsField; - } - set - { - this.enumValuePairsField = value; - } - } - - /// List of mutually exclusive fields of this field. This field cannot be selected - /// or used in a predicate together with any of the mutually exclusive fields in - /// this list. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("exclusiveFields", Order = 12)] - public string[] exclusiveFields - { - get - { - return this.exclusiveFieldsField; - } - set - { - this.exclusiveFieldsField = value; - } - } - } - - - /// Encapsulates the errors that can be thrown during ReportDefinition mutate operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ReportDefinitionError : ApiError - { - private ReportDefinitionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ReportDefinitionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Enums for all the reasons an error can be thrown to the user during a ReportDefinitionService#mutate(java.util.List) - /// operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ReportDefinitionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ReportDefinitionErrorReason - { - /// Customer passed in invalid date range for a report type. - /// - INVALID_DATE_RANGE_FOR_REPORT = 0, - /// Customer passed in invalid field name for a report type - /// - INVALID_FIELD_NAME_FOR_REPORT = 1, - /// Unable to locate a field mapping for this report type. - /// - UNABLE_TO_FIND_MAPPING_FOR_THIS_REPORT = 2, - /// Customer passed in invalid column name for a report type - /// - INVALID_COLUMN_NAME_FOR_REPORT = 3, - /// Customer passed in invalid report definition id. - /// - INVALID_REPORT_DEFINITION_ID = 4, - /// Report selector cannot be null. - /// - REPORT_SELECTOR_CANNOT_BE_NULL = 5, - /// No Enums exist for this column name. - /// - NO_ENUMS_FOR_THIS_COLUMN_NAME = 6, - /// Invalid view name. - /// - INVALID_VIEW = 7, - /// Sorting is not supported for reports. - /// - SORTING_NOT_SUPPORTED = 8, - /// Paging is not supported for reports. - /// - PAGING_NOT_SUPPORTED = 9, - /// Customer can not create report of a selected type. - /// - CUSTOMER_SERVING_TYPE_REPORT_MISMATCH = 10, - /// Cross-client report has a client selector without any valid identifier for a - /// customer. - /// - CLIENT_SELECTOR_NO_CUSTOMER_IDENTIFIER = 11, - /// Cross-client report has an invalid external customer ID in the client selector. - /// - CLIENT_SELECTOR_INVALID_CUSTOMER_ID = 12, - REPORT_DEFINITION_ERROR = 13, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.ReportDefinitionServiceInterface")] - public interface ReportDefinitionServiceInterface - { - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.ReportDefinitionService.getReportFieldsResponse getReportFields(Wrappers.ReportDefinitionService.getReportFieldsRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getReportFieldsAsync(Wrappers.ReportDefinitionService.getReportFieldsRequest request); - } - - - /// Enums for report types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ReportDefinition.ReportType", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ReportDefinitionReportType - { - /// Reports performance data for your keywords. - /// - KEYWORDS_PERFORMANCE_REPORT = 0, - /// Reports performance data for your ads. - /// - AD_PERFORMANCE_REPORT = 1, - /// Reports performance data for URLs which triggered your ad and received clicks. - /// - URL_PERFORMANCE_REPORT = 2, - /// Reports ad group performance data for one or more of your campaigns. - /// - ADGROUP_PERFORMANCE_REPORT = 3, - /// Reports performance data for your campaigns. - /// - CAMPAIGN_PERFORMANCE_REPORT = 4, - /// Reports performance data for your entire account. - /// - ACCOUNT_PERFORMANCE_REPORT = 5, - /// Reports performance data by geographic origin. - /// - GEO_PERFORMANCE_REPORT = 6, - /// Reports performance data for search queries which triggered your ad and received - /// clicks. - /// - SEARCH_QUERY_PERFORMANCE_REPORT = 7, - /// Reports performance data for automatic placements on the content network. - /// - AUTOMATIC_PLACEMENTS_PERFORMANCE_REPORT = 8, - /// Reports performance data for negative keywords at the campaign level. - /// - CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT = 9, - /// Reports performance data for the negative placements at the campaign level. - /// - CAMPAIGN_NEGATIVE_PLACEMENTS_PERFORMANCE_REPORT = 10, - /// Reports performance data for destination urls. - /// - DESTINATION_URL_REPORT = 11, - /// Reports data for shared sets. - /// - SHARED_SET_REPORT = 12, - /// Reports data for campaign shared sets. - /// - CAMPAIGN_SHARED_SET_REPORT = 13, - /// Provides a downloadable snapshot of shared set criteria. - /// - SHARED_SET_CRITERIA_REPORT = 14, - /// Reports performance data for creative conversions (e.g. free clicks). - /// - CREATIVE_CONVERSION_REPORT = 15, - /// Reports per-phone-call details for calls tracked using call metrics. - /// - CALL_METRICS_CALL_DETAILS_REPORT = 16, - /// Reports performance data for keywordless ads. - /// - KEYWORDLESS_QUERY_REPORT = 17, - /// Reports performance data for keywordless ads. - /// - KEYWORDLESS_CATEGORY_REPORT = 18, - /// Reports performance data for all published criteria types including keywords, - /// placements, topics, user-lists in a single report. - /// - CRITERIA_PERFORMANCE_REPORT = 19, - /// Reports performance data for clicks. - /// - CLICK_PERFORMANCE_REPORT = 20, - /// Reports performance data for budgets. - /// - BUDGET_PERFORMANCE_REPORT = 21, - /// Reports performance data for your (shared) bid strategies. - /// - BID_GOAL_PERFORMANCE_REPORT = 22, - /// Reports performance data for your display keywords. - /// - DISPLAY_KEYWORD_PERFORMANCE_REPORT = 23, - /// Reports performance data for your placeholder feed items - /// - PLACEHOLDER_FEED_ITEM_REPORT = 24, - /// Reports performance data for your placements. - /// - PLACEMENT_PERFORMANCE_REPORT = 25, - /// Reports performance data for negative location targets at campaign level. - /// - CAMPAIGN_NEGATIVE_LOCATIONS_REPORT = 26, - /// Reports performance data for managed and automatic genders in a combined report. - /// - GENDER_PERFORMANCE_REPORT = 27, - /// Reports performance data for managed and automatic age ranges in a combined - /// report. - /// - AGE_RANGE_PERFORMANCE_REPORT = 28, - /// Reports performance data for campaign level location targets. - /// - CAMPAIGN_LOCATION_TARGET_REPORT = 29, - /// Reports performance data for campaign level ad schedule targets. - /// - CAMPAIGN_AD_SCHEDULE_TARGET_REPORT = 30, - /// Paid & organic report - /// - PAID_ORGANIC_QUERY_REPORT = 32, - /// Reports performance data for your audience criteria. - /// - AUDIENCE_PERFORMANCE_REPORT = 33, - /// Reports performance data for your topic criteria. - /// - DISPLAY_TOPICS_PERFORMANCE_REPORT = 34, - /// Distance report - /// - USER_AD_DISTANCE_REPORT = 35, - /// Performance data for shopping campaigns. - /// - SHOPPING_PERFORMANCE_REPORT = 36, - /// Performance data for product partitions in shopping campaigns. - /// - PRODUCT_PARTITION_REPORT = 37, - /// Reports performance data for managed and automatic parental statuses in a - /// combined report. - /// - PARENTAL_STATUS_PERFORMANCE_REPORT = 38, - /// Performance data for Extension placeholders - /// - PLACEHOLDER_REPORT = 39, - /// Reports performance of ad placeholders when instantiated with specific - /// FeedItems. - /// - AD_CUSTOMIZERS_FEED_ITEM_REPORT = 40, - /// Reports stats and settings details for labels. - /// - LABEL_REPORT = 41, - /// Reports performance data for final urls. - /// - FINAL_URL_REPORT = 42, - /// Video performance report. - /// - VIDEO_PERFORMANCE_REPORT = 43, - /// Reports performance data for top content bid modifier criteria. - /// - TOP_CONTENT_PERFORMANCE_REPORT = 45, - /// Report to show campaign criteria structure. - /// - CAMPAIGN_CRITERIA_REPORT = 46, - /// Report performance data for Campaign Groups. - /// - CAMPAIGN_GROUP_PERFORMANCE_REPORT = 47, - /// Reports performance data for landing pages on unexpanded and expanded final url - /// levels. - /// - LANDING_PAGE_REPORT = 48, - /// Report performance data for Marketplace Ads Clients. - /// - MARKETPLACE_PERFORMANCE_REPORT = 49, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 44, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface ReportDefinitionServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.ReportDefinitionServiceInterface, System.ServiceModel.IClientChannel - { - } - - - ///

Note: As of v201109 this service is read-only. New report definitions - /// are no longer allowed.

A report definition describes the report type, - /// date range, and fields to include in the report. - /// Additionally, you can specify predicates to filter which - /// rows are returned in a generated report. Please note that sorting and paging are - /// not supported for report downloads.

To find out which report fields are - /// available based on report type, see the Report Types appendix or call #getReportFields.

For more information about - /// retrieving reports, see Reporting - /// Basics.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class ReportDefinitionService : AdWordsSoapClient, IReportDefinitionService - { - /// Creates a new instance of the - /// class. - public ReportDefinitionService() - { - } - - /// Creates a new instance of the - /// class. - public ReportDefinitionService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public ReportDefinitionService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public ReportDefinitionService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public ReportDefinitionService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.ReportDefinitionService.getReportFieldsResponse Google.Api.Ads.AdWords.v201806.ReportDefinitionServiceInterface.getReportFields(Wrappers.ReportDefinitionService.getReportFieldsRequest request) - { - return base.Channel.getReportFields(request); - } - - /// Returns the available report fields for a given report type. When using this - /// method the clientCustomerId header field is optional. Callers are - /// discouraged from setting the clientCustomerId header field in calls to this - /// method as its presence will trigger an authorization error if the caller does - /// not have access to the customer with the included ID. - /// The type of report. - /// The list of available report fields. Each ReportDefinitionField encapsulates the field - /// name, the field data type, and the enum values (if the field's type is - /// enum). - /// if a problem occurred while fetching the - /// ReportDefinitionField information. - public virtual Google.Api.Ads.AdWords.v201806.ReportDefinitionField[] getReportFields(Google.Api.Ads.AdWords.v201806.ReportDefinitionReportType reportType) - { - Wrappers.ReportDefinitionService.getReportFieldsRequest inValue = new Wrappers.ReportDefinitionService.getReportFieldsRequest(); - inValue.reportType = reportType; - Wrappers.ReportDefinitionService.getReportFieldsResponse retVal = ((Google.Api.Ads.AdWords.v201806.ReportDefinitionServiceInterface) (this)).getReportFields(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.ReportDefinitionServiceInterface.getReportFieldsAsync(Wrappers.ReportDefinitionService.getReportFieldsRequest request) - { - return base.Channel.getReportFieldsAsync(request); - } - - public virtual System.Threading.Tasks.Task getReportFieldsAsync(Google.Api.Ads.AdWords.v201806.ReportDefinitionReportType reportType) - { - Wrappers.ReportDefinitionService.getReportFieldsRequest inValue = new Wrappers.ReportDefinitionService.getReportFieldsRequest(); - inValue.reportType = reportType; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.ReportDefinitionServiceInterface) (this)).getReportFieldsAsync(inValue)).Result.rval); - } - } - namespace Wrappers.TargetingIdeaService - { - } - /// Basic information about a webpage. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class WebpageDescriptor - { - private string urlField; - - private string titleField; - - /// The URL of the webpage. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string url - { - get - { - return this.urlField; - } - set - { - this.urlField = value; - } - } - - /// The title of the webpage. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string title - { - get - { - return this.titleField; - } - set - { - this.titleField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A keyword response value representing search volume for a single month. An - /// instance with a null count is valid, indicating that the - /// information is unavailable. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class MonthlySearchVolume - { - private int yearField; - - private bool yearFieldSpecified; - - private int monthField; - - private bool monthFieldSpecified; - - private long countField; - - private bool countFieldSpecified; - - /// The year this search volume occurred in. (i.e. 2009) - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int year - { - get - { - return this.yearField; - } - set - { - this.yearField = value; - this.yearSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool yearSpecified - { - get - { - return this.yearFieldSpecified; - } - set - { - this.yearFieldSpecified = value; - } - } - - /// The month this search volume occurred in. Month is 1 indexed, such that - /// 1=January and 12=December. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int month - { - get - { - return this.monthField; - } - set - { - this.monthField = value; - this.monthSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool monthSpecified - { - get - { - return this.monthFieldSpecified; - } - set - { - this.monthFieldSpecified = value; - } - } - - /// The approximate number of searches in this year/month. A count - /// means that data is unavailable or unknown. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long count - { - get - { - return this.countField; - } - set - { - this.countField = value; - this.countSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool countSpecified - { - get - { - return this.countFieldSpecified; - } - set - { - this.countFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a range of values that has either an upper or a lower bound. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class Range - { - private ComparableValue minField; - - private ComparableValue maxField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ComparableValue min - { - get - { - return this.minField; - } - set - { - this.minField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ComparableValue max - { - get - { - return this.maxField; - } - set - { - this.maxField = value; - } - } - } - - - /// Attributes encompass the core information about a - /// particular TargetingIdea. Some attributes are for - /// KEYWORD IdeaTypes, some are for - /// PLACEMENT IdeaTypes, and some are for both. - /// Ultimately, an Attribute instance simply wraps an actual - /// value of interest. For example, KeywordAttribute - /// wraps the keyword itself, while a BooleanAttribute simply wraps a boolean describing - /// some information about the keyword idea. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(WebpageDescriptorAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(StringAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MonthlySearchVolumeAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MoneyAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LongRangeAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LongAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(KeywordAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IntegerSetAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IntegerAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IdeaTypeAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DoubleAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CriterionAttribute))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BooleanAttribute))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public abstract partial class Attribute - { - private string attributeTypeField; - - /// Indicates that this instance is a subtype of Attribute. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Attribute.Type", Order = 0)] - public string AttributeType - { - get - { - return this.attributeTypeField; - } - set - { - this.attributeTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a WebpageDescriptor value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class WebpageDescriptorAttribute : Attribute - { - private WebpageDescriptor valueField; - - /// WebpageDescriptor value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public WebpageDescriptor value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a string value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class StringAttribute : Attribute - { - private string valueField; - - /// String value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a list of MonthlySearchVolume values. The list contains the - /// past 12 MonthlySearchVolumes (excluding the - /// current month). The first item is the data for the most recent month and the - /// last item is the data for the oldest month. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class MonthlySearchVolumeAttribute : Attribute - { - private MonthlySearchVolume[] valueField; - - /// List of MonthlySearchVolume values contained - /// by this Attribute. The list contains the data for the - /// past 12 months (excluding the current month) in sorted order started with the - /// most recent month. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public MonthlySearchVolume[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a Money - /// value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class MoneyAttribute : Attribute - { - private Money valueField; - - /// Money value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a Range - /// of LongValue values. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class LongRangeAttribute : Attribute - { - private Range valueField; - - /// Range of LongValue values contained - /// by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Range value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a long value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class LongAttribute : Attribute - { - private long valueField; - - private bool valueFieldSpecified; - - /// Long value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a Keyword value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class KeywordAttribute : Attribute - { - private Keyword valueField; - - /// Keyword value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Keyword value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a Set of integer values. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class IntegerSetAttribute : Attribute - { - private int[] valueField; - - /// Set of integer values contained by this Attribute. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public int[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains an integer value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class IntegerAttribute : Attribute - { - private int valueField; - - private bool valueFieldSpecified; - - /// Integer value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains an IdeaType value. For example, if a TargetingIdea represents a keyword idea, its IdeaTypeAttribute would contain a - /// KEYWORD IdeaType. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class IdeaTypeAttribute : Attribute - { - private IdeaType valueField; - - private bool valueFieldSpecified; - - /// IdeaType value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public IdeaType value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the type of idea. This is - /// disabled for AdX. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public enum IdeaType - { - /// Keyword idea. - /// - KEYWORD = 0, - } - - - /// Attribute type that contains a double value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class DoubleAttribute : Attribute - { - private double valueField; - - private bool valueFieldSpecified; - - /// Double value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public double value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a Criterion value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class CriterionAttribute : Attribute - { - private Criterion valueField; - - /// Criterion value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Criterion value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Attribute type that contains a boolean value. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class BooleanAttribute : Attribute - { - private bool valueField; - - private bool valueFieldSpecified; - - /// Boolean value contained by this Attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Attribute.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Attribute.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Attribute.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// This represents an entry in a map with a key of type Type and value of type - /// Attribute. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class Type_AttributeMapEntry - { - private AttributeType keyField; - - private bool keyFieldSpecified; - - private Attribute valueField; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AttributeType key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - this.keySpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool keySpecified - { - get - { - return this.keyFieldSpecified; - } - set - { - this.keyFieldSpecified = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Attribute value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - /// Represents the type of Attribute.

IdeaType KEYWORD supports the following AttributeTypes:

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public enum AttributeType - { - /// Value substituted in when the actual value is not available in the Web API - /// version being used. (Please upgrade to the latest published WSDL.)

This - /// element is not supported directly by any IdeaType.

- ///
- UNKNOWN = 0, - /// Represents a category ID in the "Products and Services" taxonomy.

Resulting - /// attribute is IntegerSetAttribute.

This - /// element is supported by following IdeaTypes: KEYWORD.

- ///
- CATEGORY_PRODUCTS_AND_SERVICES = 1, - /// Represents the relative amount of competition associated with the given keyword - /// idea, relative to other keywords. This value will be between 0 and 1 - /// (inclusive).

Resulting attribute is DoubleAttribute.

This element is supported by - /// following IdeaTypes: KEYWORD.

- ///
- COMPETITION = 2, - /// Represents the webpage from which this keyword idea was extracted (if - /// applicable.)

Resulting attribute is WebpageDescriptorAttribute.

This - /// element is supported by following IdeaTypes: KEYWORD.

- ///
- EXTRACTED_FROM_WEBPAGE = 3, - /// Represents the type of the given idea.

Resulting attribute is IdeaTypeAttribute.

This element is supported - /// by following IdeaTypes: KEYWORD.

- ///
- IDEA_TYPE = 4, - /// Represents the keyword text for the given keyword idea.

Resulting attribute - /// is StringAttribute.

This element is - /// supported by following IdeaTypes: KEYWORD.

- ///
- KEYWORD_TEXT = 5, - /// Represents either the (approximate) number of searches for the given keyword - /// idea on google.com or google.com and partners, depending on the user's - /// targeting.

Resulting attribute is LongAttribute.

This element is supported by - /// following IdeaTypes: KEYWORD.

- ///
- SEARCH_VOLUME = 6, - /// Represents the average cost per click historically paid for the keyword. - ///

Resulting attribute is MoneyAttribute.

- ///

This element is supported by following IdeaTypes: - /// KEYWORD.

- ///
- AVERAGE_CPC = 7, - /// Represents the (approximated) number of searches on this keyword idea (as - /// available for the past twelve months), targeted to the specified geographies. - ///

Resulting attribute is MonthlySearchVolumeAttribute.

- ///

This element is supported by following IdeaTypes: - /// KEYWORD.

- ///
- TARGETED_MONTHLY_SEARCHES = 8, - } - - - /// Represents a TargetingIdea returned by search - /// criteria specified in the TargetingIdeaSelector. Targeting ideas are - /// keywords or placements that are similar to those the user inputs. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TargetingIdea - { - private Type_AttributeMapEntry[] dataField; - - /// Map of AttributeType to Attribute. Stores all data retrieved for each key - /// AttributeType. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("data", Order = 0)] - public Type_AttributeMapEntry[] data - { - get - { - return this.dataField; - } - set - { - this.dataField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of TargetingIdeas from the search - /// criteria specified by a TargetingIdeaSelector. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TargetingIdeaPage - { - private int totalNumEntriesField; - - private bool totalNumEntriesFieldSpecified; - - private TargetingIdea[] entriesField; - - /// Total number of entries that can be retrieved using the get method. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int totalNumEntries - { - get - { - return this.totalNumEntriesField; - } - set - { - this.totalNumEntriesField = value; - this.totalNumEntriesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalNumEntriesSpecified - { - get - { - return this.totalNumEntriesFieldSpecified; - } - set - { - this.totalNumEntriesFieldSpecified = value; - } - } - - /// The result entries in this page, as list of TargetingIdeas. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 1)] - public TargetingIdea[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Object representing integer comparison operations. This is usually used within a - /// particular SearchParameter to specify the valid - /// values requested for the specific Attribute. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class LongComparisonOperation - { - private long minimumField; - - private bool minimumFieldSpecified; - - private long maximumField; - - private bool maximumFieldSpecified; - - /// The minimum value of elements returned by this operation (inclusive). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long minimum - { - get - { - return this.minimumField; - } - set - { - this.minimumField = value; - this.minimumSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool minimumSpecified - { - get - { - return this.minimumFieldSpecified; - } - set - { - this.minimumFieldSpecified = value; - } - } - - /// The maximum value of elements returned by this operation (inclusive). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long maximum - { - get - { - return this.maximumField; - } - set - { - this.maximumField = value; - this.maximumSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool maximumSpecified - { - get - { - return this.maximumFieldSpecified; - } - set - { - this.maximumFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A set of SearchParameters is supplied to the TargetingIdeaSelector to specify how the user - /// wants to filter the set of all possible TargetingIdeas.

There is a SearchParameter for each type of input. SearchParameters can conceptually be broken down into - /// two types.

A request should only contain one instance of each SearchParameter. Requests containing multiple - /// instances of the same search parameter will be rejected.

One or more of - /// the following SearchParameters are required:
- ///

IdeaType KEYWORD supports following SearchParameters:

- ///
- [System.Xml.Serialization.XmlIncludeAttribute(typeof(SeedAdGroupIdSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SearchVolumeSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelatedToUrlSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelatedToQuerySearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(NetworkSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LocationSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LanguageSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IncludeAdultContentSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(IdeaTextFilterSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CompetitionSearchParameter))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CategoryProductsAndServicesSearchParameter))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public abstract partial class SearchParameter - { - private string searchParameterTypeField; - - /// Indicates that this instance is a subtype of SearchParameter. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("SearchParameter.Type", Order = 0)] - public string SearchParameterType - { - get - { - return this.searchParameterTypeField; - } - set - { - this.searchParameterTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter for KEYWORD IdeaTypes that specifies that the supplied AdGroup should be - /// used as a seed for generating new ideas. For example, an AdGroup's keywords - /// would be used to generate new and related keywords.

This element is supported - /// by following IdeaTypes: KEYWORD.

This element is - /// supported by following RequestTypes: IDEAS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class SeedAdGroupIdSearchParameter : SearchParameter - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - /// The id for the ad group that should be used as a seed for generating new ideas. - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter that specifies the level of - /// search volume expected in results, and it has a direct relationship to SEARCH_VOLUME. Absence of a SearchVolumeSearchParameter in a TargetingIdeaSelector is equivalent to having - /// no constraint on search volume specified.

This element is supported by - /// following IdeaTypes: KEYWORD.

This element is - /// supported by following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class SearchVolumeSearchParameter : SearchParameter - { - private LongComparisonOperation operationField; - - /// Used to specify the range of search volume. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public LongComparisonOperation operation - { - get - { - return this.operationField; - } - set - { - this.operationField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter that specifies a set of URLs - /// that results should in some way be related to. For example, keyword results - /// would be similar to content keywords found on the related URLs.

This element - /// is supported by following IdeaTypes: KEYWORD.

This - /// element is supported by following RequestTypes: - /// IDEAS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class RelatedToUrlSearchParameter : SearchParameter - { - private string[] urlsField; - - private bool includeSubUrlsField; - - private bool includeSubUrlsFieldSpecified; - - /// A set of URL strings to which search results should be related. For - /// KEYWORD queries, only one URL may be submitted. This field must contain distinct - /// elements. This field must not - /// contain elements. This - /// field must contain at least one element. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("urls", Order = 0)] - public string[] urls - { - get - { - return this.urlsField; - } - set - { - this.urlsField = value; - } - } - - /// Whether to crawl links off of the urls for the same domain. Default - /// is false. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool includeSubUrls - { - get - { - return this.includeSubUrlsField; - } - set - { - this.includeSubUrlsField = value; - this.includeSubUrlsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool includeSubUrlsSpecified - { - get - { - return this.includeSubUrlsFieldSpecified; - } - set - { - this.includeSubUrlsFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter for a query of - /// Strings.

This element is supported by following IdeaTypes: KEYWORD.

This element is supported by - /// following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class RelatedToQuerySearchParameter : SearchParameter - { - private string[] queriesField; - - /// A list of exact keyword match query Strings that the search - /// result should be related to. This - /// field must contain distinct elements. This field must not contain null elements. - /// This field must contain at least one - /// element. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("queries", Order = 0)] - public string[] queries - { - get - { - return this.queriesField; - } - set - { - this.queriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - ///

A SearchParameter for setting the search - /// network. Currently we support two network setting options:

  • Google - /// search network
  • Google search network and AFS

This element - /// is supported by following IdeaTypes: KEYWORD.

This - /// element is supported by following RequestTypes: IDEAS, - /// STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class NetworkSearchParameter : SearchParameter - { - private NetworkSetting networkSettingField; - - /// The network targeted for this search.

Currently we can support two - /// options:

  • number of google search impressions
  • number of - /// search impressions on the google search network(AFS)
This field is required and should not be - /// null. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public NetworkSetting networkSetting - { - get - { - return this.networkSettingField; - } - set - { - this.networkSettingField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter used to indicate the locations - /// being targeted. This can be used, for example, to search for - /// KEYWORD IdeaTypes that are best for Japan - /// and Los Angeles.

This parameter replaces the .

See the - /// Geographical Targeting page for the complete list of supported geo target - /// types for this service.

The service allows up to 10 locations to be - /// targeted for KEYWORD requests and 50 locations for PLACEMENT requests.

- ///

This element is supported by following IdeaTypes: - /// KEYWORD.

This element is supported by following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class LocationSearchParameter : SearchParameter - { - private Location[] locationsField; - - /// A list of Locations indicating the desired locations (e.g - /// countries) being targeted in the results. This field must contain distinct elements. This field must not contain - /// elements. This field must contain at - /// least one element. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("locations", Order = 0)] - public Location[] locations - { - get - { - return this.locationsField; - } - set - { - this.locationsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter used to indicate multiple - /// language being targeted. This can be used, for example, to search for - /// KEYWORD IdeaTypes that are best for Japanese - /// language.

The service allows at most one language to be targeted for - /// KEYWORD requests.

In the KEYWORD IdeaType RequestType - /// requests, those keywords that are from different language than specified in - /// or have unknown language will be filtered out in the response. To - /// avoid filtering, do not include in the request.

This - /// element is supported by following IdeaTypes: KEYWORD.

- ///

This element is supported by following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class LanguageSearchParameter : SearchParameter - { - private Language[] languagesField; - - /// A list of Languages indicating the desired languages - /// being targeted in the results. This - /// field must contain distinct elements. This field must not contain null elements. - /// This field must contain at least one - /// element. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("languages", Order = 0)] - public Language[] languages - { - get - { - return this.languagesField; - } - set - { - this.languagesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// SearchParameter that specifies whether adult - /// content should be returned.

Presence of this SearchParameter will allow adult keywords to be - /// included in the results.

This element is supported by following IdeaTypes: KEYWORD.

This element is supported by - /// following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class IncludeAdultContentSearchParameter : SearchParameter - { - } - - - /// A SearchParameter for KEYWORD IdeaTypes that specifies a collection of strings by which - /// the results should be constrained. This guarantees that each idea in the result - /// will match at least one of the values. For this SearchParameter, excluded items will always take - /// priority over included ones. This can handle a maximum of 200 (included + - /// excluded) elements.

This element is supported by following IdeaTypes: KEYWORD.

This element is supported by - /// following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class IdeaTextFilterSearchParameter : SearchParameter - { - private string[] includedField; - - private string[] excludedField; - - /// A set of strings specifying which ideas should be included in the results. This field must contain distinct - /// elements. This field must not - /// contain elements. Strings in this field must be non-empty (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute("included", Order = 0)] - public string[] included - { - get - { - return this.includedField; - } - set - { - this.includedField = value; - } - } - - /// A set of strings specifying which ideas should be excluded from the results. - /// This field must contain distinct - /// elements. This field must not - /// contain elements. Strings in this field must be non-empty (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute("excluded", Order = 1)] - public string[] excluded - { - get - { - return this.excludedField; - } - set - { - this.excludedField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A SearchParameter for KEYWORD IdeaTypes used to filter the results by the amount of - /// competition (eg: LOW, MEDIUM, HIGH).

This element is supported by following - /// IdeaTypes: KEYWORD.

This element is supported by - /// following RequestTypes: IDEAS, STATS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class CompetitionSearchParameter : SearchParameter - { - private CompetitionSearchParameterLevel[] levelsField; - - /// A set of Levels indicating a relative amount of competition - /// that KEYWORD IdeaTypes should have in the - /// results. This field must contain - /// distinct elements. This field - /// must not contain null elements. This field must contain at least one element. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute("levels", Order = 0)] - public CompetitionSearchParameterLevel[] levels - { - get - { - return this.levelsField; - } - set - { - this.levelsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An enumeration of possible values to be used in conjunction with the CompetitionSearchParameter to specify the - /// granularity of competition to be filtered. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CompetitionSearchParameter.Level", Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public enum CompetitionSearchParameterLevel - { - /// Low - competition rate [0.0000, 0.3333] - /// - LOW = 0, - /// Medium - competition rate (0.3333, 0.6667] - /// - MEDIUM = 1, - /// High - competition rate (0.6667, 1.0000] - /// - HIGH = 2, - } - - - /// A SearchParameter for KEYWORD IdeaTypes that sets a keyword category that all search - /// results should belong to. Uses the newer "Products and Services" taxonomy. - ///

This element is supported by following IdeaTypes: - /// KEYWORD.

This element is supported by following RequestTypes: IDEAS.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class CategoryProductsAndServicesSearchParameter : SearchParameter - { - private int categoryIdField; - - private bool categoryIdFieldSpecified; - - /// A keyword category ID in the "Products and Services" taxonomy that all search - /// results should belong to. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int categoryId - { - get - { - return this.categoryIdField; - } - set - { - this.categoryIdField = value; - this.categoryIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool categoryIdSpecified - { - get - { - return this.categoryIdFieldSpecified; - } - set - { - this.categoryIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : SearchParameter.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : SearchParameter.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : SearchParameter.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A descriptor for finding TargetingIdeas that match - /// the specified criteria. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TargetingIdeaSelector - { - private SearchParameter[] searchParametersField; - - private IdeaType ideaTypeField; - - private bool ideaTypeFieldSpecified; - - private RequestType requestTypeField; - - private bool requestTypeFieldSpecified; - - private AttributeType[] requestedAttributeTypesField; - - private Paging pagingField; - - private string localeCodeField; - - private string currencyCodeField; - - /// Search for targeting ideas based on these search rules.

An empty set - /// indicates this selector is valid for selecting metadata with default parameters. - /// This field must not contain - /// elements. Elements - /// in this field must have distinct types. This field is required and should not be null.

- ///
- [System.Xml.Serialization.XmlElementAttribute("searchParameters", Order = 0)] - public SearchParameter[] searchParameters - { - get - { - return this.searchParametersField; - } - set - { - this.searchParametersField = value; - } - } - - /// Limits the request to responses of this IdeaType, e.g. - /// KEYWORDS. This field is required - /// and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public IdeaType ideaType - { - get - { - return this.ideaTypeField; - } - set - { - this.ideaTypeField = value; - this.ideaTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool ideaTypeSpecified - { - get - { - return this.ideaTypeFieldSpecified; - } - set - { - this.ideaTypeFieldSpecified = value; - } - } - - /// Specifies the RequestType, e.g. or - /// STATS. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public RequestType requestType - { - get - { - return this.requestTypeField; - } - set - { - this.requestTypeField = value; - this.requestTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool requestTypeSpecified - { - get - { - return this.requestTypeFieldSpecified; - } - set - { - this.requestTypeFieldSpecified = value; - } - } - - /// Request Attributes and associated data for this set of - /// Types.

An empty set indicates a request for KeywordAttribute, PlacementAttribute, and IdeaType. This - /// field must contain distinct elements. This field must not contain null - /// elements.

- ///
- [System.Xml.Serialization.XmlElementAttribute("requestedAttributeTypes", Order = 3)] - public AttributeType[] requestedAttributeTypes - { - get - { - return this.requestedAttributeTypesField; - } - set - { - this.requestedAttributeTypesField = value; - } - } - - /// A Paging object that specifies the desired starting index - /// and number of results to return. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Paging paging - { - get - { - return this.pagingField; - } - set - { - this.pagingField = value; - } - } - - /// The locale code (for example "en_US") used for localizing strings, controlling - /// numeric formatting, and the like. See RFC 3066 for information on the format - /// used. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string localeCode - { - get - { - return this.localeCodeField; - } - set - { - this.localeCodeField = value; - } - } - - /// The currency code to be used for all monetary values returned in results in ISO - /// format (see - /// https://developers.google.com/adwords/api/docs/appendix/currencycodes for - /// supported currencies). The default is "USD" (US dollars). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string currencyCode - { - get - { - return this.currencyCodeField; - } - set - { - this.currencyCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the type of the request. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public enum RequestType - { - /// Request for new ideas based on other entries in selector. This RequestType can be used to request other ideas using - /// keyword/placements that the user already has. - /// - IDEAS = 0, - /// Request for stats for entries in selector. This RequestType can be used to request the stats for - /// keywords/placements that the user already has.

Stats are generated once a - /// month (typically on the last week of the month) from the historical data of - /// previous months.

- ///
- STATS = 1, - } - - - /// Base error class for TrafficEstimatorService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TrafficEstimatorError : ApiError - { - private TrafficEstimatorErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public TrafficEstimatorErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "TrafficEstimatorError.Reason", Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public enum TrafficEstimatorErrorReason - { - /// When the request with null campaign ID in CampaignEstimateRequest contains an AdGroupEstimateRequest with an ID. - /// - NO_CAMPAIGN_FOR_AD_GROUP_ESTIMATE_REQUEST = 0, - /// When the request with null adgroup ID in AdGroupEstimateRequest contains a KeywordEstimateRequest with an ID. - /// - NO_AD_GROUP_FOR_KEYWORD_ESTIMATE_REQUEST = 1, - /// All KeywordEstimateRequest items should - /// have maxCpc associated with them. - /// - NO_MAX_CPC_FOR_KEYWORD_ESTIMATE_REQUEST = 2, - /// When there are more KeywordEstimateRequests - /// in the request than TrafficEstimatorService allows. - /// - TOO_MANY_KEYWORD_ESTIMATE_REQUESTS = 3, - /// When there are more CampaignEstimateRequests in the request than - /// TrafficEstimatorService allows. - /// - TOO_MANY_CAMPAIGN_ESTIMATE_REQUESTS = 4, - /// When there are more AdGroupEstimateRequests - /// in the request than TrafficEstimatorService allows. - /// - TOO_MANY_ADGROUP_ESTIMATE_REQUESTS = 5, - /// When there are more targets in the request than TrafficEstimatorService allows. - /// See documentation on CampaignEstimateRequest for more information - /// about this error. - /// - TOO_MANY_TARGETS = 6, - /// Request contains a keyword that is too long for backends to handle. - /// - KEYWORD_TOO_LONG = 7, - /// Request contains a keyword that contains broad match modifiers. - /// - KEYWORD_CONTAINS_BROAD_MATCH_MODIFIERS = 8, - /// When an unexpected error occurs. - /// - INVALID_INPUT = 9, - /// When backend service calls fail. - /// - SERVICE_UNAVAILABLE = 10, - } - - - /// Base error class for the TargetingIdeaService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TargetingIdeaError : ApiError - { - private TargetingIdeaErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public TargetingIdeaErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An enumeration of TargetingIdeaService - /// specific errors. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "TargetingIdeaError.Reason", Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public enum TargetingIdeaErrorReason - { - /// Error returned when there are multiple instance of same type of SearchParameters. - /// - DUPLICATE_SEARCH_FILTER_TYPES_PRESENT = 0, - /// Error returned when the TargetingIdeaSelector doesn't have enough SearchParameters to execute request. - /// - INSUFFICIENT_SEARCH_PARAMETERS = 1, - /// Error returned when an AttributeType doesn't match - /// the IdeaType specified in the TargetingIdeaSelector. For example, if the - /// KEYWORD IDEAS selector contains an STATS - /// only AttributeType, this error will be returned. - /// - INVALID_ATTRIBUTE_TYPE = 2, - /// Error returned when a SearchParameter doesn't - /// match the IdeaType specified in the TargetingIdeaSelector or is otherwise invalid. - /// Error trigger usually contains the parameter name, and error details contain a - /// more detailed explanation. - /// - INVALID_SEARCH_PARAMETERS = 3, - /// Error returned when the TargetingIdeaSelector contains a DomainSuffixSearchParameters that - /// contains an invalid domain suffix. - /// - INVALID_DOMAIN_SUFFIX = 4, - /// Error returned when a selector contains mutually exclusive parameters. - /// - MUTUALLY_EXCLUSIVE_SEARCH_PARAMETERS_IN_QUERY = 5, - /// Error returned when the TargetingIdeaService - /// is not available. - /// - SERVICE_UNAVAILABLE = 6, - /// Error returned when the URL value specified in the TargetingIdeaSelector, such as RelatedToUrlSearchParameter, is not a - /// valid URL. - /// - INVALID_URL_IN_SEARCH_PARAMETER = 7, - /// Error returned when the requested number of entries in TargetingIdeaSelector's Paging is greater than the maximum allowed. - /// - TOO_MANY_RESULTS_REQUESTED = 8, - /// Error returned when the requested Paging is missing from - /// the TargetingIdeaSelector when required. - /// - NO_PAGING_IN_SELECTOR = 9, - /// Error returned when included keywords and excluded keywords in IdeaTextFilterSearchParameter, IdeaTextMatchesSearchParameter or ExcludedKeywordSearchParameter are - /// overlapped. - /// - INVALID_INCLUDED_EXCLUDED_KEYWORDS = 10, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.TargetingIdeaServiceInterface")] - public interface TargetingIdeaServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.TargetingIdeaPage get(Google.Api.Ads.AdWords.v201806.TargetingIdeaSelector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.TargetingIdeaSelector selector); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface TargetingIdeaServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.TargetingIdeaServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to generate new keyword ideas based on the parameters specified - /// in the selector. See the TargetingIdeaSelector documentation for more - /// details.

You can also use this service to retrieve statistics for existing - /// keyword ideas by setting the selector's to RequestType#STATS and passing in the appropriate - /// search parameters.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class TargetingIdeaService : AdWordsSoapClient, ITargetingIdeaService - { - /// Creates a new instance of the - /// class. - public TargetingIdeaService() - { - } - - /// Creates a new instance of the - /// class. - public TargetingIdeaService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public TargetingIdeaService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public TargetingIdeaService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public TargetingIdeaService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a page of ideas that match the query described by the specified TargetingIdeaSelector.

The selector must - /// specify a paging value, with set to 700 or less. - /// Large result sets must be composed through multiple calls to this method, - /// advancing the paging startIndex value by numberResults - /// with each call.

- ///
Query describing the types of results to return when - /// finding matches (similar keyword ideas). - /// A TargetingIdeaPage of results, that is - /// a subset of the list of possible ideas meeting the criteria of the TargetingIdeaSelector. - /// If problems occurred while querying for - /// ideas. - public virtual Google.Api.Ads.AdWords.v201806.TargetingIdeaPage get(Google.Api.Ads.AdWords.v201806.TargetingIdeaSelector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.TargetingIdeaSelector selector) - { - return base.Channel.getAsync(selector); - } - } - namespace Wrappers.TrafficEstimatorService - { - } - /// Contains a campaign level estimate for a specified Platform. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class PlatformCampaignEstimate - { - private Platform platformField; - - private StatsEstimate minEstimateField; - - private StatsEstimate maxEstimateField; - - /// The Platform associated with this estimate. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Platform platform - { - get - { - return this.platformField; - } - set - { - this.platformField = value; - } - } - - /// Minimum estimate for the specified Platform. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public StatsEstimate minEstimate - { - get - { - return this.minEstimateField; - } - set - { - this.minEstimateField = value; - } - } - - /// Maximum estimate for the specified Platform. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public StatsEstimate maxEstimate - { - get - { - return this.maxEstimateField; - } - set - { - this.maxEstimateField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a set of stats for a daily traffic estimate. - ///

averageCpc, averagePosition and will - /// be null when not defined and or - /// impressionsPerDay is 0, respectively.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class StatsEstimate - { - private Money averageCpcField; - - private double averagePositionField; - - private bool averagePositionFieldSpecified; - - private double clickThroughRateField; - - private bool clickThroughRateFieldSpecified; - - private float clicksPerDayField; - - private bool clicksPerDayFieldSpecified; - - private float impressionsPerDayField; - - private bool impressionsPerDayFieldSpecified; - - private Money totalCostField; - - /// The estimated average CPC. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Money averageCpc - { - get - { - return this.averageCpcField; - } - set - { - this.averageCpcField = value; - } - } - - /// The estimated average position. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public double averagePosition - { - get - { - return this.averagePositionField; - } - set - { - this.averagePositionField = value; - this.averagePositionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool averagePositionSpecified - { - get - { - return this.averagePositionFieldSpecified; - } - set - { - this.averagePositionFieldSpecified = value; - } - } - - /// The estimated click through rate. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public double clickThroughRate - { - get - { - return this.clickThroughRateField; - } - set - { - this.clickThroughRateField = value; - this.clickThroughRateSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool clickThroughRateSpecified - { - get - { - return this.clickThroughRateFieldSpecified; - } - set - { - this.clickThroughRateFieldSpecified = value; - } - } - - /// The estimated number of clicks, in floating point representation. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public float clicksPerDay - { - get - { - return this.clicksPerDayField; - } - set - { - this.clicksPerDayField = value; - this.clicksPerDaySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool clicksPerDaySpecified - { - get - { - return this.clicksPerDayFieldSpecified; - } - set - { - this.clicksPerDayFieldSpecified = value; - } - } - - /// The estimated number of impressions, in floating point representation. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public float impressionsPerDay - { - get - { - return this.impressionsPerDayField; - } - set - { - this.impressionsPerDayField = value; - this.impressionsPerDaySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool impressionsPerDaySpecified - { - get - { - return this.impressionsPerDayFieldSpecified; - } - set - { - this.impressionsPerDayFieldSpecified = value; - } - } - - /// The estimated total cost. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public Money totalCost - { - get - { - return this.totalCostField; - } - set - { - this.totalCostField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Abstract class representing an reply to an EstimateRequest. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignEstimate))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(KeywordEstimate))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupEstimate))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class Estimate - { - private string estimateTypeField; - - /// Indicates that this instance is a subtype of Estimate. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("Estimate.Type", Order = 0)] - public string EstimateType - { - get - { - return this.estimateTypeField; - } - set - { - this.estimateTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the estimate results for a single campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class CampaignEstimate : Estimate - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private AdGroupEstimate[] adGroupEstimatesField; - - private PlatformCampaignEstimate[] platformEstimatesField; - - /// The campaignId of the campaign specified in the request. This will be - /// null for new campaigns. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// The estimates for the ad groups belonging to this campaign in the request. They - /// will be returned in the same order that they were sent in the request. - /// - [System.Xml.Serialization.XmlElementAttribute("adGroupEstimates", Order = 1)] - public AdGroupEstimate[] adGroupEstimates - { - get - { - return this.adGroupEstimatesField; - } - set - { - this.adGroupEstimatesField = value; - } - } - - /// Traffic estimates segmented by platform for this campaign. - /// - [System.Xml.Serialization.XmlElementAttribute("platformEstimates", Order = 2)] - public PlatformCampaignEstimate[] platformEstimates - { - get - { - return this.platformEstimatesField; - } - set - { - this.platformEstimatesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Estimate.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Estimate.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Estimate.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the estimate results for a single ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class AdGroupEstimate : Estimate - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private KeywordEstimate[] keywordEstimatesField; - - /// The adGroupId of the ad group specified in the request. This will be - /// null for new ad groups. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The estimates for the keywords specified in the request. The list of estimates - /// are returned in the same order as the keywords that were sent in the request. - /// - [System.Xml.Serialization.XmlElementAttribute("keywordEstimates", Order = 1)] - public KeywordEstimate[] keywordEstimates - { - get - { - return this.keywordEstimatesField; - } - set - { - this.keywordEstimatesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Estimate.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Estimate.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Estimate.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents the traffic estimate result for a single keyword. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class KeywordEstimate : Estimate - { - private long criterionIdField; - - private bool criterionIdFieldSpecified; - - private StatsEstimate minField; - - private StatsEstimate maxField; - - /// The existing criterionId for this keyword, if any. This will not be returned if - /// this is a new keyword. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long criterionId - { - get - { - return this.criterionIdField; - } - set - { - this.criterionIdField = value; - this.criterionIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionIdSpecified - { - get - { - return this.criterionIdFieldSpecified; - } - set - { - this.criterionIdFieldSpecified = value; - } - } - - /// The lower bound on the estimated stats.

This is not a guarantee that actual - /// performance will never be lower than these stats.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public StatsEstimate min - { - get - { - return this.minField; - } - set - { - this.minField = value; - } - } - - /// The upper bound on the estimated stats.

This is not a guarantee that actual - /// performance will never be higher than these stats.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public StatsEstimate max - { - get - { - return this.maxField; - } - set - { - this.maxField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Estimate.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Estimate.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Estimate.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains results of traffic estimation request. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TrafficEstimatorResult - { - private CampaignEstimate[] campaignEstimatesField; - - /// The estimates for the campaigns specified in the request. They are listed in the - /// same order as the campaigns that were sent in the request. - /// - [System.Xml.Serialization.XmlElementAttribute("campaignEstimates", Order = 0)] - public CampaignEstimate[] campaignEstimates - { - get - { - return this.campaignEstimatesField; - } - set - { - this.campaignEstimatesField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Abstract class representing a request to estimate stats. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CampaignEstimateRequest))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(KeywordEstimateRequest))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AdGroupEstimateRequest))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public abstract partial class EstimateRequest - { - private string estimateRequestTypeField; - - /// Indicates that this instance is a subtype of EstimateRequest. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("EstimateRequest.Type", Order = 0)] - public string EstimateRequestType - { - get - { - return this.estimateRequestTypeField; - } - set - { - this.estimateRequestTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a campaign that will be estimated.

Returns traffic estimates for - /// the requested set of campaigns. The campaigns can be all new or all existing, or - /// a mixture of new and existing. Only existing campaigns may contain estimates for - /// existing ad groups.

For existing campaigns, the campaign and optionally - /// the ad group will be used as context to produce more accurate estimates. Traffic - /// estimates may only be requested on keywords, so regardless of whether campaign - /// and ad group IDs are provided or left blank, at least one keyword is required to - /// estimate traffic.

To make a keyword estimates request in which estimates - /// do not consider existing account information (e.g. historical ad group - /// performance), set #campaignId to .

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class CampaignEstimateRequest : EstimateRequest - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private AdGroupEstimateRequest[] adGroupEstimateRequestsField; - - private Criterion[] criteriaField; - - private NetworkSetting networkSettingField; - - private Money dailyBudgetField; - - /// The campaignId of an existing campaign or null.

Refer to the CampaignEstimateRequest documentation for - /// detailed usage.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// The list of ad groups to estimate. This field is required and should not be - /// null. At least one ad group is required.

New campaigns may only - /// contain new ad groups. If an AdGroupEstimateRequest has an adGroupId but - /// the campaign is new, the API will return an error. This field must not contain null - /// elements.

- ///
- [System.Xml.Serialization.XmlElementAttribute("adGroupEstimateRequests", Order = 1)] - public AdGroupEstimateRequest[] adGroupEstimateRequests - { - get - { - return this.adGroupEstimateRequestsField; - } - set - { - this.adGroupEstimateRequestsField = value; - } - } - - /// A list of Criterions to be used for this Campaign. - /// Criteria provide information about geographical and language targeting. - ///

Values in this field override the current targets in the Campaign specified - /// by #campaignId by the following mechanism:

This - /// field accepts two types of Criterions: Location, which should contain all geographic targeting and - /// Language, which should contain all language targeting. If - /// Locations are passed in, all geographic targeting in the - /// campaign will be overridden. If any Languages are passed - /// in, all language targeting in the campaign will be overridden.

If - /// multiple Locations are specified, the traffic estimate - /// will be the sum of the estimates for each targeted area. This means that if - /// criteria are chosen which overlap each other (for example, targeting both a - /// country and a city within that country), the traffic estimate will be be larger - /// than if no overlap were present - i. e., the overlap region will be - /// double-counted in the estimate.

If no criteria are specified and this is - /// for a new campaign then it will default to all languages in all countries and - /// territories, and Google search.

If no criteria are specified and this is - /// for an existing campaign then the current targeting on that campaign will be - /// used.

While there's no solid limit on number of criteria, - /// TrafficEstimatorService may return error with TOO_MANY_TARGETS if the request - /// contains too many criteria across all CampaignEstimateRequests in a TrafficEstimatorSelector.

Supported - /// Criteria : Language and Location. - /// This field must contain distinct - /// elements. This field must not - /// contain null elements.

- ///
- [System.Xml.Serialization.XmlElementAttribute("criteria", Order = 2)] - public Criterion[] criteria - { - get - { - return this.criteriaField; - } - set - { - this.criteriaField = value; - } - } - - /// A NetworkSetting to be used for this Campaign. The - /// value of this field overrides the current targets in the Campaign specified by - /// #campaignId.

For non Google partner accounts, only - /// NetworkSetting#targetGoogleSearch - /// and NetworkSetting#targetSearchNetwork - /// are supported, they may be combined to sum the estimates.

For some Google - /// partner accounts, in addition NetworkSetting#getTargetPartnerSearchNetwork - /// is supported.

If all request network settings and Campaign's network - /// settings are empty, the default is NetworkSetting#targetGoogleSearch.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public NetworkSetting networkSetting - { - get - { - return this.networkSettingField; - } - set - { - this.networkSettingField = value; - } - } - - /// Daily campaign budget to use in traffic estimation. If not specified, the daily - /// budget is unlimited. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public Money dailyBudget - { - get - { - return this.dailyBudgetField; - } - set - { - this.dailyBudgetField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : EstimateRequest.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : EstimateRequest.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : EstimateRequest.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an ad group that will be estimated. Ad groups may be all new or all - /// existing, or a mixture of new and existing. Only existing campaigns can contain - /// estimates for existing ad groups.

To make a keyword estimates request - /// in which estimates do not consider existing account information (e.g. historical - /// ad group performance), set both #adGroupId and the - /// enclosing CampaignEstimateRequest's - /// to null.

For more details on usage, refer to - /// document at CampaignEstimateRequest.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class AdGroupEstimateRequest : EstimateRequest - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private KeywordEstimateRequest[] keywordEstimateRequestsField; - - private Money maxCpcField; - - /// The adGroupId for an ad group that belongs to the containing campaign from CampaignEstimateRequest or . - ///

For usage, refer to document from CampaignEstimateRequest.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The keywords to estimate. This field - /// must contain distinct elements. This field must not contain null elements. - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute("keywordEstimateRequests", Order = 1)] - public KeywordEstimateRequest[] keywordEstimateRequests - { - get - { - return this.keywordEstimateRequestsField; - } - set - { - this.keywordEstimateRequestsField = value; - } - } - - /// The max CPC bid to use for estimates for this ad group.

This value overrides - /// the max CPC of AdGroup specified by #adGroupId.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Money maxCpc - { - get - { - return this.maxCpcField; - } - set - { - this.maxCpcField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : EstimateRequest.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : EstimateRequest.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : EstimateRequest.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a keyword to be estimated. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class KeywordEstimateRequest : EstimateRequest - { - private Keyword keywordField; - - private Money maxCpcField; - - private bool isNegativeField; - - private bool isNegativeFieldSpecified; - - /// The Keyword to estimate. The keyword text is required - /// regardless of whether the keyword ID is included. The keyword ID is optional and - /// has the following characteristics:
  • When omitted, the ID indicates a new - /// keyword to be estimated.
  • When present with a campaign and ad group also - /// specified, the ID should be for an existing keyword in the ad group. This can - /// improve the estimates since historical performance is known.
  • When - /// present without a campaign and ad group specified, the ID is ignored.
- /// This field is required and should not be - /// null. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Keyword keyword - { - get - { - return this.keywordField; - } - set - { - this.keywordField = value; - } - } - - /// The max CPC bid for this keyword. In general, the maxCpc of a KeywordEstimateRequest is optional, since - /// there is usually another maxCpc that can be used, such as the - /// maxCpc on an existing keyword, an existing or overriding - /// maxCpc of containing AdGroupEstimateRequest. However, if there is - /// no backup value of maxCpc anywhere along the line, you must provide - /// a value for maxCpc in KeywordEstimateRequest. This would happen, for - /// example, if the KeywordEstimateRequest is - /// for a new keyword. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Money maxCpc - { - get - { - return this.maxCpcField; - } - set - { - this.maxCpcField = value; - } - } - - /// Whether the keyword is negative or not. The default value is false. If negative, - /// no current ad group ads will appear for searches containing this keyword.

The - /// estimate for negative keywords should reflect no traffic and zero CPC, but - /// including a negative keyword will affect the other estimates in the request.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool isNegative - { - get - { - return this.isNegativeField; - } - set - { - this.isNegativeField = value; - this.isNegativeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isNegativeSpecified - { - get - { - return this.isNegativeFieldSpecified; - } - set - { - this.isNegativeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : EstimateRequest.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : EstimateRequest.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : EstimateRequest.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a list of campaigns to perform a traffic estimate on. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806")] - public partial class TrafficEstimatorSelector - { - private CampaignEstimateRequest[] campaignEstimateRequestsField; - - private bool platformEstimateRequestedField; - - private bool platformEstimateRequestedFieldSpecified; - - /// A list of all campaigns to estimate.

To create a Keyword estimates request, - /// use null campaign id. The - /// maximum size of this collection is 5. This field must contain distinct elements. This field must not contain null - /// elements. This field must contain at - /// least one element. This field is - /// required and should not be null.

- ///
- [System.Xml.Serialization.XmlElementAttribute("campaignEstimateRequests", Order = 0)] - public CampaignEstimateRequest[] campaignEstimateRequests - { - get - { - return this.campaignEstimateRequestsField; - } - set - { - this.campaignEstimateRequestsField = value; - } - } - - /// To request a list of campaign level estimates segmented by platform. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool platformEstimateRequested - { - get - { - return this.platformEstimateRequestedField; - } - set - { - this.platformEstimateRequestedField = value; - this.platformEstimateRequestedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool platformEstimateRequestedSpecified - { - get - { - return this.platformEstimateRequestedFieldSpecified; - } - set - { - this.platformEstimateRequestedFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/o/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.TrafficEstimatorServiceInterface")] - public interface TrafficEstimatorServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Estimate))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(EstimateRequest))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.TrafficEstimatorResult get(Google.Api.Ads.AdWords.v201806.TrafficEstimatorSelector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.TrafficEstimatorSelector selector); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface TrafficEstimatorServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.TrafficEstimatorServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to request traffic estimates for proposed or existing - /// campaigns, ad groups, and keywords.

To simply retrieve estimates for a list - /// of proposed keywords, create a campaign - /// estimate request and a child ad group - /// estimate request with null IDs, and then set the keywordEstimateRequests - /// to contain the keywords.

You can refine the traffic estimates by setting - /// campaign targeting options in the - /// request. If an ad group ID is provided, all creatives from that ad group will be - /// loaded and used to improve estimates.

The maximum number of keyword estimate requests across all campaign - /// estimate requests and ad group estimate requests is 2500.

The maximum - /// number of adgroup estimate requests across - /// all campaign estimate requests is 50.

Note that the API returns intervals - /// whereas the Traffic Estimator UI displays averages. Estimates are account - /// specific since they are based on creatives already in the account. When - /// comparing numbers, use the same account for the API and UI.

This is disabled for AdX. - ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class TrafficEstimatorService : AdWordsSoapClient, ITrafficEstimatorService - { - /// Creates a new instance of the - /// class. - public TrafficEstimatorService() - { - } - - /// Creates a new instance of the - /// class. - public TrafficEstimatorService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public TrafficEstimatorService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public TrafficEstimatorService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public TrafficEstimatorService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns traffic estimates for specified criteria. - /// Campaigns, ad groups and keywords for which traffic - /// should be estimated. - /// Traffic estimation results. - /// if problems occurred while retrieving - /// estimates - public virtual Google.Api.Ads.AdWords.v201806.TrafficEstimatorResult get(Google.Api.Ads.AdWords.v201806.TrafficEstimatorSelector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.TrafficEstimatorSelector selector) - { - return base.Channel.getAsync(selector); - } - } - namespace Wrappers.AdwordsUserListService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.UserListOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.UserListOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.UserListReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.UserListReturnValue rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateMembers", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateMembersRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.MutateMembersOperation[] operations; - - /// Creates a new instance of the - /// class. - public mutateMembersRequest() - { - } - - /// Creates a new instance of the - /// class. - public mutateMembersRequest(Google.Api.Ads.AdWords.v201806.MutateMembersOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateMembersResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateMembersResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.MutateMembersReturnValue rval; - - /// Creates a new instance of the - /// class. - public mutateMembersResponse() - { - } - - /// Creates a new instance of the - /// class. - public mutateMembersResponse(Google.Api.Ads.AdWords.v201806.MutateMembersReturnValue rval) - { - this.rval = rval; - } - } - } - /// Custom parameter of type string. For websites, there are two built-in parameters - /// URL (name = 'url__') and referrer URL (name = 'ref_url__'). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class StringKey - { - private string nameField; - - /// A name must begin with US-ascii letters or - /// underscore or UTF8 code that is greater than 127 and consist of US-ascii letters - /// or digits or underscore or UTF8 code that is greater than 127. This is checked - /// by the regular expression '^[a-zA-Z_?-?][a-zA-Z0-9_?-?]*$'. This field is required and should not be - /// null. This string must - /// not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An atomic rule fragment composing of string operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class StringRuleItem - { - private StringKey keyField; - - private StringRuleItemStringOperator opField; - - private bool opFieldSpecified; - - private string valueField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public StringKey key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public StringRuleItemStringOperator op - { - get - { - return this.opField; - } - set - { - this.opField = value; - this.opSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool opSpecified - { - get - { - return this.opFieldSpecified; - } - set - { - this.opFieldSpecified = value; - } - } - - /// The right hand side of the string rule item. For URL/Referrer URL, - /// value can not contain illegal URL chars such as: - /// "()'\"\t". String value can - /// not contain newline ( ) or both single quote and double quote. This is checked - /// by the regular expression '[^ ']*|[^ "]*'. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Supported operators for strings. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "StringRuleItem.StringOperator", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum StringRuleItemStringOperator - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - CONTAINS = 1, - EQUALS = 2, - STARTS_WITH = 3, - ENDS_WITH = 4, - NOT_EQUAL = 5, - NOT_CONTAIN = 6, - NOT_START_WITH = 7, - NOT_END_WITH = 8, - } - - - /// A custom parameter of type number. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class NumberKey - { - private string nameField; - - /// A name must begin with US-ascii letters or - /// underscore or UTF8 code that is greater than 127 and consist of US-ascii letters - /// or digits or underscore or UTF8 code that is greater than 127. This is checked - /// by the regular expression '^[a-zA-Z_?-?][a-zA-Z0-9_?-?]*$'. This field is required and should not be - /// null. This string must - /// not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An atomic rule fragment composing of number operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class NumberRuleItem - { - private NumberKey keyField; - - private NumberRuleItemNumberOperator opField; - - private bool opFieldSpecified; - - private double valueField; - - private bool valueFieldSpecified; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public NumberKey key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public NumberRuleItemNumberOperator op - { - get - { - return this.opField; - } - set - { - this.opField = value; - this.opSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool opSpecified - { - get - { - return this.opFieldSpecified; - } - set - { - this.opFieldSpecified = value; - } - } - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public double value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - this.valueSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool valueSpecified - { - get - { - return this.valueFieldSpecified; - } - set - { - this.valueFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Supported operator for numbers. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "NumberRuleItem.NumberOperator", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum NumberRuleItemNumberOperator - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - GREATER_THAN = 1, - GREATER_THAN_OR_EQUAL = 2, - EQUALS = 3, - NOT_EQUAL = 4, - LESS_THAN = 5, - LESS_THAN_OR_EQUAL = 6, - } - - - /// Date relative to NOW (the current date). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class RelativeDate - { - private int offsetInDaysField; - - private bool offsetInDaysFieldSpecified; - - /// Number of days offset from current date. This - /// field must be greater than or equal to 0. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int offsetInDays - { - get - { - return this.offsetInDaysField; - } - set - { - this.offsetInDaysField = value; - this.offsetInDaysSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool offsetInDaysSpecified - { - get - { - return this.offsetInDaysFieldSpecified; - } - set - { - this.offsetInDaysFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A custom parameter of date type. Supported date formats are listed as follows: - ///
  • 2011-03-31T12:20:19-05:00
  • 03/31/2011 12:20:19-05:00
  • - ///
  • Fri, Mar 31 2011 12:20:19 EST
  • Fri, Mar 31 12:20:19 EST 2011
  • - ///

If time zone information is not present in the value, it is assumed to - /// be PST. If time value is not specified, it defaults to midnight of the day.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class DateKey - { - private string nameField; - - /// A name must begin with US-ascii letters or - /// underscore or UTF8 code that is greater than 127 and consist of US-ascii letters - /// or digits or underscore or UTF8 code that is greater than 127. This is checked - /// by the regular expression '^[a-zA-Z_?-?][a-zA-Z0-9_?-?]*$'. This field is required and should not be - /// null. This string must - /// not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// An atomic rule fragment composing of date operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class DateRuleItem - { - private DateKey keyField; - - private DateRuleItemDateOperator opField; - - private bool opFieldSpecified; - - private string valueField; - - private RelativeDate relativeValueField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DateKey key - { - get - { - return this.keyField; - } - set - { - this.keyField = value; - } - } - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public DateRuleItemDateOperator op - { - get - { - return this.opField; - } - set - { - this.opField = value; - this.opSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool opSpecified - { - get - { - return this.opFieldSpecified; - } - set - { - this.opFieldSpecified = value; - } - } - - /// The right hand side of date rule item. The date's format should be YYYYMMDD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// The relative date value of the right hand side. The value field - /// will override this field when both are present. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public RelativeDate relativeValue - { - get - { - return this.relativeValueField; - } - set - { - this.relativeValueField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Supported rule operator for date type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DateRuleItem.DateOperator", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum DateRuleItemDateOperator - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - EQUALS = 1, - NOT_EQUAL = 2, - BEFORE = 3, - AFTER = 4, - } - - - /// An atomic rule fragment. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class RuleItem - { - private object itemField; - - [System.Xml.Serialization.XmlElementAttribute("DateRuleItem", typeof(DateRuleItem), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("NumberRuleItem", typeof(NumberRuleItem), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("StringRuleItem", typeof(StringRuleItem), Order = 0)] - public object Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - } - - - /// A group of rule items that are ANDed together before version V201705. Starting - /// from version V201705, rule item groups will be grouped together based on Rule#getRuleType(). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class RuleItemGroup - { - private RuleItem[] itemsField; - - /// Before version V201705, rule items are ANDed together. Starting from version - /// V201705, rule items will be grouped together based on Rule#getRuleType(). The minimum size of this collection is 1. The maximum size of - /// this collection is 1000. This - /// field must contain distinct elements. This field must not contain null elements. - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute("items", Order = 0)] - public RuleItem[] items - { - get - { - return this.itemsField; - } - set - { - this.itemsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A client defined rule based on custom parameters sent by web sites. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class Rule - { - private RuleItemGroup[] groupsField; - - private UserListRuleTypeEnumsEnum ruleTypeField; - - private bool ruleTypeFieldSpecified; - - /// List of rule item groups that defines this rule. Rule item groups are ORed - /// together for evaluation before version V201705. Starting from version V201705, - /// rule item groups are grouped together based on #getRuleType() for evaluation. The minimum size of this collection is 1. This field must contain distinct - /// elements. This field must not - /// contain null elements. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute("groups", Order = 0)] - public RuleItemGroup[] groups - { - get - { - return this.groupsField; - } - set - { - this.groupsField = value; - } - } - - /// Rule type is used to determine how to group rule item groups and rule items - /// inside rule item group. Currently, conjunctive normal form (AND of ORs) is only - /// supported for ExpressionRuleUserList. If no ruleType is specified, it will be - /// treated as disjunctive normal form (OR of ANDs), namely rule item groups are - /// ORed together and inside each rule item group, rule items are ANDed together. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public UserListRuleTypeEnumsEnum ruleType - { - get - { - return this.ruleTypeField; - } - set - { - this.ruleTypeField = value; - this.ruleTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool ruleTypeSpecified - { - get - { - return this.ruleTypeFieldSpecified; - } - set - { - this.ruleTypeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Rule based userlist rule type. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "UserListRuleTypeEnums.Enum", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListRuleTypeEnumsEnum - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// AND of ORs: Conjunctive normal form. - /// - CNF = 1, - /// OR of ANDs: Disjunctive normal form. - /// - DNF = 2, - } - - - /// Represents a conversion type used for building remarketing user lists. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserListConversionType - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private UserListConversionTypeCategory categoryField; - - private bool categoryFieldSpecified; - - /// Conversion type id - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Name of this conversion type - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The category of the ConversionType based on the location where the conversion - /// event was generated (from a user's perspective). This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public UserListConversionTypeCategory category - { - get - { - return this.categoryField; - } - set - { - this.categoryField = value; - this.categorySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool categorySpecified - { - get - { - return this.categoryFieldSpecified; - } - set - { - this.categoryFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// User can create only BOOMERANG_EVENT conversion types. For all other types - /// UserListService service will return OTHER. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "UserListConversionType.Category", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListConversionTypeCategory - { - BOOMERANG_EVENT = 0, - OTHER = 1, - } - - - /// An interface for a logical user list operand. A logical user list is a - /// combination of logical rules. Each rule is defined as a logical operator and a - /// list of operands. Those operands can be of type UserList. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class LogicalUserListOperand - { - private UserList itemField; - - [System.Xml.Serialization.XmlElementAttribute("UserList", Order = 0)] - public UserList Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - } - - - /// Represents a UserList object that is sent over the wire. This is a list of users - /// an account may target. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SimilarUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(RuleBasedUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExpressionRuleUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DateSpecificRuleUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CombinedRuleUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(BasicUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(LogicalUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CrmBasedUserList))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserList - { - private long idField; - - private bool idFieldSpecified; - - private bool isReadOnlyField; - - private bool isReadOnlyFieldSpecified; - - private string nameField; - - private string descriptionField; - - private UserListMembershipStatus statusField; - - private bool statusFieldSpecified; - - private string integrationCodeField; - - private AccessReason accessReasonField; - - private bool accessReasonFieldSpecified; - - private AccountUserListStatus accountUserListStatusField; - - private bool accountUserListStatusFieldSpecified; - - private long membershipLifeSpanField; - - private bool membershipLifeSpanFieldSpecified; - - private long sizeField; - - private bool sizeFieldSpecified; - - private SizeRange sizeRangeField; - - private bool sizeRangeFieldSpecified; - - private long sizeForSearchField; - - private bool sizeForSearchFieldSpecified; - - private SizeRange sizeRangeForSearchField; - - private bool sizeRangeForSearchFieldSpecified; - - private UserListType listTypeField; - - private bool listTypeFieldSpecified; - - private bool isEligibleForSearchField; - - private bool isEligibleForSearchFieldSpecified; - - private bool isEligibleForDisplayField; - - private bool isEligibleForDisplayFieldSpecified; - - private UserListClosingReason closingReasonField; - - private bool closingReasonFieldSpecified; - - private string userListTypeField; - - /// Id of this user list. This field can be - /// selected using the value "Id".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// A flag that indicates if a user may edit a list. Depends on the list ownership - /// and list type. For example, external remarketing user lists are not editable. - /// This field can be selected using the value - /// "IsReadOnly". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool isReadOnly - { - get - { - return this.isReadOnlyField; - } - set - { - this.isReadOnlyField = value; - this.isReadOnlySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isReadOnlySpecified - { - get - { - return this.isReadOnlyFieldSpecified; - } - set - { - this.isReadOnlyFieldSpecified = value; - } - } - - /// Name of this user list. Depending on its AccessReason, the user list name may - /// not be unique (e.g. if AccessReason=SHARED). This field can be selected using the value - /// "Name".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Description of this user list. This field - /// can be selected using the value "Description". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// Membership status of this user list. Indicates whether a user list is open or - /// active. Only open user lists can accumulate more users and can be targeted to. - /// This field can be selected using the value - /// "Status".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public UserListMembershipStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// An Id from external system. It is used by user list sellers to correlate ids on - /// their systems. This field can be selected - /// using the value "IntegrationCode".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string integrationCode - { - get - { - return this.integrationCodeField; - } - set - { - this.integrationCodeField = value; - } - } - - /// Indicates the reason this account has been granted access to the list. The - /// reason can be Shared, Owned, Licensed or Subscribed. This field can be selected using the value - /// "AccessReason".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public AccessReason accessReason - { - get - { - return this.accessReasonField; - } - set - { - this.accessReasonField = value; - this.accessReasonSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool accessReasonSpecified - { - get - { - return this.accessReasonFieldSpecified; - } - set - { - this.accessReasonFieldSpecified = value; - } - } - - /// Indicates if this share is still active. When a UserList is shared with the user - /// this field is set to Active. Later the userList owner can decide to revoke the - /// share and make it Inactive. The default value of this field is set to Active. - /// This field can be selected using the value - /// "AccountUserListStatus".This field - /// can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public AccountUserListStatus accountUserListStatus - { - get - { - return this.accountUserListStatusField; - } - set - { - this.accountUserListStatusField = value; - this.accountUserListStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool accountUserListStatusSpecified - { - get - { - return this.accountUserListStatusFieldSpecified; - } - set - { - this.accountUserListStatusFieldSpecified = value; - } - } - - /// Number of days a user's cookie stays on your list since its most recent addition - /// to the list. This field must be between 0 and 540 inclusive. However, for CRM - /// based userlists, this field can be set to 10000 which means no expiration. - ///

It'll be ignored for LogicalUserList. This field can be selected using the value - /// "MembershipLifeSpan".This field can - /// be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public long membershipLifeSpan - { - get - { - return this.membershipLifeSpanField; - } - set - { - this.membershipLifeSpanField = value; - this.membershipLifeSpanSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool membershipLifeSpanSpecified - { - get - { - return this.membershipLifeSpanFieldSpecified; - } - set - { - this.membershipLifeSpanFieldSpecified = value; - } - } - - /// Estimated number of users in this user list, on the Google Display Network. This - /// value is null if the number of users has not yet been determined. This field can be selected using the value - /// "Size".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public long size - { - get - { - return this.sizeField; - } - set - { - this.sizeField = value; - this.sizeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sizeSpecified - { - get - { - return this.sizeFieldSpecified; - } - set - { - this.sizeFieldSpecified = value; - } - } - - /// Size range in terms of number of users of the UserList. This field can be selected using the value "SizeRange". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public SizeRange sizeRange - { - get - { - return this.sizeRangeField; - } - set - { - this.sizeRangeField = value; - this.sizeRangeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sizeRangeSpecified - { - get - { - return this.sizeRangeFieldSpecified; - } - set - { - this.sizeRangeFieldSpecified = value; - } - } - - /// Estimated number of users in this user list in the google.com domain. These are - /// the users available for targeting in search campaigns. This value is null if the - /// number of users has not yet been determined. This field can be selected using the value - /// "SizeForSearch".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public long sizeForSearch - { - get - { - return this.sizeForSearchField; - } - set - { - this.sizeForSearchField = value; - this.sizeForSearchSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sizeForSearchSpecified - { - get - { - return this.sizeForSearchFieldSpecified; - } - set - { - this.sizeForSearchFieldSpecified = value; - } - } - - /// Size range in terms of number of users of the UserList, for Search ads. This field can be selected using the value - /// "SizeRangeForSearch". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public SizeRange sizeRangeForSearch - { - get - { - return this.sizeRangeForSearchField; - } - set - { - this.sizeRangeForSearchField = value; - this.sizeRangeForSearchSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sizeRangeForSearchSpecified - { - get - { - return this.sizeRangeForSearchFieldSpecified; - } - set - { - this.sizeRangeForSearchFieldSpecified = value; - } - } - - /// Type of this list: remarketing/logical/external remarketing. This field can be selected using the value - /// "ListType".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public UserListType listType - { - get - { - return this.listTypeField; - } - set - { - this.listTypeField = value; - this.listTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool listTypeSpecified - { - get - { - return this.listTypeFieldSpecified; - } - set - { - this.listTypeFieldSpecified = value; - } - } - - /// A flag that indicates this user list is eligible for Google Search Network. - /// This field can be selected using the value - /// "IsEligibleForSearch".This field can - /// be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public bool isEligibleForSearch - { - get - { - return this.isEligibleForSearchField; - } - set - { - this.isEligibleForSearchField = value; - this.isEligibleForSearchSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isEligibleForSearchSpecified - { - get - { - return this.isEligibleForSearchFieldSpecified; - } - set - { - this.isEligibleForSearchFieldSpecified = value; - } - } - - /// A flag that indicates this user list is eligible for Display Network. This field can be selected using the value - /// "IsEligibleForDisplay".This field can - /// be filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 15)] - public bool isEligibleForDisplay - { - get - { - return this.isEligibleForDisplayField; - } - set - { - this.isEligibleForDisplayField = value; - this.isEligibleForDisplaySpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool isEligibleForDisplaySpecified - { - get - { - return this.isEligibleForDisplayFieldSpecified; - } - set - { - this.isEligibleForDisplayFieldSpecified = value; - } - } - - /// Indicating the reason why this user list membership status is closed. It is only - /// populated on lists that were automatically closed due to inactivity, and will be - /// cleared once the list membership status becomes open. This field can be selected using the value - /// "ClosingReason".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 16)] - public UserListClosingReason closingReason - { - get - { - return this.closingReasonField; - } - set - { - this.closingReasonField = value; - this.closingReasonSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool closingReasonSpecified - { - get - { - return this.closingReasonFieldSpecified; - } - set - { - this.closingReasonFieldSpecified = value; - } - } - - /// Indicates that this instance is a subtype of UserList. Although this field is - /// returned in the response, it is ignored on input and cannot be selected. Specify - /// xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("UserList.Type", Order = 17)] - public string UserListType - { - get - { - return this.userListTypeField; - } - set - { - this.userListTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field IsReadOnly = new Field("IsReadOnly", false, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Description = new Field("Description", false, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field IntegrationCode = new Field("IntegrationCode", true, true); - - public static readonly Field AccessReason = new Field("AccessReason", true, true); - - public static readonly Field AccountUserListStatus = new Field("AccountUserListStatus", true, true); - - public static readonly Field MembershipLifeSpan = new Field("MembershipLifeSpan", true, true); - - public static readonly Field Size = new Field("Size", true, true); - - public static readonly Field SizeRange = new Field("SizeRange", false, true); - - public static readonly Field SizeForSearch = new Field("SizeForSearch", true, true); - - public static readonly Field SizeRangeForSearch = new Field("SizeRangeForSearch", false, true); - - public static readonly Field ListType = new Field("ListType", true, true); - - public static readonly Field IsEligibleForSearch = new Field("IsEligibleForSearch", true, true); - - public static readonly Field IsEligibleForDisplay = new Field("IsEligibleForDisplay", true, true); - - public static readonly Field ClosingReason = new Field("ClosingReason", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field IsReadOnly = Fields.IsReadOnly; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Description = Fields.Description; - - public static readonly Field Status = Fields.Status; - - public static readonly Field IntegrationCode = Fields.IntegrationCode; - - public static readonly Field AccessReason = Fields.AccessReason; - - public static readonly Field AccountUserListStatus = Fields.AccountUserListStatus; - - public static readonly Field MembershipLifeSpan = Fields.MembershipLifeSpan; - - public static readonly Field Size = Fields.Size; - - public static readonly Field SizeRange = Fields.SizeRange; - - public static readonly Field SizeForSearch = Fields.SizeForSearch; - - public static readonly Field SizeRangeForSearch = Fields.SizeRangeForSearch; - - public static readonly Field ListType = Fields.ListType; - - public static readonly Field IsEligibleForSearch = Fields.IsEligibleForSearch; - - public static readonly Field IsEligibleForDisplay = Fields.IsEligibleForDisplay; - - public static readonly Field ClosingReason = Fields.ClosingReason; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field IntegrationCode = Fields.IntegrationCode; - - public static readonly Field AccessReason = Fields.AccessReason; - - public static readonly Field AccountUserListStatus = Fields.AccountUserListStatus; - - public static readonly Field MembershipLifeSpan = Fields.MembershipLifeSpan; - - public static readonly Field Size = Fields.Size; - - public static readonly Field SizeForSearch = Fields.SizeForSearch; - - public static readonly Field ListType = Fields.ListType; - - public static readonly Field IsEligibleForSearch = Fields.IsEligibleForSearch; - - public static readonly Field IsEligibleForDisplay = Fields.IsEligibleForDisplay; - - public static readonly Field ClosingReason = Fields.ClosingReason; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Membership status of the user list. This status indicates whether a user list - /// can accumulate more users and may be targeted to. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListMembershipStatus - { - /// Open status - list is accruing members and can be targeted to. - /// - OPEN = 0, - /// Closed status - No new members being added. Can not be used for targeting. - /// - CLOSED = 1, - } - - - /// This indicates the way the entity such as UserList is related to a user. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum AccessReason - { - /// The entity is owned by the user. - /// - OWNED = 0, - /// The entity is shared to the user. - /// - SHARED = 1, - /// The entity is licensed to the user. - /// - LICENSED = 2, - /// The user subscribed to the entity. - /// - SUBSCRIBED = 3, - } - - - /// Status in the AccountUserListStatus table. This indicates if the user list share - /// or the licensing of the userlist is still active. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum AccountUserListStatus - { - ACTIVE = 0, - INACTIVE = 1, - } - - - /// Size range in terms of number of users of a UserList/UserInterest. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum SizeRange - { - LESS_THAN_FIVE_HUNDRED = 0, - LESS_THAN_ONE_THOUSAND = 1, - ONE_THOUSAND_TO_TEN_THOUSAND = 2, - TEN_THOUSAND_TO_FIFTY_THOUSAND = 3, - FIFTY_THOUSAND_TO_ONE_HUNDRED_THOUSAND = 4, - ONE_HUNDRED_THOUSAND_TO_THREE_HUNDRED_THOUSAND = 5, - THREE_HUNDRED_THOUSAND_TO_FIVE_HUNDRED_THOUSAND = 6, - FIVE_HUNDRED_THOUSAND_TO_ONE_MILLION = 7, - ONE_MILLION_TO_TWO_MILLION = 8, - TWO_MILLION_TO_THREE_MILLION = 9, - THREE_MILLION_TO_FIVE_MILLION = 10, - FIVE_MILLION_TO_TEN_MILLION = 11, - TEN_MILLION_TO_TWENTY_MILLION = 12, - TWENTY_MILLION_TO_THIRTY_MILLION = 13, - THIRTY_MILLION_TO_FIFTY_MILLION = 14, - OVER_FIFTY_MILLION = 15, - } - - - /// The user list types - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListType - { - /// UNKNOWN value can not be passed as input. Used - /// for return value only. An enumeration could not be processed, typically due to - /// incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// UserList represented as a collection of conversion types. - /// - REMARKETING = 1, - /// UserList represented as a combination of other user lists/interests. - /// - LOGICAL = 2, - /// UserList created in the DoubleClick platform. - /// - EXTERNAL_REMARKETING = 3, - /// UserList associated with a rule. - /// - RULE_BASED = 4, - /// UserList with users similar to users of another UserList. - /// - SIMILAR = 5, - /// UserList of first party CRM data provided by advertiser in the form of emails or - /// other formats. - /// - CRM_BASED = 6, - } - - - /// Indicates the reason why the userlist was closed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListClosingReason - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The userlist was closed because of not being used for over one year. - /// - UNUSED_LIST = 1, - } - - - /// SimilarUserList is a list of users which are similar to users from another - /// UserList. These lists are readonly and automatically created by google. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class SimilarUserList : UserList - { - private long seedUserListIdField; - - private bool seedUserListIdFieldSpecified; - - private string seedUserListNameField; - - private string seedUserListDescriptionField; - - private UserListMembershipStatus seedUserListStatusField; - - private bool seedUserListStatusFieldSpecified; - - private long seedListSizeField; - - private bool seedListSizeFieldSpecified; - - /// Seed UserListId from which this list is derived. This field can be selected using the value - /// "SeedUserListId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: SET. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long seedUserListId - { - get - { - return this.seedUserListIdField; - } - set - { - this.seedUserListIdField = value; - this.seedUserListIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool seedUserListIdSpecified - { - get - { - return this.seedUserListIdFieldSpecified; - } - set - { - this.seedUserListIdFieldSpecified = value; - } - } - - /// Name of the seed user list. This field can - /// be selected using the value "SeedUserListName". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string seedUserListName - { - get - { - return this.seedUserListNameField; - } - set - { - this.seedUserListNameField = value; - } - } - - /// Description of this seed user list. This - /// field can be selected using the value "SeedUserListDescription". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string seedUserListDescription - { - get - { - return this.seedUserListDescriptionField; - } - set - { - this.seedUserListDescriptionField = value; - } - } - - /// Membership status of this seed user list. This field can be selected using the value - /// "SeedUserListStatus". This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public UserListMembershipStatus seedUserListStatus - { - get - { - return this.seedUserListStatusField; - } - set - { - this.seedUserListStatusField = value; - this.seedUserListStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool seedUserListStatusSpecified - { - get - { - return this.seedUserListStatusFieldSpecified; - } - set - { - this.seedUserListStatusFieldSpecified = value; - } - } - - /// Estimated number of users in this seed user list. This value is null if the - /// number of users has not yet been determined. This field can be selected using the value - /// "SeedListSize".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public long seedListSize - { - get - { - return this.seedListSizeField; - } - set - { - this.seedListSizeField = value; - this.seedListSizeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool seedListSizeSpecified - { - get - { - return this.seedListSizeFieldSpecified; - } - set - { - this.seedListSizeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : UserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field SeedUserListId = new Field("SeedUserListId", true, true); - - public static readonly Field SeedUserListName = new Field("SeedUserListName", false, true); - - public static readonly Field SeedUserListDescription = new Field("SeedUserListDescription", false, true); - - public static readonly Field SeedUserListStatus = new Field("SeedUserListStatus", false, true); - - public static readonly Field SeedListSize = new Field("SeedListSize", true, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : UserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field SeedUserListId = Fields.SeedUserListId; - - public static readonly Field SeedUserListName = Fields.SeedUserListName; - - public static readonly Field SeedUserListDescription = Fields.SeedUserListDescription; - - public static readonly Field SeedUserListStatus = Fields.SeedUserListStatus; - - public static readonly Field SeedListSize = Fields.SeedListSize; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : UserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field SeedUserListId = Fields.SeedUserListId; - - public static readonly Field SeedListSize = Fields.SeedListSize; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Representation of a userlist that is generated by a rule. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExpressionRuleUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(DateSpecificRuleUserList))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CombinedRuleUserList))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class RuleBasedUserList : UserList - { - private RuleBasedUserListPrepopulationStatus prepopulationStatusField; - - private bool prepopulationStatusFieldSpecified; - - /// Status of pre-population. The field is default to NONE if not set which means - /// the previous users will not be considered. If set to REQUESTED, past site - /// visitors or app users who match the list definition will be included in the list - /// (works on the Display Network only). This will only pre-populate past users - /// within up to the last 30 days, depending on the list's membership duration and - /// the date when the remarketing tag is added. The status will be updated to - /// FINISHED once request is processed, or FAILED if the request fails. This field can be selected using the value - /// "PrepopulationStatus". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public RuleBasedUserListPrepopulationStatus prepopulationStatus - { - get - { - return this.prepopulationStatusField; - } - set - { - this.prepopulationStatusField = value; - this.prepopulationStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool prepopulationStatusSpecified - { - get - { - return this.prepopulationStatusFieldSpecified; - } - set - { - this.prepopulationStatusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : UserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field PrepopulationStatus = new Field("PrepopulationStatus", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : UserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field PrepopulationStatus = Fields.PrepopulationStatus; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : UserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The status of pre-population - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "RuleBasedUserList.PrepopulationStatus", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum RuleBasedUserListPrepopulationStatus - { - NONE = 0, - REQUESTED = 1, - FINISHED = 2, - FAILED = 3, - } - - - /// Visitors of a page. The page visit is defined by one boolean rule expression. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class ExpressionRuleUserList : RuleBasedUserList - { - private Rule ruleField; - - /// Boolean rule that defines this user list. The rule consists of a list of rule - /// item groups and each rule item group consists of a list of rule items. All the - /// rule item groups are ORed together for evaluation before version V201705. - /// Starting from version V201705, the group operator is based on Rule#getRuleType(). This field is selected by - /// default. This field can be selected using - /// the value "ExpressionListRule". This - /// field is required and should not be null when it is contained - /// within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Rule rule - { - get - { - return this.ruleField; - } - set - { - this.ruleField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : RuleBasedUserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ExpressionListRule = new Field("ExpressionListRule", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : RuleBasedUserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ExpressionListRule = Fields.ExpressionListRule; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : RuleBasedUserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Visitors of a page during specific dates. The visiting periods are defined as - /// follows:
  • between startDate (inclusive) and - /// endDate (inclusive);
  • before endDate - /// (exclusive) with startDate = 2000-01-01;
  • after - /// startDate (exclusive) with endDate = 2037-12-30.
  • - ///
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class DateSpecificRuleUserList : RuleBasedUserList - { - private Rule ruleField; - - private string startDateField; - - private string endDateField; - - /// Boolean rule that defines visitor of a page. This field is selected by default. - /// This field can be selected using the value - /// "DateSpecificListRule". This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Rule rule - { - get - { - return this.ruleField; - } - set - { - this.ruleField = value; - } - } - - /// Start date of users visit. If set to 20000101, then includes all - /// users before endDate. The date's format should be YYYYMMDD. This - /// field is selected by default. This field can - /// be selected using the value "DateSpecificListStartDate". This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string startDate - { - get - { - return this.startDateField; - } - set - { - this.startDateField = value; - } - } - - /// End date of users visit. If set to 20371230, then includes all - /// users after startDate. The date's format should be YYYYMMDD. This - /// field is selected by default. This field can - /// be selected using the value "DateSpecificListEndDate". This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string endDate - { - get - { - return this.endDateField; - } - set - { - this.endDateField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : RuleBasedUserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field DateSpecificListRule = new Field("DateSpecificListRule", false, true); - - public static readonly Field DateSpecificListStartDate = new Field("DateSpecificListStartDate", false, true); - - public static readonly Field DateSpecificListEndDate = new Field("DateSpecificListEndDate", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : RuleBasedUserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field DateSpecificListRule = Fields.DateSpecificListRule; - - public static readonly Field DateSpecificListStartDate = Fields.DateSpecificListStartDate; - - public static readonly Field DateSpecificListEndDate = Fields.DateSpecificListEndDate; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : RuleBasedUserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Users defined by combining two rules, left operand and right operand. There are - /// two operators: AND where left operand and right operand have to be true; AND_NOT - /// where left operand is true but right operand is false. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CombinedRuleUserList : RuleBasedUserList - { - private Rule leftOperandField; - - private Rule rightOperandField; - - private CombinedRuleUserListRuleOperator ruleOperatorField; - - private bool ruleOperatorFieldSpecified; - - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Rule leftOperand - { - get - { - return this.leftOperandField; - } - set - { - this.leftOperandField = value; - } - } - - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Rule rightOperand - { - get - { - return this.rightOperandField; - } - set - { - this.rightOperandField = value; - } - } - - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public CombinedRuleUserListRuleOperator ruleOperator - { - get - { - return this.ruleOperatorField; - } - set - { - this.ruleOperatorField = value; - this.ruleOperatorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool ruleOperatorSpecified - { - get - { - return this.ruleOperatorFieldSpecified; - } - set - { - this.ruleOperatorFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : RuleBasedUserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : RuleBasedUserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : RuleBasedUserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Logical operator connecting two rules. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CombinedRuleUserList.RuleOperator", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CombinedRuleUserListRuleOperator - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - AND = 1, - AND_NOT = 2, - } - - - /// User list targeting as a collection of conversion types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class BasicUserList : UserList - { - private UserListConversionType[] conversionTypesField; - - /// Conversion types associated with this user list. This field can be selected using the value "ConversionTypes". - /// - [System.Xml.Serialization.XmlElementAttribute("conversionTypes", Order = 0)] - public UserListConversionType[] conversionTypes - { - get - { - return this.conversionTypesField; - } - set - { - this.conversionTypesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : UserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ConversionTypes = new Field("ConversionTypes", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : UserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ConversionTypes = Fields.ConversionTypes; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : UserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a user list that is a custom combination of user lists and user - /// interests. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class LogicalUserList : UserList - { - private UserListLogicalRule[] rulesField; - - /// Logical list rules that define this user list. The rules are defined as logical - /// operator (ALL/ANY/NONE) and a list of user lists. All the rules are anded for - /// the evaluation. Required for ADD operation. This field can be selected using the value "Rules". - /// - [System.Xml.Serialization.XmlElementAttribute("rules", Order = 0)] - public UserListLogicalRule[] rules - { - get - { - return this.rulesField; - } - set - { - this.rulesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : UserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Rules = new Field("Rules", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : UserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Rules = Fields.Rules; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : UserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A user list logical rule. A rule has a logical operator (and/or/not) and a list - /// of operands that can be user lists or user interests. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserListLogicalRule - { - private UserListLogicalRuleOperator operatorField; - - private bool operatorFieldSpecified; - - private LogicalUserListOperand[] ruleOperandsField; - - /// The logical operator of the rule. This field - /// is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UserListLogicalRuleOperator @operator - { - get - { - return this.operatorField; - } - set - { - this.operatorField = value; - this.operatorSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool operatorSpecified - { - get - { - return this.operatorFieldSpecified; - } - set - { - this.operatorFieldSpecified = value; - } - } - - /// The list of operands of the rule. This - /// field must not contain elements. This field must contain at least one element. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute("ruleOperands", Order = 1)] - public LogicalUserListOperand[] ruleOperands - { - get - { - return this.ruleOperandsField; - } - set - { - this.ruleOperandsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "UserListLogicalRule.Operator", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListLogicalRuleOperator - { - /// And - all of the operands. - /// - ALL = 0, - /// Or - at least one of the operands. - /// - ANY = 1, - /// Not - none of the operands. - /// - NONE = 2, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 3, - } - - - /// UserList of CRM users provided by the advertiser. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CrmBasedUserList : UserList - { - private string appIdField; - - private CustomerMatchUploadKeyType uploadKeyTypeField; - - private bool uploadKeyTypeFieldSpecified; - - private CrmDataSourceType dataSourceTypeField; - - private bool dataSourceTypeFieldSpecified; - - private DataUploadResult dataUploadResultField; - - /// A string that uniquely identifies a mobile application from which the data was - /// collected to AdWords API. For iOS, the ID string is the 9 digit string that - /// appears at the end of an App Store URL (e.g., "476943146" for "Flood-It! 2" - /// whose App Store link is http://itunes.apple.com/us/app/flood-it!-2/id476943146). - /// For Android, the ID string is the application's package name (e.g., - /// "com.labpixies.colordrips" for "Color Drips" given Google Play link - /// https://play.google.com/store/apps/details?id=com.labpixies.colordrips). - /// Required when creating CrmBasedUserList for uploading mobile advertising IDs. - /// This field can be selected using the value - /// "AppId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string appId - { - get - { - return this.appIdField; - } - set - { - this.appIdField = value; - } - } - - /// Matching key type of the list. This field is read only and set on the first - /// upload by API. Mixed data types are not allowed on the same list. From v201802, - /// this field will be required for an ADD operation. This field can be selected using the value "UploadKeyType". - /// This field is read only and will be ignored - /// when sent to the API for the following Operators: - /// SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public CustomerMatchUploadKeyType uploadKeyType - { - get - { - return this.uploadKeyTypeField; - } - set - { - this.uploadKeyTypeField = value; - this.uploadKeyTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool uploadKeyTypeSpecified - { - get - { - return this.uploadKeyTypeFieldSpecified; - } - set - { - this.uploadKeyTypeFieldSpecified = value; - } - } - - /// Data source of the list. Default value is FIRST_PARTY. Only whitelisted - /// customers can create third party sourced crm lists. This field can be selected using the value - /// "DataSourceType".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public CrmDataSourceType dataSourceType - { - get - { - return this.dataSourceTypeField; - } - set - { - this.dataSourceTypeField = value; - this.dataSourceTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool dataSourceTypeSpecified - { - get - { - return this.dataSourceTypeFieldSpecified; - } - set - { - this.dataSourceTypeFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "DataUploadResult". This field is read - /// only and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public DataUploadResult dataUploadResult - { - get - { - return this.dataUploadResultField; - } - set - { - this.dataUploadResultField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : UserList.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AppId = new Field("AppId", false, true); - - public static readonly Field UploadKeyType = new Field("UploadKeyType", false, true); - - public static readonly Field DataSourceType = new Field("DataSourceType", true, true); - - public static readonly Field DataUploadResult = new Field("DataUploadResult", false, true); - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : UserList.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AppId = Fields.AppId; - - public static readonly Field UploadKeyType = Fields.UploadKeyType; - - public static readonly Field DataSourceType = Fields.DataSourceType; - - public static readonly Field DataUploadResult = Fields.DataUploadResult; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : UserList.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field DataSourceType = Fields.DataSourceType; - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Enum to indicate what type of data are the user list's members matched from. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CustomerMatchUploadKeyType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Members are matched from customer info such as email address, phone number or - /// physical address. - /// - CONTACT_INFO = 1, - /// Members are matched from advertiser generated and assigned user id. - /// - CRM_ID = 2, - /// Members are matched from mobile advertising ids. - /// - MOBILE_ADVERTISING_ID = 3, - } - - - /// Enum to indicate source of CRM upload data. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CrmDataSourceType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The uploaded data is first party data. - /// - FIRST_PARTY = 1, - /// The uploaded data is from third party credit bureau. - /// - THIRD_PARTY_CREDIT_BUREAU = 2, - /// The uploaded data is from third party voter file. - /// - THIRD_PARTY_VOTER_FILE = 3, - } - - - /// A class represents the data upload result for CRM based lists. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class DataUploadResult - { - private UserListUploadStatus uploadStatusField; - - private bool uploadStatusFieldSpecified; - - private UserListUploadStatus removeAllStatusField; - - private bool removeAllStatusFieldSpecified; - - /// Indicates status of the upload operation. Upload operation is triggered when removeAll is not set to true and operator is "ADD" or "REMOVE". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UserListUploadStatus uploadStatus - { - get - { - return this.uploadStatusField; - } - set - { - this.uploadStatusField = value; - this.uploadStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool uploadStatusSpecified - { - get - { - return this.uploadStatusFieldSpecified; - } - set - { - this.uploadStatusFieldSpecified = value; - } - } - - /// Indicates status of the remove-all operation. Remove-all operation is triggered - /// when removeAll is set to true and - /// operator is "REMOVE". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public UserListUploadStatus removeAllStatus - { - get - { - return this.removeAllStatusField; - } - set - { - this.removeAllStatusField = value; - this.removeAllStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool removeAllStatusSpecified - { - get - { - return this.removeAllStatusFieldSpecified; - } - set - { - this.removeAllStatusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The status of the upload/remove-all operation on a CRM based UserList. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListUploadStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The upload/remove-all operation of this UserList is still in process. - /// - IN_PROCESS = 1, - /// The upload/remove-all operation of this UserList has succeeded. - /// - SUCCESS = 2, - /// The upload/remove-all operation of this UserList has failed. - /// - FAILURE = 3, - } - - - /// Contains a list of user lists resulting from the filtering and paging of the UserListService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserListPage : Page - { - private UserList[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public UserList[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents possible error codes in UserListService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserListError : ApiError - { - private UserListErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UserListErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "UserListError.Reason", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum UserListErrorReason - { - /// Creating and updating external remarketing user lists is not supported. - /// - EXTERNAL_REMARKETING_USER_LIST_MUTATE_NOT_SUPPORTED = 0, - /// Concrete type of user list (logical v.s. remarketing) is required for ADD and - /// SET operations. - /// - CONCRETE_TYPE_REQUIRED = 1, - /// Adding/updating user list conversion types requires specifying the conversion - /// type id. - /// - CONVERSION_TYPE_ID_REQUIRED = 2, - /// Remarketing user list cannot have duplicate conversion types. - /// - DUPLICATE_CONVERSION_TYPES = 3, - /// Conversion type is invalid/unknown. - /// - INVALID_CONVERSION_TYPE = 4, - /// User list description is empty or invalid - /// - INVALID_DESCRIPTION = 5, - /// User list name is empty or invalid. - /// - INVALID_NAME = 6, - /// Type of the UserList does not match. - /// - INVALID_TYPE = 7, - /// Can't use similar list in logical user list rule when operator is NONE. - /// - CAN_NOT_ADD_SIMILAR_LIST_AS_LOGICAL_LIST_NONE_OPERAND = 22, - /// Embedded logical user lists are not allowed. - /// - CAN_NOT_ADD_LOGICAL_LIST_AS_LOGICAL_LIST_OPERAND = 23, - /// User list rule operand is invalid. - /// - INVALID_USER_LIST_LOGICAL_RULE_OPERAND = 8, - /// Name is already being used for another user list for the account. - /// - NAME_ALREADY_USED = 9, - /// Name is required when creating a new conversion type. - /// - NEW_CONVERSION_TYPE_NAME_REQUIRED = 10, - /// The given conversion type name has been used. - /// - CONVERSION_TYPE_NAME_ALREADY_USED = 21, - /// Only an owner account may edit a user list. - /// - OWNERSHIP_REQUIRED_FOR_SET = 11, - /// Removing user lists is not supported. - /// - REMOVE_NOT_SUPPORTED = 12, - /// The user list of the type is not mutable - /// - USER_LIST_MUTATE_NOT_SUPPORTED = 13, - /// Rule is invalid. - /// - INVALID_RULE = 14, - /// The specified date range is empty. - /// - INVALID_DATE_RANGE = 15, - /// A userlist which is privacy sensitive or legal rejected cannot be mutated by - /// external users. - /// - CAN_NOT_MUTATE_SENSITIVE_USERLIST = 19, - /// Maximum number of rulebased user lists a customer can have. - /// - MAX_NUM_RULEBASED_USERLISTS = 17, - /// BasicUserList's billable record field cannot be modified once it is set. - /// - CANNOT_MODIFY_BILLABLE_RECORD_COUNT = 20, - /// appId field can only be set when uploadKeyType is MOBILE_ADVERTISING_ID. - /// - APP_ID_NOT_ALLOWED = 24, - /// appId field must be set when uploadKeyType is MOBILE_ADVERTISING_ID. - /// - APP_ID_NOT_SET = 25, - USERLIST_NAME_IS_RESERVED_FOR_SYSTEM_LIST = 26, - /// Default generic error. - /// - USER_LIST_SERVICE_ERROR = 18, - } - - - /// Represents possible error codes from . - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class MutateMembersError : ApiError - { - private MutateMembersErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MutateMembersErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Reasons - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "MutateMembersError.Reason", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum MutateMembersErrorReason - { - UNKNOWN = 0, - UNSUPPORTED_METHOD = 1, - INVALID_USER_LIST_ID = 2, - INVALID_USER_LIST_TYPE = 3, - INVALID_DATA_TYPE = 4, - INVALID_SHA256_FORMAT = 5, - OPERATOR_CONFLICT_FOR_SAME_USER_LIST_ID = 6, - INVALID_REMOVEALL_OPERATION = 7, - INVALID_OPERATION_ORDER = 8, - MISSING_MEMBER_IDENTIFIER = 9, - INCOMPATIBLE_UPLOAD_KEY_TYPE = 10, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface")] - public interface AdwordsUserListServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.UserListPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdwordsUserListService.mutateResponse mutate(Wrappers.AdwordsUserListService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdwordsUserListService.mutateRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdwordsUserListService.mutateMembersResponse mutateMembers(Wrappers.AdwordsUserListService.mutateMembersRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateMembersAsync(Wrappers.AdwordsUserListService.mutateMembersRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.UserListPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// UserList operations for adding/updating UserList entities. The following Operators are supported: ADD and SET. The REMOVE operator is - /// not supported. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserListOperation : Operation - { - private UserList operandField; - - /// UserList to operate on This field is required - /// and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public UserList operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation representing a request to add or remove members from a user list. The - /// following Operators are supported: ADD and REMOVE. The - /// SET operator is not supported. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class MutateMembersOperation : Operation - { - private MutateMembersOperand operandField; - - /// The mutate members operand to operate on. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MutateMembersOperand operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operand containing user list id and members to be added or removed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class MutateMembersOperand - { - private long userListIdField; - - private bool userListIdFieldSpecified; - - private bool removeAllField; - - private bool removeAllFieldSpecified; - - private Member[] membersListField; - - /// The id of the user list. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long userListId - { - get - { - return this.userListIdField; - } - set - { - this.userListIdField = value; - this.userListIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool userListIdSpecified - { - get - { - return this.userListIdFieldSpecified; - } - set - { - this.userListIdFieldSpecified = value; - } - } - - /// Set to indicate a remove-all operation which will remove all members from the - /// user list. Can only be set with and when set to true #members must be null or empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public bool removeAll - { - get - { - return this.removeAllField; - } - set - { - this.removeAllField = value; - this.removeAllSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool removeAllSpecified - { - get - { - return this.removeAllFieldSpecified; - } - set - { - this.removeAllFieldSpecified = value; - } - } - - /// A list of members to be added or removed.

If #removeAll is true, this list must be - /// null or empty. Otherwise, this field is required and there must be - /// at least one member. The maximum size of - /// this collection is 1000000. This - /// field must not contain null elements.

- ///
- [System.Xml.Serialization.XmlElementAttribute("membersList", Order = 2)] - public Member[] membersList - { - get - { - return this.membersListField; - } - set - { - this.membersListField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Class that holds user list member identifiers. The following types of member - /// identifier are supported:
  • Contact info (email, phone number, - /// address)
  • Mobile advertising ID
  • User IDs generated and assigned - /// by advertiser
A list can be uploaded with only one type of data and - /// once uploaded will not accept any other ID types. - ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class Member - { - private string hashedEmailField; - - private string mobileIdField; - - private string hashedPhoneNumberField; - - private AddressInfo addressInfoField; - - private string userIdField; - - /// Hashed email address using SHA-256 hash function after normalization. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string hashedEmail - { - get - { - return this.hashedEmailField; - } - set - { - this.hashedEmailField = value; - } - } - - /// Mobile device ID (advertising ID/IDFA). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string mobileId - { - get - { - return this.mobileIdField; - } - set - { - this.mobileIdField = value; - } - } - - /// Hashed phone number using SHA-256 hash function after normalization. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string hashedPhoneNumber - { - get - { - return this.hashedPhoneNumberField; - } - set - { - this.hashedPhoneNumberField = value; - } - } - - /// Address info. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public AddressInfo addressInfo - { - get - { - return this.addressInfoField; - } - set - { - this.addressInfoField = value; - } - } - - /// Advertiser generated and assigned user ID. Accessible to whitelisted US - /// customers only. The length of this string - /// should be between 1 and 512, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string userId - { - get - { - return this.userIdField; - } - set - { - this.userIdField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Address identifier of a user list member. Accessible for whitelisted customers - /// only. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class AddressInfo - { - private string hashedFirstNameField; - - private string hashedLastNameField; - - private string countryCodeField; - - private string zipCodeField; - - /// First name of the member, which is hashed as SHA-256 after normalized (Lowercase - /// all characters; Remove any extra spaces before, after, and in between). This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string hashedFirstName - { - get - { - return this.hashedFirstNameField; - } - set - { - this.hashedFirstNameField = value; - } - } - - /// Last name of the member, which is hashed as SHA-256 after normalized (lower case - /// only and no punctuation). This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string hashedLastName - { - get - { - return this.hashedLastNameField; - } - set - { - this.hashedLastNameField = value; - } - } - - /// 2-letter country code in ISO-3166-1 alpha-2 of the member's address. This field is required and should not be - /// null. The length of - /// this string should be between 2 and 2, inclusive. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string countryCode - { - get - { - return this.countryCodeField; - } - set - { - this.countryCodeField = value; - } - } - - /// Zip code of the member's address. This field - /// is required and should not be null. This string must not be empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string zipCode - { - get - { - return this.zipCodeField; - } - set - { - this.zipCodeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the UserListService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class UserListReturnValue : ListReturnValue - { - private UserList[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public UserList[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - /// A container for return value from method. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class MutateMembersReturnValue - { - private UserList[] userListsField; - - /// The user lists associated in mutate members operations. - /// - [System.Xml.Serialization.XmlElementAttribute("userLists", Order = 0)] - public UserList[] userLists - { - get - { - return this.userListsField; - } - set - { - this.userListsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdwordsUserListServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service which is used to manage user lists. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdwordsUserListService : AdWordsSoapClient, IAdwordsUserListService - { - /// Creates a new instance of the - /// class. - public AdwordsUserListService() - { - } - - /// Creates a new instance of the - /// class. - public AdwordsUserListService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public AdwordsUserListService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdwordsUserListService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdwordsUserListService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the list of user lists that meet the selector criteria. - /// the selector specifying the UserLists to return. - /// a list of UserList entities which meet the selector criteria. - /// if problems occurred while fetching - /// UserList information. - public virtual Google.Api.Ads.AdWords.v201806.UserListPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdwordsUserListService.mutateResponse Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface.mutate(Wrappers.AdwordsUserListService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies a list of mutate operations (i.e. add, set): Add - creates a set of user - /// lists Set - updates a set of user lists Remove - not supported - /// the operations to apply - /// a list of UserList objects - public virtual Google.Api.Ads.AdWords.v201806.UserListReturnValue mutate(Google.Api.Ads.AdWords.v201806.UserListOperation[] operations) - { - Wrappers.AdwordsUserListService.mutateRequest inValue = new Wrappers.AdwordsUserListService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdwordsUserListService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface.mutateAsync(Wrappers.AdwordsUserListService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.UserListOperation[] operations) - { - Wrappers.AdwordsUserListService.mutateRequest inValue = new Wrappers.AdwordsUserListService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdwordsUserListService.mutateMembersResponse Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface.mutateMembers(Wrappers.AdwordsUserListService.mutateMembersRequest request) - { - return base.Channel.mutateMembers(request); - } - - /// Mutate members of user lists by either adding or removing their lists of - /// members. The following Operators are supported: ADD and - /// REMOVE. The SET operator is not supported.

Note that operations cannot have - /// same user list id but different operators.

- ///
the mutate members operations to apply - /// a list of UserList objects - /// when there are one or more errors with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.MutateMembersReturnValue mutateMembers(Google.Api.Ads.AdWords.v201806.MutateMembersOperation[] operations) - { - Wrappers.AdwordsUserListService.mutateMembersRequest inValue = new Wrappers.AdwordsUserListService.mutateMembersRequest(); - inValue.operations = operations; - Wrappers.AdwordsUserListService.mutateMembersResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface) (this)).mutateMembers(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface.mutateMembersAsync(Wrappers.AdwordsUserListService.mutateMembersRequest request) - { - return base.Channel.mutateMembersAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateMembersAsync(Google.Api.Ads.AdWords.v201806.MutateMembersOperation[] operations) - { - Wrappers.AdwordsUserListService.mutateMembersRequest inValue = new Wrappers.AdwordsUserListService.mutateMembersRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdwordsUserListServiceInterface) (this)).mutateMembersAsync(inValue)).Result.rval); - } - - /// Returns the list of user lists that match the query. - /// The SQL-like AWQL query string - /// A list of UserList - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.UserListPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignSharedSetService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignSharedSetOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignSharedSetOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignSharedSetReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignSharedSetReturnValue rval) - { - this.rval = rval; - } - } - } - /// CampaignSharedSets are used for managing the shared sets associated with a - /// campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignSharedSet - { - private long sharedSetIdField; - - private bool sharedSetIdFieldSpecified; - - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private string sharedSetNameField; - - private SharedSetType sharedSetTypeField; - - private bool sharedSetTypeFieldSpecified; - - private string campaignNameField; - - private CampaignSharedSetStatus statusField; - - private bool statusFieldSpecified; - - /// This field can be selected using the value - /// "SharedSetId".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long sharedSetId - { - get - { - return this.sharedSetIdField; - } - set - { - this.sharedSetIdField = value; - this.sharedSetIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sharedSetIdSpecified - { - get - { - return this.sharedSetIdFieldSpecified; - } - set - { - this.sharedSetIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "CampaignId".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "SharedSetName". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string sharedSetName - { - get - { - return this.sharedSetNameField; - } - set - { - this.sharedSetNameField = value; - } - } - - /// This field can be selected using the value - /// "SharedSetType".This field can be - /// filtered on. This field may only be - /// set to NEGATIVE_KEYWORDS for campaign channel type SHOPPING. This field may only be set to - /// NEGATIVE_PLACEMENTS for campaign channel subtype DISPLAY_MOBILE_APP. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public SharedSetType sharedSetType - { - get - { - return this.sharedSetTypeField; - } - set - { - this.sharedSetTypeField = value; - this.sharedSetTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sharedSetTypeSpecified - { - get - { - return this.sharedSetTypeFieldSpecified; - } - set - { - this.sharedSetTypeFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "CampaignName". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string campaignName - { - get - { - return this.campaignNameField; - } - set - { - this.campaignNameField = value; - } - } - - /// This field can be selected using the value - /// "Status".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public CampaignSharedSetStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field SharedSetId = new Field("SharedSetId", true, true); - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field SharedSetName = new Field("SharedSetName", false, true); - - public static readonly Field SharedSetType = new Field("SharedSetType", true, true); - - public static readonly Field CampaignName = new Field("CampaignName", false, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field SharedSetId = Fields.SharedSetId; - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field SharedSetName = Fields.SharedSetName; - - public static readonly Field SharedSetType = Fields.SharedSetType; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field SharedSetId = Fields.SharedSetId; - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field SharedSetType = Fields.SharedSetType; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Enumerates the different types of shared sets. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SharedSetType - { - NEGATIVE_KEYWORDS = 0, - NEGATIVE_PLACEMENTS = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// Status of association between campaign and shared set. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignSharedSet.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignSharedSetStatus - { - ENABLED = 0, - REMOVED = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// Contains a list of associations between campaigns and shared sets resulting from - /// the filtering and paging of CampaignSharedSetService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignSharedSetPage : NullStatsPage - { - private CampaignSharedSet[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignSharedSet[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Represents error codes for the CampaignSharedSetService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignSharedSetError : ApiError - { - private CampaignSharedSetErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignSharedSetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Error reasons - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignSharedSetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignSharedSetErrorReason - { - CAMPAIGN_SHARED_SET_DOES_NOT_EXIST = 0, - UNKNOWN = 2, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignSharedSetServiceInterface")] - public interface CampaignSharedSetServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignSharedSetPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignSharedSetService.mutateResponse mutate(Wrappers.CampaignSharedSetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignSharedSetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignSharedSetPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operations for adding/updating CampaignSharedSet entities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignSharedSetOperation : Operation - { - private CampaignSharedSet operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignSharedSet operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the CampaignSharedSetService#mutate call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignSharedSetReturnValue : ListReturnValue - { - private CampaignSharedSet[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignSharedSet[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignSharedSetServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignSharedSetServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// This service is used for managing associations between entities - /// and Campaign entities. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignSharedSetService : AdWordsSoapClient, ICampaignSharedSetService - { - /// Creates a new instance of the - /// class. - public CampaignSharedSetService() - { - } - - /// Creates a new instance of the - /// class. - public CampaignSharedSetService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public CampaignSharedSetService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignSharedSetService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CampaignSharedSetService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of CampaignSharedSets based on the given selector. - /// the selector specifying the query - /// a list of CampaignSharedSet entities that meet the criterion specified - /// by the selector - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.CampaignSharedSetPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignSharedSetService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignSharedSetServiceInterface.mutate(Wrappers.CampaignSharedSetService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. - /// the operations to apply - /// the modified list of CampaignSharedSet associations - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.CampaignSharedSetReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignSharedSetOperation[] operations) - { - Wrappers.CampaignSharedSetService.mutateRequest inValue = new Wrappers.CampaignSharedSetService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignSharedSetService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignSharedSetServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignSharedSetServiceInterface.mutateAsync(Wrappers.CampaignSharedSetService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignSharedSetOperation[] operations) - { - Wrappers.CampaignSharedSetService.mutateRequest inValue = new Wrappers.CampaignSharedSetService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignSharedSetServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of CampaignSharedSets that match the query. - /// The SQL-like AWQL query string - /// s A list of CampaignSharedSets - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignSharedSetPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.SharedCriterionService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.SharedCriterionOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.SharedCriterionOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.SharedCriterionReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.SharedCriterionReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a criterion belonging to a shared set. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedCriterion - { - private long sharedSetIdField; - - private bool sharedSetIdFieldSpecified; - - private Criterion criterionField; - - private bool negativeField; - - private bool negativeFieldSpecified; - - /// This field can be selected using the value - /// "SharedSetId".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long sharedSetId - { - get - { - return this.sharedSetIdField; - } - set - { - this.sharedSetIdField = value; - this.sharedSetIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sharedSetIdSpecified - { - get - { - return this.sharedSetIdFieldSpecified; - } - set - { - this.sharedSetIdFieldSpecified = value; - } - } - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// This field can be selected using the value - /// "Negative".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool negative - { - get - { - return this.negativeField; - } - set - { - this.negativeField = value; - this.negativeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool negativeSpecified - { - get - { - return this.negativeFieldSpecified; - } - set - { - this.negativeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field SharedSetId = new Field("SharedSetId", true, true); - - public static readonly Field Negative = new Field("Negative", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field SharedSetId = Fields.SharedSetId; - - public static readonly Field Negative = Fields.Negative; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field SharedSetId = Fields.SharedSetId; - - public static readonly Field Negative = Fields.Negative; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a list of shared set criteria results filtered and sorted as specified - /// in the SharedCriterionService#get call - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedCriterionPage : Page - { - private SharedCriterion[] entriesField; - - /// The result entries in this page - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public SharedCriterion[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents error codes for the SharedCriterionService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedCriterionError : ApiError - { - private SharedCriterionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SharedCriterionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Error reasons - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SharedCriterionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SharedCriterionErrorReason - { - EXCEEDS_CRITERIA_LIMIT = 0, - INCORRECT_CRITERION_TYPE = 1, - /// Cannot add the same crietrion as positive and negative in the same shared set. - /// - CANNOT_TARGET_AND_EXCLUDE = 2, - /// Negative shared set type requires a negative shared set criterion. - /// - NEGATIVE_CRITERION_REQUIRED = 3, - /// Concrete type of criterion (e.g., keyword and placement) is required for ADD - /// operations. - /// - CONCRETE_TYPE_REQUIRED = 5, - UNKNOWN = 4, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.SharedCriterionServiceInterface")] - public interface SharedCriterionServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.SharedCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.SharedCriterionService.mutateResponse mutate(Wrappers.SharedCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.SharedCriterionService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.SharedCriterionPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation for adding/removing a criterion from a shared set. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedCriterionOperation : Operation - { - private SharedCriterion operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SharedCriterion operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Container for the return value from the SharedSetCriterionService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedCriterionReturnValue : ListReturnValue - { - private SharedCriterion[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public SharedCriterion[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface SharedCriterionServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.SharedCriterionServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Manages which criteria are associated with shared sets. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class SharedCriterionService : AdWordsSoapClient, ISharedCriterionService - { - /// Creates a new instance of the - /// class. - public SharedCriterionService() - { - } - - /// Creates a new instance of the - /// class. - public SharedCriterionService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public SharedCriterionService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public SharedCriterionService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public SharedCriterionService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of SharedCriterion that meets the selector criteria. - /// filters the criteria returned - /// The list of SharedCriterion - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.SharedCriterionPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.SharedCriterionService.mutateResponse Google.Api.Ads.AdWords.v201806.SharedCriterionServiceInterface.mutate(Wrappers.SharedCriterionService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, removes criteria in a shared set. - /// A list of unique operations - /// The list of updated SharedCriterion, returned in the same order as the - /// operations array. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.SharedCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.SharedCriterionOperation[] operations) - { - Wrappers.SharedCriterionService.mutateRequest inValue = new Wrappers.SharedCriterionService.mutateRequest(); - inValue.operations = operations; - Wrappers.SharedCriterionService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.SharedCriterionServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.SharedCriterionServiceInterface.mutateAsync(Wrappers.SharedCriterionService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.SharedCriterionOperation[] operations) - { - Wrappers.SharedCriterionService.mutateRequest inValue = new Wrappers.SharedCriterionService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.SharedCriterionServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of SharedCriterion that match the query. - /// The SQL-like AWQL query string. - /// A list of SharedCriterion. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.SharedCriterionPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.SharedSetService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.SharedSetOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.SharedSetOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.SharedSetReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.SharedSetReturnValue rval) - { - this.rval = rval; - } - } - } - /// SharedSets are used for sharing entities across multiple campaigns under the - /// same account. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedSet - { - private long sharedSetIdField; - - private bool sharedSetIdFieldSpecified; - - private string nameField; - - private SharedSetType typeField; - - private bool typeFieldSpecified; - - private int memberCountField; - - private bool memberCountFieldSpecified; - - private int referenceCountField; - - private bool referenceCountFieldSpecified; - - private SharedSetStatus statusField; - - private bool statusFieldSpecified; - - /// This field can be selected using the value - /// "SharedSetId".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long sharedSetId - { - get - { - return this.sharedSetIdField; - } - set - { - this.sharedSetIdField = value; - this.sharedSetIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool sharedSetIdSpecified - { - get - { - return this.sharedSetIdFieldSpecified; - } - set - { - this.sharedSetIdFieldSpecified = value; - } - } - - /// Shared Sets must have names that are unique among active shared sets of the same - /// type. This field can be selected using the - /// value "Name".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. The length of this string should be between 1 and 255, inclusive, - /// in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// This field can be selected using the value - /// "Type".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API for the following Operators: - /// REMOVE and SET. This field is required - /// and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public SharedSetType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// The number of entities in the shared set. This field can be selected using the value "MemberCount". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int memberCount - { - get - { - return this.memberCountField; - } - set - { - this.memberCountField = value; - this.memberCountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool memberCountSpecified - { - get - { - return this.memberCountFieldSpecified; - } - set - { - this.memberCountFieldSpecified = value; - } - } - - /// The number of campaigns that actively use the shared set. This field can be selected using the value - /// "ReferenceCount". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public int referenceCount - { - get - { - return this.referenceCountField; - } - set - { - this.referenceCountField = value; - this.referenceCountSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool referenceCountSpecified - { - get - { - return this.referenceCountFieldSpecified; - } - set - { - this.referenceCountFieldSpecified = value; - } - } - - /// The status of the shared set. This field can - /// be selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public SharedSetStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field SharedSetId = new Field("SharedSetId", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Type = new Field("Type", true, true); - - public static readonly Field MemberCount = new Field("MemberCount", false, true); - - public static readonly Field ReferenceCount = new Field("ReferenceCount", false, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field SharedSetId = Fields.SharedSetId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Type = Fields.Type; - - public static readonly Field MemberCount = Fields.MemberCount; - - public static readonly Field ReferenceCount = Fields.ReferenceCount; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field SharedSetId = Fields.SharedSetId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Type = Fields.Type; - - public static readonly Field Status = Fields.Status; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SharedSet.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SharedSetStatus - { - ENABLED = 0, - REMOVED = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// Contains a list of criterion lists resulting from the filtering and paging of SharedSetService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedSetPage : NullStatsPage - { - private SharedSet[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public SharedSet[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NullStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NullStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NullStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents error codes for the SharedSetService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedSetError : ApiError - { - private SharedSetErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SharedSetErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Error reasons - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SharedSetError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SharedSetErrorReason - { - CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE = 0, - DUPLICATE_NAME = 1, - /// Customer Manager is not allowed to create shared set of this type. - /// - MANAGER_CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE = 5, - SHARED_SET_REMOVED = 2, - SHARED_SET_IN_USE = 3, - UNKNOWN = 4, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.SharedSetServiceInterface")] - public interface SharedSetServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.SharedSetPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.SharedSetService.mutateResponse mutate(Wrappers.SharedSetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.SharedSetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.SharedSetPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operations for adding/updating SharedSet entities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedSetOperation : Operation - { - private SharedSet operandField; - - /// CriterionList to operate on This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SharedSet operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the SharedSetService#mutate call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedSetReturnValue : ListReturnValue - { - private SharedSet[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public SharedSet[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface SharedSetServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.SharedSetServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// This service is used for managing SharedSet entities - /// themselves and the association between sets and campaigns. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class SharedSetService : AdWordsSoapClient, ISharedSetService - { - /// Creates a new instance of the class. - /// - public SharedSetService() - { - } - - /// Creates a new instance of the class. - /// - public SharedSetService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public SharedSetService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public SharedSetService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public SharedSetService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of SharedSets based on the given selector. - /// the selector specifying the query - /// a list of SharedSet entities that meet the criterion specified by the - /// selector - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.SharedSetPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.SharedSetService.mutateResponse Google.Api.Ads.AdWords.v201806.SharedSetServiceInterface.mutate(Wrappers.SharedSetService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. - /// the operations to apply - /// the modified CriterionList entities - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.SharedSetReturnValue mutate(Google.Api.Ads.AdWords.v201806.SharedSetOperation[] operations) - { - Wrappers.SharedSetService.mutateRequest inValue = new Wrappers.SharedSetService.mutateRequest(); - inValue.operations = operations; - Wrappers.SharedSetService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.SharedSetServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.SharedSetServiceInterface.mutateAsync(Wrappers.SharedSetService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.SharedSetOperation[] operations) - { - Wrappers.SharedSetService.mutateRequest inValue = new Wrappers.SharedSetService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.SharedSetServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of SharedSet entities that match the query. - /// The SQL-like AWQL query string - /// s A list of SharedSet entities - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.SharedSetPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.AdGroupService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdGroupOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdGroupReturnValue rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabel", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupLabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateLabelRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelRequest(Google.Api.Ads.AdWords.v201806.AdGroupLabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateLabelResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateLabelResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupLabelReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateLabelResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateLabelResponse(Google.Api.Ads.AdWords.v201806.AdGroupLabelReturnValue rval) - { - this.rval = rval; - } - } - } - /// The ad rotation mode wrapper class to allow for clearing of the AdRotationMode - /// field. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupAdRotationMode - { - private AdRotationMode adRotationModeField; - - private bool adRotationModeFieldSpecified; - - /// This field can be selected using the value - /// "AdRotationMode".This field can be - /// filtered on. This field may only be - /// set to OPTIMIZE for campaign channel subtype UNIVERSAL_APP_CAMPAIGN. - /// This field may only be set to the values: - /// OPTIMIZE, ROTATE_FOREVER. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdRotationMode adRotationMode - { - get - { - return this.adRotationModeField; - } - set - { - this.adRotationModeField = value; - this.adRotationModeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adRotationModeSpecified - { - get - { - return this.adRotationModeFieldSpecified; - } - set - { - this.adRotationModeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AdRotationMode = new Field("AdRotationMode", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AdRotationMode = Fields.AdRotationMode; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AdRotationMode = Fields.AdRotationMode; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Indicates the ad rotation mode selected for the creatives in the ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdRotationMode - { - /// Invalid type. Should not be used except for detecting values that are incorrect, - /// or values that are not yet known to the user. Used for return value only. An enumeration could not be processed, - /// typically due to incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// Adwords will optimize your adgroups based on clicks or conversions based on your - /// bidding strategy - /// - OPTIMIZE = 1, - /// Ads in the adgroups should rotate evenly forever - /// - ROTATE_FOREVER = 2, - } - - - /// Settings for the Display - /// Campaign Optimizer, initially termed "Explorer". - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExplorerAutoOptimizerSetting : Setting - { - private bool optInField; - - private bool optInFieldSpecified; - - /// This field may only be set to true for - /// campaign channel type DISPLAY with campaign channel subtype - /// DISPLAY_SMART_CAMPAIGN. This field - /// may only be set to true for campaign channel type SHOPPING with campaign channel - /// subtype SHOPPING_GOAL_OPTIMIZED_ADS. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public bool optIn - { - get - { - return this.optInField; - } - set - { - this.optInField = value; - this.optInSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool optInSpecified - { - get - { - return this.optInFieldSpecified; - } - set - { - this.optInFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Setting.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Setting.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Setting.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroup - { - private long idField; - - private bool idFieldSpecified; - - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private string campaignNameField; - - private string nameField; - - private AdGroupStatus statusField; - - private bool statusFieldSpecified; - - private Setting[] settingsField; - - private Label[] labelsField; - - private String_StringMapEntry[] forwardCompatibilityMapField; - - private BiddingStrategyConfiguration biddingStrategyConfigurationField; - - private CriterionTypeGroup contentBidCriterionTypeGroupField; - - private bool contentBidCriterionTypeGroupFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private CustomParameters urlCustomParametersField; - - private AdGroupType adGroupTypeField; - - private bool adGroupTypeFieldSpecified; - - private AdGroupAdRotationMode adGroupAdRotationModeField; - - /// ID of this ad group. This field can be - /// selected using the value "Id".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API for the following Operators: ADD. This field is required and should not be null when it is - /// contained within Operators : SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// ID of the campaign with which this ad group is associated. This field can be selected using the value - /// "CampaignId".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// Name of the campaign with which this ad group is associated. This field can be selected using the value - /// "CampaignName".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string campaignName - { - get - { - return this.campaignNameField; - } - set - { - this.campaignNameField = value; - } - } - - /// Name of this ad group (at most 255 UTF-8 full-width characters). This field is - /// required and should not be null for ADD operations from v201309 - /// version. This field can be selected using - /// the value "Name".This field can be - /// filtered on. AdGroup names must not - /// contain any null (code point 0x0), NL line feed (code point 0xA) or carriage - /// return (code point 0xD) characters. This is checked by the regular expression - /// '[^\x00\x0A\x0D]*'. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Status of this ad group. This field can be - /// selected using the value "Status".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public AdGroupStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// List of settings for the AdGroup. This field - /// can be selected using the value "Settings". - /// - [System.Xml.Serialization.XmlElementAttribute("settings", Order = 5)] - public Setting[] settings - { - get - { - return this.settingsField; - } - set - { - this.settingsField = value; - } - } - - /// Labels that are attached to the AdGroup. To associate an - /// existing Label to an existing AdGroup, - /// use AdGroupService#mutateLabel with ADD - /// operator. To remove an associated Label from the AdGroup, use AdGroupService#mutateLabel with REMOVE - /// operator. To filter on Labels, use one of Predicate.Operator#CONTAINS_ALL, Predicate.Operator#CONTAINS_ANY, Predicate.Operator#CONTAINS_NONE - /// operators with a list of Label ids. This field can be selected using the value "Labels".This field can be filtered on. This field may not be set for campaign channel - /// subtype UNIVERSAL_APP_CAMPAIGN. This - /// field is read only and will be ignored when sent to the API for the following Operators: REMOVE and SET. - /// - [System.Xml.Serialization.XmlElementAttribute("labels", Order = 6)] - public Label[] labels - { - get - { - return this.labelsField; - } - set - { - this.labelsField = value; - } - } - - /// This Map provides a place to put new features and settings in older versions of - /// the AdWords API in the rare instance we need to introduce a new feature in an - /// older version. It is presently unused. Do not set a value. - /// - [System.Xml.Serialization.XmlElementAttribute("forwardCompatibilityMap", Order = 7)] - public String_StringMapEntry[] forwardCompatibilityMap - { - get - { - return this.forwardCompatibilityMapField; - } - set - { - this.forwardCompatibilityMapField = value; - } - } - - /// Bidding configuration for this ad group. To set the bids on the ad groups use BiddingStrategyConfiguration#bids. - /// Multiple bids can be set on ad group at the same time. Only the bids that apply - /// to the effective bidding strategy will be used. Effective bidding strategy is - /// considered to be the directly attached strategy or inherited campaign level - /// strategy when there?s no directly attached strategy. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public BiddingStrategyConfiguration biddingStrategyConfiguration - { - get - { - return this.biddingStrategyConfigurationField; - } - set - { - this.biddingStrategyConfigurationField = value; - } - } - - /// Allows advertisers to specify a criteria dimension on which to place absolute - /// bids. This is only applicable for campaigns that target only the content network - /// and not search. This field can be selected - /// using the value "ContentBidCriterionTypeGroup".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public CriterionTypeGroup contentBidCriterionTypeGroup - { - get - { - return this.contentBidCriterionTypeGroupField; - } - set - { - this.contentBidCriterionTypeGroupField = value; - this.contentBidCriterionTypeGroupSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool contentBidCriterionTypeGroupSpecified - { - get - { - return this.contentBidCriterionTypeGroupFieldSpecified; - } - set - { - this.contentBidCriterionTypeGroupFieldSpecified = value; - } - } - - /// ID of the base campaign from which this draft/trial adgroup was created. This - /// field is only returned on get requests. This - /// field can be selected using the value "BaseCampaignId". This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// ID of the base adgroup from which this draft/trial adgroup was created. For base - /// adgroups this is equal to the adgroup ID. If the adgroup was created in the - /// draft or trial and has no corresponding base adgroup, this field is null. This - /// field is readonly and will be ignored when sent to the API. This field can be selected using the value - /// "BaseAdGroupId". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// URL template for constructing a tracking URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "TrackingUrlTemplate".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// URL template for appending params to Final URL.

On update, empty string ("") - /// indicates to clear the field. This field can - /// be selected using the value "FinalUrlSuffix".This field can be filtered on.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. This field can be selected using the value - /// "UrlCustomParameters". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public CustomParameters urlCustomParameters - { - get - { - return this.urlCustomParametersField; - } - set - { - this.urlCustomParametersField = value; - } - } - - /// This field can be selected using the value - /// "AdGroupType".This field can be - /// filtered on. This field may only be - /// set to SHOPPING_GOAL_OPTIMIZED_ADS for campaign channel type SHOPPING with - /// campaign channel subtype SHOPPING_GOAL_OPTIMIZED_ADS. This field is read only and will be ignored when - /// sent to the API for the following Operators: SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 15)] - public AdGroupType adGroupType - { - get - { - return this.adGroupTypeField; - } - set - { - this.adGroupTypeField = value; - this.adGroupTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupTypeSpecified - { - get - { - return this.adGroupTypeFieldSpecified; - } - set - { - this.adGroupTypeFieldSpecified = value; - } - } - - /// The ad rotation mode to specify how often the ads in the ad group will be served - /// relative to one another. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 16)] - public AdGroupAdRotationMode adGroupAdRotationMode - { - get - { - return this.adGroupAdRotationModeField; - } - set - { - this.adGroupAdRotationModeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field CampaignName = new Field("CampaignName", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field Settings = new Field("Settings", false, true); - - public static readonly Field Labels = new Field("Labels", true, true); - - public static readonly Field ContentBidCriterionTypeGroup = new Field("ContentBidCriterionTypeGroup", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", false, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", false, true); - - public static readonly Field TrackingUrlTemplate = new Field("TrackingUrlTemplate", true, true); - - public static readonly Field FinalUrlSuffix = new Field("FinalUrlSuffix", true, true); - - public static readonly Field UrlCustomParameters = new Field("UrlCustomParameters", false, true); - - public static readonly Field AdGroupType = new Field("AdGroupType", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Settings = Fields.Settings; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field ContentBidCriterionTypeGroup = Fields.ContentBidCriterionTypeGroup; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static readonly Field TrackingUrlTemplate = Fields.TrackingUrlTemplate; - - public static readonly Field FinalUrlSuffix = Fields.FinalUrlSuffix; - - public static readonly Field UrlCustomParameters = Fields.UrlCustomParameters; - - public static readonly Field AdGroupType = Fields.AdGroupType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field CampaignName = Fields.CampaignName; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Labels = Fields.Labels; - - public static readonly Field ContentBidCriterionTypeGroup = Fields.ContentBidCriterionTypeGroup; - - public static readonly Field TrackingUrlTemplate = Fields.TrackingUrlTemplate; - - public static readonly Field FinalUrlSuffix = Fields.FinalUrlSuffix; - - public static readonly Field AdGroupType = Fields.AdGroupType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of this ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroup.Status", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Active. - /// - ENABLED = 1, - /// Paused. - /// - PAUSED = 2, - /// Removed. - /// - REMOVED = 3, - } - - - /// Defines types of an ad group, specific to a particular campaign channel type. - /// This type drives validations that restrict which entities can be added to the ad - /// group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Default AdGroup type for Search Campaigns - /// - SEARCH_STANDARD = 1, - /// AdGroup type for Dynamic Search Ads campaigns. - /// - SEARCH_DYNAMIC_ADS = 5, - /// Default AdGroup type for Display Campaigns - /// - DISPLAY_STANDARD = 2, - /// Default AdGroup type for Shopping Campaigns serving standard products ads. - /// - SHOPPING_PRODUCT_ADS = 3, - /// AdGroups limited to serving Showcase/Merchant ads in shopping results. - /// - SHOPPING_SHOWCASE_ADS = 4, - /// Ad group type for Smart Shopping Campaigns. - /// - SHOPPING_GOAL_OPTIMIZED_ADS = 7, - } - - - /// Contains a subset of ad groups resulting from the filtering and paging of the AdGroupService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupPage : Page - { - private AdGroup[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroup[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents possible error codes in AdGroupService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupServiceError : ApiError - { - private AdGroupServiceErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupServiceErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the adgroup service error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdGroupServiceError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdGroupServiceErrorReason - { - /// AdGroup with the same name already exists for the campaign. - /// - DUPLICATE_ADGROUP_NAME = 0, - /// AdGroup name is not valid. - /// - INVALID_ADGROUP_NAME = 1, - /// Cannot remove an adgroup, adgroup status can be marked removed using set - /// operator. - /// - USE_SET_OPERATOR_AND_MARK_STATUS_TO_REMOVED = 2, - /// Advertiser is not allowed to target sites or set site bids that are not on the - /// Google Search Network. - /// - ADVERTISER_NOT_ON_CONTENT_NETWORK = 3, - /// Bid amount is too big. - /// - BID_TOO_BIG = 4, - /// AdGroup bid does not match the campaign's bidding strategy. - /// - BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH = 5, - /// AdGroup name is required for Add. - /// - MISSING_ADGROUP_NAME = 6, - /// No link found between the ad group and the label. - /// - ADGROUP_LABEL_DOES_NOT_EXIST = 7, - /// The label has already been attached to the ad group. - /// - ADGROUP_LABEL_ALREADY_EXISTS = 8, - /// The CriterionTypeGroup is not supported for the content bid dimension. - /// - INVALID_CONTENT_BID_CRITERION_TYPE_GROUP = 9, - /// The ad group type is not compatible with the campaign channel type. - /// - AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE = 10, - /// The ad group type is not supported in the country of sale of the campaign. - /// - ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY = 11, - /// Ad groups of AdGroupType.SEARCH_DYNAMIC_ADS can only be added to campaigns that - /// have DynamicSearchAdsSetting attached. - /// - CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 12, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface")] - public interface AdGroupServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupService.mutateResponse mutate(Wrappers.AdGroupService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdGroupService.mutateRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupService.mutateLabelResponse mutateLabel(Wrappers.AdGroupService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateLabelAsync(Wrappers.AdGroupService.mutateLabelRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// AdGroup operations for adding/updating/removing adgroups. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupOperation : Operation - { - private AdGroup operandField; - - /// AdGroup to operate on This field is required - /// and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroup operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operations for adding/removing labels from AdGroup. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupLabelOperation : Operation - { - private AdGroupLabel operandField; - - /// AdGroupLabel to operate on. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupLabel operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Manages the labels associated with an AdGroup. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupLabel - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private long labelIdField; - - private bool labelIdFieldSpecified; - - /// The id of the adGroup that the label is applied to. This field is required and should not be null when it is - /// contained within Operators : ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The id of an existing label to be applied to the ad group. This field is required and should not be - /// null when it is contained within Operators : - /// ADD, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long labelId - { - get - { - return this.labelIdField; - } - set - { - this.labelIdField = value; - this.labelIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool labelIdSpecified - { - get - { - return this.labelIdFieldSpecified; - } - set - { - this.labelIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupReturnValue : ListReturnValue - { - private AdGroup[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of AdGroups - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroup[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupService#mutateLabel call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupLabelReturnValue : ListReturnValue - { - private AdGroupLabel[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupLabel[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdGroupServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage ad groups. An ad group - /// organizes a set of ads and criteria together, and also provides the default bid for its criteria. One or more ad groups - /// belong to a campaign. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdGroupService : AdWordsSoapClient, IAdGroupService - { - /// Creates a new instance of the class. - /// - public AdGroupService() - { - } - - /// Creates a new instance of the class. - /// - public AdGroupService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdGroupService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of all the ad groups specified by the selector from the target - /// customer's account. - /// The selector specifying the AdGroups to return. - /// List of adgroups identified by the selector. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupService.mutateResponse Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface.mutate(Wrappers.AdGroupService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates, or removes ad groups.

Note: AdGroupOperation does not support the - /// operator. To remove an ad group, set its status to - /// REMOVED.

- ///
List of unique operations. The same ad group cannot be - /// specified in more than one operation. - /// The updated adgroups. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupOperation[] operations) - { - Wrappers.AdGroupService.mutateRequest inValue = new Wrappers.AdGroupService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdGroupService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface.mutateAsync(Wrappers.AdGroupService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupOperation[] operations) - { - Wrappers.AdGroupService.mutateRequest inValue = new Wrappers.AdGroupService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupService.mutateLabelResponse Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface.mutateLabel(Wrappers.AdGroupService.mutateLabelRequest request) - { - return base.Channel.mutateLabel(request); - } - - /// Adds labels to the ad group or removes labels from the ad group. - ///

ADD -- Apply an existing label to an existing ad group. The adGroupId must reference an - /// existing ad group. The labelId must reference - /// an existing label.

REMOVE -- Removes the - /// link between the specified ad group and a label.

- ///
the operations to apply. - /// a list of AdGroupLabels where each entry in - /// the list is the result of applying the operation in the input list with the same - /// index. For an add operation, the returned AdGroupLabel contains the AdGroupId - /// and the LabelId. In the case of a remove operation, the returned AdGroupLabel - /// will only have AdGroupId. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.AdGroupLabelOperation[] operations) - { - Wrappers.AdGroupService.mutateLabelRequest inValue = new Wrappers.AdGroupService.mutateLabelRequest(); - inValue.operations = operations; - Wrappers.AdGroupService.mutateLabelResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface) (this)).mutateLabel(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface.mutateLabelAsync(Wrappers.AdGroupService.mutateLabelRequest request) - { - return base.Channel.mutateLabelAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.AdGroupLabelOperation[] operations) - { - Wrappers.AdGroupService.mutateLabelRequest inValue = new Wrappers.AdGroupService.mutateLabelRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupServiceInterface) (this)).mutateLabelAsync(inValue)).Result.rval); - } - - /// Returns the list of ad groups that match the query. - /// The SQL-like AWQL query string - /// A list of adgroups - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.AdGroupPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.LabelService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.LabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.LabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.LabelReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.LabelReturnValue rval) - { - this.rval = rval; - } - } - } - /// Contains a subset of labels resulting from the filtering and paging of the LabelService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LabelPage : NoStatsPage - { - private Label[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Label[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : NoStatsPage.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : NoStatsPage.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : NoStatsPage.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Base error class for LabelService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LabelError : ApiError - { - private LabelErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public LabelErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the label error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "LabelError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum LabelErrorReason - { - /// Label name must be unique. - /// - DUPLICATE_NAME = 0, - /// Label names cannot be empty - /// - INVALID_LABEL_NAME = 1, - /// Invalid Label type. A specific type of Label is required. - /// - INVALID_LABEL_TYPE = 2, - /// Default error. Used for return value only. An - /// enumeration could not be processed, typically due to incompatibility with your - /// WSDL version. - /// - UNKNOWN = 3, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.LabelServiceInterface")] - public interface LabelServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.LabelPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.LabelService.mutateResponse mutate(Wrappers.LabelService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.LabelService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.LabelPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// An operation for adding, editing, removing Label. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LabelOperation : Operation - { - private Label operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Label operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from LabelService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class LabelReturnValue : ListReturnValue - { - private Label[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Label[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface LabelServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.LabelServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage labels. The light weight label, once created, can be - /// attached to campaign management entities such as campaigns, ad groups, - /// creatives, criterion and etc. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class LabelService : AdWordsSoapClient, ILabelService - { - /// Creates a new instance of the class. - /// - public LabelService() - { - } - - /// Creates a new instance of the class. - /// - public LabelService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public LabelService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public LabelService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public LabelService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of Labels. - /// The selector specifying the Labels to return. - /// The page containing the Labels which meet the - /// criteria specified by the selector. - /// when there is at least one error with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.LabelPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.LabelService.mutateResponse Google.Api.Ads.AdWords.v201806.LabelServiceInterface.mutate(Wrappers.LabelService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. - /// The operations to apply. The same Label cannot be specified in more than one operation. - /// The applied Labels. - /// when there is at least one error with the - /// request - public virtual Google.Api.Ads.AdWords.v201806.LabelReturnValue mutate(Google.Api.Ads.AdWords.v201806.LabelOperation[] operations) - { - Wrappers.LabelService.mutateRequest inValue = new Wrappers.LabelService.mutateRequest(); - inValue.operations = operations; - Wrappers.LabelService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.LabelServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.LabelServiceInterface.mutateAsync(Wrappers.LabelService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.LabelOperation[] operations) - { - Wrappers.LabelService.mutateRequest inValue = new Wrappers.LabelService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.LabelServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of Labels that match the query. - /// The SQL-like AWQL query string - /// s The page containing the Labels which match the - /// query. - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.LabelPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.AccountLabelService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AccountLabelOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AccountLabelOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/mcm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute("labels", IsNullable = false)] - public Google.Api.Ads.AdWords.v201806.AccountLabel[] rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AccountLabel[] rval) - { - this.rval = rval; - } - } - } - /// Contains a list of AccountLabels. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class AccountLabelPage - { - private AccountLabel[] labelsField; - - /// List of account labels. - /// - [System.Xml.Serialization.XmlElementAttribute("labels", Order = 0)] - public AccountLabel[] labels - { - get - { - return this.labelsField; - } - set - { - this.labelsField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a date. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Date - { - private int yearField; - - private bool yearFieldSpecified; - - private int monthField; - - private bool monthFieldSpecified; - - private int dayField; - - private bool dayFieldSpecified; - - /// Year (e.g., 2009) - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public int year - { - get - { - return this.yearField; - } - set - { - this.yearField = value; - this.yearSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool yearSpecified - { - get - { - return this.yearFieldSpecified; - } - set - { - this.yearFieldSpecified = value; - } - } - - /// Month (1..12) - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int month - { - get - { - return this.monthField; - } - set - { - this.monthField = value; - this.monthSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool monthSpecified - { - get - { - return this.monthFieldSpecified; - } - set - { - this.monthFieldSpecified = value; - } - } - - /// Day (1..31) - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int day - { - get - { - return this.dayField; - } - set - { - this.dayField = value; - this.daySpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool daySpecified - { - get - { - return this.dayFieldSpecified; - } - set - { - this.dayFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Errors for LabelService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class LabelServiceError : ApiError - { - private LabelServiceErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public LabelServiceErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "LabelServiceError.Reason", Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public enum LabelServiceErrorReason - { - /// The label name is empty. - /// - EMPTY_LABEL_NAME = 0, - /// The label name is longer than max allowed size. - /// - LABEL_NAME_TOO_LONG = 1, - /// The customer already has an active label with the same name. - /// - DUPLICATE_LABEL_NAME = 2, - /// The label name is reserved by the system. - /// - RESERVED_LABEL_NAME = 3, - /// The label cannot be deleted - /// - CANNOT_BE_DELETED = 4, - /// A customer cannot own more than 200 labels. - /// - TOO_MANY_LABELS = 5, - /// Label id was not found. - /// - INVALID_LABEL_ID = 6, - /// This customer cannot create labels. Only manager customers may create labels. - /// - CUSTOMER_CANNOT_CREATE_LABELS = 7, - /// An unknown enum value has been given for this error reason. - /// - SERVER_CLIENT_VERSION_MISMATCH = 8, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AccountLabelServiceInterface")] - public interface AccountLabelServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AccountLabelPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AccountLabelService.mutateResponse mutate(Wrappers.AccountLabelService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AccountLabelService.mutateRequest request); - } - - - /// Operation for adding, updating, or deleting a label. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/mcm/v201806")] - public partial class AccountLabelOperation : Operation - { - private AccountLabel operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AccountLabel operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AccountLabelServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AccountLabelServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service for creating, editing, and deleting labels that can be applied to - /// managed customers.

Labels created by a manager are not accessible to any - /// customers managed by this manager. Only manager customers may create these - /// labels.

Note that label access works a little differently in the API than - /// it does in the AdWords UI. In the UI, a manager will never see a submanager's - /// labels, and will always be using his own labels regardless of which managed - /// account he is viewing. In this API, like other API services, if you specify a - /// submanager as the effective account for the API request, then the request will - /// operate on the submanager's labels.

To apply a label to a managed - /// customer, see ManagedCustomerService#mutateLabel.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AccountLabelService : AdWordsSoapClient, IAccountLabelService - { - /// Creates a new instance of the class. - /// - public AccountLabelService() - { - } - - /// Creates a new instance of the class. - /// - public AccountLabelService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AccountLabelService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AccountLabelService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AccountLabelService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of labels specified by the selector for the authenticated user. - /// filters the list of labels to return - /// response containing lists of labels that meet all the criteria of the - /// selector - /// if a problem occurs fetching the - /// information requested - public virtual Google.Api.Ads.AdWords.v201806.AccountLabelPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AccountLabelService.mutateResponse Google.Api.Ads.AdWords.v201806.AccountLabelServiceInterface.mutate(Wrappers.AccountLabelService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Possible actions:
  • Create a new label - create a new Label and call mutate with ADD operator
  • Edit the label - /// name - set the appropriate fields in your Label and call - /// mutate with the SET operator. Null fields will be interpreted to mean "no - /// change"
  • Delete the label - call mutate with REMOVE operator
- ///
list of unique operations to be executed in a single - /// transaction, in the order specified. - /// the mutated labels, in the same order that they were in as the - /// parameter - /// if problems occurs while modifying label - /// information - public virtual Google.Api.Ads.AdWords.v201806.AccountLabel[] mutate(Google.Api.Ads.AdWords.v201806.AccountLabelOperation[] operations) - { - Wrappers.AccountLabelService.mutateRequest inValue = new Wrappers.AccountLabelService.mutateRequest(); - inValue.operations = operations; - Wrappers.AccountLabelService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AccountLabelServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AccountLabelServiceInterface.mutateAsync(Wrappers.AccountLabelService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AccountLabelOperation[] operations) - { - Wrappers.AccountLabelService.mutateRequest inValue = new Wrappers.AccountLabelService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AccountLabelServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.AdCustomizerFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdCustomizerFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdCustomizerFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdCustomizerFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdCustomizerFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// An attribute of an AdCustomizerFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerFeedAttribute - { - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private AdCustomizerFeedAttributeType typeField; - - private bool typeFieldSpecified; - - /// The ID of the attribute. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// The name of the attribute. This field is - /// required and should not be null when it is contained within Operators : ADD, SET. The length of this string should be between 1 and 30, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The type of data this attribute contains. This - /// field is required and should not be null when it is contained - /// within Operators : ADD, SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public AdCustomizerFeedAttributeType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Possible data types. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdCustomizerFeedAttribute.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdCustomizerFeedAttributeType - { - INTEGER = 0, - PRICE = 1, - DATE_TIME = 2, - STRING = 3, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 4, - } - - - /// A Feed which contains data used to populate ad customizers.

An - /// AdCustomizerFeed is a view of a regular Feed, but with some simplifications - /// intended to support the most common use cases.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerFeed - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private string feedNameField; - - private FeedStatus feedStatusField; - - private bool feedStatusFieldSpecified; - - private AdCustomizerFeedAttribute[] feedAttributesField; - - /// ID of the feed. This field can be selected - /// using the value "FeedId".This field - /// can be filtered on. This field is - /// required and should not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Name of the feed. This field can be selected - /// using the value "FeedName".This field - /// can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. The length of this string should be between 1 and 128, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string feedName - { - get - { - return this.feedNameField; - } - set - { - this.feedNameField = value; - } - } - - /// Status of the feed. This field can be - /// selected using the value "FeedStatus".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public FeedStatus feedStatus - { - get - { - return this.feedStatusField; - } - set - { - this.feedStatusField = value; - this.feedStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedStatusSpecified - { - get - { - return this.feedStatusFieldSpecified; - } - set - { - this.feedStatusFieldSpecified = value; - } - } - - /// The AdCustomizerFeed's schema. In SET operations, these attributes will be - /// considered new attributes and will be appended to the existing list of - /// attributes unless this list is an exact copy of the existing list (as would be - /// obtained via AdCustomizerFeedService#get). This field can be selected using the value - /// "FeedAttributes". This field - /// must not contain elements. This field is required and should not be null when it is - /// contained within Operators : ADD, SET. - /// - [System.Xml.Serialization.XmlElementAttribute("feedAttributes", Order = 3)] - public AdCustomizerFeedAttribute[] feedAttributes - { - get - { - return this.feedAttributesField; - } - set - { - this.feedAttributesField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field FeedId = new Field("FeedId", true, true); - - public static readonly Field FeedName = new Field("FeedName", true, true); - - public static readonly Field FeedStatus = new Field("FeedStatus", true, true); - - public static readonly Field FeedAttributes = new Field("FeedAttributes", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field FeedName = Fields.FeedName; - - public static readonly Field FeedStatus = Fields.FeedStatus; - - public static readonly Field FeedAttributes = Fields.FeedAttributes; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field FeedId = Fields.FeedId; - - public static readonly Field FeedName = Fields.FeedName; - - public static readonly Field FeedStatus = Fields.FeedStatus; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to AdCustomizerFeedService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerFeedPage : Page - { - private AdCustomizerFeed[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdCustomizerFeed[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// An error caused by an invalid ad customizer feed in an AdCustomizerFeedService - /// request. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerFeedError : ApiError - { - private AdCustomizerFeedErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The cause of this error. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdCustomizerFeedErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdCustomizerFeedError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdCustomizerFeedErrorReason - { - /// The key attribute cannot be added to an existing ad customizer feed. - /// - CANNOT_ADD_KEY_ATTRIBUTE = 0, - /// The feed is not an ad customizer feed. - /// - NOT_AD_CUSTOMIZER_FEED = 1, - /// Name of AdCustomizerFeed is not allowed. - /// - INVALID_FEED_NAME = 2, - /// Too many AdCustomizerFeedAttributes for an AdCustomizerFeed. - /// - TOO_MANY_FEED_ATTRIBUTES_FOR_FEED = 3, - /// The names of the AdCustomizerFeedAttributes must be unique. - /// - ATTRIBUTE_NAMES_NOT_UNIQUE = 4, - /// The given id refers to a removed Feed. Removed Feeds are immutable. - /// - FEED_DELETED = 5, - /// Feed name matches that of another active Feed. - /// - DUPLICATE_FEED_NAME = 6, - UNKNOWN = 7, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdCustomizerFeedServiceInterface")] - public interface AdCustomizerFeedServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdCustomizerFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdCustomizerFeedService.mutateResponse mutate(Wrappers.AdCustomizerFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdCustomizerFeedService.mutateRequest request); - } - - - /// Operation used to create or mutate an AdCustomizerFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerFeedOperation : Operation - { - private AdCustomizerFeed operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdCustomizerFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to AdCustomizerFeedService#mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCustomizerFeedReturnValue : ListReturnValue - { - private AdCustomizerFeed[] valueField; - - /// The resulting AdCustomizerFeeds. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdCustomizerFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdCustomizerFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdCustomizerFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to get and mutate Feeds that contain ad customizer data.

This - /// service is a convenience for creating and modifying ad customizer Feeds, but - /// such Feeds can also be managed using a combination of the Feed, FeedMapping, and - /// CustomerFeed services.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdCustomizerFeedService : AdWordsSoapClient, IAdCustomizerFeedService - { - /// Creates a new instance of the - /// class. - public AdCustomizerFeedService() - { - } - - /// Creates a new instance of the - /// class. - public AdCustomizerFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public AdCustomizerFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdCustomizerFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdCustomizerFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of AdCustomizerFeeds that meet the selector criteria. - /// Determines which AdCustomizerFeeds to return. If empty, - /// all AdCustomizerFeeds are returned. - /// The list of AdCustomizerFeeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdCustomizerFeedPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdCustomizerFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.AdCustomizerFeedServiceInterface.mutate(Wrappers.AdCustomizerFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, removes, or modifies AdCustomizerFeeds. - /// The operations to apply. - /// The resulting AdCustomizerFeeds. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdCustomizerFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdCustomizerFeedOperation[] operations) - { - Wrappers.AdCustomizerFeedService.mutateRequest inValue = new Wrappers.AdCustomizerFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdCustomizerFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdCustomizerFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdCustomizerFeedServiceInterface.mutateAsync(Wrappers.AdCustomizerFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdCustomizerFeedOperation[] operations) - { - Wrappers.AdCustomizerFeedService.mutateRequest inValue = new Wrappers.AdCustomizerFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdCustomizerFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.AdGroupExtensionSettingService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents one row in a price extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PriceTableRow - { - private string headerField; - - private string descriptionField; - - private UrlList finalUrlsField; - - private UrlList finalMobileUrlsField; - - private MoneyWithCurrency priceField; - - private PriceExtensionPriceUnit priceUnitField; - - private bool priceUnitFieldSpecified; - - /// Header text of this row. Required. The - /// length of this string should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string header - { - get - { - return this.headerField; - } - set - { - this.headerField = value; - } - } - - /// Description text of this row. Required. The length of this string should be between 1 and 25, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// A list of possible final URLs after all cross domain redirects. Required. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public UrlList finalUrls - { - get - { - return this.finalUrlsField; - } - set - { - this.finalUrlsField = value; - } - } - - /// A list of possible final mobile URLs after all cross domain redirects. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public UrlList finalMobileUrls - { - get - { - return this.finalMobileUrlsField; - } - set - { - this.finalMobileUrlsField = value; - } - } - - /// Price value of this row. Required. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public MoneyWithCurrency price - { - get - { - return this.priceField; - } - set - { - this.priceField = value; - } - } - - /// Price unit for this row. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public PriceExtensionPriceUnit priceUnit - { - get - { - return this.priceUnitField; - } - set - { - this.priceUnitField = value; - this.priceUnitSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool priceUnitSpecified - { - get - { - return this.priceUnitFieldSpecified; - } - set - { - this.priceUnitFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The price unit for a Price table item. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PriceExtensionPriceUnit - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Per hour. - /// - PER_HOUR = 1, - /// Per day. - /// - PER_DAY = 2, - /// Per week. - /// - PER_WEEK = 3, - /// Per month. - /// - PER_MONTH = 4, - /// Per year. - /// - PER_YEAR = 5, - /// Per night. - /// - PER_NIGHT = 7, - /// None is used for clearing the unit. - /// - NONE = 6, - } - - - /// Conversion type for a call extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CallConversionType - { - private long conversionTypeIdField; - - private bool conversionTypeIdFieldSpecified; - - /// The ID of an AdCallMetricsConversion object. This object contains the - /// phoneCallDuration field which is the minimum duration (in seconds) of a call to - /// be considered a conversion. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long conversionTypeId - { - get - { - return this.conversionTypeIdField; - } - set - { - this.conversionTypeIdField = value; - this.conversionTypeIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool conversionTypeIdSpecified - { - get - { - return this.conversionTypeIdFieldSpecified; - } - set - { - this.conversionTypeIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies the adgroup the request context must match in order for the feed item - /// to be considered eligible for serving (aka the targeted adgroup). E.g., if the - /// below adgroup targeting is set to adgroup = X, then the feed item can only serve - /// under adgroup X. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemAdGroupTargeting - { - private long targetingAdGroupIdField; - - private bool targetingAdGroupIdFieldSpecified; - - /// The ID of the adgroup to target. This field is - /// read only and will be ignored when sent to the API for the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long TargetingAdGroupId - { - get - { - return this.targetingAdGroupIdField; - } - set - { - this.targetingAdGroupIdField = value; - this.TargetingAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool TargetingAdGroupIdSpecified - { - get - { - return this.targetingAdGroupIdFieldSpecified; - } - set - { - this.targetingAdGroupIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Specifies the campaign the request context must match in order for the feed item - /// to be considered eligible for serving (aka the targeted campaign). E.g., if the - /// below campaign targeting is set to campaignId = X, then the feed item can only - /// serve under campaign X. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemCampaignTargeting - { - private long targetingCampaignIdField; - - private bool targetingCampaignIdFieldSpecified; - - /// The ID of the campaign to target. This field - /// is read only and will be ignored when sent to the API for the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long TargetingCampaignId - { - get - { - return this.targetingCampaignIdField; - } - set - { - this.targetingCampaignIdField = value; - this.TargetingCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool TargetingCampaignIdSpecified - { - get - { - return this.targetingCampaignIdFieldSpecified; - } - set - { - this.targetingCampaignIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a FeedItem schedule, which specifies a time interval on a given day - /// when the feed item may serve. The FeedItemSchedule times are in the account's - /// time zone. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemSchedule - { - private DayOfWeek dayOfWeekField; - - private bool dayOfWeekFieldSpecified; - - private int startHourField; - - private bool startHourFieldSpecified; - - private MinuteOfHour startMinuteField; - - private bool startMinuteFieldSpecified; - - private int endHourField; - - private bool endHourFieldSpecified; - - private MinuteOfHour endMinuteField; - - private bool endMinuteFieldSpecified; - - /// Day of the week the schedule applies to. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DayOfWeek dayOfWeek - { - get - { - return this.dayOfWeekField; - } - set - { - this.dayOfWeekField = value; - this.dayOfWeekSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool dayOfWeekSpecified - { - get - { - return this.dayOfWeekFieldSpecified; - } - set - { - this.dayOfWeekFieldSpecified = value; - } - } - - /// Starting hour in 24 hour time. This field must - /// be between 0 and 23, inclusive. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int startHour - { - get - { - return this.startHourField; - } - set - { - this.startHourField = value; - this.startHourSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool startHourSpecified - { - get - { - return this.startHourFieldSpecified; - } - set - { - this.startHourFieldSpecified = value; - } - } - - /// Interval starts these minutes after the starting hour. The value can be 0, 15, - /// 30, and 45. This field is required and should - /// not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public MinuteOfHour startMinute - { - get - { - return this.startMinuteField; - } - set - { - this.startMinuteField = value; - this.startMinuteSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool startMinuteSpecified - { - get - { - return this.startMinuteFieldSpecified; - } - set - { - this.startMinuteFieldSpecified = value; - } - } - - /// Ending hour in 24 hour time; 24 signifies end of the day and - /// subsequently endMinute must be 0. This field - /// must be between 0 and 24, inclusive. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int endHour - { - get - { - return this.endHourField; - } - set - { - this.endHourField = value; - this.endHourSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool endHourSpecified - { - get - { - return this.endHourFieldSpecified; - } - set - { - this.endHourFieldSpecified = value; - } - } - - /// Interval ends these minutes after the ending hour. The value can be 0, 15, 30, - /// and 45. This field is required and should not - /// be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public MinuteOfHour endMinute - { - get - { - return this.endMinuteField; - } - set - { - this.endMinuteField = value; - this.endMinuteSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool endMinuteSpecified - { - get - { - return this.endMinuteFieldSpecified; - } - set - { - this.endMinuteFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a FeedItem device preference. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class FeedItemDevicePreference - { - private long devicePreferenceField; - - private bool devicePreferenceFieldSpecified; - - /// CriterionId of the type of device the feed item is preferred to serve on. Only - /// CriterionId 30001 (mobile devices) is currently supported. If unspecified, the - /// device preference will be cleared indicating that the feed item is not preferred - /// for any device type. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long devicePreference - { - get - { - return this.devicePreferenceField; - } - set - { - this.devicePreferenceField = value; - this.devicePreferenceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool devicePreferenceSpecified - { - get - { - return this.devicePreferenceFieldSpecified; - } - set - { - this.devicePreferenceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains base extension feed item data for an extension in an extension feed - /// managed by AdWords. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(StructuredSnippetFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(SitelinkFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ReviewFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PromotionFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(PriceFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(MessageFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CalloutFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(CallFeedItem))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(AppFeedItem))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExtensionFeedItem - { - private long feedIdField; - - private bool feedIdFieldSpecified; - - private long feedItemIdField; - - private bool feedItemIdFieldSpecified; - - private FeedItemStatus statusField; - - private bool statusFieldSpecified; - - private FeedType feedTypeField; - - private bool feedTypeFieldSpecified; - - private string startTimeField; - - private string endTimeField; - - private FeedItemDevicePreference devicePreferenceField; - - private FeedItemSchedule[] schedulingField; - - private FeedItemCampaignTargeting campaignTargetingField; - - private FeedItemAdGroupTargeting adGroupTargetingField; - - private Keyword keywordTargetingField; - - private Location geoTargetingField; - - private FeedItemGeoRestriction geoTargetingRestrictionField; - - private FeedItemPolicySummary[] policySummariesField; - - private string extensionFeedItemTypeField; - - /// Id of this feed item's feed. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long feedId - { - get - { - return this.feedIdField; - } - set - { - this.feedIdField = value; - this.feedIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedIdSpecified - { - get - { - return this.feedIdFieldSpecified; - } - set - { - this.feedIdFieldSpecified = value; - } - } - - /// Id of the feed item. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long feedItemId - { - get - { - return this.feedItemIdField; - } - set - { - this.feedItemIdField = value; - this.feedItemIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedItemIdSpecified - { - get - { - return this.feedItemIdFieldSpecified; - } - set - { - this.feedItemIdFieldSpecified = value; - } - } - - /// Status of the feed item. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public FeedItemStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// The type of the feed containing this extension feed item data. The field will be - /// set by a subclass with a defined feed type. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public FeedType feedType - { - get - { - return this.feedTypeField; - } - set - { - this.feedTypeField = value; - this.feedTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool feedTypeSpecified - { - get - { - return this.feedTypeFieldSpecified; - } - set - { - this.feedTypeFieldSpecified = value; - } - } - - /// Start time in which this feed item is effective and can begin serving. The time - /// zone of startTime must either match the time zone of the account or be - /// unspecified where the time zone defaults to the account time zone. This field - /// may be null to indicate no start time restriction. The special value "00000101 - /// 000000" may be used to clear an existing start time. This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string startTime - { - get - { - return this.startTimeField; - } - set - { - this.startTimeField = value; - } - } - - /// End time in which this feed item is no longer effective and will stop serving. - /// The time zone of endTime must either match the time zone of the account or be - /// unspecified where the time zone defaults to the account time zone. This field - /// may be null to indicate no end time restriction. The special value "00000101 - /// 000000" may be used to clear an existing end time. This field is read only and will be ignored when sent to the API for - /// the following Operators: REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string endTime - { - get - { - return this.endTimeField; - } - set - { - this.endTimeField = value; - } - } - - /// Device preference for the feed item. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public FeedItemDevicePreference devicePreference - { - get - { - return this.devicePreferenceField; - } - set - { - this.devicePreferenceField = value; - } - } - - /// FeedItemScheduling specifying times for when the feed item may serve. On - /// retrieval or creation of the feed item, if the field is left null, no feed item - /// scheduling restrictions are placed on the feed item. On update, if the field is - /// left unspecified, the previous feedItemScheduling state will not be changed. On - /// update, if the field is set with a FeedItemScheduling with an empty - /// feedItemSchedules list, the scheduling will be cleared of all FeedItemSchedules - /// indicating the feed item has no scheduling restrictions. - /// - [System.Xml.Serialization.XmlArrayAttribute(Order = 7)] - [System.Xml.Serialization.XmlArrayItemAttribute("feedItemSchedules", IsNullable = false)] - public FeedItemSchedule[] scheduling - { - get - { - return this.schedulingField; - } - set - { - this.schedulingField = value; - } - } - - /// Campaign targeting specifying what campaign this extension can serve with. On - /// update, if the field is left unspecified, the previous campaign targeting state - /// will not be changed. On update, if the field is set with an empty - /// FeedItemCampaignTargeting, the campaign targeting will be cleared. Note: If - /// adGroupTargeting and campaignTargeting are set (either in the request or - /// pre-existing from a previous request), the targeted campaign must match the - /// targeted adgroup's campaign. If only adGroupTargeting is specified and there is - /// no campaignTargeting, then a campaignTargeting will be set to the targeted - /// adgroup's campaign. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public FeedItemCampaignTargeting campaignTargeting - { - get - { - return this.campaignTargetingField; - } - set - { - this.campaignTargetingField = value; - } - } - - /// Adgroup targeting specifying what adgroup this extension can serve with. On - /// update, if the field is left unspecified, the previous adgroup targeting state - /// will not be changed. On update, if the field is set with an empty - /// FeedItemAdGroupTargeting, the adgroup targeting will be cleared. Note: If - /// adGroupTargeting and campaignTargeting are set (either in the request or - /// pre-existing from a previous request), the targeted campaign must match the - /// targeted adgroup's campaign. If only adGroupTargeting is specified and there is - /// no campaignTargeting, then a campaignTargeting will be set to the targeted - /// adgroup's campaign. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public FeedItemAdGroupTargeting adGroupTargeting - { - get - { - return this.adGroupTargetingField; - } - set - { - this.adGroupTargetingField = value; - } - } - - /// Keyword targeting specifies what keyword this extension can serve with. On - /// update, if the field is left unspecified, the previous keyword targeting state - /// will not be changed. On update, if the field is set with a Keyword and without - /// Keyword.text set keyword targeting will be cleared. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public Keyword keywordTargeting - { - get - { - return this.keywordTargetingField; - } - set - { - this.keywordTargetingField = value; - } - } - - /// Geo targeting specifies what locations this extension can serve with. On update, - /// if the field is left unspecified, the previous geo targeting state will not be - /// changed. On update, if the field is set with a null value for criterionId, the - /// geo targeting will be cleared. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public Location geoTargeting - { - get - { - return this.geoTargetingField; - } - set - { - this.geoTargetingField = value; - } - } - - /// Geo targeting restriction specifies the type of location that can be used for - /// targeting. On update, if the field is left unspecified, the previous geo - /// targeting restriction state will not be changed. On update, if the field is set - /// with a null GeoRestriction enum, the geo targeting restriction will be cleared. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public FeedItemGeoRestriction geoTargetingRestriction - { - get - { - return this.geoTargetingRestrictionField; - } - set - { - this.geoTargetingRestrictionField = value; - } - } - - /// Summary of a feed item's offline validation, policy findings, and approval - /// results. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("policySummaries", Order = 13)] - public FeedItemPolicySummary[] policySummaries - { - get - { - return this.policySummariesField; - } - set - { - this.policySummariesField = value; - } - } - - /// Indicates that this instance is a subtype of ExtensionFeedItem. Although this - /// field is returned in the response, it is ignored on input and cannot be - /// selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("ExtensionFeedItem.Type", Order = 14)] - public string ExtensionFeedItemType - { - get - { - return this.extensionFeedItemTypeField; - } - set - { - this.extensionFeedItemTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Feed hard type. Values coincide with placeholder type id. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "Feed.Type", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum FeedType - { - NONE = 0, - /// Sitelink placeholder typed - /// - SITELINK = 1, - /// Call placeholder typed - /// - CALL = 2, - /// App placeholder typed - /// - APP = 3, - /// Review placeholder typed - /// - REVIEW = 4, - /// AdCustomizer placeholder typed - /// - AD_CUSTOMIZER = 5, - /// Callout placeholder typed - /// - CALLOUT = 6, - /// Structured snippets placeholder typed - /// - STRUCTURED_SNIPPET = 7, - /// Message placeholder typed - /// - MESSAGE = 9, - /// Price placeholder typed - /// - PRICE = 8, - /// Promotion placeholder typed - /// - PROMOTION = 10, - } - - - /// Represents a structured snippet extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class StructuredSnippetFeedItem : ExtensionFeedItem - { - private string headerField; - - private string[] valuesField; - - /// The header of the snippet. See the - /// structured snippets header translations page for supported localized - /// headers. This string must not be - /// empty. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string header - { - get - { - return this.headerField; - } - set - { - this.headerField = value; - } - } - - /// The values in the snippet. A SET operation replaces the values in the list. - /// The maximum size of this collection is - /// 10. This field must contain - /// distinct elements. This field - /// must not contain null elements. - /// - [System.Xml.Serialization.XmlElementAttribute("values", Order = 1)] - public string[] values - { - get - { - return this.valuesField; - } - set - { - this.valuesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a sitelink extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SitelinkFeedItem : ExtensionFeedItem - { - private string sitelinkTextField; - - private string sitelinkUrlField; - - private string sitelinkLine2Field; - - private string sitelinkLine3Field; - - private UrlList sitelinkFinalUrlsField; - - private UrlList sitelinkFinalMobileUrlsField; - - private string sitelinkTrackingUrlTemplateField; - - private string sitelinkFinalUrlSuffixField; - - private CustomParameters sitelinkUrlCustomParametersField; - - /// URL display text for the sitelink. The - /// length of this string should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string sitelinkText - { - get - { - return this.sitelinkTextField; - } - set - { - this.sitelinkTextField = value; - } - } - - /// Destination URL for the sitelink. The - /// length of this string should be between 0 and 2076, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string sitelinkUrl - { - get - { - return this.sitelinkUrlField; - } - set - { - this.sitelinkUrlField = value; - } - } - - /// First line of the description for the sitelink. To clear this field, set its - /// value to the empty string. If this value is set, sitelinkLine3 must also be set. - /// The length of this string should be - /// between 0 and 35, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string sitelinkLine2 - { - get - { - return this.sitelinkLine2Field; - } - set - { - this.sitelinkLine2Field = value; - } - } - - /// Second line of the description for the sitelink. To clear this field, set its - /// value to the empty string. If this value is set, sitelinkLine2 must also be set. - /// The length of this string should be - /// between 0 and 35, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string sitelinkLine3 - { - get - { - return this.sitelinkLine3Field; - } - set - { - this.sitelinkLine3Field = value; - } - } - - /// A list of possible final URLs after all cross domain redirects. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public UrlList sitelinkFinalUrls - { - get - { - return this.sitelinkFinalUrlsField; - } - set - { - this.sitelinkFinalUrlsField = value; - } - } - - /// A list of possible final mobile URLs after all cross domain redirects. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public UrlList sitelinkFinalMobileUrls - { - get - { - return this.sitelinkFinalMobileUrlsField; - } - set - { - this.sitelinkFinalMobileUrlsField = value; - } - } - - /// URL template for constructing a tracking URL. To clear this field, set its value - /// to the empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string sitelinkTrackingUrlTemplate - { - get - { - return this.sitelinkTrackingUrlTemplateField; - } - set - { - this.sitelinkTrackingUrlTemplateField = value; - } - } - - /// Final URL suffix to be appended to landing page URLs served with parallel - /// tracking. To clear this field, set its value to the empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string sitelinkFinalUrlSuffix - { - get - { - return this.sitelinkFinalUrlSuffixField; - } - set - { - this.sitelinkFinalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public CustomParameters sitelinkUrlCustomParameters - { - get - { - return this.sitelinkUrlCustomParametersField; - } - set - { - this.sitelinkUrlCustomParametersField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a Review extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ReviewFeedItem : ExtensionFeedItem - { - private string reviewTextField; - - private string reviewSourceNameField; - - private string reviewSourceUrlField; - - private bool reviewTextExactlyQuotedField; - - private bool reviewTextExactlyQuotedFieldSpecified; - - /// An exact quote or paraphrase from a third-party source. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string reviewText - { - get - { - return this.reviewTextField; - } - set - { - this.reviewTextField = value; - } - } - - /// Name of the third-party publisher of the review. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string reviewSourceName - { - get - { - return this.reviewSourceNameField; - } - set - { - this.reviewSourceNameField = value; - } - } - - /// Landing page of the third-party website of the review. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string reviewSourceUrl - { - get - { - return this.reviewSourceUrlField; - } - set - { - this.reviewSourceUrlField = value; - } - } - - /// Indicates if your review is formatted as an exact quote. Use a value of false to - /// indicate that the review is paraphrased. If not set, the value is treated as - /// false. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public bool reviewTextExactlyQuoted - { - get - { - return this.reviewTextExactlyQuotedField; - } - set - { - this.reviewTextExactlyQuotedField = value; - this.reviewTextExactlyQuotedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reviewTextExactlyQuotedSpecified - { - get - { - return this.reviewTextExactlyQuotedFieldSpecified; - } - set - { - this.reviewTextExactlyQuotedFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a promotion extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PromotionFeedItem : ExtensionFeedItem - { - private string promotionTargetField; - - private PromotionExtensionDiscountModifier discountModifierField; - - private bool discountModifierFieldSpecified; - - private long percentOffField; - - private bool percentOffFieldSpecified; - - private MoneyWithCurrency moneyAmountOffField; - - private string promotionCodeField; - - private MoneyWithCurrency ordersOverAmountField; - - private string promotionStartField; - - private string promotionEndField; - - private PromotionExtensionOccasion occasionField; - - private bool occasionFieldSpecified; - - private UrlList finalUrlsField; - - private UrlList finalMobileUrlsField; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private CustomParameters promotionUrlCustomParametersField; - - private string languageField; - - /// Promotion target. Required. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string promotionTarget - { - get - { - return this.promotionTargetField; - } - set - { - this.promotionTargetField = value; - } - } - - /// Discount modifier. Optional. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public PromotionExtensionDiscountModifier discountModifier - { - get - { - return this.discountModifierField; - } - set - { - this.discountModifierField = value; - this.discountModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool discountModifierSpecified - { - get - { - return this.discountModifierFieldSpecified; - } - set - { - this.discountModifierFieldSpecified = value; - } - } - - /// Percent off in micros. One million is equivalent to one percent. Either - /// percentOff or moneyAmountOff is required. Cannot set both percentOff and - /// moneyAmountOff. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long percentOff - { - get - { - return this.percentOffField; - } - set - { - this.percentOffField = value; - this.percentOffSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool percentOffSpecified - { - get - { - return this.percentOffFieldSpecified; - } - set - { - this.percentOffFieldSpecified = value; - } - } - - /// Money amount off. Either percentOff or moneyAmountOff is required. Cannot set - /// both moneyAmountOff and percentOff. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public MoneyWithCurrency moneyAmountOff - { - get - { - return this.moneyAmountOffField; - } - set - { - this.moneyAmountOffField = value; - } - } - - /// Promotion code. Optional. Cannot set both promotionCode and ordersOverAmount. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string promotionCode - { - get - { - return this.promotionCodeField; - } - set - { - this.promotionCodeField = value; - } - } - - /// Orders over amount. Optional. Cannot set both ordersOverAmount and - /// promotionCode. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public MoneyWithCurrency ordersOverAmount - { - get - { - return this.ordersOverAmountField; - } - set - { - this.ordersOverAmountField = value; - } - } - - /// Promotion start. Optional. The time part must be set to midnight. The special - /// value "00000101 000000" may be used to clear an existing value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string promotionStart - { - get - { - return this.promotionStartField; - } - set - { - this.promotionStartField = value; - } - } - - /// Promotion end. Optional The time part must be set to midnight. The special value - /// "00000101 000000" may be used to clear an existing value. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string promotionEnd - { - get - { - return this.promotionEndField; - } - set - { - this.promotionEndField = value; - } - } - - /// Occasion of the promotion. Optional. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public PromotionExtensionOccasion occasion - { - get - { - return this.occasionField; - } - set - { - this.occasionField = value; - this.occasionSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool occasionSpecified - { - get - { - return this.occasionFieldSpecified; - } - set - { - this.occasionFieldSpecified = value; - } - } - - /// Final URLs. Required. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public UrlList finalUrls - { - get - { - return this.finalUrlsField; - } - set - { - this.finalUrlsField = value; - } - } - - /// Final mobile URLs. Optional. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public UrlList finalMobileUrls - { - get - { - return this.finalMobileUrlsField; - } - set - { - this.finalMobileUrlsField = value; - } - } - - /// Tracking URL template. Optional. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// Final URL suffix to be appended to landing page URLs served with parallel - /// tracking. To clear this field, set its value to the empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 12)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 13)] - public CustomParameters promotionUrlCustomParameters - { - get - { - return this.promotionUrlCustomParametersField; - } - set - { - this.promotionUrlCustomParametersField = value; - } - } - - /// The language of the promotion. Optional. The default language is English. - /// Represented as a BCP 47 language tag. Supported language codes:
  • ar
  • - ///
  • bg
  • ca
  • zh-HK
  • zh-CN
  • zh-TW
  • hr
  • - ///
  • cs
  • da
  • nl
  • en-AU
  • en
  • en-GB
  • - ///
  • en-US
  • et
  • fil
  • fi
  • fr
  • de
  • - ///
  • el
  • iw
  • hi
  • hu
  • id
  • it
  • - ///
  • ja
  • ko
  • lv
  • lt
  • ms
  • no
  • - ///
  • pl
  • pt-BR
  • pt-PT
  • ro
  • ru
  • sr
  • - ///
  • sk
  • sl
  • es
  • es-419
  • sv
  • th
  • - ///
  • tr
  • uk
  • vi
- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 14)] - public string language - { - get - { - return this.languageField; - } - set - { - this.languageField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Qualification for a promotion extension discount. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PromotionExtensionDiscountModifier - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// /'Up to'/. - /// - UP_TO = 1, - /// None is used for clearing the discount modifier. - /// - NONE = 2, - } - - - /// The occasion of a promotion extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PromotionExtensionOccasion - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// New Year's. - /// - NEW_YEARS = 1, - /// Valentine's Day. - /// - VALENTINES_DAY = 2, - /// Easter. - /// - EASTER = 3, - /// Mother's Day. - /// - MOTHERS_DAY = 4, - /// Father's Day. - /// - FATHERS_DAY = 5, - /// Labor Day. - /// - LABOR_DAY = 6, - /// Back To School. - /// - BACK_TO_SCHOOL = 7, - /// Halloween. - /// - HALLOWEEN = 8, - /// Black Friday. - /// - BLACK_FRIDAY = 9, - /// Cyber Monday. - /// - CYBER_MONDAY = 10, - /// Christmas. - /// - CHRISTMAS = 11, - /// Boxing Day. - /// - BOXING_DAY = 12, - /// None is used for clearing the occasion. - /// - NONE = 13, - /// Independence Day. - /// - INDEPENDENCE_DAY = 14, - /// National Day. - /// - NATIONAL_DAY = 15, - /// End of Season. - /// - END_OF_SEASON = 16, - /// Winter Sale. - /// - WINTER_SALE = 17, - /// Summer Sale. - /// - SUMMER_SALE = 18, - /// Fall Sale. - /// - FALL_SALE = 19, - /// Spring Sale. - /// - SPRING_SALE = 20, - /// Ramadan. - /// - RAMADAN = 21, - /// Eid al-Fitr. - /// - EID_AL_FITR = 22, - /// Eid al-Adha. - /// - EID_AL_ADHA = 23, - /// Singles Day. - /// - SINGLES_DAY = 24, - /// Women's Day. - /// - WOMENS_DAY = 25, - /// Holi. - /// - HOLI = 26, - /// Parent's Day. - /// - PARENTS_DAY = 27, - /// St. Nicholas Day. - /// - ST_NICHOLAS_DAY = 28, - /// Chinese New Year. - /// - CHINESE_NEW_YEAR = 29, - /// Carnival. - /// - CARNIVAL = 30, - /// Epiphany. - /// - EPIPHANY = 31, - /// Rosh Hashanah. - /// - ROSH_HASHANAH = 32, - /// Passover. - /// - PASSOVER = 33, - /// Hanukkah. - /// - HANUKKAH = 34, - /// Diwali. - /// - DIWALI = 35, - /// Navratri. - /// - NAVRATRI = 36, - /// Songkran. - /// - SONGKRAN = 37, - /// Year-end Gift. - /// - YEAR_END_GIFT = 38, - } - - - /// Represents a price extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PriceFeedItem : ExtensionFeedItem - { - private PriceExtensionType priceExtensionTypeField; - - private bool priceExtensionTypeFieldSpecified; - - private PriceExtensionPriceQualifier priceQualifierField; - - private bool priceQualifierFieldSpecified; - - private string trackingUrlTemplateField; - - private string finalUrlSuffixField; - - private string languageField; - - private PriceTableRow[] tableRowsField; - - /// Price extension type of this extension. Required. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public PriceExtensionType priceExtensionType - { - get - { - return this.priceExtensionTypeField; - } - set - { - this.priceExtensionTypeField = value; - this.priceExtensionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool priceExtensionTypeSpecified - { - get - { - return this.priceExtensionTypeFieldSpecified; - } - set - { - this.priceExtensionTypeFieldSpecified = value; - } - } - - /// Price qualifier for all rows of this price extension. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public PriceExtensionPriceQualifier priceQualifier - { - get - { - return this.priceQualifierField; - } - set - { - this.priceQualifierField = value; - this.priceQualifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool priceQualifierSpecified - { - get - { - return this.priceQualifierFieldSpecified; - } - set - { - this.priceQualifierFieldSpecified = value; - } - } - - /// Tracking URL template for all rows of this price extension. To clear this field, - /// set its value to an empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string trackingUrlTemplate - { - get - { - return this.trackingUrlTemplateField; - } - set - { - this.trackingUrlTemplateField = value; - } - } - - /// Final URL Suffix for all rows of this price extension. To clear this field, set - /// its value to an empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string finalUrlSuffix - { - get - { - return this.finalUrlSuffixField; - } - set - { - this.finalUrlSuffixField = value; - } - } - - /// The language the advertiser is using for this price extension. Required. - /// Supported language codes:
  • de
  • en
  • es
  • - ///
  • es-419
  • fr
  • it
  • ja
  • nl
  • pl
  • - ///
  • pt-BR
  • pt-PT
  • ru
  • sv
- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string language - { - get - { - return this.languageField; - } - set - { - this.languageField = value; - } - } - - /// The rows in this price extension. Minimum number of items allowed is 3 and the - /// maximum number is 8. - /// - [System.Xml.Serialization.XmlElementAttribute("tableRows", Order = 5)] - public PriceTableRow[] tableRows - { - get - { - return this.tableRowsField; - } - set - { - this.tableRowsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The type of a price extension represents. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PriceExtensionType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The type for showing a list of brands. - /// - BRANDS = 1, - /// The type for showing a list of events. - /// - EVENTS = 2, - /// The type for showing locations relevant to your business. - /// - LOCATIONS = 3, - /// The type for showing sub-regions or districts within a city or region. - /// - NEIGHBORHOODS = 4, - /// The type for showing a collection of product categories. - /// - PRODUCT_CATEGORIES = 5, - /// The type for showing a collection of related product tiers. - /// - PRODUCT_TIERS = 6, - /// The type for showing a collection of services offered by your business. - /// - SERVICES = 7, - /// The type for showing a collection of service categories. - /// - SERVICE_CATEGORIES = 8, - /// The type for showing a collection of related service tiers. - /// - SERVICE_TIERS = 9, - } - - - /// The qualifier on the price for all Price items. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum PriceExtensionPriceQualifier - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// 'From' qualifier for the price. - /// - FROM = 1, - /// 'Up to' qualifier for the price. - /// - UP_TO = 2, - /// 'Average' qualifier for the price. - /// - AVERAGE = 4, - /// None is used for clearing the qualifier. - /// - NONE = 3, - } - - - /// Represents a Message extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MessageFeedItem : ExtensionFeedItem - { - private string messageBusinessNameField; - - private string messageCountryCodeField; - - private string messagePhoneNumberField; - - private string messageExtensionTextField; - - private string messageTextField; - - /// The business name of the message. This will be prepended to the message text. - /// The length of this string should be - /// between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string messageBusinessName - { - get - { - return this.messageBusinessNameField; - } - set - { - this.messageBusinessNameField = value; - } - } - - /// Uppercase two-letter country code of the advertiser's phone number to message. - /// This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string messageCountryCode - { - get - { - return this.messageCountryCodeField; - } - set - { - this.messageCountryCodeField = value; - } - } - - /// The advertiser's phone number the message will be sent to. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string messagePhoneNumber - { - get - { - return this.messagePhoneNumberField; - } - set - { - this.messagePhoneNumberField = value; - } - } - - /// The text to show in the ad. The length of - /// this string should be between 5 and 35, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string messageExtensionText - { - get - { - return this.messageExtensionTextField; - } - set - { - this.messageExtensionTextField = value; - } - } - - /// The message text populated in the messaging app. The length of this string should be between 10 and 100, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string messageText - { - get - { - return this.messageTextField; - } - set - { - this.messageTextField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a callout extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CalloutFeedItem : ExtensionFeedItem - { - private string calloutTextField; - - /// The callout text. The length of this - /// string should be between 1 and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string calloutText - { - get - { - return this.calloutTextField; - } - set - { - this.calloutTextField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a Call extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CallFeedItem : ExtensionFeedItem - { - private string callPhoneNumberField; - - private string callCountryCodeField; - - private bool callTrackingField; - - private bool callTrackingFieldSpecified; - - private CallConversionType callConversionTypeField; - - private bool disableCallConversionTrackingField; - - private bool disableCallConversionTrackingFieldSpecified; - - /// The advertiser's phone number to append to the ad. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string callPhoneNumber - { - get - { - return this.callPhoneNumberField; - } - set - { - this.callPhoneNumberField = value; - } - } - - /// Uppercase two-letter country code of the advertiser's phone number. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string callCountryCode - { - get - { - return this.callCountryCodeField; - } - set - { - this.callCountryCodeField = value; - } - } - - /// Indicates whether call tracking is enabled. By default, call tracking is not - /// enabled. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool callTracking - { - get - { - return this.callTrackingField; - } - set - { - this.callTrackingField = value; - this.callTrackingSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool callTrackingSpecified - { - get - { - return this.callTrackingFieldSpecified; - } - set - { - this.callTrackingFieldSpecified = value; - } - } - - /// Call conversion type. To clear this field, set a CallConversionType with a value - /// of null in its conversionTypeId field. This value should not be set if CallFeedItem#disableCallConversionTracking - /// is true. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public CallConversionType callConversionType - { - get - { - return this.callConversionTypeField; - } - set - { - this.callConversionTypeField = value; - } - } - - /// If set, disable call conversion tracking. CallFeedItem#callConversionType - /// should not be set if this value is true. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool disableCallConversionTracking - { - get - { - return this.disableCallConversionTrackingField; - } - set - { - this.disableCallConversionTrackingField = value; - this.disableCallConversionTrackingSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool disableCallConversionTrackingSpecified - { - get - { - return this.disableCallConversionTrackingFieldSpecified; - } - set - { - this.disableCallConversionTrackingFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an App extension. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AppFeedItem : ExtensionFeedItem - { - private AppFeedItemAppStore appStoreField; - - private bool appStoreFieldSpecified; - - private string appIdField; - - private string appLinkTextField; - - private string appUrlField; - - private UrlList appFinalUrlsField; - - private UrlList appFinalMobileUrlsField; - - private string appTrackingUrlTemplateField; - - private string appFinalUrlSuffixField; - - private CustomParameters appUrlCustomParametersField; - - /// The application store that the target application belongs to. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AppFeedItemAppStore appStore - { - get - { - return this.appStoreField; - } - set - { - this.appStoreField = value; - this.appStoreSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool appStoreSpecified - { - get - { - return this.appStoreFieldSpecified; - } - set - { - this.appStoreFieldSpecified = value; - } - } - - /// The store-specific ID for the target application. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string appId - { - get - { - return this.appIdField; - } - set - { - this.appIdField = value; - } - } - - /// The visible text displayed when the link is rendered in an ad. The length of this string should be between 1 - /// and 25, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string appLinkText - { - get - { - return this.appLinkTextField; - } - set - { - this.appLinkTextField = value; - } - } - - /// The destination URL of the in-app link. The length of this string should be between 0 and 2076, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string appUrl - { - get - { - return this.appUrlField; - } - set - { - this.appUrlField = value; - } - } - - /// A list of possible final URLs after all cross domain redirects. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public UrlList appFinalUrls - { - get - { - return this.appFinalUrlsField; - } - set - { - this.appFinalUrlsField = value; - } - } - - /// A list of possible final mobile URLs after all cross domain redirects. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public UrlList appFinalMobileUrls - { - get - { - return this.appFinalMobileUrlsField; - } - set - { - this.appFinalMobileUrlsField = value; - } - } - - /// URL template for constructing a tracking URL. To clear this field, set its value - /// to the empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string appTrackingUrlTemplate - { - get - { - return this.appTrackingUrlTemplateField; - } - set - { - this.appTrackingUrlTemplateField = value; - } - } - - /// Final URL suffix to be appended to landing page URLs served with parallel - /// tracking. To clear this field, set its value to the empty string. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string appFinalUrlSuffix - { - get - { - return this.appFinalUrlSuffixField; - } - set - { - this.appFinalUrlSuffixField = value; - } - } - - /// A list of mappings to be used for substituting URL custom parameter tags in the - /// trackingUrlTemplate, finalUrls, and/or finalMobileUrls. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public CustomParameters appUrlCustomParameters - { - get - { - return this.appUrlCustomParametersField; - } - set - { - this.appUrlCustomParametersField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ExtensionFeedItem.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ExtensionFeedItem.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ExtensionFeedItem.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The available application stores for app extensions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AppFeedItem.AppStore", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AppFeedItemAppStore - { - APPLE_ITUNES = 0, - GOOGLE_PLAY = 1, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 2, - } - - - /// A setting specifying when and which extensions should serve at a given level - /// (customer, campaign, or ad group). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExtensionSetting - { - private ExtensionFeedItem[] extensionsField; - - private ExtensionSettingPlatform platformRestrictionsField; - - private bool platformRestrictionsFieldSpecified; - - /// The list of feed items to add or modify. This field can be selected using the value "Extensions". - /// - [System.Xml.Serialization.XmlElementAttribute("extensions", Order = 0)] - public ExtensionFeedItem[] extensions - { - get - { - return this.extensionsField; - } - set - { - this.extensionsField = value; - } - } - - /// Any platform (desktop, mobile) restrictions for feed items being served. If set - /// to DESKTOP or MOBILE, only those feed items with the appropriate device - /// preference or no device preference will serve. This field can be selected using the value - /// "PlatformRestrictions". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ExtensionSettingPlatform platformRestrictions - { - get - { - return this.platformRestrictionsField; - } - set - { - this.platformRestrictionsField = value; - this.platformRestrictionsSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool platformRestrictionsSpecified - { - get - { - return this.platformRestrictionsFieldSpecified; - } - set - { - this.platformRestrictionsFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Extensions = new Field("Extensions", false, true); - - public static readonly Field PlatformRestrictions = new Field("PlatformRestrictions", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Extensions = Fields.Extensions; - - public static readonly Field PlatformRestrictions = Fields.PlatformRestrictions; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Different levels of platform restrictions. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ExtensionSetting.Platform", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ExtensionSettingPlatform - { - /// Desktop and tablet devices only. - /// - DESKTOP = 0, - /// Mobile only. - /// - MOBILE = 1, - /// No restriction. - /// - NONE = 2, - } - - - /// An AdGroupExtensionSetting is used to add or modify extensions being served for - /// the specified ad group. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupExtensionSetting - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private FeedType extensionTypeField; - - private bool extensionTypeFieldSpecified; - - private ExtensionSetting extensionSettingField; - - /// The id of the ad group for the feed items being added or modified. This field can be selected using the value - /// "AdGroupId".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The extension type the extension setting applies to. This field can be selected using the value - /// "ExtensionType".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public FeedType extensionType - { - get - { - return this.extensionTypeField; - } - set - { - this.extensionTypeField = value; - this.extensionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool extensionTypeSpecified - { - get - { - return this.extensionTypeFieldSpecified; - } - set - { - this.extensionTypeFieldSpecified = value; - } - } - - /// The extension setting specifying which extensions to serve for the specified ad - /// group. If extensionSetting is empty (i.e. has an empty list of feed items and - /// null platformRestrictions), extensions are disabled for the specified - /// extensionType. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public ExtensionSetting extensionSetting - { - get - { - return this.extensionSettingField; - } - set - { - this.extensionSettingField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field ExtensionType = new Field("ExtensionType", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field ExtensionType = Fields.ExtensionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field ExtensionType = Fields.ExtensionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of AdGroupExtensionSetting objects resulting from a - /// AdGroupExtensionSettingService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupExtensionSettingPage : Page - { - private AdGroupExtensionSetting[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroupExtensionSetting[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an error for various extension setting services. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ExtensionSettingError : ApiError - { - private ExtensionSettingErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ExtensionSettingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ExtensionSettingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ExtensionSettingErrorReason - { - /// A platform restriction was provided without input extensions or existing - /// extensions. - /// - EXTENSIONS_REQUIRED = 0, - /// The provided feed type does not correspond to the provided extensions. - /// - FEED_TYPE_EXTENSION_TYPE_MISMATCH = 1, - /// The provided feed type cannot be used. - /// - INVALID_FEED_TYPE = 2, - /// The provided feed type cannot be used at the customer level. - /// - INVALID_FEED_TYPE_FOR_CUSTOMER_EXTENSION_SETTING = 3, - /// Can not change a feed item field on an ADD operation. - /// - CANNOT_CHANGE_FEED_ITEM_ON_ADD = 4, - /// Can not update an extension that is not already in this setting. - /// - CANNOT_UPDATE_NEWLY_ADDED_EXTENSION = 5, - /// There is no existing AdGroupExtensionSetting for this type. - /// - NO_EXISTING_AD_GROUP_EXTENSION_SETTING_FOR_TYPE = 6, - /// There is no existing CampaignExtensionSetting for this type. - /// - NO_EXISTING_CAMPAIGN_EXTENSION_SETTING_FOR_TYPE = 7, - /// There is no existing CustomerExtensionSetting for this type. - /// - NO_EXISTING_CUSTOMER_EXTENSION_SETTING_FOR_TYPE = 8, - /// The AdGroupExtensionSetting already exists. SET should be used to modify the - /// existing AdGroupExtensionSetting. - /// - AD_GROUP_EXTENSION_SETTING_ALREADY_EXISTS = 9, - /// The CampaignExtensionSetting already exists. SET should be used to modify the - /// existing CampaignExtensionSetting. - /// - CAMPAIGN_EXTENSION_SETTING_ALREADY_EXISTS = 10, - /// The CustomerExtensionSetting already exists. SET should be used to modify the - /// existing CustomerExtensionSetting. - /// - CUSTOMER_EXTENSION_SETTING_ALREADY_EXISTS = 11, - /// An active ad group feed already exists for this place holder type. - /// - AD_GROUP_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 12, - /// An active campaign feed already exists for this place holder type. - /// - CAMPAIGN_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 13, - /// An active customer feed already exists for this place holder type. - /// - CUSTOMER_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE = 14, - /// Value is not within the accepted range. - /// - VALUE_OUT_OF_RANGE = 15, - /// Cannot simultaneously set sitelink field with final urls. - /// - CANNOT_SET_WITH_FINAL_URLS = 16, - /// Must set field with final urls. - /// - CANNOT_SET_WITHOUT_FINAL_URLS = 17, - /// Cannot simultaneously set sitelink url field with tracking url template. - /// - CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 18, - /// Phone number for a call extension is invalid. - /// - INVALID_PHONE_NUMBER = 19, - /// Phone number for a call extension is not supported for the given country code. - /// - PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 20, - /// A carrier specific number in short format is not allowed for call extensions. - /// - CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 21, - /// Premium rate numbers are not allowed for call extensions. - /// - PREMIUM_RATE_NUMBER_NOT_ALLOWED = 22, - /// Phone number type for a call extension is not allowed. - /// - DISALLOWED_NUMBER_TYPE = 23, - /// Phone number for a call extension does not meet domestic format requirements. - /// - INVALID_DOMESTIC_PHONE_NUMBER_FORMAT = 24, - /// Vanity phone numbers (i.e. those including letters) are not allowed for call - /// extensions. - /// - VANITY_PHONE_NUMBER_NOT_ALLOWED = 25, - /// Country code provided for a call extension is invalid. - /// - INVALID_COUNTRY_CODE = 26, - /// Call conversion type id provided for a call extension is invalid. - /// - INVALID_CALL_CONVERSION_TYPE_ID = 27, - /// For a call extension, the customer is not whitelisted for call tracking. - /// - CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING = 28, - /// Call tracking is not supported for the given country for a call extension. - /// - CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 29, - /// App id provided for an app extension is invalid. - /// - INVALID_APP_ID = 30, - /// Quotation marks present in the review text for a review extension. - /// - QUOTES_IN_REVIEW_EXTENSION_SNIPPET = 31, - /// Hyphen character present in the review text for a review extension. - /// - HYPHENS_IN_REVIEW_EXTENSION_SNIPPET = 32, - /// A blacklisted review source name or url was provided for a review extension. - /// - REVIEW_EXTENSION_SOURCE_INELIGIBLE = 33, - /// Review source name should not be found in the review text. - /// - SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT = 34, - /// Field must be set. - /// - MISSING_FIELD = 35, - /// Inconsistent currency codes. - /// - INCONSISTENT_CURRENCY_CODES = 51, - /// Price extension cannot have duplicated headers. - /// - PRICE_EXTENSION_HAS_DUPLICATED_HEADERS = 52, - /// Price item cannot have duplicated header and description. - /// - PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION = 53, - /// Price extension has too few items - /// - PRICE_EXTENSION_HAS_TOO_FEW_ITEMS = 54, - /// Price extension has too many items - /// - PRICE_EXTENSION_HAS_TOO_MANY_ITEMS = 56, - /// The input value is not currently supported. - /// - UNSUPPORTED_VALUE = 55, - /// The input value is not currently supported in the selected language of an - /// extension. - /// - UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE = 57, - /// Unknown or unsupported device preference. - /// - INVALID_DEVICE_PREFERENCE = 36, - /// Invalid feed item schedule end time (i.e., endHour = 24 and endMinute != 0). - /// - INVALID_SCHEDULE_END = 37, - /// Date time zone does not match the account's time zone. - /// - DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE = 38, - /// Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not allowed. - /// - OVERLAPPING_SCHEDULES = 39, - /// Feed item schedule end time must be after start time. - /// - SCHEDULE_END_NOT_AFTER_START = 40, - /// There are too many feed item schedules per day. - /// - TOO_MANY_SCHEDULES_PER_DAY = 41, - /// Cannot edit the same extension feed item id twice. - /// - DUPLICATE_EXTENSION_FEED_ITEM_EDIT = 42, - /// Invalid structured snippet header. - /// - INVALID_SNIPPETS_HEADER = 43, - /// Phone number not supported with call tracking enabled for country. - /// - PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 44, - /// Targeted adgroup's campaign does not match the targeted campaign. - /// - CAMPAIGN_TARGETING_MISMATCH = 47, - /// The feed used by the ExtensionSetting is deleted and cannot be operated on. - /// Remove the ExtensionSetting to allow a new one to be created using an active - /// feed. - /// - CANNOT_OPERATE_ON_DELETED_FEED = 45, - /// Concrete sub type of ExtensionFeedItem is required for this operation. - /// - CONCRETE_EXTENSION_TYPE_REQUIRED = 48, - /// The matching function that links the extension feed to the customer, campaign, - /// or ad group is not compatible with the ExtensionSetting services. - /// - INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION = 49, - START_DATE_AFTER_END_DATE = 58, - INVALID_PRICE_FORMAT = 59, - PROMOTION_INVALID_TIME = 60, - PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF = 61, - PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT = 62, - TOO_MANY_DECIMAL_PLACES_SPECIFIED = 63, - /// The language code is not valid. - /// - INVALID_LANGUAGE_CODE = 64, - /// The language is not supported. - /// - UNSUPPORTED_LANGUAGE = 65, - UNKNOWN = 46, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingServiceInterface")] - public interface AdGroupExtensionSettingServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupExtensionSettingService.mutateResponse mutate(Wrappers.AdGroupExtensionSettingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdGroupExtensionSettingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate an AdGroupExtensionSetting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupExtensionSettingOperation : Operation - { - private AdGroupExtensionSetting operandField; - - /// AdGroupExtensionSetting to operate on. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupExtensionSetting operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from a call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupExtensionSettingReturnValue : ListReturnValue - { - private AdGroupExtensionSetting[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// The resulting AdGroupExtensionSettings. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupExtensionSetting[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdGroupExtensionSettingServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage extensions at the adgroup level. The extensions are - /// managed by AdWords using existing feed services, including creating and - /// modifying feeds, feed items, and adgroup feeds for the user. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdGroupExtensionSettingService : AdWordsSoapClient, IAdGroupExtensionSettingService - { - /// Creates a new instance of the class. - public AdGroupExtensionSettingService() - { - } - - /// Creates a new instance of the class. - public AdGroupExtensionSettingService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public AdGroupExtensionSettingService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public AdGroupExtensionSettingService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public AdGroupExtensionSettingService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of AdGroupExtensionSettings that meet the selector criteria. - /// Determines which AdGroupExtensionSettings to return. If - /// empty, all AdGroupExtensionSettings are returned. - /// The list of AdGroupExtensionSettings specified by the - /// selector. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupExtensionSettingService.mutateResponse Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingServiceInterface.mutate(Wrappers.AdGroupExtensionSettingService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations (add, remove, and set).

Beginning in - /// v201509, add and set operations are treated identically. Performing an add - /// operation on an ad group with an existing ExtensionSetting will cause the - /// operation to be treated like a set operation. Performing a set operation on an - /// ad group with no ExtensionSetting will cause the operation to be treated like an - /// add operation.

- ///
The operations to apply. The same AdGroupExtensionSetting cannot be specified - /// in more than one operation. - /// The changed AdGroupExtensionSettings. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingOperation[] operations) - { - Wrappers.AdGroupExtensionSettingService.mutateRequest inValue = new Wrappers.AdGroupExtensionSettingService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdGroupExtensionSettingService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingServiceInterface.mutateAsync(Wrappers.AdGroupExtensionSettingService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingOperation[] operations) - { - Wrappers.AdGroupExtensionSettingService.mutateRequest inValue = new Wrappers.AdGroupExtensionSettingService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of AdGroupExtensionSettings that match the query. - /// The SQL-like AWQL query string. - /// The list of AdGroupExtensionSettings specified by the query. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CampaignExtensionSettingService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingReturnValue rval) - { - this.rval = rval; - } - } - } - /// A CampaignExtensionSetting is used to add or modify extensions being served for - /// the specified campaign. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignExtensionSetting - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private FeedType extensionTypeField; - - private bool extensionTypeFieldSpecified; - - private ExtensionSetting extensionSettingField; - - /// The id of the campaign for the feed items being added or modified. This field can be selected using the value - /// "CampaignId".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// The extension type the extension setting applies to. This field can be selected using the value - /// "ExtensionType".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public FeedType extensionType - { - get - { - return this.extensionTypeField; - } - set - { - this.extensionTypeField = value; - this.extensionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool extensionTypeSpecified - { - get - { - return this.extensionTypeFieldSpecified; - } - set - { - this.extensionTypeFieldSpecified = value; - } - } - - /// The extension setting specifying which extensions to serve for the specified - /// campaign. If extensionSetting is empty (i.e. has an empty list of feed items and - /// null platformRestrictions), extensions are disabled for the specified - /// extensionType. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public ExtensionSetting extensionSetting - { - get - { - return this.extensionSettingField; - } - set - { - this.extensionSettingField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field ExtensionType = new Field("ExtensionType", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field ExtensionType = Fields.ExtensionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field ExtensionType = Fields.ExtensionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of CampaignExtensionSetting objects resulting from a - /// CampaignExtensionSettingService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignExtensionSettingPage : Page - { - private CampaignExtensionSetting[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CampaignExtensionSetting[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingServiceInterface")] - public interface CampaignExtensionSettingServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CampaignExtensionSettingService.mutateResponse mutate(Wrappers.CampaignExtensionSettingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CampaignExtensionSettingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a CampaignExtensionSetting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignExtensionSettingOperation : Operation - { - private CampaignExtensionSetting operandField; - - /// CampaignExtensionSetting to operate on. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignExtensionSetting operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from a call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignExtensionSettingReturnValue : ListReturnValue - { - private CampaignExtensionSetting[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// The resulting CampaignExtensionSettings. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CampaignExtensionSetting[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CampaignExtensionSettingServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage extensions at the campaign level. The extensions are - /// managed by AdWords using existing feed services, including creating and - /// modifying feeds, feed items, and campaign feeds for the user. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CampaignExtensionSettingService : AdWordsSoapClient, ICampaignExtensionSettingService - { - /// Creates a new instance of the class. - public CampaignExtensionSettingService() - { - } - - /// Creates a new instance of the class. - public CampaignExtensionSettingService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public CampaignExtensionSettingService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CampaignExtensionSettingService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CampaignExtensionSettingService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of CampaignExtensionSettings that meet the selector criteria. - /// Determines which CampaignExtensionSettings to return. If - /// empty, all CampaignExtensionSettings are returned. - /// The list of CampaignExtensionSettings specified by the - /// selector. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CampaignExtensionSettingService.mutateResponse Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingServiceInterface.mutate(Wrappers.CampaignExtensionSettingService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations (add, remove, and set).

Beginning in - /// v201509, add and set operations are treated identically. Performing an add - /// operation on a campaign with an existing ExtensionSetting will cause the - /// operation to be treated like a set operation. Performing a set operation on a - /// campaign with no ExtensionSetting will cause the operation to be treated like an - /// add operation.

- ///
The operations to apply. The same CampaignExtensionSetting cannot be specified - /// in more than one operation. - /// The changed CampaignExtensionSettings. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingOperation[] operations) - { - Wrappers.CampaignExtensionSettingService.mutateRequest inValue = new Wrappers.CampaignExtensionSettingService.mutateRequest(); - inValue.operations = operations; - Wrappers.CampaignExtensionSettingService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingServiceInterface.mutateAsync(Wrappers.CampaignExtensionSettingService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingOperation[] operations) - { - Wrappers.CampaignExtensionSettingService.mutateRequest inValue = new Wrappers.CampaignExtensionSettingService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of CampaignExtensionSettings that match the query. - /// The SQL-like AWQL query string. - /// The list of CampaignExtensionSettings specified by the query. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.CustomerExtensionSettingService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingReturnValue rval) - { - this.rval = rval; - } - } - } - /// A CustomerExtensionSetting is used to add or modify extensions being served for - /// the customer. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerExtensionSetting - { - private FeedType extensionTypeField; - - private bool extensionTypeFieldSpecified; - - private ExtensionSetting extensionSettingField; - - /// The extension type the extension setting applies to. This field can be selected using the value - /// "ExtensionType".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public FeedType extensionType - { - get - { - return this.extensionTypeField; - } - set - { - this.extensionTypeField = value; - this.extensionTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool extensionTypeSpecified - { - get - { - return this.extensionTypeFieldSpecified; - } - set - { - this.extensionTypeFieldSpecified = value; - } - } - - /// The extension setting specifying which extensions to serve for all of the - /// customer's campaigns. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ExtensionSetting extensionSetting - { - get - { - return this.extensionSettingField; - } - set - { - this.extensionSettingField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field ExtensionType = new Field("ExtensionType", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field ExtensionType = Fields.ExtensionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field ExtensionType = Fields.ExtensionType; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of CustomerExtensionSetting objects resulting from a - /// CustomerExtensionSettingService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerExtensionSettingPage : Page - { - private CustomerExtensionSetting[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CustomerExtensionSetting[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingServiceInterface")] - public interface CustomerExtensionSettingServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomerExtensionSettingService.mutateResponse mutate(Wrappers.CustomerExtensionSettingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CustomerExtensionSettingService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Criterion))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a CustomerExtensionSetting. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerExtensionSettingOperation : Operation - { - private CustomerExtensionSetting operandField; - - /// CustomerExtensionSetting to operate on. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerExtensionSetting operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from a call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CustomerExtensionSettingReturnValue : ListReturnValue - { - private CustomerExtensionSetting[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// The resulting CustomerExtensionSettings. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public CustomerExtensionSetting[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CustomerExtensionSettingServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage extensions at the customer level. The extensions are - /// managed by AdWords using existing feed services, including creating and - /// modifying feeds, feed items, and customer feeds for the user. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CustomerExtensionSettingService : AdWordsSoapClient, ICustomerExtensionSettingService - { - /// Creates a new instance of the class. - public CustomerExtensionSettingService() - { - } - - /// Creates a new instance of the class. - public CustomerExtensionSettingService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public CustomerExtensionSettingService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CustomerExtensionSettingService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public CustomerExtensionSettingService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of CustomerExtensionSettings that meet the selector criteria. - /// Determines which CustomerExtensionSettings to return. If - /// empty, all CustomerExtensionSettings are returned. - /// The list of CustomerExtensionSettings specified by the - /// selector. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomerExtensionSettingService.mutateResponse Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingServiceInterface.mutate(Wrappers.CustomerExtensionSettingService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations (add, remove, and set).

Beginning in - /// v201509, add and set operations are treated identically. Performing an add - /// operation when there is an existing ExtensionSetting will cause the operation to - /// be treated like a set operation. Performing a set operation when there is no - /// existing ExtensionSetting will cause the operation to be treated like an add - /// operation.

- ///
The operations to apply. The same CustomerExtensionSetting cannot be specified - /// in more than one operation. - /// The changed CustomerExtensionSettings. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingReturnValue mutate(Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingOperation[] operations) - { - Wrappers.CustomerExtensionSettingService.mutateRequest inValue = new Wrappers.CustomerExtensionSettingService.mutateRequest(); - inValue.operations = operations; - Wrappers.CustomerExtensionSettingService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingServiceInterface.mutateAsync(Wrappers.CustomerExtensionSettingService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingOperation[] operations) - { - Wrappers.CustomerExtensionSettingService.mutateRequest inValue = new Wrappers.CustomerExtensionSettingService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of CustomerExtensionSettings that match the query. - /// The SQL-like AWQL query string. - /// The list of CustomerExtensionSettings specified by the query. - /// Indicates a problem with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.DraftService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.DraftOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.DraftOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.DraftReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.DraftReturnValue rval) - { - this.rval = rval; - } - } - } - /// The interface object which contains the basic information of a draft. Entity - /// specific information in the campaign tree are represented by their respective - /// entities objects with a corresponding draftId. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Draft - { - private long draftIdField; - - private bool draftIdFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private string draftNameField; - - private DraftStatus draftStatusField; - - private bool draftStatusFieldSpecified; - - private long draftCampaignIdField; - - private bool draftCampaignIdFieldSpecified; - - private bool hasRunningTrialField; - - private bool hasRunningTrialFieldSpecified; - - /// This field can be selected using the value - /// "DraftId".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API for the following Operators: - /// ADD. This field is required and should - /// not be null when it is contained within Operators : SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long draftId - { - get - { - return this.draftIdField; - } - set - { - this.draftIdField = value; - this.draftIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftIdSpecified - { - get - { - return this.draftIdFieldSpecified; - } - set - { - this.draftIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "BaseCampaignId".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "DraftName".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. The length of this string should be between 1 and 1024, inclusive, - /// in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string draftName - { - get - { - return this.draftNameField; - } - set - { - this.draftNameField = value; - } - } - - /// This field can be selected using the value - /// "DraftStatus".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public DraftStatus draftStatus - { - get - { - return this.draftStatusField; - } - set - { - this.draftStatusField = value; - this.draftStatusSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftStatusSpecified - { - get - { - return this.draftStatusFieldSpecified; - } - set - { - this.draftStatusFieldSpecified = value; - } - } - - /// The campaign id that references the draft version of the original campaign. - /// This field can be selected using the value - /// "DraftCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public long draftCampaignId - { - get - { - return this.draftCampaignIdField; - } - set - { - this.draftCampaignIdField = value; - this.draftCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftCampaignIdSpecified - { - get - { - return this.draftCampaignIdFieldSpecified; - } - set - { - this.draftCampaignIdFieldSpecified = value; - } - } - - /// True, if a trial created from this draft is running. Only available via the Get - /// action. This field can be selected using the - /// value "HasRunningTrial".This field - /// can be filtered on. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool hasRunningTrial - { - get - { - return this.hasRunningTrialField; - } - set - { - this.hasRunningTrialField = value; - this.hasRunningTrialSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool hasRunningTrialSpecified - { - get - { - return this.hasRunningTrialFieldSpecified; - } - set - { - this.hasRunningTrialFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field DraftId = new Field("DraftId", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field DraftName = new Field("DraftName", true, true); - - public static readonly Field DraftStatus = new Field("DraftStatus", true, true); - - public static readonly Field DraftCampaignId = new Field("DraftCampaignId", true, true); - - public static readonly Field HasRunningTrial = new Field("HasRunningTrial", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field DraftId = Fields.DraftId; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field DraftName = Fields.DraftName; - - public static readonly Field DraftStatus = Fields.DraftStatus; - - public static readonly Field DraftCampaignId = Fields.DraftCampaignId; - - public static readonly Field HasRunningTrial = Fields.HasRunningTrial; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field DraftId = Fields.DraftId; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field DraftName = Fields.DraftName; - - public static readonly Field DraftStatus = Fields.DraftStatus; - - public static readonly Field DraftCampaignId = Fields.DraftCampaignId; - - public static readonly Field HasRunningTrial = Fields.HasRunningTrial; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of a draft. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DraftStatus - { - /// Invalid status. Should not be used except for detecting values that are - /// incorrect, or values that are not yet known to the user. Used for return value only. An enumeration could not be processed, - /// typically due to incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// Initial state of the draft, the advertiser can start adding changes with no - /// effect on serving. - /// - PROPOSED = 1, - /// The process to merge changes in the draft back to the original campaign has - /// completedly successfully. The advertiser cannot set this status directly. To - /// move the draft to this status, set the draft to status PROMOTING and the status - /// will be updated to PROMOTED when the changes are applied to the original - /// campaign. - /// - PROMOTED = 2, - /// The advertiser requested to merge changes in the draft back into the original - /// campaigns. The update to the original campaign will be kicked off asynchronously - /// and the status will be updated to PROMOTED or PROMOTE_FAILED upon completion. - /// - PROMOTING = 3, - /// The advertiser has archived the draft. - /// - ARCHIVED = 4, - /// The promotion failed after it was partially applied. Promote cannot be attempted - /// again safely, so the issue must be corrected in the original campaign. More - /// details about the errors are available through getErrors in the DraftService - /// API.The advertiser cannot set this status directly. To promote the draft, set - /// the draft in state PROMOTING and the status will be updated to PROMOTE_FAILED if - /// errors are encountered while applying changes to the original campaign. - /// - PROMOTE_FAILED = 5, - } - - - /// Contains a subset of drafts resulting from the filtering and paging of DraftService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DraftPage : NullStatsPage - { - private Draft[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Draft[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Represents error codes for DraftService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DraftError : ApiError - { - private DraftErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public DraftErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "DraftError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DraftErrorReason - { - /// The draft is archived and cannot be modified further. - /// - CANNOT_CHANGE_ARCHIVED_DRAFT = 0, - /// The draft has been promoted and cannot be modified further. - /// - CANNOT_CHANGE_PROMOTED_DRAFT = 1, - /// The draft has failed to be promoted and cannot be modified further. - /// - CANNOT_CHANGE_PROMOTE_FAILED_DRAFT = 2, - /// This customer is not allowed to create drafts. - /// - CUSTOMER_CANNOT_CREATE_DRAFT = 3, - /// This campaign is not allowed to create drafts. - /// - CAMPAIGN_CANNOT_CREATE_DRAFT = 4, - /// A draft with this name already exists. - /// - DUPLICATE_DRAFT_NAME = 5, - /// This modification cannot be made on a draft. - /// - INVALID_DRAFT_CHANGE = 6, - /// The draft cannot be transitioned to the specified status from the its current - /// status. - /// - INVALID_STATUS_TRANSITION = 7, - /// The campaign has reached the maximum number of drafts that can be created for a - /// campaign throughout its lifetime. No additional drafts can be created for this - /// campaign. Archived drafts also count towards this limit. - /// - MAX_NUMBER_OF_DRAFTS_PER_CAMPAIGN_REACHED = 8, - DRAFT_ERROR = 9, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.DraftServiceInterface")] - public interface DraftServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.DraftPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.DraftService.mutateResponse mutate(Wrappers.DraftService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.DraftService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.DraftPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// DraftOperation for creating drafts and changing draft states. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DraftOperation : Operation - { - private Draft operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Draft operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from a {@DraftService#mutate} call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DraftReturnValue : ListReturnValue - { - private Draft[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Draft[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface DraftServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.DraftServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// The DraftService is used for creating new drafts and controlling the life cycle - /// of drafts. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class DraftService : AdWordsSoapClient, IDraftService - { - /// Creates a new instance of the class. - /// - public DraftService() - { - } - - /// Creates a new instance of the class. - /// - public DraftService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public DraftService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public DraftService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public DraftService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a DraftPage that contains a list of Draft objects matching the selector. - /// if problems occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.DraftPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.DraftService.mutateResponse Google.Api.Ads.AdWords.v201806.DraftServiceInterface.mutate(Wrappers.DraftService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// The mutate action is used for creating new Drafts and controlling the life cycle - /// of Drafts, such as abandoning or promoting Drafts. - /// The list of updated Drafts, in the same order as the - /// list. - /// if problems occurred while processing the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.DraftReturnValue mutate(Google.Api.Ads.AdWords.v201806.DraftOperation[] operations) - { - Wrappers.DraftService.mutateRequest inValue = new Wrappers.DraftService.mutateRequest(); - inValue.operations = operations; - Wrappers.DraftService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.DraftServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.DraftServiceInterface.mutateAsync(Wrappers.DraftService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.DraftOperation[] operations) - { - Wrappers.DraftService.mutateRequest inValue = new Wrappers.DraftService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.DraftServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a DraftPage that contains a list of Draft objects matching the query. - /// if problems occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.DraftPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.DraftAsyncErrorService - { - } - /// An error that has occurred while asynchronously processing the promotion of a - /// draft. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DraftAsyncError - { - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long draftIdField; - - private bool draftIdFieldSpecified; - - private long draftCampaignIdField; - - private bool draftCampaignIdFieldSpecified; - - private ApiError asyncErrorField; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - private long draftAdGroupIdField; - - private bool draftAdGroupIdFieldSpecified; - - /// The error occurred during promotion while updating this Campaign or an entity in - /// this Campaign. This field can only be used with Predicate Operators EQUALS and - /// IN. When using a Predicate with this field, also include a Predicate for the - /// field DraftId. This field can be selected - /// using the value "BaseCampaignId".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// The draft that was attempted to be promoted. This field can only be used with - /// Predicate Operators EQUALS and IN. When using a Predicate with this field, also - /// include a Predicate for the field BaseCampaignId. This field can be selected using the value "DraftId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long draftId - { - get - { - return this.draftIdField; - } - set - { - this.draftIdField = value; - this.draftIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftIdSpecified - { - get - { - return this.draftIdFieldSpecified; - } - set - { - this.draftIdFieldSpecified = value; - } - } - - /// The draft Campaign that was attempted to be promoted. This field can be selected using the value "DraftCampaignId". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long draftCampaignId - { - get - { - return this.draftCampaignIdField; - } - set - { - this.draftCampaignIdField = value; - this.draftCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftCampaignIdSpecified - { - get - { - return this.draftCampaignIdFieldSpecified; - } - set - { - this.draftCampaignIdFieldSpecified = value; - } - } - - /// The error that occurred while promoting the draft. This field can be selected using the value "AsyncError". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public ApiError asyncError - { - get - { - return this.asyncErrorField; - } - set - { - this.asyncErrorField = value; - } - } - - /// The error occurred during promotion while updating this AdGroup or an entity in - /// this AdGroup. This field can be selected - /// using the value "BaseAdGroupId". This - /// field is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// The draft AdGroup that was attempted to be promoted. This field can be selected using the value "DraftAdGroupId". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long draftAdGroupId - { - get - { - return this.draftAdGroupIdField; - } - set - { - this.draftAdGroupIdField = value; - this.draftAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftAdGroupIdSpecified - { - get - { - return this.draftAdGroupIdFieldSpecified; - } - set - { - this.draftAdGroupIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field DraftId = new Field("DraftId", true, true); - - public static readonly Field DraftCampaignId = new Field("DraftCampaignId", false, true); - - public static readonly Field AsyncError = new Field("AsyncError", false, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", false, true); - - public static readonly Field DraftAdGroupId = new Field("DraftAdGroupId", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field DraftId = Fields.DraftId; - - public static readonly Field DraftCampaignId = Fields.DraftCampaignId; - - public static readonly Field AsyncError = Fields.AsyncError; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static readonly Field DraftAdGroupId = Fields.DraftAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field DraftId = Fields.DraftId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of DraftAsyncErrors resulting from the filtering and paging of - /// DraftAsyncErrorService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class DraftAsyncErrorPage : Page - { - private DraftAsyncError[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public DraftAsyncError[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Represents error codes for campaign preferences. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class CampaignPreferenceError : ApiError - { - private CampaignPreferenceErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CampaignPreferenceErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CampaignPreferenceError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum CampaignPreferenceErrorReason - { - /// A campaign cannot have two preferences with the same preference key. - /// - PREFERENCE_ALREADY_EXISTS = 0, - /// No preference matched the given preference key. - /// - PREFERENCE_NOT_FOUND = 1, - UNKNOWN = 2, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.DraftAsyncErrorServiceInterface")] - public interface DraftAsyncErrorServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.DraftAsyncErrorPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.DraftAsyncErrorPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface DraftAsyncErrorServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.DraftAsyncErrorServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// The DraftAsyncErrorService is retrieving asynchronous errors from promoting - /// drafts. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class DraftAsyncErrorService : AdWordsSoapClient, IDraftAsyncErrorService - { - /// Creates a new instance of the - /// class. - public DraftAsyncErrorService() - { - } - - /// Creates a new instance of the - /// class. - public DraftAsyncErrorService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public DraftAsyncErrorService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public DraftAsyncErrorService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public DraftAsyncErrorService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a DraftAsyncErrorPage that contains a list of DraftAsyncErrors matching - /// the selector. - /// if problems occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.DraftAsyncErrorPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - /// Returns a DraftAsyncErrorPage that contains a list of DraftAsyncErrors matching - /// the query. - /// if problems occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.DraftAsyncErrorPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.TrialService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.TrialOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.TrialOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.TrialReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.TrialReturnValue rval) - { - this.rval = rval; - } - } - } - /// Interface for campaign trial entities. A trial is an experiment created by an - /// advertiser from changes in a draft. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Trial - { - private long idField; - - private bool idFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long draftIdField; - - private bool draftIdFieldSpecified; - - private long budgetIdField; - - private bool budgetIdFieldSpecified; - - private string nameField; - - private string startDateField; - - private string endDateField; - - private int trafficSplitPercentField; - - private bool trafficSplitPercentFieldSpecified; - - private TrialStatus statusField; - - private bool statusFieldSpecified; - - private long trialCampaignIdField; - - private bool trialCampaignIdFieldSpecified; - - /// The id of this trial. This field can be - /// selected using the value "Id".This - /// field can be filtered on. This field is - /// read only and will be ignored when sent to the API for the following Operators: ADD. This field is required and should not be null when it is - /// contained within Operators : SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Id of the base campaign, which will be the control arm of this trial. This field can be selected using the value - /// "BaseCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: SET. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// Valid id of the draft this trial is based on. This field can be selected using the value "DraftId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: SET. - /// This field is required and should not be - /// null when it is contained within Operators : - /// ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long draftId - { - get - { - return this.draftIdField; - } - set - { - this.draftIdField = value; - this.draftIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool draftIdSpecified - { - get - { - return this.draftIdFieldSpecified; - } - set - { - this.draftIdFieldSpecified = value; - } - } - - /// Id of the new budget to assign to the trial campaign when graduating a trial. - ///

Required for SET operations, when changing the #status to GRADUATED, and read-only - /// otherwise.

When graduating a trial, the same constraints apply to this - /// field as for a budget id passed to CampaignService when creating a - /// new campaign.

GET operations always return a - /// null budget id. This field is - /// read only and will be ignored when sent to the API for the following Operators: ADD.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public long budgetId - { - get - { - return this.budgetIdField; - } - set - { - this.budgetIdField = value; - this.budgetIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool budgetIdSpecified - { - get - { - return this.budgetIdFieldSpecified; - } - set - { - this.budgetIdFieldSpecified = value; - } - } - - /// The name of this trial. Must not conflict with the name of another trial or - /// campaign. This field can be selected using - /// the value "Name".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : ADD. The length of this string should be between 1 and 1024, inclusive, - /// in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// Date the trial begins. On add, defaults to the the base campaign's start date or - /// the current day in the parent account's local timezone (whichever is later). - /// This field can be selected using the value - /// "StartDate".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string startDate - { - get - { - return this.startDateField; - } - set - { - this.startDateField = value; - } - } - - /// Date the campaign ends. On add, defaults to the base campaign's end date. This field can be selected using the value - /// "EndDate".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string endDate - { - get - { - return this.endDateField; - } - set - { - this.endDateField = value; - } - } - - /// Traffic share to be directed to the trial arm of this trial, i.e. the arm - /// containing the trial changes (in percent). The remainder of the traffic (100 - - /// trafficSplitPercent) will be directed to the base campaign. This field can be selected using the value - /// "TrafficSplitPercent".This field can - /// be filtered on. This field must be - /// between 1 and 99, inclusive. This field - /// is read only and will be ignored when sent to the API for the following Operators: SET. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public int trafficSplitPercent - { - get - { - return this.trafficSplitPercentField; - } - set - { - this.trafficSplitPercentField = value; - this.trafficSplitPercentSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool trafficSplitPercentSpecified - { - get - { - return this.trafficSplitPercentFieldSpecified; - } - set - { - this.trafficSplitPercentFieldSpecified = value; - } - } - - /// Status of this trial. Note that a running trial will always be ACTIVE, but not - /// all ACTIVE trials are currently running: they may have ended or been scheduled - /// for the future. This field can be selected - /// using the value "Status".This field - /// can be filtered on. This field is read - /// only and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public TrialStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Id of the trial campaign. This will be null if the Trial has status CREATING. - /// This field can be selected using the value - /// "TrialCampaignId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public long trialCampaignId - { - get - { - return this.trialCampaignIdField; - } - set - { - this.trialCampaignIdField = value; - this.trialCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool trialCampaignIdSpecified - { - get - { - return this.trialCampaignIdFieldSpecified; - } - set - { - this.trialCampaignIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", true, true); - - public static readonly Field DraftId = new Field("DraftId", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field StartDate = new Field("StartDate", true, true); - - public static readonly Field EndDate = new Field("EndDate", true, true); - - public static readonly Field TrafficSplitPercent = new Field("TrafficSplitPercent", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field TrialCampaignId = new Field("TrialCampaignId", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field DraftId = Fields.DraftId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static readonly Field TrafficSplitPercent = Fields.TrafficSplitPercent; - - public static readonly Field Status = Fields.Status; - - public static readonly Field TrialCampaignId = Fields.TrialCampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field DraftId = Fields.DraftId; - - public static readonly Field Name = Fields.Name; - - public static readonly Field StartDate = Fields.StartDate; - - public static readonly Field EndDate = Fields.EndDate; - - public static readonly Field TrafficSplitPercent = Fields.TrafficSplitPercent; - - public static readonly Field Status = Fields.Status; - - public static readonly Field TrialCampaignId = Fields.TrialCampaignId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of a trial. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum TrialStatus - { - /// Invalid status. Should not be used except for detecting values that are - /// incorrect, or values that are not yet known to the user. Used for return value only. An enumeration could not be processed, - /// typically due to incompatibility with your WSDL version. - /// - UNKNOWN = 0, - /// The trial campaign is being created. - /// - CREATING = 1, - /// The trial campaign is fully created. The trial is currently running, scheduled - /// to run in the future or has ended based on its end date.The advertiser cannot - /// set this status directly. A trial with the status CREATING will be updated to - /// ACTIVE when it is fully created. - /// - ACTIVE = 2, - /// The advertiser requested to merge changes in the trial back into the original - /// campaigns. The update to the original campaign will be kicked off asynchronously - /// and the status will be updated to PROMOTED or PROMOTE_FAILED upon completion. - /// - PROMOTING = 3, - /// The process to merge changes in the trial back to the original campaign has - /// completedly successfully. The advertiser cannot set this status directly. To - /// move the trial to this status, set the trial to status PROMOTING and the status - /// will be updated to PROMOTED when the changes are applied to the original - /// campaign. - /// - PROMOTED = 4, - /// The advertiser archived the campaign trial. - /// - ARCHIVED = 5, - /// The trial campaign failed to create. More details about the errors are available - /// through getErrors in the TrialService API.The advertiser cannot set this status - /// directly. - /// - CREATION_FAILED = 6, - /// The promotion failed after it was partially applied. Promote cannot be attempted - /// again safely, so the issue must be corrected in the original campaign. More - /// details about the errors are available through getErrors in the TrialService - /// API.The advertiser cannot set this status directly. To promote the trial, set - /// the trial in state PROMOTING and the status will be updated to PROMOTE_FAILED if - /// errors are encountered while applying changes to the original campaign. - /// - PROMOTE_FAILED = 7, - /// The advertiser has graduated the trial campaign to a standalone campaign, - /// existing independently of the trial. - /// - GRADUATED = 8, - /// The advertiser has halted the trial. - /// - HALTED = 9, - } - - - /// Contains a filtered and paged subset of campaign trials as returned by TrialService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrialPage : Page - { - private Trial[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Trial[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Error class for TrialService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrialError : ApiError - { - private TrialErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public TrialErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Error codes defined by TrialError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "TrialError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum TrialErrorReason - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Trial status cannot be updated from the current status to the requested target - /// status. - /// - INVALID_STATUS_TRANSITION = 1, - /// Cannot create a trial from a campaign using an explicitly shared budget. - /// - CANNOT_USE_TRIAL_WITH_SHARED_BUDGET = 2, - /// Cannot create a trial as long as the campaign has a running or scheduled - /// Advertiser Campaign Experiment. - /// - CANNOT_CREATE_TRIAL_WHEN_CAMPAIGN_HAS_ACTIVE_EXPERIMENTS = 3, - /// Cannot create a trial for a base campaign, which is deleted. - /// - CANNOT_CREATE_TRIAL_FOR_DELETED_BASE_CAMPAIGN = 4, - /// Cannot create a trial from a draft, which has a status other than proposed. - /// - CANNOT_CREATE_TRIAL_FOR_NON_PROPOSED_DRAFT = 5, - /// This customer is not allowed to create a trial. - /// - CUSTOMER_CANNOT_CREATE_TRIAL = 6, - /// This campaign is not allowed to create a trial. - /// - CAMPAIGN_CANNOT_CREATE_TRIAL = 7, - /// Trying to use a trial name which is already assigned to another campaign or - /// trial. - /// - NAME_ALREADY_IN_USE = 8, - /// Trying to set a trial duration which overlaps with another trial. - /// - TRIAL_DURATIONS_MUST_NOT_OVERLAP = 9, - /// All non-archived trials must start and end within their campaign's duration. - /// - TRIAL_DURATION_MUST_BE_WITHIN_CAMPAIGN_DURATION = 10, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.TrialServiceInterface")] - public interface TrialServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.TrialPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.TrialService.mutateResponse mutate(Wrappers.TrialService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.TrialService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.TrialPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation for creating, modifying and promoting/archiving campaign trials. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrialOperation : Operation - { - private Trial operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Trial operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Return value for TrialService#mutate(java.util.List) - /// operations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrialReturnValue : ListReturnValue - { - private Trial[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Trial[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface TrialServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.TrialServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// TrialService manages the life cycle of campaign trials. It is used to create new - /// trials from drafts, modify trial properties, promote changes in a trial back to - /// its base campaign, and to archive a trial.

A trial is an experiment, running - /// two variants (trial arms) - the base campaign and the trial - at the same time, - /// directing a fixed share of traffic to each trial arm. A trial is created from a - /// draft of the base campaign and will be a snapshot of changes in the draft at the - /// time of creation.

Constraints

  • A campaign cannot have - /// running/scheduled "AdWords Campaign Experiments" (ACE) and running/scheduled - /// trials at the same time. Trial creation will fail, if the base campaign has a - /// running/scheduled ACE experiment.
  • Trial names must be unique across all - /// of the customer's non-deleted trial and campaign names.
  • When creating a - /// trial, [startDate, endDate] cannot be in the past or overlap with any other - /// running/scheduled trial, must be within the base campaign's [startDate, endDate] - /// and endDate must be later than startDate.
  • A future startDate/endDate - /// can be updated to a different future startDate/endDate as long as the - /// constraints on [startDate, endDate] are not violated.
  • There is at most - /// one trial running and at most one trial scheduled for the future at a time, per - /// base campaign.
  • The base campaign's budget cannot be shared with any - /// other campaign. Trial creation will fail if the base campaign's budget is shared - /// with another campaign.

Life cycle

A trial's status reflects the state of the trial within its life - /// cycle. Some status transitions are performed explicitly by sending a SET operation, while other status transitions occur - /// asynchronously without a client operation.

When a trial is first ADDed, its status is CREATING. The trial will be created - /// asynchronously, and once it is fully created, its status will change to ACTIVE.

If the asynchronous creation of the - /// trial fails, its status will change to CREATION_FAILED.

To promote - /// changes in an ACTIVE trial back to the base - /// campaign, set the trial status to PROMOTING. - /// The promotion itself will occur asynchronously. If the promotion operation fails - /// after some of the base campaign has already been updated, the status will change - /// to PROMOTE_FAILED.

To graduate - /// an ACTIVE trial, which will allow its - /// associated campaign to act independently of the trial and free it of - /// restrictions from the trial, set the status to GRADUATED and provide a new budgetId for the campaign to use (since it can no - /// longer share the base campaign's budget).

Any trial that is not CREATING or PROMOTING can be archived by setting the status - /// to the value of the same name.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class TrialService : AdWordsSoapClient, ITrialService - { - /// Creates a new instance of the class. - /// - public TrialService() - { - } - - /// Creates a new instance of the class. - /// - public TrialService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public TrialService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public TrialService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public TrialService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Loads a TrialPage containing a list of Trial objects - /// matching the selector. - /// defines which subset of all available trials to return, - /// the sort order, and which fields to include - /// Returns a page of matching trial objects. - /// if errors occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.TrialPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.TrialService.mutateResponse Google.Api.Ads.AdWords.v201806.TrialServiceInterface.mutate(Wrappers.TrialService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Creates new trials, updates properties and controls the life cycle of existing - /// trials. See TrialService for details on the trial - /// life cycle. - /// Returns the list of updated Trials, in the same order as the - /// operations list. - /// if errors occurred while processing the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.TrialReturnValue mutate(Google.Api.Ads.AdWords.v201806.TrialOperation[] operations) - { - Wrappers.TrialService.mutateRequest inValue = new Wrappers.TrialService.mutateRequest(); - inValue.operations = operations; - Wrappers.TrialService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.TrialServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.TrialServiceInterface.mutateAsync(Wrappers.TrialService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.TrialOperation[] operations) - { - Wrappers.TrialService.mutateRequest inValue = new Wrappers.TrialService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.TrialServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Loads a TrialPage containing a list of Trial objects - /// matching the query. - /// defines which subset of all available trials to return, the - /// sort order, and which fields to include - /// Returns a page of matching trial objects. - /// if errors occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.TrialPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.TrialAsyncErrorService - { - } - /// An error that has occurred while asynchronously processing the creation or - /// promotion of a trial. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrialAsyncError - { - private long trialIdField; - - private bool trialIdFieldSpecified; - - private ApiError asyncErrorField; - - private long trialCampaignIdField; - - private bool trialCampaignIdFieldSpecified; - - private long trialAdGroupIdField; - - private bool trialAdGroupIdFieldSpecified; - - private long baseCampaignIdField; - - private bool baseCampaignIdFieldSpecified; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - /// The trial that was attempted to be created or promoted. This field can be selected using the value "TrialId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long trialId - { - get - { - return this.trialIdField; - } - set - { - this.trialIdField = value; - this.trialIdSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool trialIdSpecified - { - get - { - return this.trialIdFieldSpecified; - } - set - { - this.trialIdFieldSpecified = value; - } - } - - /// The error that occurred while processing the trial. This field can be selected using the value "AsyncError". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ApiError asyncError - { - get - { - return this.asyncErrorField; - } - set - { - this.asyncErrorField = value; - } - } - - /// The error occurred during trial creation while updating this Campaign or an - /// entity in this Campaign. This field can be - /// selected using the value "TrialCampaignId". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long trialCampaignId - { - get - { - return this.trialCampaignIdField; - } - set - { - this.trialCampaignIdField = value; - this.trialCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool trialCampaignIdSpecified - { - get - { - return this.trialCampaignIdFieldSpecified; - } - set - { - this.trialCampaignIdFieldSpecified = value; - } - } - - /// The error occurred during trial creation while updating this AdGroup or an - /// entity in this AdGroup. This field can be - /// selected using the value "TrialAdGroupId". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public long trialAdGroupId - { - get - { - return this.trialAdGroupIdField; - } - set - { - this.trialAdGroupIdField = value; - this.trialAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool trialAdGroupIdSpecified - { - get - { - return this.trialAdGroupIdFieldSpecified; - } - set - { - this.trialAdGroupIdFieldSpecified = value; - } - } - - /// The error occurred during trial promotion while updating this Campaign or an - /// entity in this Campaign. This field can be - /// selected using the value "BaseCampaignId". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public long baseCampaignId - { - get - { - return this.baseCampaignIdField; - } - set - { - this.baseCampaignIdField = value; - this.baseCampaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseCampaignIdSpecified - { - get - { - return this.baseCampaignIdFieldSpecified; - } - set - { - this.baseCampaignIdFieldSpecified = value; - } - } - - /// The error occurred during trial promotion while updating this AdGroup or an - /// entity in this AdGroup. This field can be - /// selected using the value "BaseAdGroupId". This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field TrialId = new Field("TrialId", true, true); - - public static readonly Field AsyncError = new Field("AsyncError", false, true); - - public static readonly Field TrialCampaignId = new Field("TrialCampaignId", false, true); - - public static readonly Field TrialAdGroupId = new Field("TrialAdGroupId", false, true); - - public static readonly Field BaseCampaignId = new Field("BaseCampaignId", false, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field TrialId = Fields.TrialId; - - public static readonly Field AsyncError = Fields.AsyncError; - - public static readonly Field TrialCampaignId = Fields.TrialCampaignId; - - public static readonly Field TrialAdGroupId = Fields.TrialAdGroupId; - - public static readonly Field BaseCampaignId = Fields.BaseCampaignId; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field TrialId = Fields.TrialId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Contains a subset of TrialAsyncErrors resulting from the filtering and paging of - /// TrialAsyncErrorService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TrialAsyncErrorPage : Page - { - private TrialAsyncError[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public TrialAsyncError[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.TrialAsyncErrorServiceInterface")] - public interface TrialAsyncErrorServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.TrialAsyncErrorPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.TrialAsyncErrorPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface TrialAsyncErrorServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.TrialAsyncErrorServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// The TrialAsyncErrorService is retrieving asynchronous errors from creating and - /// promoting trials. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class TrialAsyncErrorService : AdWordsSoapClient, ITrialAsyncErrorService - { - /// Creates a new instance of the - /// class. - public TrialAsyncErrorService() - { - } - - /// Creates a new instance of the - /// class. - public TrialAsyncErrorService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public TrialAsyncErrorService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public TrialAsyncErrorService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public TrialAsyncErrorService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a TrialAsyncErrorPage that contains a list of TrialAsyncErrors matching - /// the selector. - /// if problems occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.TrialAsyncErrorPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - /// Returns a TrialAsyncErrorPage that contains a list of TrialAsyncError matching - /// the query. - /// if problems occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.TrialAsyncErrorPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.AdGroupBidModifierService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdGroupBidModifierOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdGroupBidModifierOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdGroupBidModifierReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdGroupBidModifierReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a PreferredContent criterion.

Possible IDs: 400 - /// (YOUTUBE_TOP_CONTENT).

A criterion of this type can only be - /// created using an ID. This is disabled for - /// AdX when it is contained within Operators: ADD, SET.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class PreferredContent : Criterion - { - } - - - /// Represents an adgroup level bid modifier override for campaign level criterion - /// bid modifier values. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupBidModifier - { - private long campaignIdField; - - private bool campaignIdFieldSpecified; - - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private Criterion criterionField; - - private double bidModifierField; - - private bool bidModifierFieldSpecified; - - private long baseAdGroupIdField; - - private bool baseAdGroupIdFieldSpecified; - - private BidModifierSource bidModifierSourceField; - - private bool bidModifierSourceFieldSpecified; - - /// The campaign that the criterion is in. This - /// field can be selected using the value "CampaignId".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long campaignId - { - get - { - return this.campaignIdField; - } - set - { - this.campaignIdField = value; - this.campaignIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool campaignIdSpecified - { - get - { - return this.campaignIdFieldSpecified; - } - set - { - this.campaignIdFieldSpecified = value; - } - } - - /// The adgroup that the bid modifier override is in. This field can be selected using the value "AdGroupId".This field can be filtered on. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// The criterion whose bid value is being overridden.

Currently, bid modifier - /// overrides are supported only for platform criterion (ID=30000, 30001, 30002) and - /// preferred content criterion (ID = 400). The AdGroupBidModifierService#get method - /// returns all platform and preferred content criteria. This field is required and should not be null.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public Criterion criterion - { - get - { - return this.criterionField; - } - set - { - this.criterionField = value; - } - } - - /// The modifier for bids when the criterion matches.

Valid modifier values range - /// from 0.1 to 10.0, with 0.0 reserved for - /// opting out of a platform. This field can be - /// selected using the value "BidModifier".This field can be filtered on. This field is required and should not be null when it is - /// contained within Operators : ADD, SET.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public double bidModifier - { - get - { - return this.bidModifierField; - } - set - { - this.bidModifierField = value; - this.bidModifierSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSpecified - { - get - { - return this.bidModifierFieldSpecified; - } - set - { - this.bidModifierFieldSpecified = value; - } - } - - /// ID of the base adgroup from which this draft/trial adgroup bid modifier was - /// created. For base adgroups this is equal to the adgroup ID. If the adgroup was - /// created in the draft or trial and has no corresponding base adgroup, this field - /// is null. This field is readonly and only returned on get requests. This field can be selected using the value - /// "BaseAdGroupId".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public long baseAdGroupId - { - get - { - return this.baseAdGroupIdField; - } - set - { - this.baseAdGroupIdField = value; - this.baseAdGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool baseAdGroupIdSpecified - { - get - { - return this.baseAdGroupIdFieldSpecified; - } - set - { - this.baseAdGroupIdFieldSpecified = value; - } - } - - /// Bid modifier source. This field can be - /// selected using the value "BidModifierSource".This field can be filtered on. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public BidModifierSource bidModifierSource - { - get - { - return this.bidModifierSourceField; - } - set - { - this.bidModifierSourceField = value; - this.bidModifierSourceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool bidModifierSourceSpecified - { - get - { - return this.bidModifierSourceFieldSpecified; - } - set - { - this.bidModifierSourceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CampaignId = new Field("CampaignId", true, true); - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field BidModifier = new Field("BidModifier", true, true); - - public static readonly Field BaseAdGroupId = new Field("BaseAdGroupId", true, true); - - public static readonly Field BidModifierSource = new Field("BidModifierSource", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static readonly Field BidModifierSource = Fields.BidModifierSource; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CampaignId = Fields.CampaignId; - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field BidModifier = Fields.BidModifier; - - public static readonly Field BaseAdGroupId = Fields.BaseAdGroupId; - - public static readonly Field BidModifierSource = Fields.BidModifierSource; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Enumerates possible sources for bid modifier. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BidModifierSource - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// The bid modifier is specified at the campaign level, on the campaign level - /// criterion. - /// - CAMPAIGN = 1, - /// The bid modifier is specified (overridden) at the ad group level. - /// - AD_GROUP = 2, - } - - - /// Contains a subset of adgroup bid modifiers resulting from a call to AdGroupBidModifierService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupBidModifierPage : Page - { - private AdGroupBidModifier[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdGroupBidModifier[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdGroupBidModifierServiceInterface")] - public interface AdGroupBidModifierServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupBidModifierPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdGroupBidModifierService.mutateResponse mutate(Wrappers.AdGroupBidModifierService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdGroupBidModifierService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdGroupBidModifierPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation used to create or mutate a AdGroupBidModifier.

If you try to ADD a - /// criterion that already exists, it will be treated as a SET operation on the - /// existing criterion.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupBidModifierOperation : Operation - { - private AdGroupBidModifier operandField; - - /// The AdGroupBidModifier to create or mutate. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdGroupBidModifier operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdGroupBidModifierService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdGroupBidModifierReturnValue : ListReturnValue - { - private AdGroupBidModifier[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdGroupBidModifier[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdGroupBidModifierServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdGroupBidModifierServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service used to manage campaign criterion bid overrides at the ad group level. - /// Currently this service supports Platform and PreferredContent bid multiplier - /// overrides. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdGroupBidModifierService : AdWordsSoapClient, IAdGroupBidModifierService - { - /// Creates a new instance of the - /// class. - public AdGroupBidModifierService() - { - } - - /// Creates a new instance of the - /// class. - public AdGroupBidModifierService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public AdGroupBidModifierService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdGroupBidModifierService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public AdGroupBidModifierService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Gets ad group level criterion bid modifiers. - /// The selector specifying the AdGroupBidModifiers to return. - /// A list of ad group bid modifiers. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupBidModifierPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdGroupBidModifierService.mutateResponse Google.Api.Ads.AdWords.v201806.AdGroupBidModifierServiceInterface.mutate(Wrappers.AdGroupBidModifierService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, removes or updates ad group bid modifier overrides. - /// The operations to apply. - /// The added ad group bid modifier overrides. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupBidModifierReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupBidModifierOperation[] operations) - { - Wrappers.AdGroupBidModifierService.mutateRequest inValue = new Wrappers.AdGroupBidModifierService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdGroupBidModifierService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdGroupBidModifierServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdGroupBidModifierServiceInterface.mutateAsync(Wrappers.AdGroupBidModifierService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupBidModifierOperation[] operations) - { - Wrappers.AdGroupBidModifierService.mutateRequest inValue = new Wrappers.AdGroupBidModifierService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdGroupBidModifierServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of AdGroupBidModifiers that - /// match the query. - /// The SQL-like AWQL query string. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdGroupBidModifierPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.BatchJobOpsService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.Operation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.Operation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.MutateResult[] rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.MutateResult[] rval) - { - this.rval = rval; - } - } - } - /// A marker interface for entities that can be operated upon in mutate operations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class Operand - { - private object itemField; - - [System.Xml.Serialization.XmlElementAttribute("Ad", typeof(Ad), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroup", typeof(AdGroup), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupAd", typeof(AdGroupAd), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupAdLabel", typeof(AdGroupAdLabel), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupBidModifier", typeof(AdGroupBidModifier), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupCriterion", typeof(AdGroupCriterion), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupCriterionLabel", typeof(AdGroupCriterionLabel), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupExtensionSetting", typeof(AdGroupExtensionSetting), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("AdGroupLabel", typeof(AdGroupLabel), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("Asset", typeof(Asset), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("Budget", typeof(Budget), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("Campaign", typeof(Campaign), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("CampaignCriterion", typeof(CampaignCriterion), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("CampaignExtensionSetting", typeof(CampaignExtensionSetting), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("CampaignLabel", typeof(CampaignLabel), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("CampaignSharedSet", typeof(CampaignSharedSet), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("CustomerExtensionSetting", typeof(CustomerExtensionSetting), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("ExtensionFeedItem", typeof(ExtensionFeedItem), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("FeedItem", typeof(FeedItem), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("FeedItemTarget", typeof(FeedItemTarget), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("Label", typeof(Label), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("Media", typeof(Media), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("SharedCriterion", typeof(SharedCriterion), Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("SharedSet", typeof(SharedSet), Order = 0)] - public object Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - } - - - /// The result of a single mutate operation. Contains either the resulting Operand - /// or the error(s) that occurred when attempting the mutate. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MutateResult - { - private Operand resultField; - - private ApiError[] errorListField; - - private long indexField; - - private bool indexFieldSpecified; - - /// The result if there is one. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Operand result - { - get - { - return this.resultField; - } - set - { - this.resultField = value; - } - } - - /// The errors if there are any. - /// - [System.Xml.Serialization.XmlArrayAttribute(Order = 1)] - [System.Xml.Serialization.XmlArrayItemAttribute("errors", IsNullable = false)] - public ApiError[] errorList - { - get - { - return this.errorListField; - } - set - { - this.errorListField = value; - } - } - - /// The 0-based index of the result record. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public long index - { - get - { - return this.indexField; - } - set - { - this.indexField = value; - this.indexSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool indexSpecified - { - get - { - return this.indexFieldSpecified; - } - set - { - this.indexFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operations for adding/updating Budget entities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BudgetOperation : Operation - { - private Budget operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Budget operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TaskExecutionError : ApiError - { - private TaskExecutionErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public TaskExecutionErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "TaskExecutionError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum TaskExecutionErrorReason - { - TEMP_ID_ALREADY_USED = 0, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.BatchJobOpsServiceInterface")] - public interface BatchJobOpsServiceInterface - { - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(CriterionParameter))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.BatchJobOpsService.mutateResponse mutate(Wrappers.BatchJobOpsService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.BatchJobOpsService.mutateRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface BatchJobOpsServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.BatchJobOpsServiceInterface, System.ServiceModel.IClientChannel - { - } - namespace Wrappers.OfflineConversionAdjustmentFeedService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedReturnValue rval) - { - this.rval = rval; - } - } - } - /// A container for return values from the OfflineConversionAdjustmentFeedService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionAdjustmentFeedReturnValue : ListReturnValue - { - private OfflineConversionAdjustmentFeed[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public OfflineConversionAdjustmentFeed[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of partial failure errors. - /// - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a record in the offline conversion adjustments feed that advertisers - /// upload. This class is inherited by GclidOfflineConversionAdjustmentFeed and - /// OrderIdOfflineConversionAdjustmentFeed because advertisers upload conversion - /// name and either (order id) or (gclid, conversion time) to identify a conversion. - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(OrderIdOfflineConversionAdjustmentFeed))] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(GclidOfflineConversionAdjustmentFeed))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public abstract partial class OfflineConversionAdjustmentFeed - { - private string conversionNameField; - - private string adjustmentTimeField; - - private OfflineConversionAdjustmentType adjustmentTypeField; - - private bool adjustmentTypeFieldSpecified; - - private double adjustedValueField; - - private bool adjustedValueFieldSpecified; - - private string adjustedValueCurrencyCodeField; - - private string offlineConversionAdjustmentFeedTypeField; - - /// The name associated with the conversion for this adjustment This field is required and should not be - /// null. The length of - /// this string should be between 1 and 100, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string conversionName - { - get - { - return this.conversionNameField; - } - set - { - this.conversionNameField = value; - } - } - - /// The instant that this adjustment occurred as reported by the advertiser. This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string adjustmentTime - { - get - { - return this.adjustmentTimeField; - } - set - { - this.adjustmentTimeField = value; - } - } - - /// The adjustment type. (RETRACT, RESTATE) This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public OfflineConversionAdjustmentType adjustmentType - { - get - { - return this.adjustmentTypeField; - } - set - { - this.adjustmentTypeField = value; - this.adjustmentTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adjustmentTypeSpecified - { - get - { - return this.adjustmentTypeFieldSpecified; - } - set - { - this.adjustmentTypeFieldSpecified = value; - } - } - - /// The adjusted value used for restatements. This is the value of the conversion - /// after adjustment. For example, to change the value of a conversion from 100 to - /// 70, an adjusted value of 70 should be reported. This is required for - /// restatements and should not be used for retractions. An error will be returned - /// if an adjusted value is provided for a retraction. This field must be greater than or equal to 0. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public double adjustedValue - { - get - { - return this.adjustedValueField; - } - set - { - this.adjustedValueField = value; - this.adjustedValueSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adjustedValueSpecified - { - get - { - return this.adjustedValueFieldSpecified; - } - set - { - this.adjustedValueFieldSpecified = value; - } - } - - /// The currency of the adjusted value. This is can be used for restatements and - /// should not be used for retractions. An error will be returned if a - /// adjustedValueCurrency is provided for a retraction. If not provided for a - /// restatement, then the default currency from the conversion type is used, and if - /// that is not set then the account currency is used. This is the ISO 4217 - /// 3-character currency code e.g. USD or EUR. The length of this string should be between 3 and 3, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string adjustedValueCurrencyCode - { - get - { - return this.adjustedValueCurrencyCodeField; - } - set - { - this.adjustedValueCurrencyCodeField = value; - } - } - - /// Indicates that this instance is a subtype of OfflineConversionAdjustmentFeed. - /// Although this field is returned in the response, it is ignored on input and - /// cannot be selected. Specify xsi:type instead. - /// - [System.Xml.Serialization.XmlElementAttribute("OfflineConversionAdjustmentFeed.Type", Order = 5)] - public string OfflineConversionAdjustmentFeedType - { - get - { - return this.offlineConversionAdjustmentFeedTypeField; - } - set - { - this.offlineConversionAdjustmentFeedTypeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OfflineConversionAdjustmentType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UKNOWN = 0, - /// Adjustment reported a retraction. - /// - RETRACT = 1, - /// Adjustment reported a restatement. Only conversion values can be restated. - /// - RESTATE = 2, - } - - - /// A conversion adjustment record for conversions uploaded with order ID. Inherits - /// from abstract class OfflineConversionAdjustmentFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OrderIdOfflineConversionAdjustmentFeed : OfflineConversionAdjustmentFeed - { - private string orderIdField; - - /// The orderId for the conversion for this adjustment. Used to identify conversion - /// if conversionTime and gclid are not provided. Provided through - /// OrderIdOfflineConversionAdjustmentFeed. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string orderId - { - get - { - return this.orderIdField; - } - set - { - this.orderIdField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : OfflineConversionAdjustmentFeed.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : OfflineConversionAdjustmentFeed.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : OfflineConversionAdjustmentFeed.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A conversion adjustment record for conversions uploaded with gclid and - /// conversion occurrence time. Inherits from abstract class - /// OfflineConversionAdjustmentFeed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class GclidOfflineConversionAdjustmentFeed : OfflineConversionAdjustmentFeed - { - private string googleClickIdField; - - private string conversionTimeField; - - /// The google click ID associated with the conversion for this adjustment. Has to - /// be provided with conversion occurrence time to identify conversion. Provided - /// through GclidOfflineConversionAdjustmentFeed. This field is required and should not be null. - /// The length of this string should be - /// between 1 and 512, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string googleClickId - { - get - { - return this.googleClickIdField; - } - set - { - this.googleClickIdField = value; - } - } - - /// The instant that the conversion for this adjustment occurred. Provided with - /// gclid to identify the conversion. Provided through - /// GclidOfflineConversionAdjustmentFeed. This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string conversionTime - { - get - { - return this.conversionTimeField; - } - set - { - this.conversionTimeField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : OfflineConversionAdjustmentFeed.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : OfflineConversionAdjustmentFeed.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : OfflineConversionAdjustmentFeed.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation for uploading OfflineConversionAdjustmentFeed. See - /// OfflineConversionAdjustmentFeedService#mutate. - ///

Note: Only the ADD operator is supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionAdjustmentFeedOperation : Operation - { - private OfflineConversionAdjustmentFeed operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineConversionAdjustmentFeed operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Errors that the OfflineConversionAdjustmentFeedService can return. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class OfflineConversionAdjustmentError : ApiError - { - private OfflineConversionAdjustmentErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public OfflineConversionAdjustmentErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reasons for an OfflineConversionAdjustmentError. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "OfflineConversionAdjustmentError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum OfflineConversionAdjustmentErrorReason - { - /// The retraction incorrectly contains adjusted value or currency. Retractions are - /// intended to nullify conversions and thus should not have an adjusted value or - /// currency. - /// - RETRACTION_WITH_VALUE_OR_CURRENCY = 0, - /// The restatement does not contain an adjusted value. - /// - RESTATEMENT_WITHOUT_VALUE = 1, - /// This conversion time is in the future. This only occurs when the advertiser is - /// reporting adjustments using gclid and conversion time instead of using order id. - /// - FUTURE_CONVERSION_TIME = 2, - /// This adjustment time is in the future. - /// - FUTURE_ADJUSTMENT_TIME = 3, - /// The adjustment's conversion type was created too recently. - /// - TOO_RECENT_CONVERSION_TYPE = 4, - /// This uploading account does not have a conversion type that matches the - /// conversion type of this adjustment. - /// - INVALID_CONVERSION_TYPE = 5, - /// A retraction with a different adjustment occurrence timestamp was found for this - /// conversion. - /// - CONVERSION_ALREADY_CANCELED = 6, - /// A conversion for the given (order id, conversion name) or (gclid, conversion - /// occurrence time, conversion name) could not be found. - /// - CONVERSION_NOT_FOUND = 7, - /// An expired conversion was found for the given (order id, conversion name) or - /// (gclid, conversion occurrence time, conversion name). Conversions expire after - /// 90 days, after which adjustments cannot be reported against them. - /// - CONVERSION_EXPIRED = 8, - /// The given adjustment occurrence time precedes that of the original conversion. - /// - ADJUSTMENT_PRECEDES_CONVERSION = 9, - /// A restatement was found with a more recent adjustment occurrence timestamp for - /// the same conversion. - /// - MORE_RECENT_RESTATEMENT_FOUND = 10, - /// Adjustments are currently not supported for attributed conversions. - /// - ATTRIBUTED_CONVERSION_NOT_SUPPORTED = 11, - /// The conversion was created too recently. - /// - TOO_RECENT_CONVERSION = 12, - /// A conversion associated with this order id cannot be adjusted because the order - /// id is less than 2 characters or is a static value like "order_id" or - /// "undefined". - /// - INVALID_ORDER_ID = 13, - /// Restatements cannot be reported for a conversion action that always uses the - /// default value. - /// - CANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE = 14, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 15, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedServiceInterface")] - public interface OfflineConversionAdjustmentFeedServiceInterface - { - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ListReturnValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Operation))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.OfflineConversionAdjustmentFeedService.mutateResponse mutate(Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface OfflineConversionAdjustmentFeedServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service that handles the reporting of offline conversion adjustments from - /// external third parties. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class OfflineConversionAdjustmentFeedService : AdWordsSoapClient, IOfflineConversionAdjustmentFeedService - { - /// Creates a new instance of the class. - public OfflineConversionAdjustmentFeedService() - { - } - - /// Creates a new instance of the class. - public OfflineConversionAdjustmentFeedService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - public OfflineConversionAdjustmentFeedService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public OfflineConversionAdjustmentFeedService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - public OfflineConversionAdjustmentFeedService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.OfflineConversionAdjustmentFeedService.mutateResponse Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedServiceInterface.mutate(Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Reports a conversion adjustment for each entry in .

Note: - /// OfflineConversionAdjustmentFeedOperation - /// supports only the ADD operator. (SET and - /// are not supported.)

- ///
A list of offline conversion adjustment feed - /// operations. - /// The list of offline conversion adjustment feed results in the same - /// order as the operations. - /// If problems occurred while applying offline - /// adjustment conversions. - public virtual Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedOperation[] operations) - { - Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest inValue = new Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest(); - inValue.operations = operations; - Wrappers.OfflineConversionAdjustmentFeedService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedServiceInterface.mutateAsync(Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedOperation[] operations) - { - Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest inValue = new Wrappers.OfflineConversionAdjustmentFeedService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.AssetService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AssetOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AssetOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AssetReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AssetReturnValue rval) - { - this.rval = rval; - } - } - } - /// Contains a filtered and paged subset of Assets as returned by AssetService#get. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetPage : Page - { - private Asset[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Asset[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Error when uploading a media. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class MediaUploadError : ApiError - { - private MediaUploadErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// Error reason. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public MediaUploadErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "MediaUploadError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum MediaUploadErrorReason - { - UNKNOWN = 0, - /// File is too big. - /// - FILE_TOO_BIG = 1, - /// Image data is unrecognizable. - /// - INVALID_IMAGE = 2, - /// Animated is not allowed. - /// - ANIMATED_NOT_ALLOWED = 3, - /// Server error when uploading media bytes. - /// - SERVER_ERROR = 4, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AssetServiceInterface")] - public interface AssetServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AssetPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AssetService.mutateResponse mutate(Wrappers.AssetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AssetService.mutateRequest request); - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetOperation : Operation - { - private Asset operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Asset operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AssetReturnValue : ListReturnValue - { - private Asset[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Asset[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AssetServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AssetServiceInterface, System.ServiceModel.IClientChannel - { - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AssetService : AdWordsSoapClient, IAssetService - { - /// Creates a new instance of the class. - /// - public AssetService() - { - } - - /// Creates a new instance of the class. - /// - public AssetService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AssetService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AssetService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AssetService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Loads an AssetPage containing a list of Asset objects - /// matching the selector. - /// defines which subset of all available assets to return, - /// the sort order, and which fields to include - /// Returns a page of matching asset objects. - /// if errors occurred while retrieving the - /// results. - public virtual Google.Api.Ads.AdWords.v201806.AssetPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AssetService.mutateResponse Google.Api.Ads.AdWords.v201806.AssetServiceInterface.mutate(Wrappers.AssetService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. For AssetService, only ADD and REMOVE operations are - /// currently allowed. - /// The operations to apply. - /// A list of Assets where each entry in the list is - /// the result of applying the operation in the input list with the same - /// index. - public virtual Google.Api.Ads.AdWords.v201806.AssetReturnValue mutate(Google.Api.Ads.AdWords.v201806.AssetOperation[] operations) - { - Wrappers.AssetService.mutateRequest inValue = new Wrappers.AssetService.mutateRequest(); - inValue.operations = operations; - Wrappers.AssetService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AssetServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AssetServiceInterface.mutateAsync(Wrappers.AssetService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AssetOperation[] operations) - { - Wrappers.AssetService.mutateRequest inValue = new Wrappers.AssetService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AssetServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.AdService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.AdReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdReturnValue rval) - { - this.rval = rval; - } - } - } - /// Represents a page of Ads resulting from the query done by AdService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdPage : Page - { - private Ad[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Ad[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error for AdCampaignAdSubProductType which is used by - /// AdService.updateCampaignAdSubProductType(). - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCampaignAdSubProductTypeError : ApiError - { - private AdCampaignAdSubProductTypeErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdCampaignAdSubProductTypeErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The reasons for the target error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdCampaignAdSubProductTypeError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdCampaignAdSubProductTypeErrorReason - { - /// AdSubProductType is not allowed to be set to given value. - /// - INVALID_AD_SUB_PRODUCT_TYPE = 0, - /// Cannot change creative AdSubProduct type since it is not AD_VARIATIONS. - /// - CANNOT_CHANGE_AD_SUB_PRODUCT_TYPE = 1, - /// An unexpected or unknown error occurred. - /// - UNKNOWN = 2, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdServiceInterface")] - public interface AdServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(PolicySummaryInfo))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdService.mutateResponse mutate(Wrappers.AdService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdService.mutateRequest request); - } - - - /// Ad service operations. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdOperation : Operation - { - private Ad operandField; - - private ExemptionRequest[] exemptionRequestsField; - - private string[] ignorablePolicyTopicIdsField; - - /// Ad to operate on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public Ad operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// Exemption requests for any policy violations in this Ad. - /// - [System.Xml.Serialization.XmlElementAttribute("exemptionRequests", Order = 1)] - public ExemptionRequest[] exemptionRequests - { - get - { - return this.exemptionRequestsField; - } - set - { - this.exemptionRequestsField = value; - } - } - - /// The list of policy topic IDs that should not cause a PolicyFindingError to be - /// reported. If the up front policy check produces a policy summary containing - /// PROHIBITED or FULLY_LIMITED policy topic entries of these types, the reviewable - /// entities will be saved without reporting an error. The reviewable entities will - /// not be eligible to serve until they pass the policy check.

This field accepts - /// returned policyTopicId from PolicyTopicEntry in the PolicyFindingError.

- ///
- [System.Xml.Serialization.XmlElementAttribute("ignorablePolicyTopicIds", Order = 2)] - public string[] ignorablePolicyTopicIds - { - get - { - return this.ignorablePolicyTopicIdsField; - } - set - { - this.ignorablePolicyTopicIdsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation used to create a AdCampaignAdSubProductType. The following Operators are supported: SET. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCampaignAdSubProductTypeOperation : Operation - { - private AdCampaignAdSubProductType operandField; - - /// The AdCampaignAdSubProductType to create This - /// field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdCampaignAdSubProductType operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents an operation to update Ad.adSubProductType. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCampaignAdSubProductType - { - private long idField; - - private bool idFieldSpecified; - - /// Id of ad to update This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the AdService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdReturnValue : ListReturnValue - { - private Ad[] valueField; - - private ApiError[] partialFailureErrorsField; - - /// List of ads in an ad group. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Ad[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The result of a call to AdService#updateCampaignAdSubProductType - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdCampaignAdSubProductTypeReturnValue : ListReturnValue - { - private AdCampaignAdSubProductType[] valueField; - - /// The resulting AdCampaignAdSubProductType. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public AdCampaignAdSubProductType[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// AdService is used to update Ads. Ads are created using the AdGroupAdService at the - /// same time they are associated with an AdGroup, but Ads are mutated using AdService. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdService : AdWordsSoapClient, IAdService - { - /// Creates a new instance of the class. - /// - public AdService() - { - } - - /// Creates a new instance of the class. - /// - public AdService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AdService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of Ads. - /// The selector specifying the Ads - /// to return. - /// The page containing the Ads that meet the criteria - /// specified by the selector. - /// when there is at least one error with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.AdPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdService.mutateResponse Google.Api.Ads.AdWords.v201806.AdServiceInterface.mutate(Wrappers.AdService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. For AdService, - /// only SET operations are allowed. - /// The operations to apply. - /// A list of {@line Ad}s where each entry in the list is the result of - /// applying the operation in the input list with the same index. The returned Ads will be what is saved. - public virtual Google.Api.Ads.AdWords.v201806.AdReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdOperation[] operations) - { - Wrappers.AdService.mutateRequest inValue = new Wrappers.AdService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdServiceInterface.mutateAsync(Wrappers.AdService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdOperation[] operations) - { - Wrappers.AdService.mutateRequest inValue = new Wrappers.AdService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.CustomAffinityService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CustomAffinityOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.CustomAffinityOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute("entries", IsNullable = false)] - public Google.Api.Ads.AdWords.v201806.CustomAffinity[] rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.CustomAffinity[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateToken", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateTokenRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.CustomAffinityTokenOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateTokenRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateTokenRequest(Google.Api.Ads.AdWords.v201806.CustomAffinityTokenOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateTokenResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/rm/v201806", IsWrapped = true)] - public partial class mutateTokenResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute("entries", IsNullable = false)] - public Google.Api.Ads.AdWords.v201806.CustomAffinityToken[] rval; - - /// Creates a new instance of the class. - /// - public mutateTokenResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateTokenResponse(Google.Api.Ads.AdWords.v201806.CustomAffinityToken[] rval) - { - this.rval = rval; - } - } - } - /// A token of custom affinity audience. A token can be a keyword or placement. It - /// is immutable, that is, it can only be created or removed but not changed. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CustomAffinityToken - { - private long customAffinityIdField; - - private bool customAffinityIdFieldSpecified; - - private long customAffinityTokenIdField; - - private bool customAffinityTokenIdFieldSpecified; - - private CustomAffinityTokenTokenType tokenTypeField; - - private bool tokenTypeFieldSpecified; - - private string parameterField; - - /// CustomAffinityId can be a dummy value when token is ADDed together with - /// CustomAffinity. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long customAffinityId - { - get - { - return this.customAffinityIdField; - } - set - { - this.customAffinityIdField = value; - this.customAffinityIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customAffinityIdSpecified - { - get - { - return this.customAffinityIdFieldSpecified; - } - set - { - this.customAffinityIdFieldSpecified = value; - } - } - - /// The ID of this custom affinity token. In REMOVE operation, this field or [type, - /// parameter] pair is required. This field is - /// read only and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long customAffinityTokenId - { - get - { - return this.customAffinityTokenIdField; - } - set - { - this.customAffinityTokenIdField = value; - this.customAffinityTokenIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool customAffinityTokenIdSpecified - { - get - { - return this.customAffinityTokenIdFieldSpecified; - } - set - { - this.customAffinityTokenIdFieldSpecified = value; - } - } - - /// The type of custom affinity token, KEYWORD or URL. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public CustomAffinityTokenTokenType tokenType - { - get - { - return this.tokenTypeField; - } - set - { - this.tokenTypeField = value; - this.tokenTypeSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool tokenTypeSpecified - { - get - { - return this.tokenTypeFieldSpecified; - } - set - { - this.tokenTypeFieldSpecified = value; - } - } - - /// Keyword when token type is KEYWORD or URL string when token type is URL. This field is required and should not be - /// null when it is contained within Operators : - /// ADD. This string must not be empty, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string parameter - { - get - { - return this.parameterField; - } - set - { - this.parameterField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Type of the token. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomAffinityToken.TokenType", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CustomAffinityTokenTokenType - { - UNKNOWN = 0, - KEYWORD = 1, - URL = 2, - } - - - /// Custom affinity audience defined by a collection of examples/hints. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CustomAffinity - { - private long idField; - - private bool idFieldSpecified; - - private CustomAffinityStatus statusField; - - private bool statusFieldSpecified; - - private string nameField; - - private CustomAffinityType typeField; - - private bool typeFieldSpecified; - - private string descriptionField; - - private CustomAffinityToken[] tokensField; - - /// The ID of the custom affinity. This field - /// can be selected using the value "CustomAffinityId".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: ADD. - /// This field is required and should not be - /// null when it is contained within Operators : - /// SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Status of custom affinity, ENABLED or REMOVED. This field can be selected using the value "Status".This field can be filtered on. This field is read only and will be ignored when - /// sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public CustomAffinityStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// The name of this custom affinity. It should be unique across the same custom - /// affinity audience. This field can be - /// selected using the value "Name".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. This string must not be empty, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// The type of this custom affinity, CUSTOM_AFFINITY or CUSTOM_INTENT. By default - /// the type is set to CUSTOM_AFFINITY. This - /// field can be selected using the value "Type".This field can be filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public CustomAffinityType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// The description of this custom affinity audience. This field can be selected using the value - /// "Description".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// List of custom affinity tokens that this custom affinity is composed of. Tokens - /// can be added during CustomAffinity creation. Later they can be added or removed - /// using mutateToken method. This field is returned by the CustomAffinityService#get method without - /// the need to select. This field can be - /// selected using the value "Tokens". - /// - [System.Xml.Serialization.XmlElementAttribute("tokens", Order = 5)] - public CustomAffinityToken[] tokens - { - get - { - return this.tokensField; - } - set - { - this.tokensField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field CustomAffinityId = new Field("CustomAffinityId", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Type = new Field("Type", true, true); - - public static readonly Field Description = new Field("Description", true, true); - - public static readonly Field Tokens = new Field("Tokens", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field CustomAffinityId = Fields.CustomAffinityId; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Type = Fields.Type; - - public static readonly Field Description = Fields.Description; - - public static readonly Field Tokens = Fields.Tokens; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field CustomAffinityId = Fields.CustomAffinityId; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Type = Fields.Type; - - public static readonly Field Description = Fields.Description; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of custom affinity. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CustomAffinityStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - ENABLED = 1, - REMOVED = 2, - } - - - /// Type of custom audience segment. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CustomAffinityType - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Allow brand advertisers to define custom affinity audience segments. - /// - CUSTOM_AFFINITY = 1, - /// Allow advertisers to define custom intent audience segments. - /// - CUSTOM_INTENT = 2, - } - - - /// A container that contains a subset of CustomAffinitys resulting from the filtering of the CustomAffinityService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CustomAffinityPage - { - private CustomAffinity[] entriesField; - - private int totalNumEntriesField; - - private bool totalNumEntriesFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public CustomAffinity[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int totalNumEntries - { - get - { - return this.totalNumEntriesField; - } - set - { - this.totalNumEntriesField = value; - this.totalNumEntriesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalNumEntriesSpecified - { - get - { - return this.totalNumEntriesFieldSpecified; - } - set - { - this.totalNumEntriesFieldSpecified = value; - } - } - } - - - /// Represents possible error codes in CustomAffinityService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CustomAffinityError : ApiError - { - private CustomAffinityErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomAffinityErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error reasons. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomAffinityError.Reason", Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public enum CustomAffinityErrorReason - { - /// Duplicated name ignoring cases. - /// - NAME_ALREADY_USED = 0, - /// In remove custom affinity token operation, both token ID and pair [type, - /// parameter] are not present. - /// - CUSTOM_AFFINITY_TOKEN_ID_AND_TYPE_PARAMETER_NOT_PRESENT_IN_REMOVE = 1, - /// The pair of [type, parameter] does not exist. - /// - TYPE_AND_PARAMETER_NOT_FOUND = 2, - /// The pair of [type, parameter] already exists. - /// - TYPE_AND_PARAMETER_ALREADY_EXISTED = 3, - /// Unsupported custom affinity token type. - /// - INVALID_CUSTOM_AFFINITY_TOKEN_TYPE = 4, - /// Cannot remove a custom affinity while it's still being used as targeting. - /// - CANNOT_REMOVE_WHILE_IN_USE = 5, - /// Field mutate operator for tokens is not supported. - /// - FIELD_MUTATE_OPERATOR_FOR_TOKENS_IS_NOT_SUPPORTED = 6, - /// Read only entities are not editable. - /// - READ_ONLY_ENTITY = 7, - /// Cannot change custom affinity type. - /// - CANNOT_CHANGE_TYPE = 8, - /// Default generic error. - /// - CUSTOM_AFFINITY_SERVICE_ERROR = 9, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface")] - public interface CustomAffinityServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomAffinityPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomAffinityService.mutateResponse mutate(Wrappers.CustomAffinityService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.CustomAffinityService.mutateRequest request); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayItemAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.CustomAffinityService.mutateTokenResponse mutateToken(Wrappers.CustomAffinityService.mutateTokenRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateTokenAsync(Wrappers.CustomAffinityService.mutateTokenRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.CustomAffinityPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operation for adding or updating a custom affinity audience. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CustomAffinityOperation : Operation - { - private CustomAffinity operandField; - - /// CustomAffinity to operate on This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomAffinity operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation for adding or deleting a custom affinity token. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/rm/v201806")] - public partial class CustomAffinityTokenOperation : Operation - { - private CustomAffinityToken operandField; - - /// CustomAffinityToken to operate on This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomAffinityToken operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface CustomAffinityServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// A service which is used to manage custom affinity audience. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class CustomAffinityService : AdWordsSoapClient, ICustomAffinityService - { - /// Creates a new instance of the - /// class. - public CustomAffinityService() - { - } - - /// Creates a new instance of the - /// class. - public CustomAffinityService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public CustomAffinityService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CustomAffinityService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public CustomAffinityService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Provides the ability to get one or more custom affinity audience with the - /// ability to filter based various criteria. - /// a selector describing the subset of custom - /// affinity audience for this customer. - /// A page of custom affinity audience as described by the - /// selector. - public virtual Google.Api.Ads.AdWords.v201806.CustomAffinityPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomAffinityService.mutateResponse Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface.mutate(Wrappers.CustomAffinityService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies a list of mutate operations (i.e. add, set) to custom affinity audience: - ///

Add - creates a custom affinity audience Set - updates a custom affinity - /// audience

Notice that custom affinity tokens are not managed by this - /// method. They are created/deleted by mutateToken method. But when a - /// new custom affinity audience is added, its tokens are also added.

- ///
the operations to apply - /// a list of CustomAffinity objects - public virtual Google.Api.Ads.AdWords.v201806.CustomAffinity[] mutate(Google.Api.Ads.AdWords.v201806.CustomAffinityOperation[] operations) - { - Wrappers.CustomAffinityService.mutateRequest inValue = new Wrappers.CustomAffinityService.mutateRequest(); - inValue.operations = operations; - Wrappers.CustomAffinityService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface.mutateAsync(Wrappers.CustomAffinityService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomAffinityOperation[] operations) - { - Wrappers.CustomAffinityService.mutateRequest inValue = new Wrappers.CustomAffinityService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.CustomAffinityService.mutateTokenResponse Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface.mutateToken(Wrappers.CustomAffinityService.mutateTokenRequest request) - { - return base.Channel.mutateToken(request); - } - - /// Applies a list of mutate operations (i.e. add, remove) to custom affinity - /// tokens:

Add - creates a custom affinity token Set - set operation for custom - /// affinity token is not supported Remove - deletes a custom affinity token

- ///
the operations to apply - /// a list of CustomAffinityToken objects - public virtual Google.Api.Ads.AdWords.v201806.CustomAffinityToken[] mutateToken(Google.Api.Ads.AdWords.v201806.CustomAffinityTokenOperation[] operations) - { - Wrappers.CustomAffinityService.mutateTokenRequest inValue = new Wrappers.CustomAffinityService.mutateTokenRequest(); - inValue.operations = operations; - Wrappers.CustomAffinityService.mutateTokenResponse retVal = ((Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface) (this)).mutateToken(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface.mutateTokenAsync(Wrappers.CustomAffinityService.mutateTokenRequest request) - { - return base.Channel.mutateTokenAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateTokenAsync(Google.Api.Ads.AdWords.v201806.CustomAffinityTokenOperation[] operations) - { - Wrappers.CustomAffinityService.mutateTokenRequest inValue = new Wrappers.CustomAffinityService.mutateTokenRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.CustomAffinityServiceInterface) (this)).mutateTokenAsync(inValue)).Result.rval); - } - - /// Returns the list of CustomAffinity that match the query. - /// The SQL-like AWQL query string - /// A list of CustomAffinity - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.CustomAffinityPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.AdParamService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.AdParamOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.AdParamOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.AdParam[] rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.AdParam[] rval) - { - this.rval = rval; - } - } - } - /// Represents an ad parameter. Use ad parameters to update numeric values (such as - /// prices or inventory levels) in any line of a text ad, including the destination - /// URL. You can set two AdParam objects (one for each value of #paramIndex) per ad group Keyword criterion.

When - /// setting or removing an AdParam, it is uniquely identified by the - /// combination of these three fields:

  • adGroupId
  • - ///
  • criterionId
  • paramIndex
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdParam - { - private long adGroupIdField; - - private bool adGroupIdFieldSpecified; - - private long criterionIdField; - - private bool criterionIdFieldSpecified; - - private string insertionTextField; - - private int paramIndexField; - - private bool paramIndexFieldSpecified; - - /// ID of the associated ad group. Text ads in this ad group will be candidates for - /// parameterized text replacement. This field - /// can be selected using the value "AdGroupId".This field can be filtered on. This field is required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long adGroupId - { - get - { - return this.adGroupIdField; - } - set - { - this.adGroupIdField = value; - this.adGroupIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool adGroupIdSpecified - { - get - { - return this.adGroupIdFieldSpecified; - } - set - { - this.adGroupIdFieldSpecified = value; - } - } - - /// ID of the associated Keyword criterion. The keyword must be in the - /// same ad group as this AdParam. Text ads triggered by this keyword - /// will have their {paramN:default-value} - /// snippet replaced by the contents of #insertionText. - /// This field can be selected using the value - /// "CriterionId".This field can be - /// filtered on. This field is required and - /// should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long criterionId - { - get - { - return this.criterionIdField; - } - set - { - this.criterionIdField = value; - this.criterionIdSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool criterionIdSpecified - { - get - { - return this.criterionIdFieldSpecified; - } - set - { - this.criterionIdFieldSpecified = value; - } - } - - /// Numeric value to insert into the ad text. The following restrictions apply:
    - ///
  • Can use , or . as a separator, with - /// an optional . or , (respectively) for - /// fractional values. For example, 1,000,000.00 and - /// 2.000.000,10 are valid.
  • Can be prepended or appended with - /// a currency symbol. For example, $99.99 and 200#x163; - /// are valid.
  • Can be prepended or appended with a currency code. For - /// example, 99.99USD and EUR200 are valid.
  • Can - /// use %. For example, 1.0% and 1,0% are - /// valid.
  • Can use + or -. For example, - /// -10.99 and 25+ are valid.
  • Can use - /// / between two numbers. For example 4/1 and - /// 0.95/0.45 are valid.
This field can be selected using the value "InsertionText". - /// This field is required and should not be - /// null when it is contained within Operators : - /// SET. The length of this string - /// should be between 1 and 25, inclusive. - ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string insertionText - { - get - { - return this.insertionTextField; - } - set - { - this.insertionTextField = value; - } - } - - /// Defines which parameterized snippet of ad text to replace. For example, a value - /// of 1 indicates a replacement for the - /// {param1:default-value} token. This field can be selected using the value - /// "ParamIndex". This field must be between - /// 1 and 2, inclusive. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int paramIndex - { - get - { - return this.paramIndexField; - } - set - { - this.paramIndexField = value; - this.paramIndexSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool paramIndexSpecified - { - get - { - return this.paramIndexFieldSpecified; - } - set - { - this.paramIndexFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field AdGroupId = new Field("AdGroupId", true, true); - - public static readonly Field CriterionId = new Field("CriterionId", true, true); - - public static readonly Field InsertionText = new Field("InsertionText", false, true); - - public static readonly Field ParamIndex = new Field("ParamIndex", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field CriterionId = Fields.CriterionId; - - public static readonly Field InsertionText = Fields.InsertionText; - - public static readonly Field ParamIndex = Fields.ParamIndex; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field AdGroupId = Fields.AdGroupId; - - public static readonly Field CriterionId = Fields.CriterionId; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a page of AdParams returned by the AdParamService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdParamPage - { - private AdParam[] entriesField; - - private int totalNumEntriesField; - - private bool totalNumEntriesFieldSpecified; - - /// The result entries in this page - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public AdParam[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// Total number of entries in the result which this page is a part of. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public int totalNumEntries - { - get - { - return this.totalNumEntriesField; - } - set - { - this.totalNumEntriesField = value; - this.totalNumEntriesSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool totalNumEntriesSpecified - { - get - { - return this.totalNumEntriesFieldSpecified; - } - set - { - this.totalNumEntriesFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Policy violation for an AdParam. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdParamPolicyError : PolicyViolationError - { - } - - - /// Errors for AdParamService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdParamError : ApiError - { - private AdParamErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdParamErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "AdParamError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum AdParamErrorReason - { - /// The same ad param cannot be specified in multiple operations - /// - AD_PARAM_CANNOT_BE_SPECIFIED_MULTIPLE_TIMES = 0, - /// Specified AdParam does not exist - /// - AD_PARAM_DOES_NOT_EXIST = 1, - /// Specified criterion is not a keyword - /// - CRITERION_SPECIFIED_MUST_BE_KEYWORD = 2, - /// The (AdGroupId,CriterionId) is invalid - /// - INVALID_ADGROUP_CRITERION_SPECIFIED = 3, - /// The insertion text is invalid - /// - INVALID_INSERTION_TEXT_FORMAT = 4, - /// Must specify AdGroupId in selector - /// - MUST_SPECIFY_ADGROUP_ID = 5, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 6, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.AdParamServiceInterface")] - public interface AdParamServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.AdParamPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.AdParamService.mutateResponse mutate(Wrappers.AdParamService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.AdParamService.mutateRequest request); - } - - - /// Represents an operation on an AdParam. The supported - /// operators are SET and REMOVE. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class AdParamOperation : Operation - { - private AdParam operandField; - - /// The ad parameter to operate on. This field is - /// required and should not be null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public AdParam operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AdParamServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.AdParamServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use this service to manage ad parameters, which let you quickly update - /// parameterized values (such as prices or inventory levels) in a text ad. Whereas - /// updates to regular ad text can take hours to go live, updates to parameterized - /// values go live in minutes.

To define where parameterized values appear in an - /// ad, you insert {param#:default-value} tags in your ad - /// text. You can use these tags in any line of display text, and also in the - /// destination URL. When the text ad is displayed, values in these tags are - /// replaced by the ad parameter's insertion - /// text. default-value specifies the string to display if one of - /// the following conditions is true:

  • The parameter has not been - /// set.
  • The parameter's insertion text is too long for the display - /// line.
  • The ad is being shown on the Google Display Network.
- /// This is disabled for AdX. - ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AdParamService : AdWordsSoapClient, IAdParamService - { - /// Creates a new instance of the class. - /// - public AdParamService() - { - } - - /// Creates a new instance of the class. - /// - public AdParamService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public AdParamService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdParamService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public AdParamService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns the ad parameters that match the criteria specified in the selector. - /// Specifies which ad parameters to return. - /// A list of ad parameters. - public virtual Google.Api.Ads.AdWords.v201806.AdParamPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.AdParamService.mutateResponse Google.Api.Ads.AdWords.v201806.AdParamServiceInterface.mutate(Wrappers.AdParamService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Sets and removes ad parameters.

Note: ADD is - /// not supported. Use SET for new ad parameters.

  • SET: Creates or updates an ad parameter, - /// setting the new parameterized value for the given ad group / keyword pair.
  • - ///
  • REMOVE: Removes an ad parameter. The - /// default-value specified in the ad text will be - /// used.
- ///
The operations to perform. - /// A list of ad parameters, where each entry in the list is the result of - /// applying the operation in the input list with the same index. For a - /// operation, the returned ad parameter will contain the updated - /// values. For a REMOVE operation, the returned ad parameter will - /// simply be the ad parameter that was removed. - public virtual Google.Api.Ads.AdWords.v201806.AdParam[] mutate(Google.Api.Ads.AdWords.v201806.AdParamOperation[] operations) - { - Wrappers.AdParamService.mutateRequest inValue = new Wrappers.AdParamService.mutateRequest(); - inValue.operations = operations; - Wrappers.AdParamService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.AdParamServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.AdParamServiceInterface.mutateAsync(Wrappers.AdParamService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdParamOperation[] operations) - { - Wrappers.AdParamService.mutateRequest inValue = new Wrappers.AdParamService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.AdParamServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.BatchJobService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.BatchJobOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.BatchJobOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.BatchJobReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.BatchJobReturnValue rval) - { - this.rval = rval; - } - } - } - /// A URL that expires at a particular time. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class TemporaryUrl - { - private string urlField; - - private string expirationField; - - /// The URL. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string url - { - get - { - return this.urlField; - } - set - { - this.urlField = value; - } - } - - /// When the URL expires, in account time. This - /// field is read only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string expiration - { - get - { - return this.expirationField; - } - set - { - this.expirationField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Statistics on the progress of a BatchJob. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ProgressStats - { - private long numOperationsExecutedField; - - private bool numOperationsExecutedFieldSpecified; - - private long numOperationsSucceededField; - - private bool numOperationsSucceededFieldSpecified; - - private int estimatedPercentExecutedField; - - private bool estimatedPercentExecutedFieldSpecified; - - private long numResultsWrittenField; - - private bool numResultsWrittenFieldSpecified; - - /// The number of operations executed. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long numOperationsExecuted - { - get - { - return this.numOperationsExecutedField; - } - set - { - this.numOperationsExecutedField = value; - this.numOperationsExecutedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool numOperationsExecutedSpecified - { - get - { - return this.numOperationsExecutedFieldSpecified; - } - set - { - this.numOperationsExecutedFieldSpecified = value; - } - } - - /// The number of operations succeeded. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long numOperationsSucceeded - { - get - { - return this.numOperationsSucceededField; - } - set - { - this.numOperationsSucceededField = value; - this.numOperationsSucceededSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool numOperationsSucceededSpecified - { - get - { - return this.numOperationsSucceededFieldSpecified; - } - set - { - this.numOperationsSucceededFieldSpecified = value; - } - } - - /// An estimate of the percent of this job that has been executed. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public int estimatedPercentExecuted - { - get - { - return this.estimatedPercentExecutedField; - } - set - { - this.estimatedPercentExecutedField = value; - this.estimatedPercentExecutedSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool estimatedPercentExecutedSpecified - { - get - { - return this.estimatedPercentExecutedFieldSpecified; - } - set - { - this.estimatedPercentExecutedFieldSpecified = value; - } - } - - /// The number of results written. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public long numResultsWritten - { - get - { - return this.numResultsWrittenField; - } - set - { - this.numResultsWrittenField = value; - this.numResultsWrittenSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool numResultsWrittenSpecified - { - get - { - return this.numResultsWrittenFieldSpecified; - } - set - { - this.numResultsWrittenFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Represents a large mutation job. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BatchJob - { - private long idField; - - private bool idFieldSpecified; - - private BatchJobStatus statusField; - - private bool statusFieldSpecified; - - private ProgressStats progressStatsField; - - private TemporaryUrl uploadUrlField; - - private TemporaryUrl downloadUrlField; - - private BatchJobProcessingError[] processingErrorsField; - - private long diskUsageQuotaBalanceField; - - private bool diskUsageQuotaBalanceFieldSpecified; - - /// ID of this job. This field can be selected - /// using the value "Id".This field can - /// be filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: ADD. This field is required and should not be null when it is - /// contained within Operators : SET. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Status of this job. This field can be - /// selected using the value "Status". This - /// field is read only and will be ignored when sent to the API for the following Operators: ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public BatchJobStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// Statistics related to the progress of this job. This field can be selected using the value "ProgressStats". - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public ProgressStats progressStats - { - get - { - return this.progressStatsField; - } - set - { - this.progressStatsField = value; - } - } - - /// The URL to use in upload operations for this job. The URL is unique to this job - /// and will expire one week after the job was created. This field is only returned - /// when calling BatchJobService#mutate with an - /// operation.

To upload a file, make a POST request to - /// uploadUrl and retrieve the "Location" header from the response as - /// the URL to upload operations. For the set of supported operations, look up - /// . For more information about how to upload files, see https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload. - /// This field is read only and will be ignored - /// when sent to the API.

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public TemporaryUrl uploadUrl - { - get - { - return this.uploadUrlField; - } - set - { - this.uploadUrlField = value; - } - } - - /// The URL to use to download results for this job. Results will be available for - /// 30 days after job completion. This field is only returned once #status is either DONE or CANCELED. - /// This field can be selected using the value - /// "DownloadUrl". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public TemporaryUrl downloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlField = value; - } - } - - /// A list of any errors that occurred during processing, not related to specific - /// input operations, e.g. input file corruption errors. This field can be selected using the value - /// "ProcessingErrors". This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute("processingErrors", Order = 5)] - public BatchJobProcessingError[] processingErrors - { - get - { - return this.processingErrorsField; - } - set - { - this.processingErrorsField = value; - } - } - - /// Disk quota balance of the batch job's customer in KB, which is the limit of - /// batch job disk usage for the customer. The field is only returned when calling - /// BatchJobService#mutate with an - /// operation. This field is read - /// only and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public long diskUsageQuotaBalance - { - get - { - return this.diskUsageQuotaBalanceField; - } - set - { - this.diskUsageQuotaBalanceField = value; - this.diskUsageQuotaBalanceSpecified = true; - } - } - - /// true, if a value is specified for , false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool diskUsageQuotaBalanceSpecified - { - get - { - return this.diskUsageQuotaBalanceFieldSpecified; - } - set - { - this.diskUsageQuotaBalanceFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field Status = new Field("Status", false, true); - - public static readonly Field ProgressStats = new Field("ProgressStats", false, true); - - public static readonly Field DownloadUrl = new Field("DownloadUrl", false, true); - - public static readonly Field ProcessingErrors = new Field("ProcessingErrors", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Status = Fields.Status; - - public static readonly Field ProgressStats = Fields.ProgressStats; - - public static readonly Field DownloadUrl = Fields.DownloadUrl; - - public static readonly Field ProcessingErrors = Fields.ProcessingErrors; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// The current status of a BatchJob. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BatchJobStatus - { - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 0, - /// Initial state of a BatchJob. While a job has this status, it is awaiting a file - /// upload to Google Cloud Storage. - /// - AWAITING_FILE = 1, - /// Indicates that a job has an associated file and is being executed. - /// - ACTIVE = 2, - /// Indicates that a job is being canceled. It will remain in this status until any - /// partial results are written, and then will be marked CANCELED. Send this status - /// in a SET operation to cancel a job that is in progress. This is the only status - /// that can be explicitly set. - /// - CANCELING = 3, - /// Indicates that a job has been canceled. It will be garbage-collected 30 days - /// after cancellation. - /// - CANCELED = 4, - /// Indicates that a job has completed. It will be garbage-collected 30 days after - /// completion. - /// - DONE = 5, - } - - - /// An error related to processing a BatchJob. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BatchJobProcessingError : ApiError - { - private BatchJobProcessingErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BatchJobProcessingErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reason for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BatchJobProcessingError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BatchJobProcessingErrorReason - { - UNKNOWN = 0, - /// The input file was corrupted. - /// - INPUT_FILE_CORRUPTION = 1, - /// An internal API error occurred while processing the batch. - /// - INTERNAL_ERROR = 2, - /// Unable to complete a batch in the allotted time. - /// - DEADLINE_EXCEEDED = 4, - /// The input file had a format error. - /// - FILE_FORMAT_ERROR = 3, - } - - - /// A page of BatchJobs. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BatchJobPage : Page - { - private BatchJob[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public BatchJob[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// An error related to a BatchJob. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BatchJobError : ApiError - { - private BatchJobErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BatchJobErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// The reason for the error. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BatchJobError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BatchJobErrorReason - { - UNKNOWN = 0, - /// The user exceeded allowed disk quota for in-flight jobs. - /// - DISK_QUOTA_EXCEEDED = 1, - /// An internal error resulted in a failure to create the job. - /// - FAILED_TO_CREATE_JOB = 2, - /// The requested state change was invalid. - /// - INVALID_STATE_CHANGE = 3, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.BatchJobServiceInterface")] - public interface BatchJobServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BatchJobPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.BatchJobService.mutateResponse mutate(Wrappers.BatchJobService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.BatchJobService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BatchJobPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// An operation on a BatchJob.

Note: Only the - /// ADD and SET operators are supported.

- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BatchJobOperation : Operation - { - private BatchJob operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BatchJob operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the BatchJobService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BatchJobReturnValue : ListReturnValue - { - private BatchJob[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public BatchJob[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface BatchJobServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.BatchJobServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Use the BatchJobService to schedule large batches of updates to - /// your AdWords campaigns as asynchronous mutate jobs, and to retrieve the status, - /// results or statistics of your recent jobs.

Use this service when you wish to - /// release your application from actively waiting on a synchronous response. Your - /// application can do other things or even shutdown while we execute mutations - /// asynchronously.

Once a job has been submitted, you may check its status - /// periodically, by calling #get.

Caution: Do not poll the job status too frequently or you - /// will risk getting your customer rate-limited.

Once a job's status changes - /// to DONE, you can retrieve the job's results.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class BatchJobService : AdWordsSoapClient, IBatchJobService - { - /// Creates a new instance of the class. - /// - public BatchJobService() - { - } - - /// Creates a new instance of the class. - /// - public BatchJobService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public BatchJobService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public BatchJobService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public BatchJobService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Query the status of existing BatchJobs. - /// The selector specifying the BatchJobs to - /// return. - /// The list of selected jobs. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BatchJobPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.BatchJobService.mutateResponse Google.Api.Ads.AdWords.v201806.BatchJobServiceInterface.mutate(Wrappers.BatchJobService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Creates or updates a BatchJob.

Note: BatchJobOperation does not support the - /// REMOVE operator. It is not necessary to remove BatchJobs.

- ///
A list of operations. - /// The list of created or updated jobs. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BatchJobReturnValue mutate(Google.Api.Ads.AdWords.v201806.BatchJobOperation[] operations) - { - Wrappers.BatchJobService.mutateRequest inValue = new Wrappers.BatchJobService.mutateRequest(); - inValue.operations = operations; - Wrappers.BatchJobService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.BatchJobServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.BatchJobServiceInterface.mutateAsync(Wrappers.BatchJobService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BatchJobOperation[] operations) - { - Wrappers.BatchJobService.mutateRequest inValue = new Wrappers.BatchJobService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.BatchJobServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of BatchJobs that match the query. - /// The SQL-like AWQL query string. - /// The list of selected jobs. - /// if problems occur while parsing the query - /// or fetching batchjob information. - public virtual Google.Api.Ads.AdWords.v201806.BatchJobPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.BiddingStrategyService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.BiddingStrategyOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.BiddingStrategyOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.BiddingStrategyReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.BiddingStrategyReturnValue rval) - { - this.rval = rval; - } - } - } - /// Bidding strategies store shared bidding configuration data and are account-level - /// objects. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class SharedBiddingStrategy - { - private BiddingScheme biddingSchemeField; - - private long idField; - - private bool idFieldSpecified; - - private string nameField; - - private SharedBiddingStrategyBiddingStrategyStatus statusField; - - private bool statusFieldSpecified; - - private BiddingStrategyType typeField; - - private bool typeFieldSpecified; - - /// Specifies the type of bidding scheme and the metadata associated with it. This field can be selected using the value - /// "BiddingScheme". - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BiddingScheme biddingScheme - { - get - { - return this.biddingSchemeField; - } - set - { - this.biddingSchemeField = value; - } - } - - /// Id of the flexible bidding strategy. The bidding strategy id is used to - /// associate the bidding strategy with the campaign, ad group or ad group - /// criterion. This field can be selected using - /// the value "Id".This field can be - /// filtered on. This field is required and - /// should not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Name of the bidding strategy. Every bidding strategy must have a non-null - /// non-empty name. In addition, all bidding strategies within an account must be - /// named distinctly. This field can be selected - /// using the value "Name".This field can - /// be filtered on. This field is required - /// and should not be null when it is contained within Operators : ADD. The length of this string should be between 1 and 255, inclusive, - /// in UTF-8 bytes, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// This field can be selected using the value - /// "Status".This field can be filtered - /// on. This field is read only and will be - /// ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public SharedBiddingStrategyBiddingStrategyStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// This field can be selected using the value - /// "Type".This field can be filtered - /// on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public BiddingStrategyType type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - this.typeSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool typeSpecified - { - get - { - return this.typeFieldSpecified; - } - set - { - this.typeFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field BiddingScheme = new Field("BiddingScheme", false, true); - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field Name = new Field("Name", true, true); - - public static readonly Field Status = new Field("Status", true, true); - - public static readonly Field Type = new Field("Type", true, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field BiddingScheme = Fields.BiddingScheme; - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Type = Fields.Type; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field Id = Fields.Id; - - public static readonly Field Name = Fields.Name; - - public static readonly Field Status = Fields.Status; - - public static readonly Field Type = Fields.Type; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Status of the bidding strategy. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "SharedBiddingStrategy.BiddingStrategyStatus", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum SharedBiddingStrategyBiddingStrategyStatus - { - ENABLED = 0, - REMOVED = 1, - UNKNOWN = 2, - } - - - /// Contains a list of bidding strategies resulting from the filtering and paging of - /// BiddingStrategy#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddingStrategyPage : Page - { - private SharedBiddingStrategy[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public SharedBiddingStrategy[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - /// Represents error codes for bidding strategy entities. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddingStrategyError : ApiError - { - private BiddingStrategyErrorReason reasonField; - - private bool reasonFieldSpecified; - - /// The error reason represented by an enum. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BiddingStrategyErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ApiError.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ApiError.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ApiError.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BiddingStrategyError.Reason", Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum BiddingStrategyErrorReason - { - /// Each bidding strategy must have a unique name. - /// - DUPLICATE_NAME = 0, - /// Bidding strategy type is immutable. - /// - CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = 1, - /// Only bidding strategies not linked to campaigns, adgroups or adgroup criteria - /// can be removed. - /// - CANNOT_REMOVE_ASSOCIATED_STRATEGY = 2, - /// The specified bidding strategy is not supported. - /// - BIDDING_STRATEGY_NOT_SUPPORTED = 3, - UNKNOWN = 4, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.BiddingStrategyServiceInterface")] - public interface BiddingStrategyServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BiddingStrategyPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.BiddingStrategyService.mutateResponse mutate(Wrappers.BiddingStrategyService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.BiddingStrategyService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BiddingStrategyPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Operations for adding/updating bidding strategies. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddingStrategyOperation : Operation - { - private SharedBiddingStrategy operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public SharedBiddingStrategy operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the BiddingStrategyService#mutate call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BiddingStrategyReturnValue : ListReturnValue - { - private SharedBiddingStrategy[] valueField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public SharedBiddingStrategy[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface BiddingStrategyServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.BiddingStrategyServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// BiddingStrategy Service to get/mutate bidding strategies. This is disabled for AdX. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class BiddingStrategyService : AdWordsSoapClient, IBiddingStrategyService - { - /// Creates a new instance of the - /// class. - public BiddingStrategyService() - { - } - - /// Creates a new instance of the - /// class. - public BiddingStrategyService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the - /// class. - public BiddingStrategyService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public BiddingStrategyService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the - /// class. - public BiddingStrategyService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of bidding strategies that match the selector. - /// list of bidding strategies specified by the selector. - /// if problems occurred while retrieving - /// results. - public virtual Google.Api.Ads.AdWords.v201806.BiddingStrategyPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.BiddingStrategyService.mutateResponse Google.Api.Ads.AdWords.v201806.BiddingStrategyServiceInterface.mutate(Wrappers.BiddingStrategyService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. - /// the operations to apply - /// the modified list of BiddingStrategy - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BiddingStrategyReturnValue mutate(Google.Api.Ads.AdWords.v201806.BiddingStrategyOperation[] operations) - { - Wrappers.BiddingStrategyService.mutateRequest inValue = new Wrappers.BiddingStrategyService.mutateRequest(); - inValue.operations = operations; - Wrappers.BiddingStrategyService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.BiddingStrategyServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.BiddingStrategyServiceInterface.mutateAsync(Wrappers.BiddingStrategyService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BiddingStrategyOperation[] operations) - { - Wrappers.BiddingStrategyService.mutateRequest inValue = new Wrappers.BiddingStrategyService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.BiddingStrategyServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns a list of bidding strategies that match the query. - /// The SQL-like AWQL query string. - /// when there are one or more errors with the - /// request. - public virtual Google.Api.Ads.AdWords.v201806.BiddingStrategyPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - namespace Wrappers.BudgetOrderService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getBillingAccounts", WrapperNamespace = "https://adwords.google.com/api/adwords/billing/v201806", IsWrapped = true)] - public partial class getBillingAccountsRequest - { - /// Creates a new instance of the - /// class. - public getBillingAccountsRequest() - { - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "getBillingAccountsResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/billing/v201806", IsWrapped = true)] - public partial class getBillingAccountsResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("rval")] - public Google.Api.Ads.AdWords.v201806.BillingAccount[] rval; - - /// Creates a new instance of the - /// class. - public getBillingAccountsResponse() - { - } - - /// Creates a new instance of the - /// class. - public getBillingAccountsResponse(Google.Api.Ads.AdWords.v201806.BillingAccount[] rval) - { - this.rval = rval; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/billing/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.BudgetOrderOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.BudgetOrderOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/billing/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.BudgetOrderReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.BudgetOrderReturnValue rval) - { - this.rval = rval; - } - } - } - /// Holds fields that provide information on the last set of values that were passed - /// in through the parent BudgetOrder for mutate.add and mutate.set. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BudgetOrderRequest - { - private BudgetOrderRequestStatus statusField; - - private bool statusFieldSpecified; - - private string dateField; - - private string billingAccountNameField; - - private string poNumberField; - - private string budgetOrderNameField; - - private Money spendingLimitField; - - private string startDateTimeField; - - private string endDateTimeField; - - /// Status of the last BudgetOrder change. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BudgetOrderRequestStatus status - { - get - { - return this.statusField; - } - set - { - this.statusField = value; - this.statusSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool statusSpecified - { - get - { - return this.statusFieldSpecified; - } - set - { - this.statusFieldSpecified = value; - } - } - - /// DateTime of when the request was received. This field is read only and will be ignored when - /// sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string date - { - get - { - return this.dateField; - } - set - { - this.dateField = value; - } - } - - /// Enables user to specify meaningful name for a billing account to aid in - /// reconciling monthly invoices. This name will be printed in the monthly invoices. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string billingAccountName - { - get - { - return this.billingAccountNameField; - } - set - { - this.billingAccountNameField = value; - } - } - - /// Enables user to enter a value that helps them reference this budget order in - /// their monthly invoices. This number will be printed in the monthly invoices. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string poNumber - { - get - { - return this.poNumberField; - } - set - { - this.poNumberField = value; - } - } - - /// Enables user to specify meaningful name for referencing this budget order. A - /// default name will be provided if none is specified. This name will be printed in - /// the monthly invoices. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string budgetOrderName - { - get - { - return this.budgetOrderNameField; - } - set - { - this.budgetOrderNameField = value; - } - } - - /// The spending limit in micros. To specify an unlimited budget, set spendingLimit - /// to -1, otherwise spendingLimit must be greater than 0. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public Money spendingLimit - { - get - { - return this.spendingLimitField; - } - set - { - this.spendingLimitField = value; - } - } - - /// StartDateTime cannot be in the past, it must be on or before "20361231 235959 - /// America/Los_Angeles". StartDateTime and EndDateTime must use the same time zone. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string startDateTime - { - get - { - return this.startDateTimeField; - } - set - { - this.startDateTimeField = value; - } - } - - /// EndDateTime must be on or before "20361231 235959 America/Los_Angeles" or must - /// set the same instant as "20371230 235959 America/Los_Angeles" to indicate - /// infinite end date. StartDateTime and EndDateTime must use the same time zone. - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public string endDateTime - { - get - { - return this.endDateTimeField; - } - set - { - this.endDateTimeField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BudgetOrderRequest.Status", Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public enum BudgetOrderRequestStatus - { - /// The budget request is under review. - /// - UNDER_REVIEW = 0, - /// The budget request has been approved. - /// - APPROVED = 1, - /// The budget request has been rejected. - /// - REJECTED = 2, - /// The budget request has been cancelled. - /// - CANCELLED = 3, - /// Used for return value only. An enumeration - /// could not be processed, typically due to incompatibility with your WSDL - /// version. - /// - UNKNOWN = 4, - } - - - /// A budget order - /// links an account-wide budget with a BillingAccount. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BudgetOrder - { - private string billingAccountIdField; - - private long idField; - - private bool idFieldSpecified; - - private string billingAccountNameField; - - private string poNumberField; - - private string budgetOrderNameField; - - private string primaryBillingIdField; - - private string secondaryBillingIdField; - - private Money spendingLimitField; - - private Money totalAdjustmentsField; - - private string startDateTimeField; - - private string endDateTimeField; - - private BudgetOrderRequest lastRequestField; - - /// This must be passed as a string with dashes, e.g. "1234-5678-9012-3456". This field can be selected using the value - /// "BillingAccountId".This field can be - /// filtered on. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string billingAccountId - { - get - { - return this.billingAccountIdField; - } - set - { - this.billingAccountIdField = value; - } - } - - /// This field can be selected using the value - /// "Id".This field can be filtered - /// on. This field is required and should - /// not be null when it is contained within Operators : SET, REMOVE. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public long id - { - get - { - return this.idField; - } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get - { - return this.idFieldSpecified; - } - set - { - this.idFieldSpecified = value; - } - } - - /// Enables user to specify meaningful name for a billing account to aid in - /// reconciling monthly invoices. This name will be printed in the monthly invoices. - /// This field can be selected using the value - /// "BillingAccountName".This field can - /// be filtered on. The length of this - /// string should be between 0 and 80, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string billingAccountName - { - get - { - return this.billingAccountNameField; - } - set - { - this.billingAccountNameField = value; - } - } - - /// Enables user to enter a value that helps them reference this budget order in - /// their monthly invoices. This number will be printed in the monthly invoices. - /// This field can be selected using the value - /// "PoNumber".This field can be filtered - /// on. The length of this string - /// should be between 0 and 80, inclusive, (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string poNumber - { - get - { - return this.poNumberField; - } - set - { - this.poNumberField = value; - } - } - - /// Enables user to specify meaningful name for referencing this budget order. A - /// default name will be provided if none is specified. This name will be printed in - /// the monthly invoices. This field can be - /// selected using the value "BudgetOrderName".This field can be filtered on. The length of this string should be between 0 and 150, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string budgetOrderName - { - get - { - return this.budgetOrderNameField; - } - set - { - this.budgetOrderNameField = value; - } - } - - /// A 12 digit billing ID assigned to the user by Google. This must be passed in as - /// a string with dashes, e.g. "1234-5678-9012".

This field is required in an - /// ADD operation if billingAccountId is not specified.

Note:Starting with v201708, this field is required in any - /// ADD operation that sets or changes the billing account of a client - /// account. This field can be selected using - /// the value "PrimaryBillingId".This - /// field can be filtered on. The - /// length of this string should be between 0 and 14, inclusive, - /// (trimmed).

- ///
- [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public string primaryBillingId - { - get - { - return this.primaryBillingIdField; - } - set - { - this.primaryBillingIdField = value; - } - } - - /// For certain users, a secondary billing ID will be required on mutate.add. If - /// this requirement was not communicated to the user, the user may ignore this - /// parameter. If specified, this must be passed in as a string with dashes, e.g. - /// "1234-5678-9012". This field can be selected - /// using the value "SecondaryBillingId".This field can be filtered on. The length of this string should be between 0 and 14, inclusive, - /// (trimmed). - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 6)] - public string secondaryBillingId - { - get - { - return this.secondaryBillingIdField; - } - set - { - this.secondaryBillingIdField = value; - } - } - - /// The spending limit in micros. To specify an unlimited budget, set spendingLimit - /// to -1, otherwise spendingLimit must be greater than 0. Note that for get - /// requests, the spending limit includes any adjustments that have been applied to - /// the budget order. For mutate, the spending limit represents the maximum allowed - /// spend prior to considering any adjustments. When making mutate requests, make - /// sure to account for any adjustments that may be reported in the get value of the - /// spending limit. This field can be selected - /// using the value "SpendingLimit".This - /// field can be filtered on. This field is - /// required and should not be null when it is contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 7)] - public Money spendingLimit - { - get - { - return this.spendingLimitField; - } - set - { - this.spendingLimitField = value; - } - } - - /// The adjustments amount in micros. Adjustments from Google come in the form of - /// credits or debits to your budget order. This amount is the net sum of - /// adjustments since the creation of the budget order. You can use the adjustments - /// amount to compute your current base spendingLimit by subtracting your - /// adjustments from the value returned from spendingLimit in get requests. This field can be selected using the value - /// "TotalAdjustments".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 8)] - public Money totalAdjustments - { - get - { - return this.totalAdjustmentsField; - } - set - { - this.totalAdjustmentsField = value; - } - } - - /// StartDateTime cannot be in the past, it must be on or before "20361231 235959 - /// America/Los_Angeles". StartDateTime and EndDateTime must use the same time zone. - /// This field can be selected using the value - /// "StartDateTime".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: REMOVE. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public string startDateTime - { - get - { - return this.startDateTimeField; - } - set - { - this.startDateTimeField = value; - } - } - - /// EndDateTime must be on or before "20361231 235959 America/Los_Angeles" or must - /// set the same instant as "20371230 235959 America/Los_Angeles" to indicate - /// infinite end date. StartDateTime and EndDateTime must use the same time zone. - /// This field can be selected using the value - /// "EndDateTime".This field can be - /// filtered on. This field is read only - /// and will be ignored when sent to the API for the following Operators: REMOVE. This field is required and should not be null when it is - /// contained within Operators : ADD. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 10)] - public string endDateTime - { - get - { - return this.endDateTimeField; - } - set - { - this.endDateTimeField = value; - } - } - - /// Contains fields that provide information on the last set of values that were - /// passed in through the parent BudgetOrder for mutate.add and mutate.set. This field can be selected using the value - /// "LastRequest". This field is read only - /// and will be ignored when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public BudgetOrderRequest lastRequest - { - get - { - return this.lastRequestField; - } - set - { - this.lastRequestField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static readonly Field BillingAccountId = new Field("BillingAccountId", true, true); - - public static readonly Field Id = new Field("Id", true, true); - - public static readonly Field BillingAccountName = new Field("BillingAccountName", true, true); - - public static readonly Field PoNumber = new Field("PoNumber", true, true); - - public static readonly Field BudgetOrderName = new Field("BudgetOrderName", true, true); - - public static readonly Field PrimaryBillingId = new Field("PrimaryBillingId", true, true); - - public static readonly Field SecondaryBillingId = new Field("SecondaryBillingId", true, true); - - public static readonly Field SpendingLimit = new Field("SpendingLimit", true, true); - - public static readonly Field TotalAdjustments = new Field("TotalAdjustments", true, true); - - public static readonly Field StartDateTime = new Field("StartDateTime", true, true); - - public static readonly Field EndDateTime = new Field("EndDateTime", true, true); - - public static readonly Field LastRequest = new Field("LastRequest", false, true); - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static readonly Field BillingAccountId = Fields.BillingAccountId; - - public static readonly Field Id = Fields.Id; - - public static readonly Field BillingAccountName = Fields.BillingAccountName; - - public static readonly Field PoNumber = Fields.PoNumber; - - public static readonly Field BudgetOrderName = Fields.BudgetOrderName; - - public static readonly Field PrimaryBillingId = Fields.PrimaryBillingId; - - public static readonly Field SecondaryBillingId = Fields.SecondaryBillingId; - - public static readonly Field SpendingLimit = Fields.SpendingLimit; - - public static readonly Field TotalAdjustments = Fields.TotalAdjustments; - - public static readonly Field StartDateTime = Fields.StartDateTime; - - public static readonly Field EndDateTime = Fields.EndDateTime; - - public static readonly Field LastRequest = Fields.LastRequest; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static readonly Field BillingAccountId = Fields.BillingAccountId; - - public static readonly Field Id = Fields.Id; - - public static readonly Field BillingAccountName = Fields.BillingAccountName; - - public static readonly Field PoNumber = Fields.PoNumber; - - public static readonly Field BudgetOrderName = Fields.BudgetOrderName; - - public static readonly Field PrimaryBillingId = Fields.PrimaryBillingId; - - public static readonly Field SecondaryBillingId = Fields.SecondaryBillingId; - - public static readonly Field SpendingLimit = Fields.SpendingLimit; - - public static readonly Field TotalAdjustments = Fields.TotalAdjustments; - - public static readonly Field StartDateTime = Fields.StartDateTime; - - public static readonly Field EndDateTime = Fields.EndDateTime; - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A page of BudgetOrders from BudgetOrderService#get method. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BudgetOrderPage : Page - { - private BudgetOrder[] entriesField; - - /// The result entries in this page. - /// - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public BudgetOrder[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Page.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Page.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Page.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Error information returned for CustomerOrderLineService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class CustomerOrderLineError : ApiError - { - private CustomerOrderLineErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public CustomerOrderLineErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - /// Enums for all the reasons an error can be thrown to the user during a - /// CustomerOrderLine mutate operation. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "CustomerOrderLineError.Reason", Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public enum CustomerOrderLineErrorReason - { - /// Order Line Id does not exist. - /// - INVALID_ORDER_LINE_ID = 0, - /// End date must be later than start date - /// - END_DATE_BEFORE_START_DATE = 1, - /// Cannot create order line with start date in the past - /// - CREATE_IN_PAST = 3, - /// Cannot change start date after the order line has started - /// - ALREADY_STARTED = 4, - /// Cannot set spending limit below what has already been spent - /// - ALREADY_SPENT = 5, - /// Cannot move end date into the past - /// - FINISHED_IN_THE_PAST = 6, - /// Cannot make overlapping order lines. - /// - OVERLAP_DATE_RANGE = 8, - /// Cannot set contract start date to be after actual start date - /// - END_DATE_PAST_MAX = 12, - /// only cancelled order lines may have themselves as parent - /// - PARENT_IS_SELF = 13, - /// Cannot cancel started order line - /// - CANNOT_CANCEL_STARTED = 15, - /// Only Order lines in normal or pending state can be modified. - /// - ORDERLINE_BEING_MODIFIED_IS_NOT_NORMAL_OR_PENDING = 18, - /// More than one operation not permitted per call. - /// - MORE_THAN_ONE_OPERATION_NOT_PERMITTED = 20, - /// StartDate and EndDate should pass in the customer's account timeZone. - /// - INVALID_TIMEZONE_IN_DATE_RANGES = 21, - UNKNOWN = 22, - } - - - /// Error information for BudgetOrderService. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BudgetOrderError : ApiError - { - private BudgetOrderErrorReason reasonField; - - private bool reasonFieldSpecified; - - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BudgetOrderErrorReason reason - { - get - { - return this.reasonField; - } - set - { - this.reasonField = value; - this.reasonSpecified = true; - } - } - - /// true, if a value is specified for , - /// false otherwise. - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reasonSpecified - { - get - { - return this.reasonFieldSpecified; - } - set - { - this.reasonFieldSpecified = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "BudgetOrderError.Reason", Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public enum BudgetOrderErrorReason - { - /// Existing pending request is being approved. - /// - BUDGET_APPROVAL_IN_PROGRESS = 0, - /// A server backend was not available. - /// - SERVICE_UNAVAILABLE = 1, - /// The billing account was invalid. - /// - INVALID_BILLING_ACCOUNT = 3, - /// Unspecified billing service error. - /// - GENERIC_BILLING_ERROR = 4, - /// The billing account ID format was invalid. - /// - INVALID_BILLING_ACCOUNT_ID_FORMAT = 5, - /// Budget date range was invalid. - /// - INVALID_BUDGET_DATE_RANGE = 6, - /// User does not have permission to update this budget. - /// - BUDGET_UPDATE_DENIED = 8, - /// User attempted to cancel a started budget. - /// - BUDGET_ALREADY_STARTED = 9, - /// User attempted to change an ended budget. - /// - BUDGET_ALREADY_ENDED = 10, - /// Invalid amount, start date or end date specified. - /// - INVALID_CONSTRAINT = 11, - /// The bid is too high. - /// - INVALID_BID_TOO_LARGE = 12, - /// Budget was not found. - /// - NO_SUCH_BUDGET_FOUND = 13, - /// The budget cannot be lowered below the amount which has already been spent. - /// - INVALID_BUDGET_ALREADY_SPENT = 14, - /// Time zone from user input is different from user's account time zone. - /// - INVALID_TIMEZONE_IN_DATE = 15, - /// The BudgetOrder's ID was set in an add operation. - /// - ACCOUNT_BUDGET_ID_SET_IN_ADD = 16, - /// We don't support more than one operation per mutate call. - /// - MORE_THAN_ONE_OPERATIONS = 17, - /// Manager account not found. - /// - INVALID_MANAGER_ACCOUNT = 18, - UNKNOWN = 19, - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface")] - public interface BudgetOrderServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BudgetOrderPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector); - - // CODEGEN: Parameter 'rval' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.BudgetOrderService.getBillingAccountsResponse getBillingAccounts(Wrappers.BudgetOrderService.getBillingAccountsRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task getBillingAccountsAsync(Wrappers.BudgetOrderService.getBillingAccountsRequest request); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.BudgetOrderService.mutateResponse mutate(Wrappers.BudgetOrderService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.BudgetOrderService.mutateRequest request); - } - - - /// Represents an account to which invoices are sent in consolidated - /// billing. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BillingAccount - { - private string idField; - - private string nameField; - - private string currencyCodeField; - - private string primaryBillingIdField; - - private string secondaryBillingIdField; - - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public string id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public string name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// This field is read only and will be ignored - /// when sent to the API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string currencyCode - { - get - { - return this.currencyCodeField; - } - set - { - this.currencyCodeField = value; - } - } - - /// A 12 digit billing id assigned to the user by Google. This field is read only and will be ignored when sent to the - /// API. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public string primaryBillingId - { - get - { - return this.primaryBillingIdField; - } - set - { - this.primaryBillingIdField = value; - } - } - - /// An optional secondary billing id assigned to the user by Google. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public string secondaryBillingId - { - get - { - return this.secondaryBillingIdField; - } - set - { - this.secondaryBillingIdField = value; - } - } - - /// List of all supported fields for the class. - /// - public class Fields : BaseFields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public class SelectableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public class FilterableFields : BaseFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// Operation for BudgetOrder. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BudgetOrderOperation : Operation - { - private BudgetOrder operandField; - - /// This field is required and should not be - /// null. - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public BudgetOrder operand - { - get - { - return this.operandField; - } - set - { - this.operandField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : Operation.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : Operation.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : Operation.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - /// A container for return values from the BudgetOrderService#mutate method. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/billing/v201806")] - public partial class BudgetOrderReturnValue : ListReturnValue - { - private BudgetOrder[] valueField; - - /// List of BudgetOrders affected by the mutate call. - /// - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public BudgetOrder[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// List of all supported fields for the class. - /// - public new class Fields : ListReturnValue.Fields - { - /// Creates a new instance of the class. - protected Fields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported selectable fields for the - /// class. - public new class SelectableFields : ListReturnValue.SelectableFields - { - /// Creates a new instance of the class. - /// - protected SelectableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - - - /// List of all supported filterable fields for the - /// class. - public new class FilterableFields : ListReturnValue.FilterableFields - { - /// Creates a new instance of the class. - /// - protected FilterableFields() - { - } - - public static new Field[] All - { - get - { - return BaseFields.GetAllFields(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - } - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface BudgetOrderServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Service for managing BudgetOrders.

Note: The mutate action in this service is - /// available only on a whitelist basis.

Warning: The - /// BudgetOrderService is limited to one operation per mutate request. - /// Any attempt to make more than one operation will result in an - /// ApiException.

- ///
- [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class BudgetOrderService : AdWordsSoapClient, IBudgetOrderService - { - /// Creates a new instance of the class. - /// - public BudgetOrderService() - { - } - - /// Creates a new instance of the class. - /// - public BudgetOrderService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public BudgetOrderService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public BudgetOrderService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public BudgetOrderService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Gets a list of BudgetOrders using the generic - /// selector. - /// specifies which BudgetOrder to return. - /// A BudgetOrderPage of BudgetOrders of the - /// client customer. All BudgetOrder fields are returned. Stats are not yet - /// supported. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BudgetOrderPage get(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.get(serviceSelector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector serviceSelector) - { - return base.Channel.getAsync(serviceSelector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.BudgetOrderService.getBillingAccountsResponse Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface.getBillingAccounts(Wrappers.BudgetOrderService.getBillingAccountsRequest request) - { - return base.Channel.getBillingAccounts(request); - } - - /// Returns all the open/active BillingAccounts associated with the current manager. - /// A list of BillingAccounts. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BillingAccount[] getBillingAccounts() - { - Wrappers.BudgetOrderService.getBillingAccountsRequest inValue = new Wrappers.BudgetOrderService.getBillingAccountsRequest(); - Wrappers.BudgetOrderService.getBillingAccountsResponse retVal = ((Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface) (this)).getBillingAccounts(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface.getBillingAccountsAsync(Wrappers.BudgetOrderService.getBillingAccountsRequest request) - { - return base.Channel.getBillingAccountsAsync(request); - } - - public virtual System.Threading.Tasks.Task getBillingAccountsAsync() - { - Wrappers.BudgetOrderService.getBillingAccountsRequest inValue = new Wrappers.BudgetOrderService.getBillingAccountsRequest(); - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface) (this)).getBillingAccountsAsync(inValue)).Result.rval); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.BudgetOrderService.mutateResponse Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface.mutate(Wrappers.BudgetOrderService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Adds, updates, or removes budget orders. Supported operations are: - ///

ADD: Adds a BudgetOrder to the billing - /// account specified by the billing account ID.

SET: Sets the - /// start/end date and amount of the BudgetOrder.

- ///

REMOVE: Cancels the BudgetOrder - /// (status change).

Warning: The - /// BudgetOrderService is limited to one operation per mutate request. - /// Any attempt to make more than one operation will result in an - /// ApiException.

Note: This action is - /// available only on a whitelist basis.

- ///
A list of operations, however currently we only - /// support one operation per mutate call. - /// BudgetOrders affected by the mutate operation. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BudgetOrderReturnValue mutate(Google.Api.Ads.AdWords.v201806.BudgetOrderOperation[] operations) - { - Wrappers.BudgetOrderService.mutateRequest inValue = new Wrappers.BudgetOrderService.mutateRequest(); - inValue.operations = operations; - Wrappers.BudgetOrderService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface.mutateAsync(Wrappers.BudgetOrderService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BudgetOrderOperation[] operations) - { - Wrappers.BudgetOrderService.mutateRequest inValue = new Wrappers.BudgetOrderService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.BudgetOrderServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - } - namespace Wrappers.BudgetService - { - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutate", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateRequest - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Google.Api.Ads.AdWords.v201806.BudgetOperation[] operations; - - /// Creates a new instance of the class. - /// - public mutateRequest() - { - } - - /// Creates a new instance of the class. - /// - public mutateRequest(Google.Api.Ads.AdWords.v201806.BudgetOperation[] operations) - { - this.operations = operations; - } - } - - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "mutateResponse", WrapperNamespace = "https://adwords.google.com/api/adwords/cm/v201806", IsWrapped = true)] - public partial class mutateResponse - { - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", Order = 0)] - public Google.Api.Ads.AdWords.v201806.BudgetReturnValue rval; - - /// Creates a new instance of the class. - /// - public mutateResponse() - { - } - - /// Creates a new instance of the class. - /// - public mutateResponse(Google.Api.Ads.AdWords.v201806.BudgetReturnValue rval) - { - this.rval = rval; - } - } - } - /// Contains a list of budgets resulting from the filtering and paging of BudgetService#get call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BudgetPage : Page - { - private Budget[] entriesField; - - [System.Xml.Serialization.XmlElementAttribute("entries", Order = 0)] - public Budget[] entries - { - get - { - return this.entriesField; - } - set - { - this.entriesField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806", ConfigurationName = "Google.Api.Ads.AdWords.v201806.BudgetServiceInterface")] - public interface BudgetServiceInterface - { - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BudgetPage get(Google.Api.Ads.AdWords.v201806.Selector selector); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - // CODEGEN: Parameter 'operations' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlElementAttribute'. - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Wrappers.BudgetService.mutateResponse mutate(Wrappers.BudgetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - System.Threading.Tasks.Task mutateAsync(Wrappers.BudgetService.mutateRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [System.ServiceModel.FaultContractAttribute(typeof(Google.Api.Ads.AdWords.v201806.ApiException), Action = "", Name = "ApiExceptionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ApplicationException))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ComparableValue))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Page))] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - Google.Api.Ads.AdWords.v201806.BudgetPage query([System.ServiceModel.MessageParameterAttribute(Name = "query")] string query1); - - [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")] - [return: System.ServiceModel.MessageParameterAttribute(Name = "rval")] - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// A container for return values from the BudgetService#mutate call. - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.6.1055.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class BudgetReturnValue : ListReturnValue - { - private Budget[] valueField; - - private ApiError[] partialFailureErrorsField; - - [System.Xml.Serialization.XmlElementAttribute("value", Order = 0)] - public Budget[] value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - [System.Xml.Serialization.XmlElementAttribute("partialFailureErrors", Order = 1)] - public ApiError[] partialFailureErrors - { - get - { - return this.partialFailureErrorsField; - } - set - { - this.partialFailureErrorsField = value; - } - } - } - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface BudgetServiceInterfaceChannel : Google.Api.Ads.AdWords.v201806.BudgetServiceInterface, System.ServiceModel.IClientChannel - { - } - - - /// Budget Service to get/mutate budgets. - /// - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class BudgetService : AdWordsSoapClient, IBudgetService - { - /// Creates a new instance of the class. - /// - public BudgetService() - { - } - - /// Creates a new instance of the class. - /// - public BudgetService(string endpointConfigurationName) - : base(endpointConfigurationName) - { - } - - /// Creates a new instance of the class. - /// - public BudgetService(string endpointConfigurationName, string remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public BudgetService(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) - : base(endpointConfigurationName, remoteAddress) - { - } - - /// Creates a new instance of the class. - /// - public BudgetService(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) - : base(binding, remoteAddress) - { - } - - /// Returns a list of budgets that match the selector. - /// List of budgets specified by the selector. - /// if problems occurred while retrieving - /// results. - public virtual Google.Api.Ads.AdWords.v201806.BudgetPage get(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.get(selector); - } - - public virtual System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector) - { - return base.Channel.getAsync(selector); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - Wrappers.BudgetService.mutateResponse Google.Api.Ads.AdWords.v201806.BudgetServiceInterface.mutate(Wrappers.BudgetService.mutateRequest request) - { - return base.Channel.mutate(request); - } - - /// Applies the list of mutate operations. - /// The operations to apply. - /// The modified list of Budgets, returned in the same order as - /// operations. - /// AdWordsApiException - public virtual Google.Api.Ads.AdWords.v201806.BudgetReturnValue mutate(Google.Api.Ads.AdWords.v201806.BudgetOperation[] operations) - { - Wrappers.BudgetService.mutateRequest inValue = new Wrappers.BudgetService.mutateRequest(); - inValue.operations = operations; - Wrappers.BudgetService.mutateResponse retVal = ((Google.Api.Ads.AdWords.v201806.BudgetServiceInterface) (this)).mutate(inValue); - return retVal.rval; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task Google.Api.Ads.AdWords.v201806.BudgetServiceInterface.mutateAsync(Wrappers.BudgetService.mutateRequest request) - { - return base.Channel.mutateAsync(request); - } - - public virtual System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BudgetOperation[] operations) - { - Wrappers.BudgetService.mutateRequest inValue = new Wrappers.BudgetService.mutateRequest(); - inValue.operations = operations; - return System.Threading.Tasks.Task.Factory.StartNew(() => (((Google.Api.Ads.AdWords.v201806.BudgetServiceInterface) (this)).mutateAsync(inValue)).Result.rval); - } - - /// Returns the list of budgets that match the query. - /// The SQL-like AWQL query string - /// s A list of Budget - /// when the query is invalid or there are - /// errors processing the request. - public virtual Google.Api.Ads.AdWords.v201806.BudgetPage query(string query1) - { - return base.Channel.query(query1); - } - - public virtual System.Threading.Tasks.Task queryAsync(string query) - { - return base.Channel.queryAsync(query); - } - } - - - /// Use this service to manage ads. Available ad types are subclasses of the base Ad type and are shown in the AdGroupAd.ad documentation. Here are some of the - /// commonly used ad types:
Expanded Text - /// Ad
The primary ad type used on the search network. An expanded text - /// ad contains two headlines, a single description line, a final url, and optional - /// path fields.
Image Ad
A standard image - /// ad.
Template Ad (AdWords - /// Display Ad Builder)
A flexible ad type that supports various Template Ad formats.
- ///
- ///
- public interface IAdGroupAdService : AdGroupAdServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdGroupAdReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupAdOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupAdOperation[] operations); - - Google.Api.Ads.AdWords.v201806.AdGroupAdLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.AdGroupAdLabelOperation[] operations); - - System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.AdGroupAdLabelOperation[] operations); - } - - - /// Use this service to manage campaign-level criteria.

A campaign-level negative - /// criterion prevents the campaign's ads from showing on specific placements, - /// specific keywords, demographics, and so on.

Additionally, the service can - /// be used to target criteria such as location, language, carrier, platform, and so on. The targeting criteria - /// can be added using the Criterion Id listed in the documentation.

- ///
- public interface ICampaignCriterionService : CampaignCriterionServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignCriterionOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignCriterionOperation[] operations); - } - - - /// Use this service to manage campaigns. A campaign - /// organizes one or more ad groups together and has its own budget, bidding - /// strategy, serving date range, and targeting settings (managed using CampaignCriterionService). You can also set - /// campaign-wide ad extensions using CampaignExtensionSettingService. - ///

Note: CampaignService does not support video campaigns.

- ///
- public interface ICampaignService : CampaignServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignOperation[] operations); - - Google.Api.Ads.AdWords.v201806.CampaignLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.CampaignLabelOperation[] operations); - - System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.CampaignLabelOperation[] operations); - } - - - /// Use this service to manage campaign level bidmodifiable-only criteria. - /// - public interface ICampaignBidModifierService : CampaignBidModifierServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignBidModifierReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignBidModifierOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignBidModifierOperation[] operations); - } - - - /// Service used to manage campaign feed links, and matching functions. - /// - public interface ICampaignFeedService : CampaignFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignFeedOperation[] operations); - } - - - /// Use this service to manage campaign groups. A CampaignGroup organizes one or more campaigns together - /// and has its own budget. - /// - public interface ICampaignGroupService : CampaignGroupServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignGroupReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignGroupOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignGroupOperation[] operations); - } - - - /// Use this service to manage campaign group performance targets. A CampaignGroupPerformanceTarget is an - /// entity that specifies a time range for a campaign group and various metrics by - /// which the performance of that campaign group can be measured for the time period - /// that the performance target is active. - /// - public interface ICampaignGroupPerformanceTargetService : CampaignGroupPerformanceTargetServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignGroupPerformanceTargetOperation[] operations); - } - - - /// A service to return constant data. - /// - public interface IConstantDataService : ConstantDataServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AgeRange[] getAgeRangeCriterion(); - - System.Threading.Tasks.Task getAgeRangeCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.Carrier[] getCarrierCriterion(); - - System.Threading.Tasks.Task getCarrierCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.Gender[] getGenderCriterion(); - - System.Threading.Tasks.Task getGenderCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.Language[] getLanguageCriterion(); - - System.Threading.Tasks.Task getLanguageCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.MobileAppCategory[] getMobileAppCategoryCriterion(); - - System.Threading.Tasks.Task getMobileAppCategoryCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.MobileDevice[] getMobileDeviceCriterion(); - - System.Threading.Tasks.Task getMobileDeviceCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.OperatingSystemVersion[] getOperatingSystemVersionCriterion(); - - System.Threading.Tasks.Task getOperatingSystemVersionCriterionAsync(); - - Google.Api.Ads.AdWords.v201806.ProductBiddingCategoryData[] getProductBiddingCategoryData(Google.Api.Ads.AdWords.v201806.Selector selector); - - System.Threading.Tasks.Task getProductBiddingCategoryDataAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - Google.Api.Ads.AdWords.v201806.CriterionUserInterest[] getUserInterestCriterion(Google.Api.Ads.AdWords.v201806.ConstantDataServiceUserInterestTaxonomyType userInterestTaxonomyType); - - System.Threading.Tasks.Task getUserInterestCriterionAsync(Google.Api.Ads.AdWords.v201806.ConstantDataServiceUserInterestTaxonomyType userInterestTaxonomyType); - - Google.Api.Ads.AdWords.v201806.Vertical[] getVerticalCriterion(); - - System.Threading.Tasks.Task getVerticalCriterionAsync(); - } - - - /// Use this service to manage conversion trackers. A conversion tracker provides a - /// snippet of code which records every time a user visits a page that contains it. - /// The data this provides can be used to gauge the effectiveness of your ads and - /// keywords. - /// - public interface IConversionTrackerService : ConversionTrackerServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.ConversionTrackerReturnValue mutate(Google.Api.Ads.AdWords.v201806.ConversionTrackerOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.ConversionTrackerOperation[] operations); - } - - - /// Manages criteria negatives for customer. - /// - public interface ICustomerNegativeCriterionService : CustomerNegativeCriterionServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomerNegativeCriterionOperation[] operations); - } - - - /// Service to access basic details about any customer. - /// - public interface ICustomerService : CustomerServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.Customer[] getCustomers(); - - System.Threading.Tasks.Task getCustomersAsync(); - - Google.Api.Ads.AdWords.v201806.ServiceLink[] getServiceLinks(Google.Api.Ads.AdWords.v201806.Selector selector); - - System.Threading.Tasks.Task getServiceLinksAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - Google.Api.Ads.AdWords.v201806.ServiceLink[] mutateServiceLinks(Google.Api.Ads.AdWords.v201806.ServiceLinkOperation[] operations); - - System.Threading.Tasks.Task mutateServiceLinksAsync(Google.Api.Ads.AdWords.v201806.ServiceLinkOperation[] operations); - } - - - /// Service used to manage adgroup feed links, and matching functions. - /// - public interface IAdGroupFeedService : AdGroupFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdGroupFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupFeedOperation[] operations); - } - - - /// Use this service to retrieve the changed entities for a customer account or - /// campaign based on the given date range.

Note: There will - /// be some delay in changes becoming visible to this service; thus, use - /// from the response to determine the validity period for the - /// data.

Note: CustomerSyncService only supports queries - /// for dates within the last 90 days.

- ///
- public interface ICustomerSyncService : CustomerSyncServiceInterface, IDisposable - { - } - - - /// Service used to manage customer feed links, and matching functions. - /// - public interface ICustomerFeedService : CustomerFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CustomerFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.CustomerFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomerFeedOperation[] operations); - } - - - /// A service to return Ads Campaign Management data matching a Selector. This is - /// disabled for AdX. - /// - public interface IDataService : DataServiceInterface, IDisposable - { - } - - - /// Service used to get and mutate Feeds. - /// - public interface IFeedService : FeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.FeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedOperation[] operations); - } - - - /// Service to operate on feed items. - /// - public interface IFeedItemService : FeedItemServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.FeedItemReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedItemOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedItemOperation[] operations); - } - - - /// Service for getting and mutating FeedItemTargets. - /// - public interface IFeedItemTargetService : FeedItemTargetServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.FeedItemTargetReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedItemTargetOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedItemTargetOperation[] operations); - } - - - /// Service for getting and mutating FeedMappings. - /// - public interface IFeedMappingService : FeedMappingServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.FeedMappingReturnValue mutate(Google.Api.Ads.AdWords.v201806.FeedMappingOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.FeedMappingOperation[] operations); - } - - - /// Service that returns LocationCriterion constants - /// that match a specified name or list of criterion id(s) as specified in the input - /// selector.

Please note that filtering by date range is not - /// supported.

- ///
- public interface ILocationCriterionService : LocationCriterionServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.LocationCriterion[] get(Google.Api.Ads.AdWords.v201806.Selector selector); - - System.Threading.Tasks.Task getAsync(Google.Api.Ads.AdWords.v201806.Selector selector); - - Google.Api.Ads.AdWords.v201806.LocationCriterion[] query(string query1); - - System.Threading.Tasks.Task queryAsync(string query); - } - - - /// Customer Manager Service. - /// - public interface IManagedCustomerService : ManagedCustomerServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.PendingInvitation[] getPendingInvitations(Google.Api.Ads.AdWords.v201806.PendingInvitationSelector selector); - - System.Threading.Tasks.Task getPendingInvitationsAsync(Google.Api.Ads.AdWords.v201806.PendingInvitationSelector selector); - - Google.Api.Ads.AdWords.v201806.ManagedCustomerReturnValue mutate(Google.Api.Ads.AdWords.v201806.ManagedCustomerOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.ManagedCustomerOperation[] operations); - - Google.Api.Ads.AdWords.v201806.ManagedCustomerLabel[] mutateLabel(Google.Api.Ads.AdWords.v201806.ManagedCustomerLabelOperation[] operations); - - System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.ManagedCustomerLabelOperation[] operations); - - Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] mutateLink(Google.Api.Ads.AdWords.v201806.LinkOperation[] operations); - - System.Threading.Tasks.Task mutateLinkAsync(Google.Api.Ads.AdWords.v201806.LinkOperation[] operations); - - Google.Api.Ads.AdWords.v201806.ManagedCustomerLink[] mutateManager(Google.Api.Ads.AdWords.v201806.MoveOperation[] operations); - - System.Threading.Tasks.Task mutateManagerAsync(Google.Api.Ads.AdWords.v201806.MoveOperation[] operations); - } - - - /// Use this service to manage media. - /// - public interface IMediaService : MediaServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.Media[] upload(Google.Api.Ads.AdWords.v201806.Media[] media); - - System.Threading.Tasks.Task uploadAsync(Google.Api.Ads.AdWords.v201806.Media[] media); - } - - - /// Use this service to manage criteria (such as keywords or - /// placements). A criterion describes the conditions that - /// determine if an ad should display. Two classes of criteria are available:
    - ///
  • A biddable criterion defines - /// conditions that will cause the parent ad group's ads to display. A biddable - /// criterion can also specify a bid amount that overrides the parent ad group's - /// default bid.
  • A negative - /// criterion defines conditions that will prevent the parent ad group's ads - /// from displaying.
- ///
- public interface IAdGroupCriterionService : AdGroupCriterionServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdGroupCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupCriterionOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupCriterionOperation[] operations); - - Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelOperation[] operations); - - System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.AdGroupCriterionLabelOperation[] operations); - } - - - /// Service that handles the reporting of offline conversion data from external - /// third parties.

For more information, see our - /// conversion tracking guide.

- ///
- public interface IOfflineConversionFeedService : OfflineConversionFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.OfflineConversionFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineConversionFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineConversionFeedOperation[] operations); - } - - - /// Service to manage Offline Data uploads.

Note: This - /// service is available only on a whitelist basis.

- ///
- public interface IOfflineDataUploadService : OfflineDataUploadServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.OfflineDataUploadReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineDataUploadOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineDataUploadOperation[] operations); - } - - - /// Service that handles the reporting of externally provided call conversions. - /// - public interface IOfflineCallConversionFeedService : OfflineCallConversionFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineCallConversionFeedOperation[] operations); - } - - - ///

Note: As of v201109 this service is read-only. New report definitions - /// are no longer allowed.

A report definition describes the report type, - /// date range, and fields to include in the report. - /// Additionally, you can specify predicates to filter which - /// rows are returned in a generated report. Please note that sorting and paging are - /// not supported for report downloads.

To find out which report fields are - /// available based on report type, see the Report Types appendix or call #getReportFields.

For more information about - /// retrieving reports, see Reporting - /// Basics.

- ///
- public interface IReportDefinitionService : ReportDefinitionServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.ReportDefinitionField[] getReportFields(Google.Api.Ads.AdWords.v201806.ReportDefinitionReportType reportType); - - System.Threading.Tasks.Task getReportFieldsAsync(Google.Api.Ads.AdWords.v201806.ReportDefinitionReportType reportType); - } - - - /// Use this service to generate new keyword ideas based on the parameters specified - /// in the selector. See the TargetingIdeaSelector documentation for more - /// details.

You can also use this service to retrieve statistics for existing - /// keyword ideas by setting the selector's to RequestType#STATS and passing in the appropriate - /// search parameters.

- ///
- public interface ITargetingIdeaService : TargetingIdeaServiceInterface, IDisposable - { - } - - - /// Use this service to request traffic estimates for proposed or existing - /// campaigns, ad groups, and keywords.

To simply retrieve estimates for a list - /// of proposed keywords, create a campaign - /// estimate request and a child ad group - /// estimate request with null IDs, and then set the keywordEstimateRequests - /// to contain the keywords.

You can refine the traffic estimates by setting - /// campaign targeting options in the - /// request. If an ad group ID is provided, all creatives from that ad group will be - /// loaded and used to improve estimates.

The maximum number of keyword estimate requests across all campaign - /// estimate requests and ad group estimate requests is 2500.

The maximum - /// number of adgroup estimate requests across - /// all campaign estimate requests is 50.

Note that the API returns intervals - /// whereas the Traffic Estimator UI displays averages. Estimates are account - /// specific since they are based on creatives already in the account. When - /// comparing numbers, use the same account for the API and UI.

This is disabled for AdX. - ///
- public interface ITrafficEstimatorService : TrafficEstimatorServiceInterface, IDisposable - { - } - - - /// Service which is used to manage user lists. - /// - public interface IAdwordsUserListService : AdwordsUserListServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.UserListReturnValue mutate(Google.Api.Ads.AdWords.v201806.UserListOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.UserListOperation[] operations); - - Google.Api.Ads.AdWords.v201806.MutateMembersReturnValue mutateMembers(Google.Api.Ads.AdWords.v201806.MutateMembersOperation[] operations); - - System.Threading.Tasks.Task mutateMembersAsync(Google.Api.Ads.AdWords.v201806.MutateMembersOperation[] operations); - } - - - /// This service is used for managing associations between entities - /// and Campaign entities. - /// - public interface ICampaignSharedSetService : CampaignSharedSetServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignSharedSetReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignSharedSetOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignSharedSetOperation[] operations); - } - - - /// Manages which criteria are associated with shared sets. - /// - public interface ISharedCriterionService : SharedCriterionServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.SharedCriterionReturnValue mutate(Google.Api.Ads.AdWords.v201806.SharedCriterionOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.SharedCriterionOperation[] operations); - } - - - /// This service is used for managing SharedSet entities - /// themselves and the association between sets and campaigns. - /// - public interface ISharedSetService : SharedSetServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.SharedSetReturnValue mutate(Google.Api.Ads.AdWords.v201806.SharedSetOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.SharedSetOperation[] operations); - } - - - /// Use this service to manage ad groups. An ad group - /// organizes a set of ads and criteria together, and also provides the default bid for its criteria. One or more ad groups - /// belong to a campaign. - /// - public interface IAdGroupService : AdGroupServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdGroupReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupOperation[] operations); - - Google.Api.Ads.AdWords.v201806.AdGroupLabelReturnValue mutateLabel(Google.Api.Ads.AdWords.v201806.AdGroupLabelOperation[] operations); - - System.Threading.Tasks.Task mutateLabelAsync(Google.Api.Ads.AdWords.v201806.AdGroupLabelOperation[] operations); - } - - - /// Use this service to manage labels. The light weight label, once created, can be - /// attached to campaign management entities such as campaigns, ad groups, - /// creatives, criterion and etc. - /// - public interface ILabelService : LabelServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.LabelReturnValue mutate(Google.Api.Ads.AdWords.v201806.LabelOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.LabelOperation[] operations); - } - - - /// Service for creating, editing, and deleting labels that can be applied to - /// managed customers.

Labels created by a manager are not accessible to any - /// customers managed by this manager. Only manager customers may create these - /// labels.

Note that label access works a little differently in the API than - /// it does in the AdWords UI. In the UI, a manager will never see a submanager's - /// labels, and will always be using his own labels regardless of which managed - /// account he is viewing. In this API, like other API services, if you specify a - /// submanager as the effective account for the API request, then the request will - /// operate on the submanager's labels.

To apply a label to a managed - /// customer, see ManagedCustomerService#mutateLabel.

- ///
- public interface IAccountLabelService : AccountLabelServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AccountLabel[] mutate(Google.Api.Ads.AdWords.v201806.AccountLabelOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AccountLabelOperation[] operations); - } - - - /// Service used to get and mutate Feeds that contain ad customizer data.

This - /// service is a convenience for creating and modifying ad customizer Feeds, but - /// such Feeds can also be managed using a combination of the Feed, FeedMapping, and - /// CustomerFeed services.

- ///
- public interface IAdCustomizerFeedService : AdCustomizerFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdCustomizerFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdCustomizerFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdCustomizerFeedOperation[] operations); - } - - - /// Service used to manage extensions at the adgroup level. The extensions are - /// managed by AdWords using existing feed services, including creating and - /// modifying feeds, feed items, and adgroup feeds for the user. - /// - public interface IAdGroupExtensionSettingService : AdGroupExtensionSettingServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupExtensionSettingOperation[] operations); - } - - - /// Service used to manage extensions at the campaign level. The extensions are - /// managed by AdWords using existing feed services, including creating and - /// modifying feeds, feed items, and campaign feeds for the user. - /// - public interface ICampaignExtensionSettingService : CampaignExtensionSettingServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingReturnValue mutate(Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CampaignExtensionSettingOperation[] operations); - } - - - /// Service used to manage extensions at the customer level. The extensions are - /// managed by AdWords using existing feed services, including creating and - /// modifying feeds, feed items, and customer feeds for the user. - /// - public interface ICustomerExtensionSettingService : CustomerExtensionSettingServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingReturnValue mutate(Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomerExtensionSettingOperation[] operations); - } - - - /// The DraftService is used for creating new drafts and controlling the life cycle - /// of drafts. - /// - public interface IDraftService : DraftServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.DraftReturnValue mutate(Google.Api.Ads.AdWords.v201806.DraftOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.DraftOperation[] operations); - } - - - /// The DraftAsyncErrorService is retrieving asynchronous errors from promoting - /// drafts. - /// - public interface IDraftAsyncErrorService : DraftAsyncErrorServiceInterface, IDisposable - { - } - - - /// TrialService manages the life cycle of campaign trials. It is used to create new - /// trials from drafts, modify trial properties, promote changes in a trial back to - /// its base campaign, and to archive a trial.

A trial is an experiment, running - /// two variants (trial arms) - the base campaign and the trial - at the same time, - /// directing a fixed share of traffic to each trial arm. A trial is created from a - /// draft of the base campaign and will be a snapshot of changes in the draft at the - /// time of creation.

Constraints

  • A campaign cannot have - /// running/scheduled "AdWords Campaign Experiments" (ACE) and running/scheduled - /// trials at the same time. Trial creation will fail, if the base campaign has a - /// running/scheduled ACE experiment.
  • Trial names must be unique across all - /// of the customer's non-deleted trial and campaign names.
  • When creating a - /// trial, [startDate, endDate] cannot be in the past or overlap with any other - /// running/scheduled trial, must be within the base campaign's [startDate, endDate] - /// and endDate must be later than startDate.
  • A future startDate/endDate - /// can be updated to a different future startDate/endDate as long as the - /// constraints on [startDate, endDate] are not violated.
  • There is at most - /// one trial running and at most one trial scheduled for the future at a time, per - /// base campaign.
  • The base campaign's budget cannot be shared with any - /// other campaign. Trial creation will fail if the base campaign's budget is shared - /// with another campaign.

Life cycle

A trial's status reflects the state of the trial within its life - /// cycle. Some status transitions are performed explicitly by sending a SET operation, while other status transitions occur - /// asynchronously without a client operation.

When a trial is first ADDed, its status is CREATING. The trial will be created - /// asynchronously, and once it is fully created, its status will change to ACTIVE.

If the asynchronous creation of the - /// trial fails, its status will change to CREATION_FAILED.

To promote - /// changes in an ACTIVE trial back to the base - /// campaign, set the trial status to PROMOTING. - /// The promotion itself will occur asynchronously. If the promotion operation fails - /// after some of the base campaign has already been updated, the status will change - /// to PROMOTE_FAILED.

To graduate - /// an ACTIVE trial, which will allow its - /// associated campaign to act independently of the trial and free it of - /// restrictions from the trial, set the status to GRADUATED and provide a new budgetId for the campaign to use (since it can no - /// longer share the base campaign's budget).

Any trial that is not CREATING or PROMOTING can be archived by setting the status - /// to the value of the same name.

- ///
- public interface ITrialService : TrialServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.TrialReturnValue mutate(Google.Api.Ads.AdWords.v201806.TrialOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.TrialOperation[] operations); - } - - - /// The TrialAsyncErrorService is retrieving asynchronous errors from creating and - /// promoting trials. - /// - public interface ITrialAsyncErrorService : TrialAsyncErrorServiceInterface, IDisposable - { - } - - - /// Service used to manage campaign criterion bid overrides at the ad group level. - /// Currently this service supports Platform and PreferredContent bid multiplier - /// overrides. - /// - public interface IAdGroupBidModifierService : AdGroupBidModifierServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdGroupBidModifierReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdGroupBidModifierOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdGroupBidModifierOperation[] operations); - } - - - /// IMPORTANT: THIS IS NOT A REAL SERVICE INTERFACE. It exists solely for the - /// purpose of generating client library code. Do not attempt to send SOAP requests - /// to this endpoint.

Service for BatchJob XML i/o. When submitting an XML file - /// to BatchJobService, the input should be a single Mutate with any number of - /// Operations. The output will be a single MutateResponse with the same number of - /// MutateResults.

- ///
- public interface IBatchJobOpsService : BatchJobOpsServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.MutateResult[] mutate(Google.Api.Ads.AdWords.v201806.Operation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.Operation[] operations); - } - - - /// Service that handles the reporting of offline conversion adjustments from - /// external third parties. - /// - public interface IOfflineConversionAdjustmentFeedService : OfflineConversionAdjustmentFeedServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedReturnValue mutate(Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.OfflineConversionAdjustmentFeedOperation[] operations); - } - - - public interface IAssetService : AssetServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AssetReturnValue mutate(Google.Api.Ads.AdWords.v201806.AssetOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AssetOperation[] operations); - } - - - /// AdService is used to update Ads. Ads are created using the AdGroupAdService at the - /// same time they are associated with an AdGroup, but Ads are mutated using AdService. - /// - public interface IAdService : AdServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdReturnValue mutate(Google.Api.Ads.AdWords.v201806.AdOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdOperation[] operations); - } - - - /// A service which is used to manage custom affinity audience. - /// - public interface ICustomAffinityService : CustomAffinityServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.CustomAffinity[] mutate(Google.Api.Ads.AdWords.v201806.CustomAffinityOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.CustomAffinityOperation[] operations); - - Google.Api.Ads.AdWords.v201806.CustomAffinityToken[] mutateToken(Google.Api.Ads.AdWords.v201806.CustomAffinityTokenOperation[] operations); - - System.Threading.Tasks.Task mutateTokenAsync(Google.Api.Ads.AdWords.v201806.CustomAffinityTokenOperation[] operations); - } - - - /// Use this service to manage ad parameters, which let you quickly update - /// parameterized values (such as prices or inventory levels) in a text ad. Whereas - /// updates to regular ad text can take hours to go live, updates to parameterized - /// values go live in minutes.

To define where parameterized values appear in an - /// ad, you insert {param#:default-value} tags in your ad - /// text. You can use these tags in any line of display text, and also in the - /// destination URL. When the text ad is displayed, values in these tags are - /// replaced by the ad parameter's insertion - /// text. default-value specifies the string to display if one of - /// the following conditions is true:

  • The parameter has not been - /// set.
  • The parameter's insertion text is too long for the display - /// line.
  • The ad is being shown on the Google Display Network.
- /// This is disabled for AdX. - ///
- public interface IAdParamService : AdParamServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.AdParam[] mutate(Google.Api.Ads.AdWords.v201806.AdParamOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.AdParamOperation[] operations); - } - - - /// Use the BatchJobService to schedule large batches of updates to - /// your AdWords campaigns as asynchronous mutate jobs, and to retrieve the status, - /// results or statistics of your recent jobs.

Use this service when you wish to - /// release your application from actively waiting on a synchronous response. Your - /// application can do other things or even shutdown while we execute mutations - /// asynchronously.

Once a job has been submitted, you may check its status - /// periodically, by calling #get.

Caution: Do not poll the job status too frequently or you - /// will risk getting your customer rate-limited.

Once a job's status changes - /// to DONE, you can retrieve the job's results.

- ///
- public interface IBatchJobService : BatchJobServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.BatchJobReturnValue mutate(Google.Api.Ads.AdWords.v201806.BatchJobOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BatchJobOperation[] operations); - } - - - /// BiddingStrategy Service to get/mutate bidding strategies. This is disabled for AdX. - /// - public interface IBiddingStrategyService : BiddingStrategyServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.BiddingStrategyReturnValue mutate(Google.Api.Ads.AdWords.v201806.BiddingStrategyOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BiddingStrategyOperation[] operations); - } - - - /// Service for managing BudgetOrders.

Note: The mutate action in this service is - /// available only on a whitelist basis.

Warning: The - /// BudgetOrderService is limited to one operation per mutate request. - /// Any attempt to make more than one operation will result in an - /// ApiException.

- ///
- public interface IBudgetOrderService : BudgetOrderServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.BillingAccount[] getBillingAccounts(); - - System.Threading.Tasks.Task getBillingAccountsAsync(); - - Google.Api.Ads.AdWords.v201806.BudgetOrderReturnValue mutate(Google.Api.Ads.AdWords.v201806.BudgetOrderOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BudgetOrderOperation[] operations); - } - - - /// Budget Service to get/mutate budgets. - /// - public interface IBudgetService : BudgetServiceInterface, IDisposable - { - Google.Api.Ads.AdWords.v201806.BudgetReturnValue mutate(Google.Api.Ads.AdWords.v201806.BudgetOperation[] operations); - - System.Threading.Tasks.Task mutateAsync(Google.Api.Ads.AdWords.v201806.BudgetOperation[] operations); - } - - - /// - /// A class to lookup human-friendly descriptions for an error enumeration. - /// - public class ErrorDescriptions - { - /// - /// A dictionary to hold the error messages. - /// - private static readonly Dictionary codes; - - /// - /// Static constructor to initialize the error lookup dictionary. - /// - static ErrorDescriptions() - { - codes = new Dictionary(); - codes["UrlErrorReason.INVALID_TRACKING_URL_TEMPLATE"] = "The tracking url template is invalid."; - codes["UrlErrorReason.INVALID_TAG_IN_TRACKING_URL_TEMPLATE"] = "The tracking url template contains invalid tag."; - codes["UrlErrorReason.MISSING_TRACKING_URL_TEMPLATE_TAG"] = "The tracking url template must contain at least one tag (e.g. {lpurl}), This applies only to tracking url template associated with website ads or product ads."; - codes["UrlErrorReason.MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE"] = "The tracking url template must start with a valid protocol (or lpurl tag)."; - codes["UrlErrorReason.INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE"] = "The tracking url template starts with an invalid protocol."; - codes["UrlErrorReason.MALFORMED_TRACKING_URL_TEMPLATE"] = "The tracking url template contains illegal characters."; - codes["UrlErrorReason.MISSING_HOST_IN_TRACKING_URL_TEMPLATE"] = "The tracking url template must contain a host name (or lpurl tag)."; - codes["UrlErrorReason.INVALID_TLD_IN_TRACKING_URL_TEMPLATE"] = "The tracking url template has an invalid or missing top level domain extension."; - codes["UrlErrorReason.REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG"] = "The tracking url template contains nested occurrences of the same conditional tag (i.e. {ifmobile:{ifmobile:x}})."; - codes["UrlErrorReason.INVALID_FINAL_URL"] = "The final url is invalid."; - codes["UrlErrorReason.INVALID_TAG_IN_FINAL_URL"] = "The final url contains invalid tag."; - codes["UrlErrorReason.REDUNDANT_NESTED_FINAL_URL_TAG"] = "The final url contains nested occurrences of the same conditional tag (i.e. {ifmobile:{ifmobile:x}})."; - codes["UrlErrorReason.MISSING_PROTOCOL_IN_FINAL_URL"] = "The final url must start with a valid protocol."; - codes["UrlErrorReason.INVALID_PROTOCOL_IN_FINAL_URL"] = "The final url starts with an invalid protocol."; - codes["UrlErrorReason.MALFORMED_FINAL_URL"] = "The final url contains illegal characters."; - codes["UrlErrorReason.MISSING_HOST_IN_FINAL_URL"] = "The final url must contain a host name."; - codes["UrlErrorReason.INVALID_TLD_IN_FINAL_URL"] = "The tracking url template has an invalid or missing top level domain extension."; - codes["UrlErrorReason.INVALID_FINAL_MOBILE_URL"] = "The final mobile url is invalid."; - codes["UrlErrorReason.INVALID_TAG_IN_FINAL_MOBILE_URL"] = "The final mobile url contains invalid tag."; - codes["UrlErrorReason.REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG"] = "The final mobile url contains nested occurrences of the same conditional tag (i.e. {ifmobile:{ifmobile:x}})."; - codes["UrlErrorReason.MISSING_PROTOCOL_IN_FINAL_MOBILE_URL"] = "The final mobile url must start with a valid protocol."; - codes["UrlErrorReason.INVALID_PROTOCOL_IN_FINAL_MOBILE_URL"] = "The final mobile url starts with an invalid protocol."; - codes["UrlErrorReason.MALFORMED_FINAL_MOBILE_URL"] = "The final mobile url contains illegal characters."; - codes["UrlErrorReason.MISSING_HOST_IN_FINAL_MOBILE_URL"] = "The final mobile url must contain a host name."; - codes["UrlErrorReason.INVALID_TLD_IN_FINAL_MOBILE_URL"] = "The tracking url template has an invalid or missing top level domain extension."; - codes["UrlErrorReason.INVALID_FINAL_APP_URL"] = "The final app url is invalid."; - codes["UrlErrorReason.INVALID_TAG_IN_FINAL_APP_URL"] = "The final app url contains invalid tag."; - codes["UrlErrorReason.REDUNDANT_NESTED_FINAL_APP_URL_TAG"] = "The final app url contains nested occurrences of the same conditional tag (i.e. {ifmobile:{ifmobile:x}})."; - codes["UrlErrorReason.MULTIPLE_APP_URLS_FOR_OSTYPE"] = "More than one app url found for the same OS type."; - codes["UrlErrorReason.INVALID_OSTYPE"] = "The OS type given for an app url is not valid."; - codes["UrlErrorReason.INVALID_PROTOCOL_FOR_APP_URL"] = "The protocol given for an app url is not valid. (E.g. \"android-app://\")"; - codes["UrlErrorReason.INVALID_PACKAGE_ID_FOR_APP_URL"] = "The package id (app id) given for an app url is not valid."; - codes["UrlErrorReason.URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT"] = "The number of url custom parameters for an entity exceeds the maximum limit allowed."; - codes["UrlErrorReason.URL_CUSTOM_PARAMETER_REMOVAL_WITH_NON_NULL_VALUE"] = "The parameter has isRemove set to true but a value that is non-null."; - codes["UrlErrorReason.CANNOT_REMOVE_URL_CUSTOM_PARAMETER_IN_ADD_OPERATION"] = "For add operations, there will not be any existing parameters to delete."; - codes["UrlErrorReason.CANNOT_REMOVE_URL_CUSTOM_PARAMETER_DURING_FULL_REPLACEMENT"] = "When the doReplace flag is set to true, individual parameters cannot be deleted."; - codes["UrlErrorReason.FINAL_URL_SUFFIX_MALFORMED"] = "The final url suffix cannot begin with ? or & characters and must be a valid query string."; - codes["UrlErrorReason.INVALID_TAG_IN_FINAL_URL_SUFFIX"] = "The final url suffix cannot contain {lpurl} related or {ignore} tags."; - codes["UrlErrorReason.NULL_CUSTOM_PARAMETER_VALUE_DURING_ADD_OR_FULL_REPLACEMENT"] = "For ADD operations and when the doReplace flag is set to true, custom parameter values cannot be null."; - codes["UrlErrorReason.INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY"] = "An invalid character appears in the parameter key."; - codes["UrlErrorReason.INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE"] = "An invalid character appears in the parameter value."; - codes["UrlErrorReason.INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE"] = "The url custom parameter value fails url tag validation."; - codes["UrlErrorReason.REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG"] = "The custom parameter contains nested occurrences of the same conditional tag (i.e. {ifmobile:{ifmobile:x}})."; - codes["UrlErrorReason.MISSING_PROTOCOL"] = "The protocol (http:// or https://) is missing."; - codes["UrlErrorReason.INVALID_URL"] = "The url is invalid."; - codes["UrlErrorReason.DESTINATION_URL_DEPRECATED"] = "Destination Url is deprecated."; - codes["UrlErrorReason.INVALID_TAG_IN_URL"] = "The url contains invalid tag."; - codes["UrlErrorReason.MISSING_URL_TAG"] = "The url must contain at least one tag (e.g. {lpurl}), This applies only to urls associated with website ads or product ads."; - codes["UrlErrorReason.DUPLICATE_URL_ID"] = ""; - codes["UrlErrorReason.INVALID_URL_ID"] = ""; - codes["UrlErrorReason.URL_ERROR"] = ""; - codes["StringLengthErrorReason.TOO_SHORT"] = ""; - codes["StringLengthErrorReason.TOO_LONG"] = ""; - codes["StringFormatErrorReason.UNKNOWN"] = ""; - codes["StringFormatErrorReason.ILLEGAL_CHARS"] = "The input string value contains disallowed characters."; - codes["StringFormatErrorReason.INVALID_FORMAT"] = "The input string value is invalid for the associated field."; - codes["StatsQueryErrorReason.DATE_NOT_IN_VALID_RANGE"] = "Date is outside of allowed range."; - codes["SizeLimitErrorReason.REQUEST_SIZE_LIMIT_EXCEEDED"] = "The number of entries in the request exceeds the system limit."; - codes["SizeLimitErrorReason.RESPONSE_SIZE_LIMIT_EXCEEDED"] = "The number of entries in the response exceeds the system limit."; - codes["SizeLimitErrorReason.INTERNAL_STORAGE_ERROR"] = "The account is too large to load."; - codes["SizeLimitErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["SelectorErrorReason.INVALID_FIELD_NAME"] = "The field name is not valid."; - codes["SelectorErrorReason.MISSING_FIELDS"] = "The list of fields is null or empty."; - codes["SelectorErrorReason.MISSING_PREDICATES"] = "The list of predicates is null or empty."; - codes["SelectorErrorReason.OPERATOR_DOES_NOT_SUPPORT_MULTIPLE_VALUES"] = "Predicate operator does not support multiple values. Multiple values are supported only for Predicate.Operator#IN and Predicate.Operator#NOT_IN."; - codes["SelectorErrorReason.INVALID_PREDICATE_ENUM_VALUE"] = "The predicate enum value is not valid."; - codes["SelectorErrorReason.MISSING_PREDICATE_OPERATOR"] = "The predicate operator is empty."; - codes["SelectorErrorReason.MISSING_PREDICATE_VALUES"] = "The predicate values are empty."; - codes["SelectorErrorReason.INVALID_PREDICATE_FIELD_NAME"] = "The predicate field name is not valid."; - codes["SelectorErrorReason.INVALID_PREDICATE_OPERATOR"] = "The predicate operator is not valid."; - codes["SelectorErrorReason.INVALID_FIELD_SELECTION"] = "Invalid selection of fields."; - codes["SelectorErrorReason.INVALID_PREDICATE_VALUE"] = "The predicate value is not valid."; - codes["SelectorErrorReason.INVALID_SORT_FIELD_NAME"] = "The sort field name is not valid or the field is not sortable."; - codes["SelectorErrorReason.SELECTOR_ERROR"] = "Standard error."; - codes["SelectorErrorReason.FILTER_BY_DATE_RANGE_NOT_SUPPORTED"] = "Filtering by date range is not supported."; - codes["SelectorErrorReason.START_INDEX_IS_TOO_HIGH"] = "Selector paging start index is too high."; - codes["SelectorErrorReason.TOO_MANY_PREDICATE_VALUES"] = "The values list in a predicate was too long."; - codes["SelectorErrorReason.UNKNOWN_ERROR"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["RequiredErrorReason.REQUIRED"] = "Missing required field."; - codes["RequestErrorReason.UNKNOWN"] = "Error reason is unknown."; - codes["RequestErrorReason.INVALID_INPUT"] = "Invalid input."; - codes["RequestErrorReason.UNSUPPORTED_VERSION"] = "The api version in the request has been discontinued. Please update to the new AdWords API version."; - codes["RejectedErrorReason.UNKNOWN_VALUE"] = "Unknown value encountered"; - codes["ReadOnlyErrorReason.READ_ONLY"] = ""; - codes["RateExceededErrorReason.RATE_EXCEEDED"] = "Rate exceeded."; - codes["RangeErrorReason.TOO_LOW"] = ""; - codes["RangeErrorReason.TOO_HIGH"] = ""; - codes["QuotaCheckErrorReason.INVALID_TOKEN_HEADER"] = "Customer passed in an invalid token in the header."; - codes["QuotaCheckErrorReason.ACCOUNT_DELINQUENT"] = "Customer is marked delinquent."; - codes["QuotaCheckErrorReason.ACCOUNT_INACCESSIBLE"] = "Customer is a fraudulent."; - codes["QuotaCheckErrorReason.ACCOUNT_INACTIVE"] = "Inactive Account."; - codes["QuotaCheckErrorReason.INCOMPLETE_SIGNUP"] = "Signup not complete"; - codes["QuotaCheckErrorReason.DEVELOPER_TOKEN_NOT_APPROVED"] = "Developer token is not approved for production access, and the customer is attempting to access a production account."; - codes["QuotaCheckErrorReason.TERMS_AND_CONDITIONS_NOT_SIGNED"] = "Terms and conditions are not signed."; - codes["QuotaCheckErrorReason.MONTHLY_BUDGET_REACHED"] = "Monthly budget quota reached."; - codes["QuotaCheckErrorReason.QUOTA_EXCEEDED"] = "Monthly budget quota exceeded."; - codes["QueryErrorReason.PARSING_FAILED"] = "Exception that happens when trying to parse a query that doesn't match the AWQL grammar."; - codes["QueryErrorReason.MISSING_QUERY"] = "The provided query is an empty string."; - codes["QueryErrorReason.MISSING_SELECT_CLAUSE"] = "The query does not contain the required SELECT clause or it is not in the correct location."; - codes["QueryErrorReason.MISSING_FROM_CLAUSE"] = "The query does not contain the required FROM clause or it is not in the correct location."; - codes["QueryErrorReason.INVALID_SELECT_CLAUSE"] = "The SELECT clause could not be parsed."; - codes["QueryErrorReason.INVALID_FROM_CLAUSE"] = "The FROM clause could not be parsed."; - codes["QueryErrorReason.INVALID_WHERE_CLAUSE"] = "The WHERE clause could not be parsed."; - codes["QueryErrorReason.INVALID_ORDER_BY_CLAUSE"] = "The ORDER BY clause could not be parsed."; - codes["QueryErrorReason.INVALID_LIMIT_CLAUSE"] = "The LIMIT clause could not be parsed."; - codes["QueryErrorReason.INVALID_START_INDEX_IN_LIMIT_CLAUSE"] = "The startIndex in the LIMIT clause does not contain a valid integer."; - codes["QueryErrorReason.INVALID_PAGE_SIZE_IN_LIMIT_CLAUSE"] = "The pageSize in the LIMIT clause does not contain a valid integer."; - codes["QueryErrorReason.INVALID_DURING_CLAUSE"] = "The DURING clause could not be parsed."; - codes["QueryErrorReason.INVALID_MIN_DATE_IN_DURING_CLAUSE"] = "The minimum date in the DURING clause is not a valid date in YYYYMMDD format."; - codes["QueryErrorReason.INVALID_MAX_DATE_IN_DURING_CLAUSE"] = "The maximum date in the DURING clause is not a valid date in YYYYMMDD format."; - codes["QueryErrorReason.MAX_LESS_THAN_MIN_IN_DURING_CLAUSE"] = "The minimum date in the DURING is after the maximum date."; - codes["QueryErrorReason.VALIDATION_FAILED"] = "The query matched the grammar, but is invalid in some way such as using a service that isn't supported."; - codes["PolicyFindingErrorReason.POLICY_FINDING"] = ""; - codes["PagingErrorReason.START_INDEX_CANNOT_BE_NEGATIVE"] = "The start index value cannot be a negative number."; - codes["PagingErrorReason.NUMBER_OF_RESULTS_CANNOT_BE_NEGATIVE"] = "The number of results cannot be a negative number."; - codes["PagingErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["OperatorErrorReason.OPERATOR_NOT_SUPPORTED"] = ""; - codes["NullErrorReason.NULL_CONTENT"] = "Specified list/container must not contain any null elements"; - codes["NotEmptyErrorReason.EMPTY_LIST"] = ""; - codes["NewEntityCreationErrorReason.CANNOT_SET_ID_FOR_ADD"] = "Do not set the id field while creating new entities."; - codes["NewEntityCreationErrorReason.DUPLICATE_TEMP_IDS"] = "Creating more than one entity with the same temp ID is not allowed."; - codes["NewEntityCreationErrorReason.TEMP_ID_ENTITY_HAD_ERRORS"] = "Parent object with specified temp id failed validation, so no deep validation will be done for this child entity."; - codes["MediaErrorReason.CANNOT_ADD_STANDARD_ICON"] = "Cannot add a standard icon type"; - codes["MediaErrorReason.CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES"] = "May only select Standard Icons alone"; - codes["MediaErrorReason.CANNOT_SPECIFY_MEDIA_ID_AND_DATA"] = "Image contains both a media ID and media data."; - codes["MediaErrorReason.DUPLICATE_MEDIA"] = "A media with given type and reference id already exists"; - codes["MediaErrorReason.EMPTY_FIELD"] = "A required field was not specified or is an empty string."; - codes["MediaErrorReason.ENTITY_REFERENCED_IN_MULTIPLE_OPS"] = "A media may only be modified once per call"; - codes["MediaErrorReason.FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE"] = "Field is not supported for the media sub type."; - codes["MediaErrorReason.INVALID_MEDIA_ID"] = "The media id is invalid"; - codes["MediaErrorReason.INVALID_MEDIA_SUB_TYPE"] = "The media subtype is invalid"; - codes["MediaErrorReason.INVALID_MEDIA_TYPE"] = "The media type is invalid"; - codes["MediaErrorReason.INVALID_MIME_TYPE"] = "The mimetype is invalid"; - codes["MediaErrorReason.INVALID_REFERENCE_ID"] = "The media reference id is invalid"; - codes["MediaErrorReason.INVALID_YOU_TUBE_ID"] = "The YouTube video id is invalid"; - codes["MediaErrorReason.MEDIA_FAILED_TRANSCODING"] = "Media has failed transcoding"; - codes["MediaErrorReason.MEDIA_NOT_TRANSCODED"] = "Media has not been transcoded"; - codes["MediaErrorReason.MEDIA_TYPE_DOES_NOT_MATCH_OBJECT_TYPE"] = "The MediaType does not match the actual media object's type"; - codes["MediaErrorReason.NO_FIELDS_SPECIFIED"] = "None of the fields have been specified."; - codes["MediaErrorReason.NULL_REFERENCE_ID_AND_MEDIA_ID"] = "One of reference Id or media Id must be specified"; - codes["MediaErrorReason.TOO_LONG"] = "The string has too many characters."; - codes["MediaErrorReason.UNSUPPORTED_OPERATION"] = "The specified operation is not supported. Only ADD, SET, and REMOVE are supported"; - codes["MediaErrorReason.UNSUPPORTED_TYPE"] = "The specified type is not supported."; - codes["MediaErrorReason.YOU_TUBE_SERVICE_UNAVAILABLE"] = "YouTube is unavailable for requesting video data."; - codes["MediaErrorReason.YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION"] = "The YouTube video has a non positive duration."; - codes["MediaErrorReason.YOU_TUBE_VIDEO_NOT_FOUND"] = "The YouTube video id is syntactically valid but the video was not found."; - codes["MediaBundleErrorReason.ENTRY_POINT_CANNOT_BE_SET_USING_MEDIA_SERVICE"] = "The entryPoint field cannot be set using the MediaService."; - codes["MediaBundleErrorReason.BAD_REQUEST"] = "There was a problem with the request."; - codes["MediaBundleErrorReason.DOUBLECLICK_BUNDLE_NOT_ALLOWED"] = "HTML5 ads using DoubleClick Studio created ZIP files are not supported."; - codes["MediaBundleErrorReason.EXTERNAL_URL_NOT_ALLOWED"] = "Cannot reference URL external to the media bundle."; - codes["MediaBundleErrorReason.FILE_TOO_LARGE"] = "Media bundle file is too large."; - codes["MediaBundleErrorReason.GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED"] = "ZIP file from Google Web Designer is not published."; - codes["MediaBundleErrorReason.INVALID_INPUT"] = "Input was invalid."; - codes["MediaBundleErrorReason.INVALID_MEDIA_BUNDLE"] = "There was a problem with the media bundle."; - codes["MediaBundleErrorReason.INVALID_MEDIA_BUNDLE_ENTRY"] = "There was a problem with one or more of the media bundle entries."; - codes["MediaBundleErrorReason.INVALID_MIME_TYPE"] = "The media bundle contains a file with an unknown mime type"; - codes["MediaBundleErrorReason.INVALID_PATH"] = "The media bundle contain an invalid asset path."; - codes["MediaBundleErrorReason.INVALID_URL_REFERENCE"] = "HTML5 ad is trying to reference an asset not in .ZIP file"; - codes["MediaBundleErrorReason.MEDIA_DATA_TOO_LARGE"] = "Media data is too large."; - codes["MediaBundleErrorReason.MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY"] = "The media bundle contains no primary entry."; - codes["MediaBundleErrorReason.SERVER_ERROR"] = "There was an error on the server."; - codes["MediaBundleErrorReason.STORAGE_ERROR"] = "The image could not be stored."; - codes["MediaBundleErrorReason.SWIFFY_BUNDLE_NOT_ALLOWED"] = "Media bundle created with the Swiffy tool is not allowed."; - codes["MediaBundleErrorReason.TOO_MANY_FILES"] = "The media bundle contains too many files."; - codes["MediaBundleErrorReason.UNEXPECTED_SIZE"] = "The media bundle is not of legal dimensions."; - codes["MediaBundleErrorReason.UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT"] = "Google Web Designer not created for \"AdWords\" environment."; - codes["MediaBundleErrorReason.UNSUPPORTED_HTML5_FEATURE"] = "Unsupported HTML5 feature in HTML5 asset."; - codes["MediaBundleErrorReason.URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT"] = "URL in HTML5 entry is not ssl compliant."; - codes["MediaBundleErrorReason.CUSTOM_EXIT_NOT_ALLOWED"] = "Custom exits not allowed in HTML5 entry."; - codes["InternalApiErrorReason.UNEXPECTED_INTERNAL_API_ERROR"] = "API encountered an unexpected internal error."; - codes["InternalApiErrorReason.TRANSIENT_ERROR"] = "A temporary error occurred during the request. Please retry."; - codes["InternalApiErrorReason.UNKNOWN"] = "The cause of the error is not known or only defined in newer versions."; - codes["InternalApiErrorReason.DOWNTIME"] = "The API is currently unavailable for a planned downtime."; - codes["InternalApiErrorReason.ERROR_GENERATING_RESPONSE"] = "Mutate succeeded but server was unable to build response. Client should not retry mutate."; - codes["ImageErrorReason.INVALID_IMAGE"] = "The image is not valid."; - codes["ImageErrorReason.STORAGE_ERROR"] = "The image could not be stored."; - codes["ImageErrorReason.BAD_REQUEST"] = "There was a problem with the request."; - codes["ImageErrorReason.UNEXPECTED_SIZE"] = "The image is not of legal dimensions."; - codes["ImageErrorReason.ANIMATED_NOT_ALLOWED"] = "Animated image are not permitted."; - codes["ImageErrorReason.ANIMATION_TOO_LONG"] = "Animation is too long."; - codes["ImageErrorReason.SERVER_ERROR"] = "There was an error on the server."; - codes["ImageErrorReason.CMYK_JPEG_NOT_ALLOWED"] = "Image cannot be in CMYK color format."; - codes["ImageErrorReason.FLASH_NOT_ALLOWED"] = "Flash images are not permitted."; - codes["ImageErrorReason.FLASH_WITHOUT_CLICKTAG"] = "Flash images must support clickTag."; - codes["ImageErrorReason.FLASH_ERROR_AFTER_FIXING_CLICK_TAG"] = "A flash error has occurred after fixing the click tag."; - codes["ImageErrorReason.ANIMATED_VISUAL_EFFECT"] = "Unacceptable visual effects."; - codes["ImageErrorReason.FLASH_ERROR"] = "There was a problem with the flash image."; - codes["ImageErrorReason.LAYOUT_PROBLEM"] = "Incorrect image layout."; - codes["ImageErrorReason.PROBLEM_READING_IMAGE_FILE"] = "There was a problem reading the image file."; - codes["ImageErrorReason.ERROR_STORING_IMAGE"] = "There was an error storing the image."; - codes["ImageErrorReason.ASPECT_RATIO_NOT_ALLOWED"] = "The aspect ratio of the image is not allowed."; - codes["ImageErrorReason.FLASH_HAS_NETWORK_OBJECTS"] = "Flash cannot have network objects."; - codes["ImageErrorReason.FLASH_HAS_NETWORK_METHODS"] = "Flash cannot have network methods."; - codes["ImageErrorReason.FLASH_HAS_URL"] = "Flash cannot have a Url."; - codes["ImageErrorReason.FLASH_HAS_MOUSE_TRACKING"] = "Flash cannot use mouse tracking."; - codes["ImageErrorReason.FLASH_HAS_RANDOM_NUM"] = "Flash cannot have a random number."; - codes["ImageErrorReason.FLASH_SELF_TARGETS"] = "Ad click target cannot be '_self'."; - codes["ImageErrorReason.FLASH_BAD_GETURL_TARGET"] = "GetUrl method should only use '_blank'."; - codes["ImageErrorReason.FLASH_VERSION_NOT_SUPPORTED"] = "Flash version is not supported."; - codes["ImageErrorReason.FLASH_WITHOUT_HARD_CODED_CLICK_URL"] = "Flash movies need to have hard coded click URL or clickTAG"; - codes["ImageErrorReason.INVALID_FLASH_FILE"] = "Uploaded flash file is corrupted."; - codes["ImageErrorReason.FAILED_TO_FIX_CLICK_TAG_IN_FLASH"] = "Uploaded flash file can be parsed, but the click tag can not be fixed properly."; - codes["ImageErrorReason.FLASH_ACCESSES_NETWORK_RESOURCES"] = "Flash movie accesses network resources"; - codes["ImageErrorReason.FLASH_EXTERNAL_JS_CALL"] = "Flash movie attempts to call external javascript code"; - codes["ImageErrorReason.FLASH_EXTERNAL_FS_CALL"] = "Flash movie attempts to call flash system commands"; - codes["ImageErrorReason.FILE_TOO_LARGE"] = "Image file is too large."; - codes["ImageErrorReason.IMAGE_DATA_TOO_LARGE"] = "Image data is too large."; - codes["ImageErrorReason.IMAGE_PROCESSING_ERROR"] = "Error while processing the image."; - codes["ImageErrorReason.IMAGE_TOO_SMALL"] = "Image is too small."; - codes["ImageErrorReason.INVALID_INPUT"] = "Input was invalid."; - codes["ImageErrorReason.PROBLEM_READING_FILE"] = "There was a problem reading the image file."; - codes["IdErrorReason.NOT_FOUND"] = "Id not found"; - codes["FunctionParsingErrorReason.NO_MORE_INPUT"] = "Unexpected end of function string."; - codes["FunctionParsingErrorReason.EXPECTED_CHARACTER"] = "Could not find an expected character."; - codes["FunctionParsingErrorReason.UNEXPECTED_SEPARATOR"] = "Unexpected separator character."; - codes["FunctionParsingErrorReason.UNMATCHED_LEFT_BRACKET"] = "Unmatched left bracket or parenthesis."; - codes["FunctionParsingErrorReason.UNMATCHED_RIGHT_BRACKET"] = "Unmatched right bracket or parenthesis."; - codes["FunctionParsingErrorReason.TOO_MANY_NESTED_FUNCTIONS"] = "Functions are nested too deeply."; - codes["FunctionParsingErrorReason.MISSING_RIGHT_HAND_OPERAND"] = "Missing right-hand-side operand."; - codes["FunctionParsingErrorReason.INVALID_OPERATOR_NAME"] = "Invalid operator/function name."; - codes["FunctionParsingErrorReason.FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER"] = "Feed attribute operand's argument is not an integer."; - codes["FunctionParsingErrorReason.NO_OPERANDS"] = "Missing function operands."; - codes["FunctionParsingErrorReason.TOO_MANY_OPERANDS"] = "Function had too many operands."; - codes["FunctionParsingErrorReason.UNKNOWN"] = ""; - codes["FunctionErrorReason.INVALID_FUNCTION_FORMAT"] = "The format of the function is not recognized as a supported function format."; - codes["FunctionErrorReason.DATA_TYPE_MISMATCH"] = "Operand data types do not match."; - codes["FunctionErrorReason.INVALID_CONJUNCTION_OPERANDS"] = "The operands cannot be used together in a conjunction."; - codes["FunctionErrorReason.INVALID_NUMBER_OF_OPERANDS"] = "Invalid numer of Operands."; - codes["FunctionErrorReason.INVALID_OPERAND_TYPE"] = "Operand Type not supported."; - codes["FunctionErrorReason.INVALID_OPERATOR"] = "Operator not supported."; - codes["FunctionErrorReason.INVALID_REQUEST_CONTEXT_TYPE"] = "Request context type not supported."; - codes["FunctionErrorReason.INVALID_FUNCTION_FOR_CALL_PLACEHOLDER"] = "The matching function is not allowed for call placeholders"; - codes["FunctionErrorReason.INVALID_FUNCTION_FOR_PLACEHOLDER"] = "The matching function is not allowed for the specified placeholder"; - codes["FunctionErrorReason.INVALID_OPERAND"] = "Invalid operand."; - codes["FunctionErrorReason.MISSING_CONSTANT_OPERAND_VALUE"] = "Missing value for the constant operand."; - codes["FunctionErrorReason.INVALID_CONSTANT_OPERAND_VALUE"] = "The value of the constant operand is invalid."; - codes["FunctionErrorReason.INVALID_NESTING"] = "Invalid function nesting."; - codes["FunctionErrorReason.MULTIPLE_FEED_IDS_NOT_SUPPORTED"] = "The Feed ID was different from another Feed ID in the same function."; - codes["FunctionErrorReason.INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA"] = "The matching function is invalid for use with a feed with a fixed schema."; - codes["FunctionErrorReason.INVALID_ATTRIBUTE_NAME"] = "Invalid attribute name."; - codes["FunctionErrorReason.UNKNOWN"] = ""; - codes["ForwardCompatibilityErrorReason.INVALID_FORWARD_COMPATIBILITY_MAP_VALUE"] = "Invalid value specified for a key in the forward compatibility map."; - codes["ForwardCompatibilityErrorReason.UNKNOWN"] = ""; - codes["FeedAttributeReferenceErrorReason.CANNOT_REFERENCE_DELETED_FEED"] = "A feed referenced by ID has been deleted."; - codes["FeedAttributeReferenceErrorReason.INVALID_FEED_NAME"] = "There is no active feed with the given name."; - codes["FeedAttributeReferenceErrorReason.INVALID_FEED_ATTRIBUTE_NAME"] = "There is no feed attribute in an active feed with the given name."; - codes["DistinctErrorReason.DUPLICATE_ELEMENT"] = ""; - codes["DistinctErrorReason.DUPLICATE_TYPE"] = ""; - codes["DateErrorReason.INVALID_FIELD_VALUES_IN_DATE"] = "Given field values do not correspond to a valid date."; - codes["DateErrorReason.INVALID_FIELD_VALUES_IN_DATE_TIME"] = "Given field values do not correspond to a valid date time."; - codes["DateErrorReason.INVALID_STRING_DATE"] = "The string date's format should be yyyymmdd."; - codes["DateErrorReason.INVALID_STRING_DATE_RANGE"] = "The string date range's format should be yyyymmdd yyyymmdd."; - codes["DateErrorReason.INVALID_STRING_DATE_TIME"] = "The string date time's format should be yyyymmdd hhmmss [tz]."; - codes["DateErrorReason.EARLIER_THAN_MINIMUM_DATE"] = "Date is before allowed minimum."; - codes["DateErrorReason.LATER_THAN_MAXIMUM_DATE"] = "Date is after allowed maximum."; - codes["DateErrorReason.DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE"] = "Date range bounds are not in order."; - codes["DateErrorReason.DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL"] = "Both dates in range are null."; - codes["DatabaseErrorReason.CONCURRENT_MODIFICATION"] = "A concurrency problem occurred as two threads were attempting to modify same object."; - codes["DatabaseErrorReason.PERMISSION_DENIED"] = "The permission was denied to access an object."; - codes["DatabaseErrorReason.ACCESS_PROHIBITED"] = "The user's access to an object has been prohibited."; - codes["DatabaseErrorReason.CAMPAIGN_PRODUCT_NOT_SUPPORTED"] = "Requested campaign belongs to a product that is not supported by the api."; - codes["DatabaseErrorReason.DUPLICATE_KEY"] = "a duplicate key was detected upon insertion"; - codes["DatabaseErrorReason.DATABASE_ERROR"] = "a database error has occurred"; - codes["DatabaseErrorReason.UNKNOWN"] = "an unknown error has occurred"; - codes["CollectionSizeErrorReason.TOO_FEW"] = ""; - codes["CollectionSizeErrorReason.TOO_MANY"] = ""; - codes["ClientTermsErrorReason.INCOMPLETE_SIGNUP_CURRENT_ADWORDS_TNC_NOT_AGREED"] = "Customer has not agreed to the latest AdWords Terms & Conditions"; - codes["AuthorizationErrorReason.UNABLE_TO_AUTHORIZE"] = "Could not complete authorization due to an internal problem."; - codes["AuthorizationErrorReason.NO_ADWORDS_ACCOUNT_FOR_CUSTOMER"] = "Customer has no AdWords account."; - codes["AuthorizationErrorReason.USER_PERMISSION_DENIED"] = "User doesn't have permission to access customer."; - codes["AuthorizationErrorReason.EFFECTIVE_USER_PERMISSION_DENIED"] = "Effective user doesn't have permission to access this customer."; - codes["AuthorizationErrorReason.CUSTOMER_NOT_ACTIVE"] = "Access denied since the customer is not active."; - codes["AuthorizationErrorReason.USER_HAS_READONLY_PERMISSION"] = "User has read-only permission cannot mutate."; - codes["AuthorizationErrorReason.NO_CUSTOMER_FOUND"] = "No customer found."; - codes["AuthorizationErrorReason.SERVICE_ACCESS_DENIED"] = "Developer doesn't have permission to access service."; - codes["AuthorizationErrorReason.TWO_STEP_VERIFICATION_NOT_ENROLLED"] = "The customer has a policy to enforce 2-Step Verification, but the user is not enrolled."; - codes["AuthorizationErrorReason.ADVANCED_PROTECTION_NOT_ENROLLED"] = "The customer has a policy to enforce enrollment in the Advanced Protection Program, but the user is not enrolled."; - codes["AuthenticationErrorReason.AUTHENTICATION_FAILED"] = "Authentication of the request failed."; - codes["AuthenticationErrorReason.CLIENT_CUSTOMER_ID_IS_REQUIRED"] = "Client Customer Id is required if CustomerIdMode is set to CLIENT_EXTERNAL_CUSTOMER_ID. Starting version V201409 ClientCustomerId will be required for all requests except for CustomerService#get"; - codes["AuthenticationErrorReason.CLIENT_EMAIL_REQUIRED"] = "Client Email is required if CustomerIdMode is set to CLIENT_EXTERNAL_EMAIL_FIELD."; - codes["AuthenticationErrorReason.CLIENT_CUSTOMER_ID_INVALID"] = "Client customer Id is not a number."; - codes["AuthenticationErrorReason.CLIENT_EMAIL_INVALID"] = "Client customer Id is not a number."; - codes["AuthenticationErrorReason.CLIENT_EMAIL_FAILED_TO_AUTHENTICATE"] = "Client email is not a valid customer email."; - codes["AuthenticationErrorReason.CUSTOMER_NOT_FOUND"] = "No customer found for the customer id provided in the header."; - codes["AuthenticationErrorReason.GOOGLE_ACCOUNT_DELETED"] = "Client's Google Account is deleted."; - codes["AuthenticationErrorReason.GOOGLE_ACCOUNT_COOKIE_INVALID"] = "Google account login token in the cookie is invalid."; - codes["AuthenticationErrorReason.FAILED_TO_AUTHENTICATE_GOOGLE_ACCOUNT"] = "problem occurred during Google account authentication."; - codes["AuthenticationErrorReason.GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH"] = "The user in the google account login token does not match the UserId in the cookie."; - codes["AuthenticationErrorReason.LOGIN_COOKIE_REQUIRED"] = "Login cookie is required for authentication."; - codes["AuthenticationErrorReason.NOT_ADS_USER"] = "User in the cookie is not a valid Ads user."; - codes["AuthenticationErrorReason.OAUTH_TOKEN_INVALID"] = "Oauth token in the header is not valid."; - codes["AuthenticationErrorReason.OAUTH_TOKEN_EXPIRED"] = "Oauth token in the header has expired."; - codes["AuthenticationErrorReason.OAUTH_TOKEN_DISABLED"] = "Oauth token in the header has been disabled."; - codes["AuthenticationErrorReason.OAUTH_TOKEN_REVOKED"] = "Oauth token in the header has been revoked."; - codes["AuthenticationErrorReason.OAUTH_TOKEN_HEADER_INVALID"] = "Oauth token HTTP header is malformed."; - codes["AuthenticationErrorReason.LOGIN_COOKIE_INVALID"] = "Login cookie is not valid."; - codes["AuthenticationErrorReason.FAILED_TO_RETRIEVE_LOGIN_COOKIE"] = "Failed to decrypt the login cookie."; - codes["AuthenticationErrorReason.USER_ID_INVALID"] = "User Id in the header is not a valid id."; - codes["AssetLinkErrorReason.INVALID_ASSET_TYPE_FOR_FIELD"] = "Provided asset's type is invalid for use in the specified field."; - codes["AssetLinkErrorReason.PINNING_UNSUPPORTED"] = "Pinning is not supported for the given AssetLink field."; - codes["AssetLinkErrorReason.INVALID_PINNED_FIELD"] = "The input pinnedField is not valid for the given AssetLink field."; - codes["AssetLinkErrorReason.UNKNOWN"] = ""; - codes["AssetErrorReason.UNKNOWN"] = ""; - codes["AssetErrorReason.ASSET_TYPE_NOT_SUPPORTED"] = "The asset type is not supported by asset service."; - codes["AssetErrorReason.CANNOT_REMOVE_ASSET_WITH_REMOVED_STATUS"] = "Cannot remove an asset with status REMOVED."; - codes["AssetErrorReason.CANNOT_MODIFY_ASSET_NAME"] = "The asset has a name which is different from an existing duplicate that represents the same content."; - codes["AssetErrorReason.DUPLICATE_ASSET"] = "The asset is duplicated across operations."; - codes["AssetErrorReason.DUPLICATE_ASSET_NAME"] = "The asset name is duplicated, either across operations, or with an existing asset."; - codes["AssetErrorReason.ASSET_DATA_IS_MISSING"] = "No asset type specific data are set."; - codes["AdxErrorReason.UNSUPPORTED_FEATURE"] = "Attempt to use non-AdX feature by AdX customer."; - codes["AdSharingErrorReason.AD_GROUP_ALREADY_CONTAINS_AD"] = "Error resulting in attempting to add an Ad to an AdGroup that already contains the Ad."; - codes["AdSharingErrorReason.INCOMPATIBLE_AD_UNDER_AD_GROUP"] = "Ad is not compatible with the AdGroup it is being shared with. For more details, look at #sharedAdError."; - codes["AdSharingErrorReason.CANNOT_SHARE_INACTIVE_AD"] = "Cannot add AdGroupAd on inactive Ad."; - codes["AdGroupAdErrorReason.AD_GROUP_AD_LABEL_DOES_NOT_EXIST"] = "No link found between the adgroup ad and the label."; - codes["AdGroupAdErrorReason.AD_GROUP_AD_LABEL_ALREADY_EXISTS"] = "The label has already been attached to the adgroup ad."; - codes["AdGroupAdErrorReason.AD_NOT_UNDER_ADGROUP"] = "The specified ad was not found in the adgroup"; - codes["AdGroupAdErrorReason.CANNOT_OPERATE_ON_REMOVED_ADGROUPAD"] = "Removed ads may not be modified"; - codes["AdGroupAdErrorReason.CANNOT_CREATE_DEPRECATED_ADS"] = "An ad of this type is deprecated and cannot be created. Only deletions are permitted."; - codes["AdGroupAdErrorReason.CANNOT_CREATE_TEXT_ADS"] = "Text ads are deprecated and cannot be created. Use expanded text ads instead."; - codes["AdGroupAdErrorReason.EMPTY_FIELD"] = "A required field was not specified or is an empty string."; - codes["AdGroupAdErrorReason.ENTITY_REFERENCED_IN_MULTIPLE_OPS"] = "An ad may only be modified once per call"; - codes["AdGroupAdErrorReason.UNSUPPORTED_OPERATION"] = "The specified operation is not supported. Only ADD, SET, and REMOVE are supported"; - codes["AdErrorReason.AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE"] = "Ad customizers are not supported for ad type."; - codes["AdErrorReason.APPROXIMATELY_TOO_LONG"] = "Estimating character sizes the string is too long."; - codes["AdErrorReason.APPROXIMATELY_TOO_SHORT"] = "Estimating character sizes the string is too short."; - codes["AdErrorReason.BAD_SNIPPET"] = "There is a problem with the snippet."; - codes["AdErrorReason.CANNOT_MODIFY_AD"] = "Cannot modify an ad."; - codes["AdErrorReason.CANNOT_SET_BUSINESS_NAME_IF_URL_SET"] = "business name and url cannot be set at the same time"; - codes["AdErrorReason.CANNOT_SET_FIELD"] = "The specified field is incompatible with this ad's type or settings."; - codes["AdErrorReason.CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET"] = "Cannot set field when originAdId is set."; - codes["AdErrorReason.CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING"] = "Cannot set field when an existing ad id is set for sharing."; - codes["AdErrorReason.CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE"] = "Cannot set allowFlexibleColor false if no color is provided by user."; - codes["AdErrorReason.CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING"] = "When user select native, no color control is allowed because we will always respect publisher color for native format serving."; - codes["AdErrorReason.CANNOT_SET_URL"] = "Cannot specify a url for the ad type"; - codes["AdErrorReason.CANNOT_SET_WITHOUT_FINAL_URLS"] = "Cannot specify a tracking or mobile url without also setting final urls"; - codes["AdErrorReason.CANNOT_SET_WITH_FINAL_URLS"] = "Cannot specify a legacy url and a final url simultaneously"; - codes["AdErrorReason.CANNOT_SET_WITH_TRACKING_URL_TEMPLATE"] = "Cannot specify a legacy url and a tracking url template simultaneously in a DSA."; - codes["AdErrorReason.CANNOT_SET_WITH_URL_DATA"] = "Cannot specify a urls in UrlData and in template fields simultaneously."; - codes["AdErrorReason.CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR"] = "This operator cannot be used with a subclass of Ad."; - codes["AdErrorReason.CUSTOMER_NOT_APPROVED_MOBILEADS"] = "Customer is not approved for mobile ads."; - codes["AdErrorReason.CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS"] = "Customer is not approved for 3PAS richmedia ads."; - codes["AdErrorReason.CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS"] = "Customer is not approved for 3PAS redirect richmedia (Ad Exchange) ads."; - codes["AdErrorReason.CUSTOMER_NOT_ELIGIBLE"] = "Not an eligible customer"; - codes["AdErrorReason.CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL"] = "Customer is not eligible for updating beacon url"; - codes["AdErrorReason.DIMENSION_ALREADY_IN_UNION"] = "There already exists an ad with the same dimensions in the union."; - codes["AdErrorReason.DIMENSION_MUST_BE_SET"] = "Ad's dimension must be set before setting union dimension."; - codes["AdErrorReason.DIMENSION_NOT_IN_UNION"] = "Ad's dimension must be included in the union dimensions."; - codes["AdErrorReason.DISPLAY_URL_CANNOT_BE_SPECIFIED"] = "Display Url cannot be specified (applies to Ad Exchange Ads)"; - codes["AdErrorReason.DOMESTIC_PHONE_NUMBER_FORMAT"] = "Telephone number contains invalid characters or invalid format. Please re-enter your number using digits (0-9), dashes (-), and parentheses only."; - codes["AdErrorReason.EMERGENCY_PHONE_NUMBER"] = "Emergency telephone numbers are not allowed. Please enter a valid domestic phone number to connect customers to your business."; - codes["AdErrorReason.EMPTY_FIELD"] = "A required field was not specified or is an empty string."; - codes["AdErrorReason.FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID"] = "A feed attribute referenced in an ad customizer tag is not in the ad customizer mapping for the feed."; - codes["AdErrorReason.FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH"] = "The ad customizer field mapping for the feed attribute does not match the expected field type."; - codes["AdErrorReason.ILLEGAL_AD_CUSTOMIZER_TAG_USE"] = "The use of ad customizer tags in the ad text is disallowed. Details in trigger."; - codes["AdErrorReason.ILLEGAL_TAG_USE"] = "Tags of the form {PH_x}, where x is a number, are disallowed in ad text."; - codes["AdErrorReason.INCONSISTENT_DIMENSIONS"] = "The dimensions of the ad are specified or derived in multiple ways and are not consistent."; - codes["AdErrorReason.INCONSISTENT_STATUS_IN_TEMPLATE_UNION"] = "The status cannot differ among template ads of the same union."; - codes["AdErrorReason.INCORRECT_LENGTH"] = "The length of the string is not valid."; - codes["AdErrorReason.INELIGIBLE_FOR_UPGRADE"] = "The ad is ineligible for upgrade."; - codes["AdErrorReason.INVALID_AD_ADDRESS_CAMPAIGN_TARGET"] = "User cannot create mobile ad for countries targeted in specified campaign."; - codes["AdErrorReason.INVALID_AD_TYPE"] = "Invalid Ad type. A specific type of Ad is required."; - codes["AdErrorReason.INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE"] = "Headline, description or phone cannot be present when creating mobile image ad."; - codes["AdErrorReason.INVALID_ATTRIBUTES_FOR_MOBILE_TEXT"] = "Image cannot be present when creating mobile text ad."; - codes["AdErrorReason.INVALID_CALL_TO_ACTION_TEXT"] = "Invalid call to action text."; - codes["AdErrorReason.INVALID_CHARACTER_FOR_URL"] = "Invalid character in URL."; - codes["AdErrorReason.INVALID_COUNTRY_CODE"] = "Creative's country code is not valid."; - codes["AdErrorReason.INVALID_DSA_URL_TAG"] = "Invalid use of Dynamic Search Ads tags ({lpurl} etc.)"; - codes["AdErrorReason.INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG"] = "Invalid use of Expanded Dynamic Search Ads tags ({lpurl} etc.)"; - codes["AdErrorReason.INVALID_INPUT"] = "An input error whose real reason was not properly mapped (should not happen)."; - codes["AdErrorReason.INVALID_MARKUP_LANGUAGE"] = "An invalid markup language was entered."; - codes["AdErrorReason.INVALID_MOBILE_CARRIER"] = "An invalid mobile carrier was entered."; - codes["AdErrorReason.INVALID_MOBILE_CARRIER_TARGET"] = "Specified mobile carriers target a country not targeted by the campaign."; - codes["AdErrorReason.INVALID_NUMBER_OF_ELEMENTS"] = "Wrong number of elements for given element type"; - codes["AdErrorReason.INVALID_PHONE_NUMBER_FORMAT"] = "The format of the telephone number is incorrect. Please re-enter the number using the correct format."; - codes["AdErrorReason.INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID"] = "The certified vendor format id is incorrect."; - codes["AdErrorReason.INVALID_TEMPLATE_DATA"] = "The template ad data contains validation errors."; - codes["AdErrorReason.INVALID_TEMPLATE_ELEMENT_FIELD_TYPE"] = "The template field doesn't have have the correct type."; - codes["AdErrorReason.INVALID_TEMPLATE_ID"] = "Invalid template id."; - codes["AdErrorReason.LINE_TOO_WIDE"] = "After substituting replacement strings, the line is too wide."; - codes["AdErrorReason.MISSING_AD_CUSTOMIZER_MAPPING"] = "The feed referenced must have ad customizer mapping to be used in a customizer tag."; - codes["AdErrorReason.MISSING_ADDRESS_COMPONENT"] = "Missing address component in template element address field."; - codes["AdErrorReason.MISSING_ADVERTISEMENT_NAME"] = "An ad name must be entered."; - codes["AdErrorReason.MISSING_BUSINESS_NAME"] = "Business name must be entered."; - codes["AdErrorReason.MISSING_DESCRIPTION1"] = "Description (line 2) must be entered."; - codes["AdErrorReason.MISSING_DESCRIPTION2"] = "Description (line 3) must be entered."; - codes["AdErrorReason.MISSING_DESTINATION_URL_TAG"] = "The destination url must contain at least one tag (e.g. {lpurl})"; - codes["AdErrorReason.MISSING_LANDING_PAGE_URL_TAG"] = "The tracking url template of ExpandedDynamicSearchAd must contain at least one tag. (e.g. {lpurl})"; - codes["AdErrorReason.MISSING_DIMENSION"] = "A valid dimension must be specified for this ad."; - codes["AdErrorReason.MISSING_DISPLAY_URL"] = "A display URL must be entered."; - codes["AdErrorReason.MISSING_HEADLINE"] = "Headline must be entered."; - codes["AdErrorReason.MISSING_HEIGHT"] = "A height must be entered."; - codes["AdErrorReason.MISSING_IMAGE"] = "An image must be entered."; - codes["AdErrorReason.MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS"] = "Marketing image or product videos are required."; - codes["AdErrorReason.MISSING_MARKUP_LANGUAGES"] = "The markup language in which your site is written must be entered."; - codes["AdErrorReason.MISSING_MOBILE_CARRIER"] = "A mobile carrier must be entered."; - codes["AdErrorReason.MISSING_PHONE"] = "Phone number must be entered."; - codes["AdErrorReason.MISSING_REQUIRED_TEMPLATE_FIELDS"] = "Missing required template fields"; - codes["AdErrorReason.MISSING_TEMPLATE_FIELD_VALUE"] = "Missing a required field value"; - codes["AdErrorReason.MISSING_TEXT"] = "The ad must have text."; - codes["AdErrorReason.MISSING_VISIBLE_URL"] = "A visible URL must be entered."; - codes["AdErrorReason.MISSING_WIDTH"] = "A width must be entered."; - codes["AdErrorReason.MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED"] = "Only 1 feed can be used as the source of ad customizer substitutions in a single ad."; - codes["AdErrorReason.MUST_USE_TEMP_AD_UNION_ID_ON_ADD"] = "TempAdUnionId must be use when adding template ads."; - codes["AdErrorReason.TOO_LONG"] = "The string has too many characters."; - codes["AdErrorReason.TOO_SHORT"] = "The string has too few characters."; - codes["AdErrorReason.UNION_DIMENSIONS_CANNOT_CHANGE"] = "Ad union dimensions cannot change for saved ads."; - codes["AdErrorReason.UNKNOWN_ADDRESS_COMPONENT"] = "Address component is not {country, lat, lng}."; - codes["AdErrorReason.UNKNOWN_FIELD_NAME"] = "Unknown unique field name"; - codes["AdErrorReason.UNKNOWN_UNIQUE_NAME"] = "Unknown unique name (template element type specifier)"; - codes["AdErrorReason.UNSUPPORTED_DIMENSIONS"] = "Unsupported ad dimension"; - codes["AdErrorReason.URL_INVALID_SCHEME"] = "URL starts with an invalid scheme."; - codes["AdErrorReason.URL_INVALID_TOP_LEVEL_DOMAIN"] = "URL ends with an invalid top-level domain name."; - codes["AdErrorReason.URL_MALFORMED"] = "URL contains illegal characters."; - codes["AdErrorReason.URL_NO_HOST"] = "URL must contain a host name."; - codes["AdErrorReason.URL_NOT_EQUIVALENT"] = "URL not equivalent during upgrade."; - codes["AdErrorReason.URL_HOST_NAME_TOO_LONG"] = "URL host name too long to be stored as visible URL (applies to Ad Exchange ads)"; - codes["AdErrorReason.URL_NO_SCHEME"] = "URL must start with a scheme."; - codes["AdErrorReason.URL_NO_TOP_LEVEL_DOMAIN"] = "URL should end in a valid domain extension, such as .com or .net."; - codes["AdErrorReason.URL_PATH_NOT_ALLOWED"] = "URL must not end with a path."; - codes["AdErrorReason.URL_PORT_NOT_ALLOWED"] = "URL must not specify a port."; - codes["AdErrorReason.URL_QUERY_NOT_ALLOWED"] = "URL must not contain a query."; - codes["AdErrorReason.URL_SCHEME_BEFORE_DSA_TAG"] = "A url scheme is not allowed in front of tag in dest url (e.g. http://{lpurl})"; - codes["AdErrorReason.URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG"] = "A url scheme is not allowed in front of tag in tracking url template (e.g. http://{lpurl})"; - codes["AdErrorReason.USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE"] = "The user does not have permissions to create a template ad for the given template."; - codes["AdErrorReason.INCONSISTENT_EXPANDABLE_SETTINGS"] = "Expandable setting is inconsistent/wrong. For example, an AdX ad is invalid if it has a expandable vendor format but no expanding directions specified, or expanding directions is specified, but the vendor format is not expandable."; - codes["AdErrorReason.INVALID_FORMAT"] = "Format is invalid"; - codes["AdErrorReason.INVALID_FIELD_TEXT"] = "The text of this field did not match a pattern of allowed values."; - codes["AdErrorReason.ELEMENT_NOT_PRESENT"] = "Template element is mising"; - codes["AdErrorReason.IMAGE_ERROR"] = "Error occurred during image processing"; - codes["AdErrorReason.VALUE_NOT_IN_RANGE"] = "The value is not within the valid range"; - codes["AdErrorReason.FIELD_NOT_PRESENT"] = "Template element field is not present"; - codes["AdErrorReason.ADDRESS_NOT_COMPLETE"] = "Address is incomplete"; - codes["AdErrorReason.ADDRESS_INVALID"] = "Invalid address"; - codes["AdErrorReason.VIDEO_RETRIEVAL_ERROR"] = "Error retrieving specified video"; - codes["AdErrorReason.AUDIO_ERROR"] = "Error processing audio"; - codes["AdErrorReason.INVALID_YOUTUBE_DISPLAY_URL"] = "Display URL is incorrect for YouTube PYV ads"; - codes["AdErrorReason.TOO_MANY_PRODUCT_IMAGES"] = "Too many product Images in GmailAd"; - codes["AdErrorReason.TOO_MANY_PRODUCT_VIDEOS"] = "Too many product Videos in GmailAd"; - codes["AdErrorReason.INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE"] = "The device preference is not compatible with the ad type"; - codes["AdErrorReason.CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY"] = "Call tracking is not supported for specified country."; - codes["AdErrorReason.CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED"] = "Carrier specific short number is not allowed."; - codes["AdErrorReason.DISALLOWED_NUMBER_TYPE"] = "Specified phone number type is disallowed."; - codes["AdErrorReason.PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY"] = "Phone number not supported for country."; - codes["AdErrorReason.PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY"] = "Phone number not supported with call tracking enabled for country."; - codes["AdErrorReason.PREMIUM_RATE_NUMBER_NOT_ALLOWED"] = "Premium rate phone number is not allowed."; - codes["AdErrorReason.VANITY_PHONE_NUMBER_NOT_ALLOWED"] = "Vanity phone number is not allowed."; - codes["AdErrorReason.INVALID_CALL_CONVERSION_TYPE_ID"] = "Invalid call conversion type id."; - codes["AdErrorReason.CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID"] = ""; - codes["AdErrorReason.CANNOT_SET_PATH2_WITHOUT_PATH1"] = "Cannot set path2 without path1."; - codes["AdErrorReason.MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME"] = "Missing domain name in campaign setting when adding expanded dynamic search ad."; - codes["AdErrorReason.UNKNOWN"] = "An unexpected or unknown error occurred."; - codes["AdCustomizerErrorReason.COUNTDOWN_INVALID_DATE_FORMAT"] = "Invalid date argument in countdown function."; - codes["AdCustomizerErrorReason.COUNTDOWN_DATE_IN_PAST"] = "Countdown end date is in the past."; - codes["AdCustomizerErrorReason.COUNTDOWN_INVALID_LOCALE"] = "Invalid locale string in countdown function."; - codes["AdCustomizerErrorReason.COUNTDOWN_INVALID_START_DAYS_BEFORE"] = "Days-before argument to countdown function is not positive."; - codes["AdCustomizerErrorReason.UNKNOWN_USER_LIST"] = "A user list referenced in an IF function does not exist."; - codes["RegionCodeErrorReason.INVALID_REGION_CODE"] = ""; - codes["CriterionErrorReason.CONCRETE_TYPE_REQUIRED"] = "Concrete type of criterion is required for ADD and SET operations."; - codes["CriterionErrorReason.INVALID_EXCLUDED_CATEGORY"] = "The category requested for exclusion is invalid."; - codes["CriterionErrorReason.INVALID_KEYWORD_TEXT"] = "Invalid keyword criteria text."; - codes["CriterionErrorReason.KEYWORD_TEXT_TOO_LONG"] = "Keyword text should be less than 80 chars."; - codes["CriterionErrorReason.KEYWORD_HAS_TOO_MANY_WORDS"] = "Keyword text has too many words."; - codes["CriterionErrorReason.KEYWORD_HAS_INVALID_CHARS"] = "Keyword text has invalid characters or symbols."; - codes["CriterionErrorReason.INVALID_PLACEMENT_URL"] = "Invalid placement URL."; - codes["CriterionErrorReason.INVALID_USER_LIST"] = "Invalid user list criterion."; - codes["CriterionErrorReason.INVALID_USER_INTEREST"] = "Invalid user interest criterion."; - codes["CriterionErrorReason.INVALID_FORMAT_FOR_PLACEMENT_URL"] = "Placement URL has wrong format."; - codes["CriterionErrorReason.PLACEMENT_URL_IS_TOO_LONG"] = "Placement URL is too long."; - codes["CriterionErrorReason.PLACEMENT_URL_HAS_ILLEGAL_CHAR"] = "Indicates the URL contains an illegal character."; - codes["CriterionErrorReason.PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE"] = "Indicates the URL contains multiple comma separated URLs."; - codes["CriterionErrorReason.PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION"] = "Indicates the domain is blacklisted."; - codes["CriterionErrorReason.INVALID_VERTICAL_PATH"] = "Invalid vertical path."; - codes["CriterionErrorReason.INVALID_YOUTUBE_CHANNEL_ID"] = "The YouTube Channel Id is invalid."; - codes["CriterionErrorReason.INVALID_YOUTUBE_VIDEO_ID"] = "The YouTube Video Id is invalid."; - codes["CriterionErrorReason.YOUTUBE_VERTICAL_CHANNEL_DEPRECATED"] = "Indicates the placement is a YouTube vertical channel, which is no longer supported."; - codes["CriterionErrorReason.YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED"] = "Indicates the placement is a YouTube demographic channel, which is no longer supported."; - codes["CriterionErrorReason.YOUTUBE_URL_UNSUPPORTED"] = "YouTube urls are not supported in Placement criterion. Use YouTubeChannel and YouTubeVideo criterion instead."; - codes["CriterionErrorReason.CANNOT_EXCLUDE_CRITERIA_TYPE"] = "Criteria type can not be excluded by the customer, like AOL account type cannot target site type criteria."; - codes["CriterionErrorReason.CANNOT_ADD_CRITERIA_TYPE"] = "Criteria type can not be targeted."; - codes["CriterionErrorReason.INVALID_PRODUCT_FILTER"] = "Product filter in the product criteria has invalid characters. Operand and the argument in the filter can not have \"==\" or \"&+\"."; - codes["CriterionErrorReason.PRODUCT_FILTER_TOO_LONG"] = "Product filter in the product criteria is translated to a string as operand1==argument1&+operand2==argument2, maximum allowed length for the string is 255 chars."; - codes["CriterionErrorReason.CANNOT_EXCLUDE_SIMILAR_USER_LIST"] = "Not allowed to exclude similar user list."; - codes["CriterionErrorReason.CANNOT_ADD_CLOSED_USER_LIST"] = "Not allowed to target a closed user list."; - codes["CriterionErrorReason.CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS"] = "Not allowed to add display only UserLists to search only campaigns."; - codes["CriterionErrorReason.CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS"] = "Not allowed to add display only UserLists to search plus campaigns."; - codes["CriterionErrorReason.CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS"] = "Not allowed to add display only UserLists to shopping campaigns."; - codes["CriterionErrorReason.CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS"] = "Not allowed to add User interests to search only campaigns."; - codes["CriterionErrorReason.CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS"] = "Not allowed to set bids for this criterion type in search campaigns"; - codes["CriterionErrorReason.CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE"] = "Final URLs, URL Templates and CustomParameters cannot be set for the criterion types of Gender, AgeRange, UserList, Placement, MobileApp, and MobileAppCategory in search campaigns and shopping campaigns."; - codes["CriterionErrorReason.INVALID_IP_ADDRESS"] = "IP address is not valid."; - codes["CriterionErrorReason.INVALID_IP_FORMAT"] = "IP format is not valid."; - codes["CriterionErrorReason.INVALID_MOBILE_APP"] = "Mobile application is not valid."; - codes["CriterionErrorReason.INVALID_MOBILE_APP_CATEGORY"] = "Mobile application category is not valid."; - codes["CriterionErrorReason.INVALID_CRITERION_ID"] = "The CriterionId does not exist or is of the incorrect type."; - codes["CriterionErrorReason.CANNOT_TARGET_CRITERION"] = "The Criterion is not allowed to be targeted."; - codes["CriterionErrorReason.CANNOT_TARGET_OBSOLETE_CRITERION"] = "The criterion is not allowed to be targeted as it is deprecated."; - codes["CriterionErrorReason.CRITERION_ID_AND_TYPE_MISMATCH"] = "The CriterionId is not valid for the type."; - codes["CriterionErrorReason.INVALID_PROXIMITY_RADIUS"] = "Distance for the radius for the proximity criterion is invalid."; - codes["CriterionErrorReason.INVALID_PROXIMITY_RADIUS_UNITS"] = "Units for the distance for the radius for the proximity criterion is invalid."; - codes["CriterionErrorReason.INVALID_STREETADDRESS_LENGTH"] = "Street address is too short."; - codes["CriterionErrorReason.INVALID_CITYNAME_LENGTH"] = "City name in the address is too short."; - codes["CriterionErrorReason.INVALID_REGIONCODE_LENGTH"] = "Region code in the address is too short."; - codes["CriterionErrorReason.INVALID_REGIONNAME_LENGTH"] = "Region name in the address is not valid."; - codes["CriterionErrorReason.INVALID_POSTALCODE_LENGTH"] = "Postal code in the address is not valid."; - codes["CriterionErrorReason.INVALID_COUNTRY_CODE"] = "Country code in the address is not valid."; - codes["CriterionErrorReason.INVALID_LATITUDE"] = "Latitude for the GeoPoint is not valid."; - codes["CriterionErrorReason.INVALID_LONGITUDE"] = "Longitude for the GeoPoint is not valid."; - codes["CriterionErrorReason.PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL"] = "The Proximity input is not valid. Both address and geoPoint cannot be null."; - codes["CriterionErrorReason.INVALID_PROXIMITY_ADDRESS"] = "The Proximity address cannot be geocoded to a valid lat/long."; - codes["CriterionErrorReason.INVALID_USER_DOMAIN_NAME"] = "User domain name is not valid."; - codes["CriterionErrorReason.INVALID_WEBPAGE_CONDITION"] = "The combination of operand and operator in webpage condition is invalid."; - codes["CriterionErrorReason.INVALID_WEBPAGE_CONDITION_URL"] = "The URL of webpage condition is invalid."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_CANNOT_BE_EMPTY"] = "The URL of webpage condition cannot be empty or contain white space."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_UNSUPPORTED_PROTOCOL"] = "The URL of webpage condition contains unsupported protocol."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_CANNOT_BE_IP_ADDRESS"] = "The URL of webpage condition cannot be an IP address."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_DOMAIN_NOT_CONSISTENT_WITH_CAMPAIGN_SETTING"] = "The domain of the URL is not consistent with the domain in campaign setting."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_CANNOT_BE_PUBLIC_SUFFIX"] = "The URL of webpage condition cannot be a public suffix itself."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_INVALID_PUBLIC_SUFFIX"] = "The URL of webpage condition has an invalid public suffix."; - codes["CriterionErrorReason.WEBPAGE_CONDITION_URL_VALUE_TRACK_VALUE_NOT_SUPPORTED"] = "Value track parameter is not supported in webpage condition URL."; - codes["CriterionErrorReason.WEBPAGE_CRITERION_URL_EQUALS_CAN_HAVE_ONLY_ONE_CONDITION"] = "Only one URL-EQUALS webpage condition is allowed in a webpage criterion and it cannot be combined with other conditions."; - codes["CriterionErrorReason.WEBPAGE_CRITERION_CANNOT_ADD_NON_SMART_TARGETING_TO_NON_DSA_AD_GROUP"] = "Only allow smart targeting on non-DSA ad groups."; - codes["CriterionErrorReason.CRITERION_PARAMETER_TOO_LONG"] = "Length of serialized criterion parameter exceeded size limit."; - codes["CriterionErrorReason.AD_SCHEDULE_TIME_INTERVALS_OVERLAP"] = "Time interval in the AdSchedule overlaps with another AdSchedule."; - codes["CriterionErrorReason.AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS"] = "AdSchedule time interval cannot span multiple days."; - codes["CriterionErrorReason.AD_SCHEDULE_INVALID_TIME_INTERVAL"] = "AdSchedule time interval specified is invalid, endTime cannot be earlier than startTime."; - codes["CriterionErrorReason.AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT"] = "The number of AdSchedule entries in a day exceeds the limit."; - codes["CriterionErrorReason.AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS"] = "CriteriaId does not match the interval of the AdSchedule specified."; - codes["CriterionErrorReason.CANNOT_BID_MODIFY_CRITERION_TYPE"] = "Cannot set bid modifier for this criterion type."; - codes["CriterionErrorReason.CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT"] = "Cannot bid modify criterion, since it is opted out of the campaign."; - codes["CriterionErrorReason.CANNOT_BID_MODIFY_NEGATIVE_CRITERION"] = "Cannot set bid modifier for a negative criterion."; - codes["CriterionErrorReason.BID_MODIFIER_ALREADY_EXISTS"] = "Bid Modifier already exists. Use SET operation to update."; - codes["CriterionErrorReason.FEED_ID_NOT_ALLOWED"] = "Feed Id is not allowed in these Location Groups."; - codes["CriterionErrorReason.ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE"] = "The account may not use the requested criteria type. For example, some accounts are restricted to keywords only."; - codes["CriterionErrorReason.CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY"] = "The requested criteria type cannot be used with campaign or ad group bidding strategy."; - codes["CriterionErrorReason.CANNOT_EXCLUDE_CRITERION"] = "The Criterion is not allowed to be excluded."; - codes["CriterionErrorReason.CANNOT_REMOVE_CRITERION"] = "The criterion is not allowed to be removed. For example, we cannot remove any of the platform criterion."; - codes["CriterionErrorReason.PRODUCT_SCOPE_TOO_LONG"] = "The combined length of product dimension values of the product scope criterion is too long."; - codes["CriterionErrorReason.PRODUCT_SCOPE_TOO_MANY_DIMENSIONS"] = "Product scope contains too many dimensions."; - codes["CriterionErrorReason.PRODUCT_PARTITION_TOO_LONG"] = "The combined length of product dimension values of the product partition criterion is too long."; - codes["CriterionErrorReason.PRODUCT_PARTITION_TOO_MANY_DIMENSIONS"] = "Product partition contains too many dimensions."; - codes["CriterionErrorReason.INVALID_PRODUCT_DIMENSION"] = "The product dimension is invalid (e.g. dimension contains illegal value, dimension type is represented with wrong class, etc). Product dimension value can not contain \"==\" or \"&+\"."; - codes["CriterionErrorReason.INVALID_PRODUCT_DIMENSION_TYPE"] = "Product dimension type is either invalid for campaigns of this type or cannot be used in the current context. BIDDING_CATEGORY_Lx and PRODUCT_TYPE_Lx product dimensions must be used in ascending order of their levels: L1, L2, L3, L4, L5... The levels must be specified sequentially and start from L1. Furthermore, an \"others\" product partition cannot be subdivided with a dimension of the same type but of a higher level (\"others\" BIDDING_CATEGORY_L3 can be subdivided with BRAND but not with BIDDING_CATEGORY_L4)."; - codes["CriterionErrorReason.INVALID_PRODUCT_BIDDING_CATEGORY"] = "Bidding categories do not form a valid path in the Shopping bidding category taxonomy."; - codes["CriterionErrorReason.MISSING_SHOPPING_SETTING"] = "ShoppingSetting must be added to the campaign before ProductScope criteria can be added."; - codes["CriterionErrorReason.INVALID_MATCHING_FUNCTION"] = "Matching function is invalid."; - codes["CriterionErrorReason.LOCATION_FILTER_NOT_ALLOWED"] = "Filter parameters not allowed for location groups targeting."; - codes["CriterionErrorReason.LOCATION_FILTER_INVALID"] = "Given location filter parameter is invalid for location groups targeting."; - codes["CriterionErrorReason.CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP"] = "Criteria type cannot be associated with a campaign and its ad group(s) simultaneously."; - codes["CriterionErrorReason.UNKNOWN"] = ""; - codes["CampaignCriterionErrorReason.CONCRETE_TYPE_REQUIRED"] = "Concrete type of criterion (keyword v.s. placement) is required for ADD and SET operations."; - codes["CampaignCriterionErrorReason.INVALID_PLACEMENT_URL"] = "Invalid placement URL."; - codes["CampaignCriterionErrorReason.CANNOT_EXCLUDE_CRITERIA_TYPE"] = "Criteria type can not be excluded for the campaign by the customer. like AOL account type cannot target site type criteria"; - codes["CampaignCriterionErrorReason.CANNOT_SET_STATUS_FOR_CRITERIA_TYPE"] = "Cannot set the campaign criterion status for this criteria type."; - codes["CampaignCriterionErrorReason.CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA"] = "Cannot set the campaign criterion status for an excluded criteria."; - codes["CampaignCriterionErrorReason.CANNOT_TARGET_AND_EXCLUDE"] = "Cannot target and exclude the same criterion."; - codes["CampaignCriterionErrorReason.TOO_MANY_OPERATIONS"] = "The #mutate operation contained too many operations."; - codes["CampaignCriterionErrorReason.OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE"] = "This operator cannot be applied to a criterion of this type."; - codes["CampaignCriterionErrorReason.SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL"] = "The Shopping campaign sales country is not supported for ProductSalesChannel targeting."; - codes["CampaignCriterionErrorReason.UNKNOWN"] = ""; - codes["CampaignCriterionErrorReason.CANNOT_ADD_EXISTING_FIELD"] = "The existing field can't be updated with ADD operation. It can be updated with SET operation only."; - codes["SettingErrorReason.DUPLICATE_SETTING_TYPE"] = "The campaign already has a setting of the type that is being added."; - codes["SettingErrorReason.SETTING_TYPE_IS_NOT_AVAILABLE"] = "The campaign setting is not available for this AdWords account."; - codes["SettingErrorReason.SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN"] = "The setting is not compatible with the campaign."; - codes["SettingErrorReason.TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP"] = "The supplied TargetingSetting contains an invalid CriterionTypeGroup. See CriterionTypeGroup documentation for CriterionTypeGroups allowed in Campaign or AdGroup TargetingSettings."; - codes["SettingErrorReason.TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL"] = "Starting with AdWords API v201802, TargetingSetting must not explicitly set any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, INCOME_RANGE) to false (it's okay to not set them at all, in which case the system will set them to true automatically)."; - codes["SettingErrorReason.TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP"] = "Starting with AdWords API v201802,TargetingSetting cannot change any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, INCOME_RANGE) from true to false."; - codes["SettingErrorReason.DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT"] = "At least one feed id should be present."; - codes["SettingErrorReason.DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME"] = "The supplied DynamicSearchAdsSetting contains an invalid domain name."; - codes["SettingErrorReason.DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME"] = "The supplied DynamicSearchAdsSetting contains a subdomain name."; - codes["SettingErrorReason.DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE"] = "The supplied DynamicSearchAdsSetting contains an invalid language code."; - codes["SettingErrorReason.TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN"] = "TargetingSettings in search campaigns should not have CriterionTypeGroup.PLACEMENT set to targetAll."; - codes["SettingErrorReason.UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION"] = "Duplicate description in universal app setting description field."; - codes["SettingErrorReason.UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG"] = "Description line width is too long in universal app setting description field."; - codes["SettingErrorReason.UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED"] = "Universal app setting appId field cannot be modified for COMPLETE campaigns."; - codes["SettingErrorReason.TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN"] = "YoutubeVideoMediaIds in universal app setting cannot exceed size limit."; - codes["SettingErrorReason.TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN"] = "ImageMediaIds in universal app setting cannot exceed size limit."; - codes["SettingErrorReason.MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN"] = "Media is incompatible for universal app campaign."; - codes["SettingErrorReason.TOO_MANY_EXCLAMATION_MARKS"] = "Too many exclamation marks in universal app campaign ad text ideas."; - codes["SettingErrorReason.UNKNOWN"] = "Unspecified campaign setting error. Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["ListErrorReason.CLEAR_UNSUPPORTED"] = "A request attempted to clear a list that does not support being cleared."; - codes["ListErrorReason.INVALID_OPERATOR"] = "The operator is invalid for the list or list element the operator was applied to."; - codes["ListErrorReason.INVALID_ELEMENT"] = "An UPDATE or REMOVE was requested for a list element that does not exist."; - codes["ListErrorReason.LIST_LENGTH_MISMATCH"] = "The operator list has different a size compared to the element list."; - codes["ListErrorReason.DUPLICATE_ELEMENT"] = "Duplicate elements inside list."; - codes["ListErrorReason.MUTATE_UNSUPPORTED"] = "The API operator of the mutate being performed on the entity containing this list is not supported."; - codes["ListErrorReason.UNKNOWN"] = ""; - codes["DateRangeErrorReason.DATE_RANGE_ERROR"] = ""; - codes["DateRangeErrorReason.INVALID_DATE"] = "Invalid date."; - codes["DateRangeErrorReason.START_DATE_AFTER_END_DATE"] = "The start date was after the end date."; - codes["DateRangeErrorReason.CANNOT_SET_DATE_TO_PAST"] = "Cannot set date to past time"; - codes["DateRangeErrorReason.AFTER_MAXIMUM_ALLOWABLE_DATE"] = "A date was used that is past the system \"last\" date."; - codes["DateRangeErrorReason.CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED"] = "Trying to change start date on a campaign that has started."; - codes["CampaignErrorReason.CANNOT_GO_BACK_TO_INCOMPLETE"] = "A complete campaign cannot go back to being incomplete"; - codes["CampaignErrorReason.CANNOT_TARGET_CONTENT_NETWORK"] = "Cannot target content network."; - codes["CampaignErrorReason.CANNOT_TARGET_SEARCH_NETWORK"] = "Cannot target search network."; - codes["CampaignErrorReason.CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH"] = "Cannot cover search network without google search network."; - codes["CampaignErrorReason.CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN"] = "Cannot target Google Search network for a CPM campaign."; - codes["CampaignErrorReason.CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK"] = "Must target at least one network."; - codes["CampaignErrorReason.CANNOT_TARGET_PARTNER_SEARCH_NETWORK"] = "Only some Google partners are allowed to target partner search network."; - codes["CampaignErrorReason.CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY"] = "Cannot target content network only as campaign has criteria-level bidding strategy."; - codes["CampaignErrorReason.CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS"] = "Cannot modify the start or end date such that the campaign duration would not contain the durations of all runnable trials."; - codes["CampaignErrorReason.CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN"] = "Cannot modify dates, budget or campaign name of a trial campaign."; - codes["CampaignErrorReason.DUPLICATE_CAMPAIGN_NAME"] = "Trying to modify the name of an active or paused campaign, where the name is already assigned to another active or paused campaign."; - codes["CampaignErrorReason.INCOMPATIBLE_CAMPAIGN_FIELD"] = "Two fields are in conflicting modes."; - codes["CampaignErrorReason.INVALID_CAMPAIGN_NAME"] = "Campaign name cannot be used."; - codes["CampaignErrorReason.INVALID_AD_SERVING_OPTIMIZATION_STATUS"] = "Given status is invalid."; - codes["CampaignErrorReason.INVALID_TRACKING_URL"] = "Error in the campaign level tracking url."; - codes["CampaignErrorReason.CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING"] = "Cannot set both tracking url template and tracking setting. An user has to clear legacy tracking setting in order to add tracking url template."; - codes["CampaignErrorReason.MAX_IMPRESSIONS_NOT_IN_RANGE"] = "The maximum number of impressions for Frequency Cap should be an integer greater than 0."; - codes["CampaignErrorReason.TIME_UNIT_NOT_SUPPORTED"] = "Only the Day, Week and Month time units are supported."; - codes["CampaignErrorReason.INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED"] = "Operation not allowed on a campaign whose serving status has ended"; - codes["CampaignErrorReason.BUDGET_CANNOT_BE_SHARED"] = "This budget is exclusively linked to a Campaign that is using @link{Experiment}s so it cannot be shared."; - codes["CampaignErrorReason.CAMPAIGN_CANNOT_USE_SHARED_BUDGET"] = "Campaigns using @link{Experiment}s cannot use a shared budget."; - codes["CampaignErrorReason.CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS"] = "A different budget cannot be assigned to a campaign when there are running or scheduled trials."; - codes["CampaignErrorReason.CAMPAIGN_LABEL_DOES_NOT_EXIST"] = "No link found between the campaign and the label."; - codes["CampaignErrorReason.CAMPAIGN_LABEL_ALREADY_EXISTS"] = "The label has already been attached to the campaign."; - codes["CampaignErrorReason.MISSING_SHOPPING_SETTING"] = "A ShoppingSetting was not found when creating a shopping campaign."; - codes["CampaignErrorReason.INVALID_SHOPPING_SALES_COUNTRY"] = "The country in shopping setting is not an allowed country."; - codes["CampaignErrorReason.SHOPPING_MERCHANT_NOT_ALLOWED_FOR_PURCHASES_ON_GOOGLE"] = "Shopping merchant is not enabled for Purchases on Google."; - codes["CampaignErrorReason.PURCHASES_ON_GOOGLE_NOT_SUPPORTED_FOR_SHOPPING_SALES_COUNTRY"] = "Purchases on Google not enabled for the shopping campaign's sales country."; - codes["CampaignErrorReason.MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING"] = "A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a UniversalAppCampaignSetting specified."; - codes["CampaignErrorReason.ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE"] = "The requested channel type is not available according to the customer's account setting."; - codes["CampaignErrorReason.INVALID_ADVERTISING_CHANNEL_SUB_TYPE"] = "The AdvertisingChannelSubType is not a valid subtype of the primary channel type."; - codes["CampaignErrorReason.AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED"] = "At least one conversion must be selected."; - codes["CampaignErrorReason.CANNOT_SET_AD_ROTATION_MODE"] = "Setting ad rotation mode for a campaign is not allowed. Ad rotation mode at campaign is deprecated."; - codes["CampaignErrorReason.UNKNOWN"] = "Default error Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["BudgetErrorReason.BUDGET_REMOVED"] = "The requested budget no longer exists."; - codes["BudgetErrorReason.BUDGET_ERROR"] = "Default budget error."; - codes["BudgetErrorReason.BUDGET_IN_USE"] = "The budget is associated with at least one campaign, and so the budget cannot be removed."; - codes["BudgetErrorReason.BUDGET_PERIOD_NOT_AVAILABLE"] = "Customer is not whitelisted for this budget period."; - codes["BudgetErrorReason.CANNOT_EDIT_SHARED_BUDGET"] = "Customer cannot use CampaignService to edit a shared budget."; - codes["BudgetErrorReason.CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_BUDGET"] = "This field is not mutable on implicitly shared budgets"; - codes["BudgetErrorReason.CANNOT_UPDATE_BUDGET_TO_IMPLICITLY_SHARED"] = "Cannot change explicitly shared budgets back to implicitly shared ones."; - codes["BudgetErrorReason.CANNOT_UPDATE_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME"] = "An implicit budget without a name cannot be changed to explicitly shared budget."; - codes["BudgetErrorReason.CANNOT_UPDATE_BUDGET_TO_EXPLICITLY_SHARED"] = "Cannot change an implicitly shared budget to an explicitly shared one."; - codes["BudgetErrorReason.CANNOT_USE_IMPLICITLY_SHARED_BUDGET_WITH_MULTIPLE_CAMPAIGNS"] = "Only explicitly shared budgets can be used with multiple campaigns."; - codes["BudgetErrorReason.DUPLICATE_NAME"] = "A budget with this name already exists."; - codes["BudgetErrorReason.MONEY_AMOUNT_IN_WRONG_CURRENCY"] = "A money amount was not in the expected currency."; - codes["BudgetErrorReason.MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC"] = "A money amount was less than the minimum CPC for currency."; - codes["BudgetErrorReason.MONEY_AMOUNT_TOO_LARGE"] = "A money amount was greater than the maximum allowed."; - codes["BudgetErrorReason.NEGATIVE_MONEY_AMOUNT"] = "A money amount was negative."; - codes["BudgetErrorReason.NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT"] = "A money amount was not a multiple of a minimum unit."; - codes["CampaignBidModifierErrorReason.CAMPAIGN_BID_MODIFIER_ERROR"] = ""; - codes["CampaignFeedErrorReason.FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE"] = "An active feed already exists for this campaign and place holder type."; - codes["CampaignFeedErrorReason.INVALID_ID"] = "The specified id does not exist."; - codes["CampaignFeedErrorReason.CANNOT_ADD_FOR_DELETED_FEED"] = "The specified feed is deleted."; - codes["CampaignFeedErrorReason.CANNOT_ADD_ALREADY_EXISTING_CAMPAIGN_FEED"] = "The CampaignFeed already exists. SET should be used to modify the existing CampaignFeed."; - codes["CampaignFeedErrorReason.CANNOT_OPERATE_ON_REMOVED_CAMPAIGN_FEED"] = "Cannot operate on deleted campaign feed."; - codes["CampaignFeedErrorReason.INVALID_PLACEHOLDER_TYPES"] = "Invalid placeholder type ids."; - codes["CampaignFeedErrorReason.MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE"] = "Feed mapping for this placeholder type does not exist."; - codes["CampaignFeedErrorReason.NO_EXISTING_LOCATION_CUSTOMER_FEED"] = "Location CampaignFeeds cannot be created unless there is a location CustomerFeed for the specified feed."; - codes["CampaignFeedErrorReason.UNKNOWN"] = ""; - codes["CampaignGroupErrorReason.CANNOT_DELETE_CAMPAIGN_GROUP_WITH_ACTIVE_OR_PAUSED_CAMPAIGNS"] = "Cannot delete a campaign group which is associated with active or paused campaigns."; - codes["CampaignGroupErrorReason.CANNOT_MODIFY_DELETED_CAMPAIGN_GROUP"] = "Cannot modify a deleted campaign group."; - codes["CampaignGroupErrorReason.DUPLICATE_NAME"] = "Trying to modify the name of an active or paused campaign group, where the name is already assigned to another active or paused campaign group."; - codes["CampaignGroupErrorReason.UNKNOWN"] = "Default error Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["PerformanceTargetErrorReason.SPEND_TARGET_REQUIRES_DATE_RANGE"] = "Spend target requires both start date and end date to be specified."; - codes["PerformanceTargetErrorReason.VOLUME_TARGET_VALUE_REQUIRES_DATE_RANGE"] = "Volume target value requires both start date and end date to be specified."; - codes["PerformanceTargetErrorReason.START_DATE_AFTER_END_DATE"] = "The end date is before the start date."; - codes["PerformanceTargetErrorReason.INCOMPATIBLE_EFFICIENCY_TARGET_TYPE"] = "The efficiency target type is incompatible with the volume goal type. The following mapping describes which volume goal types are compatibe with which efficiency target types. If a volume goal does not appear in the mapping, then no efficiency target types are compatible with it. Volume Goal Type : List of Efficiency Target Types MAXIMIZE_CLICKS : CPC_LESS_THAN_OR_EQUAL_TO MAXIMIZE_CONVERSIONS : CPA_LESS_THAN_OR_EQUAL_TO"; - codes["PerformanceTargetErrorReason.EFFICIENCY_TARGET_VALUE_AND_TYPE_ARE_MUTUALLY_REQUIRED"] = "Efficiency target value and type have to both be null or set to some value."; - codes["PerformanceTargetErrorReason.OVERLAPPING_DATE_RANGE"] = "A modified or newly added performance target's date range overlaps with one or more other date ranges of other performance targets assigned to the same parent."; - codes["PerformanceTargetErrorReason.HISTORICAL_PERFORMANCE_TARGETS_CANNOT_BE_MODIFIED"] = "It is not possible to set performance targets that have already ended. If modifications are needed, remove the performance target first and re-create it with the desired settings."; - codes["PerformanceTargetErrorReason.SPEND_TARGET_AND_SPEND_TARGET_TYPE_ARE_MUTUALLY_REQUIRED"] = "Spend target and spend target type have to both be null or set to some value."; - codes["PerformanceTargetErrorReason.PERFORMANCE_TARGET_ERROR"] = "Default error Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["CampaignGroupPerformanceTargetErrorReason.UNKNOWN"] = "Default error. Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["ConversionTrackingErrorReason.ALREADY_CREATED_CUSTOM_CONVERSION_TYPE"] = "An attempt to make a forked conversion type from a global conversion type was made, but there already exists a conversion type forked from this global conversion type."; - codes["ConversionTrackingErrorReason.ANALYTICS_NOT_ALLOWED"] = "This user is not whitelisted for the import of Analytics goals and profiles, and yet requested to mutate an Analytics conversion type."; - codes["ConversionTrackingErrorReason.CANNOT_ADD_CONVERSION_TYPE_SUBCLASS"] = "Cannot execute an ADD operation on this subclass of ConversionType (currently, only instances of AdWordsConversionType may be added)."; - codes["ConversionTrackingErrorReason.CANNOT_ADD_EXTERNALLY_ATTRIBUTED_SALESFORCE_CONVERSION"] = "Creating an upload conversion type with isExternallyAttributedConversion and isSalesforceConversion both set is not allowed."; - codes["ConversionTrackingErrorReason.CANNOT_CHANGE_APP_CONVERSION_TYPE"] = "AppConversions cannot change app conversion types once it has been set."; - codes["ConversionTrackingErrorReason.CANNOT_CHANGE_APP_PLATFORM"] = "AppConversions cannot change app platforms once it has been set."; - codes["ConversionTrackingErrorReason.CANNNOT_CHANGE_CONVERSION_SUBCLASS"] = "Cannot change between subclasses of ConversionType"; - codes["ConversionTrackingErrorReason.CANNOT_SET_HIDDEN_STATUS"] = "If a conversion type's status is initially non-hidden, it may not be changed to Hidden; nor may hidden conversion types be created through the API. Hidden conversion types are typically created by backend processes."; - codes["ConversionTrackingErrorReason.CATEGORY_IS_UNEDITABLE"] = "The user attempted to change the Category when it was uneditable."; - codes["ConversionTrackingErrorReason.ATTRIBUTION_MODEL_IS_UNEDITABLE"] = "The attribution model of the conversion type is uneditable."; - codes["ConversionTrackingErrorReason.ATTRIBUTION_MODEL_CANNOT_BE_UNKNOWN"] = "The attribution model of the conversion type cannot be unknown."; - codes["ConversionTrackingErrorReason.DATA_DRIVEN_MODEL_WAS_NEVER_GENERATED"] = "The attribution model cannot be set to DATA_DRIVEN because a data-driven model has never been generated."; - codes["ConversionTrackingErrorReason.DATA_DRIVEN_MODEL_IS_EXPIRED"] = "The attribution model cannot be set to DATA_DRIVEN because the data-driven model is expired."; - codes["ConversionTrackingErrorReason.DATA_DRIVEN_MODEL_IS_STALE"] = "The attribution model cannot be set to DATA_DRIVEN because the data-driven model is stale."; - codes["ConversionTrackingErrorReason.DATA_DRIVEN_MODEL_IS_UNKNOWN"] = "The attribution model cannot be set to DATA_DRIVEN because the data-driven model is unavailable or the conversion type was newly added."; - codes["ConversionTrackingErrorReason.CONVERSION_TYPE_NOT_FOUND"] = "An attempt to access a conversion type failed because no conversion type with this ID exists for this account."; - codes["ConversionTrackingErrorReason.CTC_LOOKBACK_WINDOW_IS_UNEDITABLE"] = "The user attempted to change the click-through conversion (ctc) lookback window when it is not editable."; - codes["ConversionTrackingErrorReason.DOMAIN_EXCEPTION"] = "An exception occurred in the domain layer during an attempt to process a ConversionTypeOperation."; - codes["ConversionTrackingErrorReason.INCONSISTENT_COUNTING_TYPE"] = "An attempt was made to set a counting type inconsistent with other properties. Currently, AppConversion with appConversionType = DOWNLOAD and appPlatform = ANDROID_MARKET cannot have a countingType of MANY_PER_CLICK"; - codes["ConversionTrackingErrorReason.DUPLICATE_APP_ID"] = "The user specified two identical app ids when attempting to create or modify a conversion type."; - codes["ConversionTrackingErrorReason.TWO_CONVERSION_TYPES_BIDDING_ON_SAME_APP_DOWNLOAD"] = "The user is trying to enter a double bidding conflict. A double bidding conflict is when 2 conversion types both measure downloads for the same app ID."; - codes["ConversionTrackingErrorReason.CONVERSION_TYPE_BIDDING_ON_SAME_APP_DOWNLOAD_AS_GLOBAL_TYPE"] = "The user is trying to enter a double bidding conflict with the global type. The conversion type being created/editied and the global type (or forked global download type) are both measuring downloads for the same app ID."; - codes["ConversionTrackingErrorReason.DUPLICATE_NAME"] = "The user specified two identical names when attempting to create or rename multiple conversion types."; - codes["ConversionTrackingErrorReason.EMAIL_FAILED"] = "An error occurred while the server was sending the email."; - codes["ConversionTrackingErrorReason.EXCEEDED_CONVERSION_TYPE_LIMIT"] = "The maximum number of active conversion types for this account has been exceeded."; - codes["ConversionTrackingErrorReason.ID_IS_NULL"] = "The user requested to modify an existing conversion type, but did not supply an ID."; - codes["ConversionTrackingErrorReason.INVALID_APP_ID"] = "App ids must adhere to valid Java package naming requirements."; - codes["ConversionTrackingErrorReason.CANNOT_SET_APP_ID"] = "App id can not be set to forked system-defined Android download conversion type."; - codes["ConversionTrackingErrorReason.INVALID_CATEGORY"] = "The user attempted to set category which is not applicable to provided conversion type."; - codes["ConversionTrackingErrorReason.INVALID_COLOR"] = "The user entered an invalid background color. The background color must be a valid HTML hex color code, such as \"99ccff\"."; - codes["ConversionTrackingErrorReason.INVALID_DATE_RANGE"] = "The date range specified in the stats selector is invalid."; - codes["ConversionTrackingErrorReason.INVALID_EMAIL_ADDRESS"] = "The email address of the sender or the recipient of a snippet email was invalid."; - codes["ConversionTrackingErrorReason.INVALID_ORIGINAL_CONVERSION_TYPE_ID"] = "Editing the settings for the system-wide default conversion trackers is not permitted in AdWords API."; - codes["ConversionTrackingErrorReason.MUST_SET_APP_PLATFORM_AND_APP_CONVERSION_TYPE_TOGETHER"] = "The AppPlatform and AppConversionType must be set at the same time. It is an error to set just one or the other."; - codes["ConversionTrackingErrorReason.NAME_ALREADY_EXISTS"] = "The user attempted to create a new conversion type, or to rename an existing conversion type, whose new name matches one of the other conversion types for his account."; - codes["ConversionTrackingErrorReason.NO_RECIPIENTS"] = "The user asked to send a notification email, but specified no recipients."; - codes["ConversionTrackingErrorReason.NO_SNIPPET"] = "The requested conversion type has no snippet, and thus its snippet email cannot be sent."; - codes["ConversionTrackingErrorReason.TOO_MANY_WEBPAGES"] = "The requested date range contains too many webpages to be processed."; - codes["ConversionTrackingErrorReason.UNKNOWN_SORTING_TYPE"] = "An unknown sorting type was specified in the selector."; - codes["ConversionTrackingErrorReason.UNSUPPORTED_APP_CONVERSION_TYPE"] = "AppConversionType cannot be set to DOWNLOAD when AppPlatform is ITUNES."; - codes["AppPostbackUrlErrorReason.INVALID_URL_FORMAT"] = "Invalid Url format."; - codes["AppPostbackUrlErrorReason.INVALID_DOMAIN"] = "Invalid domain."; - codes["AppPostbackUrlErrorReason.REQUIRED_MACRO_NOT_FOUND"] = "Some of the required macros were not found."; - codes["CustomerNegativeCriterionErrorReason.INVALID_CRITERION_TYPE"] = ""; - codes["CustomerNegativeCriterionErrorReason.SHARED_SET_IS_DELETED"] = "Cannot create a criterion with a deleted SharedSet."; - codes["CustomerNegativeCriterionErrorReason.INVALID_SHARED_SET_TYPE"] = "Cannot create a criterion with an invalid SharedSetType."; - codes["CustomerNegativeCriterionErrorReason.PLACEMENT_LIST_TYPE_ONLY_ALLOWED_FOR_XBID"] = ""; - codes["CustomerNegativeCriterionErrorReason.MANAGER_CUSTOMER_CANNOT_ADD"] = "Manager customer is not allowed to add customer exclusion criteria."; - codes["CustomerNegativeCriterionErrorReason.CUSTOMER_EXCLUSION_CRITERION_ERROR"] = ""; - codes["CustomerErrorReason.INVALID_SERVICE_LINK"] = "Referenced service link does not exist"; - codes["CustomerErrorReason.INVALID_STATUS"] = "An ACTIVE link cannot be made PENDING"; - codes["CustomerErrorReason.ACCOUNT_NOT_SET_UP"] = "CustomerService cannot get an account that is not fully set up."; - codes["AdGroupFeedErrorReason.FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE"] = "An active feed already exists for this adgroup and place holder type."; - codes["AdGroupFeedErrorReason.INVALID_ID"] = "The specified id does not exist."; - codes["AdGroupFeedErrorReason.CANNOT_ADD_FOR_DELETED_FEED"] = "The specified feed is deleted."; - codes["AdGroupFeedErrorReason.CANNOT_ADD_ALREADY_EXISTING_ADGROUP_FEED"] = "The AdGroupFeed already exists. SET should be used to modify the existing AdGroupFeed."; - codes["AdGroupFeedErrorReason.CANNOT_OPERATE_ON_REMOVED_ADGROUP_FEED"] = "Cannot operate on removed adgroup feed."; - codes["AdGroupFeedErrorReason.INVALID_PLACEHOLDER_TYPES"] = "Invalid placeholder type ids."; - codes["AdGroupFeedErrorReason.MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE"] = "Feed mapping for this placeholder type does not exist."; - codes["AdGroupFeedErrorReason.NO_EXISTING_LOCATION_CUSTOMER_FEED"] = "Location AdGroupFeeds cannot be created unless there is a location CustomerFeed for the specified feed."; - codes["AdGroupFeedErrorReason.UNKNOWN"] = ""; - codes["CustomerSyncErrorReason.INVALID_CAMPAIGN_ID"] = "The request attempted to access a campaign that either does not exist or belongs to a different account."; - codes["CustomerSyncErrorReason.INVALID_FEED_ID"] = "The request attempted to access a feed that either does not exist or belongs to a different account."; - codes["CustomerSyncErrorReason.INVALID_DATE_RANGE"] = "The request asked for an invalid date range"; - codes["CustomerSyncErrorReason.TOO_MANY_CHANGES"] = "There have been too many changes to sync the campaign over the requested date/time range. To avoid this error, try specifying a smaller date/time range. If this does not work, you should assume that everything has changed and retrieve the objects using their respective services."; - codes["CustomerFeedErrorReason.FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE"] = "An active feed already exists for this customer and place holder type."; - codes["CustomerFeedErrorReason.INVALID_ID"] = "The specified id does not exist."; - codes["CustomerFeedErrorReason.CANNOT_ADD_FOR_DELETED_FEED"] = "The specified feed is deleted."; - codes["CustomerFeedErrorReason.CANNOT_ADD_ALREADY_EXISTING_CUSTOMER_FEED"] = "The CustomerFeed already exists. SET should be used to modify the existing CustomerFeed."; - codes["CustomerFeedErrorReason.CANNOT_MODIFY_REMOVED_CUSTOMER_FEED"] = "Cannot modify removed customer feed."; - codes["CustomerFeedErrorReason.INVALID_PLACEHOLDER_TYPES"] = "Invalid placeholder types."; - codes["CustomerFeedErrorReason.MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE"] = "Feed mapping for this placeholder type does not exist."; - codes["CustomerFeedErrorReason.PLACEHOLDER_TYPE_NOT_ALLOWED_ON_CUSTOMER_FEED"] = "Placeholder not allowed at the account level."; - codes["CustomerFeedErrorReason.UNKNOWN"] = ""; - codes["DataErrorReason.CANNOT_CREATE_TABLE_ENTRY"] = ""; - codes["DataErrorReason.NO_TABLE_ENTRY_CLASS_FOR_VIEW_TYPE"] = ""; - codes["DataErrorReason.TABLE_SERVICE_ERROR"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["FeedErrorReason.ATTRIBUTE_NAMES_NOT_UNIQUE"] = "The names of the FeedAttributes must be unique."; - codes["FeedErrorReason.ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES"] = "The attribute list must be an exact copy of the existing list if the attribute id's are present."; - codes["FeedErrorReason.CANNOT_CHANGE_ORIGIN"] = "Origin can only be set during Feed creation."; - codes["FeedErrorReason.CANNOT_SPECIFY_USER_ORIGIN_FOR_SYSTEM_FEED"] = "Cannot specify USER origin for a system generated feed."; - codes["FeedErrorReason.CANNOT_SPECIFY_ADWORDS_ORIGIN_FOR_NON_SYSTEM_FEED"] = "Cannot specify ADWORDS origin for a non-system generated feed."; - codes["FeedErrorReason.CANNOT_SPECIFY_FEED_ATTRIBUTES_FOR_SYSTEM_FEED"] = "Cannot specify feed attributes for system feed."; - codes["FeedErrorReason.CANNOT_UPDATE_FEED_ATTRIBUTES_WITH_ORIGIN_ADWORDS"] = "Cannot update FeedAttributes on feed with origin adwords."; - codes["FeedErrorReason.FEED_REMOVED"] = "The given id refers to a removed Feed. Removed Feeds are immutable."; - codes["FeedErrorReason.INVALID_ORIGIN_VALUE"] = "The origin of the feed is not valid for the client."; - codes["FeedErrorReason.FEED_ORIGIN_IS_NOT_USER"] = "A user can only create and modify feeds with user origin."; - codes["FeedErrorReason.INVALID_AUTH_TOKEN_FOR_EMAIL"] = "Invalid auth token for the given email"; - codes["FeedErrorReason.INVALID_EMAIL"] = "Invalid email specified"; - codes["FeedErrorReason.DUPLICATE_FEED_NAME"] = "Feed name matches that of another active Feed."; - codes["FeedErrorReason.INVALID_FEED_NAME"] = "Name of feed is not allowed."; - codes["FeedErrorReason.MISSING_OAUTH_INFO"] = "Missing OAuthInfo"; - codes["FeedErrorReason.NEW_ATTRIBUTE_CANNOT_BE_PART_OF_UNIQUE_KEY"] = "New FeedAttributes must not effect the unique key."; - codes["FeedErrorReason.TOO_MANY_FEED_ATTRIBUTES_FOR_FEED"] = "Too many FeedAttributes for a Feed."; - codes["FeedErrorReason.INVALID_BUSINESS_ACCOUNT"] = "The business account is not valid."; - codes["FeedErrorReason.BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT"] = "Business account cannot access Google My Business account."; - codes["FeedErrorReason.INVALID_AFFILIATE_CHAIN_ID"] = "Invalid chain id provided for affiliate location feed."; - codes["FeedErrorReason.CANNOT_CHANGE_SYSTEM_FEED_GENERATION_DATA_TYPE"] = "Cannot change system feed generation data type"; - codes["FeedErrorReason.UNSUPPORTED_AFFILIATE_LOCATION_RELATIONSHIP_TYPE"] = "Unsupported relationship type"; - codes["FeedErrorReason.UNKNOWN"] = ""; - codes["FeedItemErrorReason.CAMPAIGN_TARGETING_MISMATCH"] = "Targeted adgroup's campaign does not match the targeted campaign."; - codes["FeedItemErrorReason.CANNOT_CONVERT_ATTRIBUTE_VALUE_FROM_STRING"] = "Cannot convert the feed attribute value from string to its real type."; - codes["FeedItemErrorReason.CANNOT_OPERATE_ON_REMOVED_FEED_ITEM"] = "Cannot operate on removed feed item."; - codes["FeedItemErrorReason.DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE"] = "Date time zone does not match the account's time zone."; - codes["FeedItemErrorReason.KEY_ATTRIBUTES_NOT_FOUND"] = "Feed item with the key attributes could not be found."; - codes["FeedItemErrorReason.INVALID_DEVICE_PREFERENCE"] = "Unknown or unsupported device preference."; - codes["FeedItemErrorReason.INVALID_SCHEDULE_END"] = "Invalid feed item schedule end time (i.e., endHour = 24 and endMinute != 0)."; - codes["FeedItemErrorReason.INVALID_URL"] = "Url feed attribute value is not valid."; - codes["FeedItemErrorReason.MISSING_KEY_ATTRIBUTES"] = "Some key attributes are missing."; - codes["FeedItemErrorReason.KEY_ATTRIBUTES_NOT_UNIQUE"] = "Feed item has same key attributes as another feed item."; - codes["FeedItemErrorReason.CANNOT_MODIFY_KEY_ATTRIBUTE_VALUE"] = "Cannot modify key attributes on an existing feed item."; - codes["FeedItemErrorReason.OVERLAPPING_SCHEDULES"] = "Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not allowed."; - codes["FeedItemErrorReason.SCHEDULE_END_NOT_AFTER_START"] = "Feed item schedule end time must be after start time."; - codes["FeedItemErrorReason.TOO_MANY_SCHEDULES_PER_DAY"] = "There are too many feed item schedules per day."; - codes["FeedItemErrorReason.SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE"] = "The feed attribute value is too large."; - codes["FeedItemErrorReason.UNKNOWN"] = "Unknown error."; - codes["FeedItemTargetErrorReason.CRITERION_TYPE_NOT_SUPPORTED"] = "The criterion type given cannot be used for targeting."; - codes["FeedItemTargetErrorReason.FEED_ITEM_TARGET_ALREADY_EXISTS"] = "The feed item target specified already exists, so it cannot be added."; - codes["FeedItemTargetErrorReason.NEGATIVE_TARGETING_NOT_SUPPORTED_FOR_CRITERION_TYPE"] = "The type of criterion is not allowed to have negative targeting."; - codes["FeedItemTargetErrorReason.ONLY_MOBILE_TARGETING_IS_SUPPORTED_FOR_PLATFORM_CRITERION"] = "Only platform criterion with mobile targeting are supported."; - codes["FeedItemTargetErrorReason.FEED_ITEM_SCHEDULES_CANNOT_OVERLAP"] = "The schedules for a given feed item cannot overlap"; - codes["FeedItemTargetErrorReason.CRITERION_ID_MUST_BE_SET_FOR_GIVEN_TYPE"] = "The type of Criterion requires the criterion id to be set."; - codes["FeedItemTargetErrorReason.TARGET_LIMIT_EXCEEDED_FOR_GIVEN_TYPE"] = "Too many targets of a given type were added for a single feed item."; - codes["FeedItemTargetErrorReason.TOO_MANY_SCHEDULES_PER_DAY"] = "Too many AdSchedules are active for the feed item for the given day."; - codes["FeedItemTargetErrorReason.CANNOT_HAVE_ACTIVE_CAMPAIGN_AND_ACTIVE_AD_GROUP_TARGETS"] = "A feed item may either have an active campaign target or an active ad group target."; - codes["FeedItemTargetErrorReason.UNKNOWN"] = ""; - codes["FeedMappingErrorReason.INVALID_PLACEHOLDER_FIELD"] = "The given placeholder field does not exist."; - codes["FeedMappingErrorReason.INVALID_CRITERION_FIELD"] = "The given criterion field does not exist."; - codes["FeedMappingErrorReason.INVALID_PLACEHOLDER_TYPE"] = "The given placeholder type does not exist."; - codes["FeedMappingErrorReason.INVALID_CRITERION_TYPE"] = "The given criterion type does not exist."; - codes["FeedMappingErrorReason.CANNOT_SET_PLACEHOLDER_TYPE_AND_CRITERION_TYPE"] = "Cannot specify both placeholder type and criterion type."; - codes["FeedMappingErrorReason.NO_ATTRIBUTE_FIELD_MAPPINGS"] = "A feed mapping must contain at least one attribute field mapping."; - codes["FeedMappingErrorReason.FEED_ATTRIBUTE_TYPE_MISMATCH"] = "The type of the feed attribute referenced in the attribute field mapping must match the type of the placeholder field."; - codes["FeedMappingErrorReason.CANNOT_OPERATE_ON_MAPPINGS_FOR_SYSTEM_GENERATED_FEED"] = "A feed mapping for a system generated feed cannot be operated on."; - codes["FeedMappingErrorReason.MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_TYPE"] = "Only one feed mapping for a placeholder type is allowed per feed or customer (depending on the placeholder type)."; - codes["FeedMappingErrorReason.MULTIPLE_MAPPINGS_FOR_CRITERION_TYPE"] = "Only one feed mapping for a criterion type is allowed per customer."; - codes["FeedMappingErrorReason.MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_FIELD"] = "Only one feed attribute mapping for a placeholder field is allowed (depending on the placeholder type)."; - codes["FeedMappingErrorReason.MULTIPLE_MAPPINGS_FOR_CRITERION_FIELD"] = "Only one feed attribute mapping for a criterion field is allowed (depending on the criterion type)."; - codes["FeedMappingErrorReason.UNEXPECTED_ATTRIBUTE_FIELD_MAPPINGS"] = "This feed mapping may not contain any explicit attribute field mappings."; - codes["FeedMappingErrorReason.LOCATION_PLACEHOLDER_ONLY_FOR_PLACES_FEEDS"] = "Location placeholder feedmappings can only be created for Places feeds."; - codes["FeedMappingErrorReason.CANNOT_MODIFY_MAPPINGS_FOR_TYPED_FEED"] = "Mappings for typed feeds cannot be modified."; - codes["FeedMappingErrorReason.INVALID_PLACEHOLDER_TYPE_FOR_NON_SYSTEM_GENERATED_FEED"] = "The given placeholder type can only be mapped to system generated feeds."; - codes["FeedMappingErrorReason.INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE"] = "The given placeholder type cannot be mapped to a system generated feed with the given type."; - codes["FeedMappingErrorReason.UNKNOWN"] = ""; - codes["LocationCriterionServiceErrorReason.REQUIRED_LOCATION_CRITERION_PREDICATE_MISSING"] = ""; - codes["LocationCriterionServiceErrorReason.TOO_MANY_LOCATION_CRITERION_PREDICATES_SPECIFIED"] = ""; - codes["LocationCriterionServiceErrorReason.INVALID_COUNTRY_CODE"] = ""; - codes["LocationCriterionServiceErrorReason.LOCATION_NAME_TOO_LARGE"] = ""; - codes["LocationCriterionServiceErrorReason.LOCATION_CRITERION_SERVICE_ERROR"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["ManagedCustomerServiceErrorReason.UNKNOWN"] = "Unknown."; - codes["ManagedCustomerServiceErrorReason.NOT_AUTHORIZED"] = "The user is not authorized to perform the action."; - codes["ManagedCustomerServiceErrorReason.INVALID_SELECTOR"] = "Invalid selector"; - codes["ManagedCustomerServiceErrorReason.INVALID_TIMEZONE"] = "Can't process the passed in timezone."; - codes["ManagedCustomerServiceErrorReason.INVALID_CURRENCY"] = "Can't process the passed in currency code."; - codes["ManagedCustomerServiceErrorReason.INVALID_DESCRIPTIVE_NAME"] = "Can't process the passed in descriptive name."; - codes["ManagedCustomerServiceErrorReason.ADD_CUSTOMER_FAILURE"] = "Generic error during add customer process."; - codes["ManagedCustomerServiceErrorReason.SAVE_CUSTOMERS_FAILURE"] = "There was a problem saving the modified customers, and some of the customers may not have been saved successfully."; - codes["ManagedCustomerServiceErrorReason.ALREADY_MANAGED_BY_THIS_MANAGER"] = "Attempt to establish a link with a client that is already managed by the manager."; - codes["ManagedCustomerServiceErrorReason.ALREADY_INVITED_BY_THIS_MANAGER"] = "Attempt to invite a client that has already been invited by the manager."; - codes["ManagedCustomerServiceErrorReason.ALREADY_MANAGED_IN_HIERARCHY"] = "Already managed by some other manager in the hierarchy."; - codes["ManagedCustomerServiceErrorReason.ALREADY_MANAGED_FOR_UI_ACCESS"] = "Client is managed by another manager for UI access already."; - codes["ManagedCustomerServiceErrorReason.MAX_LINK_DEPTH_EXCEEDED"] = "Attempt to exceed the maximum hierarchy depth."; - codes["ManagedCustomerServiceErrorReason.NO_PENDING_INVITATION"] = "Attempt to accept an invitation that doesn't exist."; - codes["ManagedCustomerServiceErrorReason.TOO_MANY_ACCOUNTS"] = "Manager account has the maximum number of linked accounts."; - codes["ManagedCustomerServiceErrorReason.TOO_MANY_ACCOUNTS_AT_MANAGER"] = "Your manager's account has the maximum number of linked accounts."; - codes["ManagedCustomerServiceErrorReason.TOO_MANY_UI_API_MANAGERS"] = "The invitee has already linked with max allowed number of UI and API managers."; - codes["ManagedCustomerServiceErrorReason.TEST_ACCOUNT_LINK_ERROR"] = "Error involving test accounts (mixed types) or too many child accounts."; - codes["ManagedCustomerServiceErrorReason.INVALID_LABEL_ID"] = "Label id was not found, or is not owned by the requesting customer."; - codes["ManagedCustomerServiceErrorReason.CANNOT_APPLY_INACTIVE_LABEL"] = "Deleted labels cannot be applied to customers."; - codes["ManagedCustomerServiceErrorReason.APPLIED_LABEL_TO_TOO_MANY_ACCOUNTS"] = "A label cannot be applied to more than 1000 customers."; - codes["VideoErrorReason.INVALID_VIDEO"] = "Invalid video."; - codes["VideoErrorReason.STORAGE_ERROR"] = "Storage error."; - codes["VideoErrorReason.BAD_REQUEST"] = "Bad request."; - codes["VideoErrorReason.ERROR_GENERATING_STREAMING_URL"] = "Server error."; - codes["VideoErrorReason.UNEXPECTED_SIZE"] = "Unexpected size."; - codes["VideoErrorReason.SERVER_ERROR"] = "Server error."; - codes["VideoErrorReason.FILE_TOO_LARGE"] = "File too large."; - codes["VideoErrorReason.VIDEO_PROCESSING_ERROR"] = "Video processing error."; - codes["VideoErrorReason.INVALID_INPUT"] = "Invalid input."; - codes["VideoErrorReason.PROBLEM_READING_FILE"] = "Problem reading file."; - codes["VideoErrorReason.INVALID_ISCI"] = "Invalid ISCI."; - codes["VideoErrorReason.INVALID_AD_ID"] = "Invalid AD-ID."; - codes["AudioErrorReason.INVALID_AUDIO"] = ""; - codes["AudioErrorReason.PROBLEM_READING_AUDIO_FILE"] = ""; - codes["AudioErrorReason.ERROR_STORING_AUDIO"] = ""; - codes["AudioErrorReason.FILE_TOO_LARGE"] = ""; - codes["AudioErrorReason.UNSUPPORTED_AUDIO"] = ""; - codes["AudioErrorReason.ERROR_GENERATING_STREAMING_URL"] = ""; - codes["MultiplierErrorReason.MULTIPLIER_TOO_HIGH"] = "Multiplier value is too high"; - codes["MultiplierErrorReason.MULTIPLIER_TOO_LOW"] = "Multiplier value is too low"; - codes["MultiplierErrorReason.TOO_MANY_FRACTIONAL_DIGITS"] = "Too many fractional digits"; - codes["MultiplierErrorReason.MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY"] = "A multiplier cannot be set for this bidding strategy"; - codes["MultiplierErrorReason.MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING"] = "A multiplier cannot be set when there is no base bid (e.g., content max cpc)"; - codes["MultiplierErrorReason.NO_MULTIPLIER_SPECIFIED"] = "A bid multiplier must be specified"; - codes["MultiplierErrorReason.MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET"] = "Multiplier causes bid to exceed daily budget"; - codes["MultiplierErrorReason.MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET"] = "Multiplier causes bid to exceed monthly budget"; - codes["MultiplierErrorReason.MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET"] = "Multiplier causes bid to exceed custom budget"; - codes["MultiplierErrorReason.MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID"] = "Multiplier causes bid to exceed maximum allowed bid"; - codes["MultiplierErrorReason.BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER"] = "Multiplier causes bid to become less than the minimum bid allowed"; - codes["MultiplierErrorReason.MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH"] = "Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy"; - codes["MultiplierErrorReason.MULTIPLIER_ERROR"] = ""; - codes["AdGroupCriterionErrorReason.AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST"] = "No link found between the AdGroupCriterion and the label."; - codes["AdGroupCriterionErrorReason.AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS"] = "The label has already been attached to the AdGroupCriterion."; - codes["AdGroupCriterionErrorReason.CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION"] = "Negative AdGroupCriterion cannot have labels."; - codes["AdGroupCriterionErrorReason.TOO_MANY_OPERATIONS"] = "Too many operations for a single call."; - codes["AdGroupCriterionErrorReason.CANT_UPDATE_NEGATIVE"] = "Negative ad group criteria are not updateable."; - codes["AdGroupCriterionErrorReason.CONCRETE_TYPE_REQUIRED"] = "Concrete type of criterion (keyword v.s. placement) is required for ADD and SET operations."; - codes["AdGroupCriterionErrorReason.BID_INCOMPATIBLE_WITH_ADGROUP"] = "Bid is incompatible with ad group's bidding settings."; - codes["AdGroupCriterionErrorReason.CANNOT_TARGET_AND_EXCLUDE"] = "Cannot target and exclude the same criterion at once."; - codes["AdGroupCriterionErrorReason.ILLEGAL_URL"] = "The URL of a placement is invalid."; - codes["AdGroupCriterionErrorReason.INVALID_KEYWORD_TEXT"] = "Keyword text was invalid."; - codes["AdGroupCriterionErrorReason.INVALID_DESTINATION_URL"] = "Destination URL was invalid."; - codes["AdGroupCriterionErrorReason.MISSING_DESTINATION_URL_TAG"] = "The destination url must contain at least one tag (e.g. {lpurl})"; - codes["AdGroupCriterionErrorReason.KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM"] = "Keyword-level cpm bid is not supported"; - codes["AdGroupCriterionErrorReason.INVALID_USER_STATUS"] = "For example, cannot add a biddable ad group criterion that had been removed."; - codes["AdGroupCriterionErrorReason.CANNOT_ADD_CRITERIA_TYPE"] = "Criteria type cannot be targeted for the ad group. Either the account is restricted to keywords only, the criteria type is incompatible with the campaign's bidding strategy, or the criteria type can only be applied to campaigns."; - codes["AdGroupCriterionErrorReason.CANNOT_EXCLUDE_CRITERIA_TYPE"] = "Criteria type cannot be excluded for the ad group. Refer to the documentation for a specific criterion to check if it is excludable."; - codes["AdGroupCriterionErrorReason.INVALID_PRODUCT_PARTITION_HIERARCHY"] = "Ad group is invalid due to the product partitions it contains."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_UNIT_CANNOT_HAVE_CHILDREN"] = "Product partition unit cannot have children."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE"] = "Subdivided product partitions must have an \"others\" case."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS"] = "Dimension type of product partition must be the same as that of its siblings."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_ALREADY_EXISTS"] = "Product partition cannot be added to the ad group because it already exists."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_DOES_NOT_EXIST"] = "Product partition referenced in the operation was not found in the ad group."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_CANNOT_BE_REMOVED"] = "Recursive removal failed because product partition subdivision is being created or modified in this request."; - codes["AdGroupCriterionErrorReason.INVALID_PRODUCT_PARTITION_TYPE"] = "Product partition type is not allowed for specified AdGroupCriterion type."; - codes["AdGroupCriterionErrorReason.PRODUCT_PARTITION_ADD_MAY_ONLY_USE_TEMP_ID"] = "Product partition in an ADD operation specifies a non temporary CriterionId."; - codes["AdGroupCriterionErrorReason.CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE"] = "Partial failure is not supported for shopping campaign mutate operations."; - codes["AdGroupCriterionErrorReason.OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS"] = "Operations in the mutate request changes too many shopping ad groups. Please split requests for multiple shopping ad groups across multiple requests."; - codes["AdGroupCriterionErrorReason.CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS"] = "Not allowed to modify url fields of an ad group criterion if there are duplicate elements for that ad group criterion in the request."; - codes["AdGroupCriterionErrorReason.CANNOT_SET_WITHOUT_FINAL_URLS"] = "Cannot set url fields without also setting final urls."; - codes["AdGroupCriterionErrorReason.CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST"] = "Cannot clear final urls if final mobile urls exist."; - codes["AdGroupCriterionErrorReason.CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST"] = "Cannot clear final urls if final app urls exist."; - codes["AdGroupCriterionErrorReason.CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS"] = "Cannot clear final urls if tracking url template exists."; - codes["AdGroupCriterionErrorReason.CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST"] = "Cannot clear final urls if url custom parameters exist."; - codes["AdGroupCriterionErrorReason.CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS"] = "Cannot set both destination url and final urls."; - codes["AdGroupCriterionErrorReason.CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE"] = "Cannot set both destination url and tracking url template."; - codes["AdGroupCriterionErrorReason.FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE"] = "Final urls are not supported for this criterion type."; - codes["AdGroupCriterionErrorReason.FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE"] = "Final mobile urls are not supported for this criterion type."; - codes["AdGroupCriterionErrorReason.UNKNOWN"] = ""; - codes["OfflineConversionErrorReason.UNPARSEABLE_GCLID"] = "This google click ID could not be decoded."; - codes["OfflineConversionErrorReason.CONVERSION_PRECEDES_CLICK"] = "This conversion is reported to have happened before the click."; - codes["OfflineConversionErrorReason.FUTURE_CONVERSION_TIME"] = "You cannot set a future conversion time."; - codes["OfflineConversionErrorReason.EXPIRED_CLICK"] = "This click is either too old to be imported or occurred before the conversion window for the specified combination of conversion date and conversion name (default is 90 days)."; - codes["OfflineConversionErrorReason.TOO_RECENT_CLICK"] = "This click occurred less than 24 hours ago, please try again after a day or so."; - codes["OfflineConversionErrorReason.INVALID_CLICK"] = "This click does not exist in the system. This can occur if google click ids are collected for non AdWords clicks (e.g. dart search)."; - codes["OfflineConversionErrorReason.UNAUTHORIZED_USER"] = "This customer is trying to upload conversions for a different customer that it does not manage."; - codes["OfflineConversionErrorReason.INVALID_CONVERSION_TYPE"] = "This customer does not have an import conversion with a name that matches the label of this conversion."; - codes["OfflineConversionErrorReason.TOO_RECENT_CONVERSION_TYPE"] = "This conversion action was created too recently. Please wait for 4 hours and try uploading again."; - codes["OfflineConversionErrorReason.CLICK_MISSING_CONVERSION_LABEL"] = "Cannot process clicks that occurred when none of the effective conversion types in the account were enabled, to generate conversions."; - codes["OfflineConversionErrorReason.ATTRIBUTED_CREDIT_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION"] = "This conversion action is not configured to use an external attribution model, but the attributed credit is set to a non-zero value."; - codes["OfflineConversionErrorReason.ATTRIBUTION_MODEL_SET_FOR_NON_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION"] = "This conversion action is not configured to use an external attribution model, but the attribution model name is set."; - codes["OfflineConversionErrorReason.ATTRIBUTED_CREDIT_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION"] = "This conversion action is using an external attribution model, but the attributed credit is not set."; - codes["OfflineConversionErrorReason.ATTRIBUTED_CREDIT_ZERO_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION"] = "This conversion action is using an external attribution model, but the attributed credit is set to 0."; - codes["OfflineConversionErrorReason.ATTRIBUTION_MODEL_NOT_SET_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION"] = "This conversion action is using an external attribution model, but the attribution model name is not set."; - codes["OfflineConversionErrorReason.ORDER_ID_NOT_PERMITTED_FOR_EXTERNALLY_ATTRIBUTED_CONVERSION_ACTION"] = "This conversion action is using an external attribution model, which does not accept order ids."; - codes["OfflineConversionErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["CurrencyCodeErrorReason.UNSUPPORTED_CURRENCY_CODE"] = ""; - codes["NotWhitelistedErrorReason.CUSTOMER_NOT_WHITELISTED_FOR_API"] = "Customer is not whitelisted for accessing the API."; - codes["OfflineDataUploadErrorReason.UNKNOWN"] = ""; - codes["OfflineDataUploadErrorReason.INCOMPATIBLE_USERIDENTIFIER_TYPE"] = "Indicates a row error due to the incompatible , like using EXTERNAL_USER_ID for first party uploads or not using EXTERNAL_USER_ID for third party uploads."; - codes["OfflineDataUploadErrorReason.INVALID_UPLOAD_TYPE"] = "Indicates an upload error due to the invalid upload type."; - codes["OfflineDataUploadErrorReason.MISSING_UPLOAD_METADATA"] = "Indicates an upload error due to missing metadata."; - codes["OfflineDataUploadErrorReason.INVALID_UPLOAD_METADATA"] = "Indicates an upload error due to missing metadata."; - codes["OfflineDataUploadErrorReason.INVALID_PARTNER_ID"] = "Indicates an upload error due to invalid partner id in metadata."; - codes["OfflineDataUploadErrorReason.MISSING_TRANSACTION_INFO"] = "Indicates a row error due to missing transaction data."; - codes["OfflineDataUploadErrorReason.INVALID_CONVERSION_TYPE"] = "The name specified in store_sales_attributes is used to report conversions to a conversion type configured in AdWords with the same name. A row generates this error if there is no such name configured in the account."; - codes["OfflineDataUploadErrorReason.FUTURE_TRANSACTION_TIME"] = "Indicates a row error due to a conversion with a transaction time in the future."; - codes["OfflineDataUploadErrorReason.NEGATIVE_TRANSACTION_AMOUNT"] = "Indicates a row error due to a negative transaction amount."; - codes["OfflineDataUploadErrorReason.COUNTRY_CODE_HASHED"] = "Country code hashed."; - codes["OfflineDataUploadErrorReason.ZIPCODE_HASHED"] = "ZIP Code hashed."; - codes["OfflineDataUploadErrorReason.EMAIL_NOT_HASHED"] = "Email not hashed."; - codes["OfflineDataUploadErrorReason.FIRST_NAME_NOT_HASHED"] = "First Name not hashed."; - codes["OfflineDataUploadErrorReason.LAST_NAME_NOT_HASHED"] = "Last Name not hashed."; - codes["OfflineDataUploadErrorReason.PHONE_NOT_HASHED"] = "Phone not hashed."; - codes["OfflineCallConversionErrorReason.CONVERSION_PRECEDES_CALL"] = "The conversion time cannot precede the call time."; - codes["OfflineCallConversionErrorReason.FUTURE_CALL_START_TIME"] = "You cannot set a future call start time."; - codes["OfflineCallConversionErrorReason.FUTURE_CONVERSION_TIME"] = "You cannot set a future conversion time."; - codes["OfflineCallConversionErrorReason.EXPIRED_CALL"] = "The click that initiated the call is too old for this conversion to be imported."; - codes["OfflineCallConversionErrorReason.TOO_RECENT_CALL"] = "We are still processing this call's information, please re-upload this conversion in 4-6 hours."; - codes["OfflineCallConversionErrorReason.UNPARSEABLE_CALLERS_PHONE_NUMBER"] = "The caller?s phone number cannot be parsed. Please re-upload in one of the supported formats. It should be formatted either as E.164 \"+16502531234\", International \"+64 3-331 6005\" or as a US national number ?6502531234?."; - codes["OfflineCallConversionErrorReason.INVALID_CALL"] = "We are unable to import a conversion for this call, since either this call or the click leading to the call was not found in our system."; - codes["OfflineCallConversionErrorReason.UNAUTHORIZED_USER"] = "This call belongs to an account that you are not authorized to access."; - codes["OfflineCallConversionErrorReason.INVALID_CONVERSION_TYPE"] = "We cannot find an import conversion type with this name in the target account."; - codes["OfflineCallConversionErrorReason.TOO_RECENT_CONVERSION_TYPE"] = "This conversion action was created too recently. Please wait for 4 hours and try uploading again."; - codes["OfflineCallConversionErrorReason.CONVERSION_TRACKING_NOT_ENABLED_AT_CALL_TIME"] = "Unable to upload. No AdWords call import conversion types were defined when this call occurred. Please make sure you create at least one such conversion type before uploading."; - codes["OfflineCallConversionErrorReason.DESKTOP_CALL_NOT_SUPPORTED"] = "We can't count calls from ads made by computer or tablet users as conversions."; - codes["OfflineCallConversionErrorReason.INTERNAL_ERROR"] = "An internal server error occurred, please try again."; - codes["OfflineCallConversionErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["ReportDefinitionErrorReason.INVALID_DATE_RANGE_FOR_REPORT"] = "Customer passed in invalid date range for a report type."; - codes["ReportDefinitionErrorReason.INVALID_FIELD_NAME_FOR_REPORT"] = "Customer passed in invalid field name for a report type"; - codes["ReportDefinitionErrorReason.UNABLE_TO_FIND_MAPPING_FOR_THIS_REPORT"] = "Unable to locate a field mapping for this report type."; - codes["ReportDefinitionErrorReason.INVALID_COLUMN_NAME_FOR_REPORT"] = "Customer passed in invalid column name for a report type"; - codes["ReportDefinitionErrorReason.INVALID_REPORT_DEFINITION_ID"] = "Customer passed in invalid report definition id."; - codes["ReportDefinitionErrorReason.REPORT_SELECTOR_CANNOT_BE_NULL"] = "Report selector cannot be null."; - codes["ReportDefinitionErrorReason.NO_ENUMS_FOR_THIS_COLUMN_NAME"] = "No Enums exist for this column name."; - codes["ReportDefinitionErrorReason.INVALID_VIEW"] = "Invalid view name."; - codes["ReportDefinitionErrorReason.SORTING_NOT_SUPPORTED"] = "Sorting is not supported for reports."; - codes["ReportDefinitionErrorReason.PAGING_NOT_SUPPORTED"] = "Paging is not supported for reports."; - codes["ReportDefinitionErrorReason.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH"] = "Customer can not create report of a selected type."; - codes["ReportDefinitionErrorReason.CLIENT_SELECTOR_NO_CUSTOMER_IDENTIFIER"] = "Cross-client report has a client selector without any valid identifier for a customer."; - codes["ReportDefinitionErrorReason.CLIENT_SELECTOR_INVALID_CUSTOMER_ID"] = "Cross-client report has an invalid external customer ID in the client selector."; - codes["ReportDefinitionErrorReason.REPORT_DEFINITION_ERROR"] = ""; - codes["TrafficEstimatorErrorReason.NO_CAMPAIGN_FOR_AD_GROUP_ESTIMATE_REQUEST"] = "When the request with null campaign ID in CampaignEstimateRequest contains an AdGroupEstimateRequest with an ID."; - codes["TrafficEstimatorErrorReason.NO_AD_GROUP_FOR_KEYWORD_ESTIMATE_REQUEST"] = "When the request with null adgroup ID in AdGroupEstimateRequest contains a KeywordEstimateRequest with an ID."; - codes["TrafficEstimatorErrorReason.NO_MAX_CPC_FOR_KEYWORD_ESTIMATE_REQUEST"] = "All KeywordEstimateRequest items should have maxCpc associated with them."; - codes["TrafficEstimatorErrorReason.TOO_MANY_KEYWORD_ESTIMATE_REQUESTS"] = "When there are more KeywordEstimateRequests in the request than TrafficEstimatorService allows."; - codes["TrafficEstimatorErrorReason.TOO_MANY_CAMPAIGN_ESTIMATE_REQUESTS"] = "When there are more CampaignEstimateRequests in the request than TrafficEstimatorService allows."; - codes["TrafficEstimatorErrorReason.TOO_MANY_ADGROUP_ESTIMATE_REQUESTS"] = "When there are more AdGroupEstimateRequests in the request than TrafficEstimatorService allows."; - codes["TrafficEstimatorErrorReason.TOO_MANY_TARGETS"] = "When there are more targets in the request than TrafficEstimatorService allows. See documentation on CampaignEstimateRequest for more information about this error."; - codes["TrafficEstimatorErrorReason.KEYWORD_TOO_LONG"] = "Request contains a keyword that is too long for backends to handle."; - codes["TrafficEstimatorErrorReason.KEYWORD_CONTAINS_BROAD_MATCH_MODIFIERS"] = "Request contains a keyword that contains broad match modifiers."; - codes["TrafficEstimatorErrorReason.INVALID_INPUT"] = "When an unexpected error occurs."; - codes["TrafficEstimatorErrorReason.SERVICE_UNAVAILABLE"] = "When backend service calls fail."; - codes["TargetingIdeaErrorReason.DUPLICATE_SEARCH_FILTER_TYPES_PRESENT"] = "Error returned when there are multiple instance of same type of SearchParameters."; - codes["TargetingIdeaErrorReason.INSUFFICIENT_SEARCH_PARAMETERS"] = "Error returned when the TargetingIdeaSelector doesn't have enough SearchParameters to execute request."; - codes["TargetingIdeaErrorReason.INVALID_ATTRIBUTE_TYPE"] = "Error returned when an AttributeType doesn't match the IdeaType specified in the TargetingIdeaSelector. For example, if the KEYWORD IDEAS selector contains an STATS only AttributeType, this error will be returned."; - codes["TargetingIdeaErrorReason.INVALID_SEARCH_PARAMETERS"] = "Error returned when a SearchParameter doesn't match the IdeaType specified in the TargetingIdeaSelector or is otherwise invalid. Error trigger usually contains the parameter name, and error details contain a more detailed explanation."; - codes["TargetingIdeaErrorReason.INVALID_DOMAIN_SUFFIX"] = "Error returned when the TargetingIdeaSelector contains a DomainSuffixSearchParameters that contains an invalid domain suffix."; - codes["TargetingIdeaErrorReason.MUTUALLY_EXCLUSIVE_SEARCH_PARAMETERS_IN_QUERY"] = "Error returned when a selector contains mutually exclusive parameters."; - codes["TargetingIdeaErrorReason.SERVICE_UNAVAILABLE"] = "Error returned when the TargetingIdeaService is not available."; - codes["TargetingIdeaErrorReason.INVALID_URL_IN_SEARCH_PARAMETER"] = "Error returned when the URL value specified in the TargetingIdeaSelector, such as RelatedToUrlSearchParameter, is not a valid URL."; - codes["TargetingIdeaErrorReason.TOO_MANY_RESULTS_REQUESTED"] = "Error returned when the requested number of entries in TargetingIdeaSelector's Paging is greater than the maximum allowed."; - codes["TargetingIdeaErrorReason.NO_PAGING_IN_SELECTOR"] = "Error returned when the requested Paging is missing from the TargetingIdeaSelector when required."; - codes["TargetingIdeaErrorReason.INVALID_INCLUDED_EXCLUDED_KEYWORDS"] = "Error returned when included keywords and excluded keywords in IdeaTextFilterSearchParameter, IdeaTextMatchesSearchParameter or ExcludedKeywordSearchParameter are overlapped."; - codes["UserListErrorReason.EXTERNAL_REMARKETING_USER_LIST_MUTATE_NOT_SUPPORTED"] = "Creating and updating external remarketing user lists is not supported."; - codes["UserListErrorReason.CONCRETE_TYPE_REQUIRED"] = "Concrete type of user list (logical v.s. remarketing) is required for ADD and SET operations."; - codes["UserListErrorReason.CONVERSION_TYPE_ID_REQUIRED"] = "Adding/updating user list conversion types requires specifying the conversion type id."; - codes["UserListErrorReason.DUPLICATE_CONVERSION_TYPES"] = "Remarketing user list cannot have duplicate conversion types."; - codes["UserListErrorReason.INVALID_CONVERSION_TYPE"] = "Conversion type is invalid/unknown."; - codes["UserListErrorReason.INVALID_DESCRIPTION"] = "User list description is empty or invalid"; - codes["UserListErrorReason.INVALID_NAME"] = "User list name is empty or invalid."; - codes["UserListErrorReason.INVALID_TYPE"] = "Type of the UserList does not match."; - codes["UserListErrorReason.CAN_NOT_ADD_SIMILAR_LIST_AS_LOGICAL_LIST_NONE_OPERAND"] = "Can't use similar list in logical user list rule when operator is NONE."; - codes["UserListErrorReason.CAN_NOT_ADD_LOGICAL_LIST_AS_LOGICAL_LIST_OPERAND"] = "Embedded logical user lists are not allowed."; - codes["UserListErrorReason.INVALID_USER_LIST_LOGICAL_RULE_OPERAND"] = "User list rule operand is invalid."; - codes["UserListErrorReason.NAME_ALREADY_USED"] = "Name is already being used for another user list for the account."; - codes["UserListErrorReason.NEW_CONVERSION_TYPE_NAME_REQUIRED"] = "Name is required when creating a new conversion type."; - codes["UserListErrorReason.CONVERSION_TYPE_NAME_ALREADY_USED"] = "The given conversion type name has been used."; - codes["UserListErrorReason.OWNERSHIP_REQUIRED_FOR_SET"] = "Only an owner account may edit a user list."; - codes["UserListErrorReason.REMOVE_NOT_SUPPORTED"] = "Removing user lists is not supported."; - codes["UserListErrorReason.USER_LIST_MUTATE_NOT_SUPPORTED"] = "The user list of the type is not mutable"; - codes["UserListErrorReason.INVALID_RULE"] = "Rule is invalid."; - codes["UserListErrorReason.INVALID_DATE_RANGE"] = "The specified date range is empty."; - codes["UserListErrorReason.CAN_NOT_MUTATE_SENSITIVE_USERLIST"] = "A userlist which is privacy sensitive or legal rejected cannot be mutated by external users."; - codes["UserListErrorReason.MAX_NUM_RULEBASED_USERLISTS"] = "Maximum number of rulebased user lists a customer can have."; - codes["UserListErrorReason.CANNOT_MODIFY_BILLABLE_RECORD_COUNT"] = "BasicUserList's billable record field cannot be modified once it is set."; - codes["UserListErrorReason.APP_ID_NOT_ALLOWED"] = "appId field can only be set when uploadKeyType is MOBILE_ADVERTISING_ID."; - codes["UserListErrorReason.APP_ID_NOT_SET"] = "appId field must be set when uploadKeyType is MOBILE_ADVERTISING_ID."; - codes["UserListErrorReason.USERLIST_NAME_IS_RESERVED_FOR_SYSTEM_LIST"] = ""; - codes["UserListErrorReason.USER_LIST_SERVICE_ERROR"] = "Default generic error."; - codes["MutateMembersErrorReason.UNKNOWN"] = ""; - codes["MutateMembersErrorReason.UNSUPPORTED_METHOD"] = ""; - codes["MutateMembersErrorReason.INVALID_USER_LIST_ID"] = ""; - codes["MutateMembersErrorReason.INVALID_USER_LIST_TYPE"] = ""; - codes["MutateMembersErrorReason.INVALID_DATA_TYPE"] = ""; - codes["MutateMembersErrorReason.INVALID_SHA256_FORMAT"] = ""; - codes["MutateMembersErrorReason.OPERATOR_CONFLICT_FOR_SAME_USER_LIST_ID"] = ""; - codes["MutateMembersErrorReason.INVALID_REMOVEALL_OPERATION"] = ""; - codes["MutateMembersErrorReason.INVALID_OPERATION_ORDER"] = ""; - codes["MutateMembersErrorReason.MISSING_MEMBER_IDENTIFIER"] = ""; - codes["MutateMembersErrorReason.INCOMPATIBLE_UPLOAD_KEY_TYPE"] = ""; - codes["CampaignSharedSetErrorReason.CAMPAIGN_SHARED_SET_DOES_NOT_EXIST"] = ""; - codes["CampaignSharedSetErrorReason.UNKNOWN"] = ""; - codes["SharedCriterionErrorReason.EXCEEDS_CRITERIA_LIMIT"] = ""; - codes["SharedCriterionErrorReason.INCORRECT_CRITERION_TYPE"] = ""; - codes["SharedCriterionErrorReason.CANNOT_TARGET_AND_EXCLUDE"] = "Cannot add the same crietrion as positive and negative in the same shared set."; - codes["SharedCriterionErrorReason.NEGATIVE_CRITERION_REQUIRED"] = "Negative shared set type requires a negative shared set criterion."; - codes["SharedCriterionErrorReason.CONCRETE_TYPE_REQUIRED"] = "Concrete type of criterion (e.g., keyword and placement) is required for ADD operations."; - codes["SharedCriterionErrorReason.UNKNOWN"] = ""; - codes["SharedSetErrorReason.CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE"] = ""; - codes["SharedSetErrorReason.DUPLICATE_NAME"] = ""; - codes["SharedSetErrorReason.MANAGER_CUSTOMER_CANNOT_CREATE_SHARED_SET_OF_THIS_TYPE"] = "Customer Manager is not allowed to create shared set of this type."; - codes["SharedSetErrorReason.SHARED_SET_REMOVED"] = ""; - codes["SharedSetErrorReason.SHARED_SET_IN_USE"] = ""; - codes["SharedSetErrorReason.UNKNOWN"] = ""; - codes["AdGroupServiceErrorReason.DUPLICATE_ADGROUP_NAME"] = "AdGroup with the same name already exists for the campaign."; - codes["AdGroupServiceErrorReason.INVALID_ADGROUP_NAME"] = "AdGroup name is not valid."; - codes["AdGroupServiceErrorReason.USE_SET_OPERATOR_AND_MARK_STATUS_TO_REMOVED"] = "Cannot remove an adgroup, adgroup status can be marked removed using set operator."; - codes["AdGroupServiceErrorReason.ADVERTISER_NOT_ON_CONTENT_NETWORK"] = "Advertiser is not allowed to target sites or set site bids that are not on the Google Search Network."; - codes["AdGroupServiceErrorReason.BID_TOO_BIG"] = "Bid amount is too big."; - codes["AdGroupServiceErrorReason.BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH"] = "AdGroup bid does not match the campaign's bidding strategy."; - codes["AdGroupServiceErrorReason.MISSING_ADGROUP_NAME"] = "AdGroup name is required for Add."; - codes["AdGroupServiceErrorReason.ADGROUP_LABEL_DOES_NOT_EXIST"] = "No link found between the ad group and the label."; - codes["AdGroupServiceErrorReason.ADGROUP_LABEL_ALREADY_EXISTS"] = "The label has already been attached to the ad group."; - codes["AdGroupServiceErrorReason.INVALID_CONTENT_BID_CRITERION_TYPE_GROUP"] = "The CriterionTypeGroup is not supported for the content bid dimension."; - codes["AdGroupServiceErrorReason.AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE"] = "The ad group type is not compatible with the campaign channel type."; - codes["AdGroupServiceErrorReason.ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY"] = "The ad group type is not supported in the country of sale of the campaign."; - codes["AdGroupServiceErrorReason.CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING"] = "Ad groups of AdGroupType.SEARCH_DYNAMIC_ADS can only be added to campaigns that have DynamicSearchAdsSetting attached."; - codes["LabelErrorReason.DUPLICATE_NAME"] = "Label name must be unique."; - codes["LabelErrorReason.INVALID_LABEL_NAME"] = "Label names cannot be empty"; - codes["LabelErrorReason.INVALID_LABEL_TYPE"] = "Invalid Label type. A specific type of Label is required."; - codes["LabelErrorReason.UNKNOWN"] = "Default error. Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["LabelServiceErrorReason.EMPTY_LABEL_NAME"] = "The label name is empty."; - codes["LabelServiceErrorReason.LABEL_NAME_TOO_LONG"] = "The label name is longer than max allowed size."; - codes["LabelServiceErrorReason.DUPLICATE_LABEL_NAME"] = "The customer already has an active label with the same name."; - codes["LabelServiceErrorReason.RESERVED_LABEL_NAME"] = "The label name is reserved by the system."; - codes["LabelServiceErrorReason.CANNOT_BE_DELETED"] = "The label cannot be deleted"; - codes["LabelServiceErrorReason.TOO_MANY_LABELS"] = "A customer cannot own more than 200 labels."; - codes["LabelServiceErrorReason.INVALID_LABEL_ID"] = "Label id was not found."; - codes["LabelServiceErrorReason.CUSTOMER_CANNOT_CREATE_LABELS"] = "This customer cannot create labels. Only manager customers may create labels."; - codes["LabelServiceErrorReason.SERVER_CLIENT_VERSION_MISMATCH"] = "An unknown enum value has been given for this error reason."; - codes["AdCustomizerFeedErrorReason.CANNOT_ADD_KEY_ATTRIBUTE"] = "The key attribute cannot be added to an existing ad customizer feed."; - codes["AdCustomizerFeedErrorReason.NOT_AD_CUSTOMIZER_FEED"] = "The feed is not an ad customizer feed."; - codes["AdCustomizerFeedErrorReason.INVALID_FEED_NAME"] = "Name of AdCustomizerFeed is not allowed."; - codes["AdCustomizerFeedErrorReason.TOO_MANY_FEED_ATTRIBUTES_FOR_FEED"] = "Too many AdCustomizerFeedAttributes for an AdCustomizerFeed."; - codes["AdCustomizerFeedErrorReason.ATTRIBUTE_NAMES_NOT_UNIQUE"] = "The names of the AdCustomizerFeedAttributes must be unique."; - codes["AdCustomizerFeedErrorReason.FEED_DELETED"] = "The given id refers to a removed Feed. Removed Feeds are immutable."; - codes["AdCustomizerFeedErrorReason.DUPLICATE_FEED_NAME"] = "Feed name matches that of another active Feed."; - codes["AdCustomizerFeedErrorReason.UNKNOWN"] = ""; - codes["ExtensionSettingErrorReason.EXTENSIONS_REQUIRED"] = "A platform restriction was provided without input extensions or existing extensions."; - codes["ExtensionSettingErrorReason.FEED_TYPE_EXTENSION_TYPE_MISMATCH"] = "The provided feed type does not correspond to the provided extensions."; - codes["ExtensionSettingErrorReason.INVALID_FEED_TYPE"] = "The provided feed type cannot be used."; - codes["ExtensionSettingErrorReason.INVALID_FEED_TYPE_FOR_CUSTOMER_EXTENSION_SETTING"] = "The provided feed type cannot be used at the customer level."; - codes["ExtensionSettingErrorReason.CANNOT_CHANGE_FEED_ITEM_ON_ADD"] = "Can not change a feed item field on an ADD operation."; - codes["ExtensionSettingErrorReason.CANNOT_UPDATE_NEWLY_ADDED_EXTENSION"] = "Can not update an extension that is not already in this setting."; - codes["ExtensionSettingErrorReason.NO_EXISTING_AD_GROUP_EXTENSION_SETTING_FOR_TYPE"] = "There is no existing AdGroupExtensionSetting for this type."; - codes["ExtensionSettingErrorReason.NO_EXISTING_CAMPAIGN_EXTENSION_SETTING_FOR_TYPE"] = "There is no existing CampaignExtensionSetting for this type."; - codes["ExtensionSettingErrorReason.NO_EXISTING_CUSTOMER_EXTENSION_SETTING_FOR_TYPE"] = "There is no existing CustomerExtensionSetting for this type."; - codes["ExtensionSettingErrorReason.AD_GROUP_EXTENSION_SETTING_ALREADY_EXISTS"] = "The AdGroupExtensionSetting already exists. SET should be used to modify the existing AdGroupExtensionSetting."; - codes["ExtensionSettingErrorReason.CAMPAIGN_EXTENSION_SETTING_ALREADY_EXISTS"] = "The CampaignExtensionSetting already exists. SET should be used to modify the existing CampaignExtensionSetting."; - codes["ExtensionSettingErrorReason.CUSTOMER_EXTENSION_SETTING_ALREADY_EXISTS"] = "The CustomerExtensionSetting already exists. SET should be used to modify the existing CustomerExtensionSetting."; - codes["ExtensionSettingErrorReason.AD_GROUP_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE"] = "An active ad group feed already exists for this place holder type."; - codes["ExtensionSettingErrorReason.CAMPAIGN_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE"] = "An active campaign feed already exists for this place holder type."; - codes["ExtensionSettingErrorReason.CUSTOMER_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE"] = "An active customer feed already exists for this place holder type."; - codes["ExtensionSettingErrorReason.VALUE_OUT_OF_RANGE"] = "Value is not within the accepted range."; - codes["ExtensionSettingErrorReason.CANNOT_SET_WITH_FINAL_URLS"] = "Cannot simultaneously set sitelink field with final urls."; - codes["ExtensionSettingErrorReason.CANNOT_SET_WITHOUT_FINAL_URLS"] = "Must set field with final urls."; - codes["ExtensionSettingErrorReason.CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE"] = "Cannot simultaneously set sitelink url field with tracking url template."; - codes["ExtensionSettingErrorReason.INVALID_PHONE_NUMBER"] = "Phone number for a call extension is invalid."; - codes["ExtensionSettingErrorReason.PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY"] = "Phone number for a call extension is not supported for the given country code."; - codes["ExtensionSettingErrorReason.CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED"] = "A carrier specific number in short format is not allowed for call extensions."; - codes["ExtensionSettingErrorReason.PREMIUM_RATE_NUMBER_NOT_ALLOWED"] = "Premium rate numbers are not allowed for call extensions."; - codes["ExtensionSettingErrorReason.DISALLOWED_NUMBER_TYPE"] = "Phone number type for a call extension is not allowed."; - codes["ExtensionSettingErrorReason.INVALID_DOMESTIC_PHONE_NUMBER_FORMAT"] = "Phone number for a call extension does not meet domestic format requirements."; - codes["ExtensionSettingErrorReason.VANITY_PHONE_NUMBER_NOT_ALLOWED"] = "Vanity phone numbers (i.e. those including letters) are not allowed for call extensions."; - codes["ExtensionSettingErrorReason.INVALID_COUNTRY_CODE"] = "Country code provided for a call extension is invalid."; - codes["ExtensionSettingErrorReason.INVALID_CALL_CONVERSION_TYPE_ID"] = "Call conversion type id provided for a call extension is invalid."; - codes["ExtensionSettingErrorReason.CUSTOMER_NOT_WHITELISTED_FOR_CALLTRACKING"] = "For a call extension, the customer is not whitelisted for call tracking."; - codes["ExtensionSettingErrorReason.CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY"] = "Call tracking is not supported for the given country for a call extension."; - codes["ExtensionSettingErrorReason.INVALID_APP_ID"] = "App id provided for an app extension is invalid."; - codes["ExtensionSettingErrorReason.QUOTES_IN_REVIEW_EXTENSION_SNIPPET"] = "Quotation marks present in the review text for a review extension."; - codes["ExtensionSettingErrorReason.HYPHENS_IN_REVIEW_EXTENSION_SNIPPET"] = "Hyphen character present in the review text for a review extension."; - codes["ExtensionSettingErrorReason.REVIEW_EXTENSION_SOURCE_INELIGIBLE"] = "A blacklisted review source name or url was provided for a review extension."; - codes["ExtensionSettingErrorReason.SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT"] = "Review source name should not be found in the review text."; - codes["ExtensionSettingErrorReason.MISSING_FIELD"] = "Field must be set."; - codes["ExtensionSettingErrorReason.INCONSISTENT_CURRENCY_CODES"] = "Inconsistent currency codes."; - codes["ExtensionSettingErrorReason.PRICE_EXTENSION_HAS_DUPLICATED_HEADERS"] = "Price extension cannot have duplicated headers."; - codes["ExtensionSettingErrorReason.PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION"] = "Price item cannot have duplicated header and description."; - codes["ExtensionSettingErrorReason.PRICE_EXTENSION_HAS_TOO_FEW_ITEMS"] = "Price extension has too few items"; - codes["ExtensionSettingErrorReason.PRICE_EXTENSION_HAS_TOO_MANY_ITEMS"] = "Price extension has too many items"; - codes["ExtensionSettingErrorReason.UNSUPPORTED_VALUE"] = "The input value is not currently supported."; - codes["ExtensionSettingErrorReason.UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE"] = "The input value is not currently supported in the selected language of an extension."; - codes["ExtensionSettingErrorReason.INVALID_DEVICE_PREFERENCE"] = "Unknown or unsupported device preference."; - codes["ExtensionSettingErrorReason.INVALID_SCHEDULE_END"] = "Invalid feed item schedule end time (i.e., endHour = 24 and endMinute != 0)."; - codes["ExtensionSettingErrorReason.DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE"] = "Date time zone does not match the account's time zone."; - codes["ExtensionSettingErrorReason.OVERLAPPING_SCHEDULES"] = "Overlapping feed item schedule times (e.g., 7-10AM and 8-11AM) are not allowed."; - codes["ExtensionSettingErrorReason.SCHEDULE_END_NOT_AFTER_START"] = "Feed item schedule end time must be after start time."; - codes["ExtensionSettingErrorReason.TOO_MANY_SCHEDULES_PER_DAY"] = "There are too many feed item schedules per day."; - codes["ExtensionSettingErrorReason.DUPLICATE_EXTENSION_FEED_ITEM_EDIT"] = "Cannot edit the same extension feed item id twice."; - codes["ExtensionSettingErrorReason.INVALID_SNIPPETS_HEADER"] = "Invalid structured snippet header."; - codes["ExtensionSettingErrorReason.PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY"] = "Phone number not supported with call tracking enabled for country."; - codes["ExtensionSettingErrorReason.CAMPAIGN_TARGETING_MISMATCH"] = "Targeted adgroup's campaign does not match the targeted campaign."; - codes["ExtensionSettingErrorReason.CANNOT_OPERATE_ON_DELETED_FEED"] = "The feed used by the ExtensionSetting is deleted and cannot be operated on. Remove the ExtensionSetting to allow a new one to be created using an active feed."; - codes["ExtensionSettingErrorReason.CONCRETE_EXTENSION_TYPE_REQUIRED"] = "Concrete sub type of ExtensionFeedItem is required for this operation."; - codes["ExtensionSettingErrorReason.INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION"] = "The matching function that links the extension feed to the customer, campaign, or ad group is not compatible with the ExtensionSetting services."; - codes["ExtensionSettingErrorReason.START_DATE_AFTER_END_DATE"] = ""; - codes["ExtensionSettingErrorReason.INVALID_PRICE_FORMAT"] = ""; - codes["ExtensionSettingErrorReason.PROMOTION_INVALID_TIME"] = ""; - codes["ExtensionSettingErrorReason.PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF"] = ""; - codes["ExtensionSettingErrorReason.PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT"] = ""; - codes["ExtensionSettingErrorReason.TOO_MANY_DECIMAL_PLACES_SPECIFIED"] = ""; - codes["ExtensionSettingErrorReason.INVALID_LANGUAGE_CODE"] = "The language code is not valid."; - codes["ExtensionSettingErrorReason.UNSUPPORTED_LANGUAGE"] = "The language is not supported."; - codes["ExtensionSettingErrorReason.UNKNOWN"] = ""; - codes["DraftErrorReason.CANNOT_CHANGE_ARCHIVED_DRAFT"] = "The draft is archived and cannot be modified further."; - codes["DraftErrorReason.CANNOT_CHANGE_PROMOTED_DRAFT"] = "The draft has been promoted and cannot be modified further."; - codes["DraftErrorReason.CANNOT_CHANGE_PROMOTE_FAILED_DRAFT"] = "The draft has failed to be promoted and cannot be modified further."; - codes["DraftErrorReason.CUSTOMER_CANNOT_CREATE_DRAFT"] = "This customer is not allowed to create drafts."; - codes["DraftErrorReason.CAMPAIGN_CANNOT_CREATE_DRAFT"] = "This campaign is not allowed to create drafts."; - codes["DraftErrorReason.DUPLICATE_DRAFT_NAME"] = "A draft with this name already exists."; - codes["DraftErrorReason.INVALID_DRAFT_CHANGE"] = "This modification cannot be made on a draft."; - codes["DraftErrorReason.INVALID_STATUS_TRANSITION"] = "The draft cannot be transitioned to the specified status from the its current status."; - codes["DraftErrorReason.MAX_NUMBER_OF_DRAFTS_PER_CAMPAIGN_REACHED"] = "The campaign has reached the maximum number of drafts that can be created for a campaign throughout its lifetime. No additional drafts can be created for this campaign. Archived drafts also count towards this limit."; - codes["DraftErrorReason.DRAFT_ERROR"] = ""; - codes["CampaignPreferenceErrorReason.PREFERENCE_ALREADY_EXISTS"] = "A campaign cannot have two preferences with the same preference key."; - codes["CampaignPreferenceErrorReason.PREFERENCE_NOT_FOUND"] = "No preference matched the given preference key."; - codes["CampaignPreferenceErrorReason.UNKNOWN"] = ""; - codes["TrialErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["TrialErrorReason.INVALID_STATUS_TRANSITION"] = "Trial status cannot be updated from the current status to the requested target status."; - codes["TrialErrorReason.CANNOT_USE_TRIAL_WITH_SHARED_BUDGET"] = "Cannot create a trial from a campaign using an explicitly shared budget."; - codes["TrialErrorReason.CANNOT_CREATE_TRIAL_WHEN_CAMPAIGN_HAS_ACTIVE_EXPERIMENTS"] = "Cannot create a trial as long as the campaign has a running or scheduled Advertiser Campaign Experiment."; - codes["TrialErrorReason.CANNOT_CREATE_TRIAL_FOR_DELETED_BASE_CAMPAIGN"] = "Cannot create a trial for a base campaign, which is deleted."; - codes["TrialErrorReason.CANNOT_CREATE_TRIAL_FOR_NON_PROPOSED_DRAFT"] = "Cannot create a trial from a draft, which has a status other than proposed."; - codes["TrialErrorReason.CUSTOMER_CANNOT_CREATE_TRIAL"] = "This customer is not allowed to create a trial."; - codes["TrialErrorReason.CAMPAIGN_CANNOT_CREATE_TRIAL"] = "This campaign is not allowed to create a trial."; - codes["TrialErrorReason.NAME_ALREADY_IN_USE"] = "Trying to use a trial name which is already assigned to another campaign or trial."; - codes["TrialErrorReason.TRIAL_DURATIONS_MUST_NOT_OVERLAP"] = "Trying to set a trial duration which overlaps with another trial."; - codes["TrialErrorReason.TRIAL_DURATION_MUST_BE_WITHIN_CAMPAIGN_DURATION"] = "All non-archived trials must start and end within their campaign's duration."; - codes["TaskExecutionErrorReason.TEMP_ID_ALREADY_USED"] = ""; - codes["OfflineConversionAdjustmentErrorReason.RETRACTION_WITH_VALUE_OR_CURRENCY"] = "The retraction incorrectly contains adjusted value or currency. Retractions are intended to nullify conversions and thus should not have an adjusted value or currency."; - codes["OfflineConversionAdjustmentErrorReason.RESTATEMENT_WITHOUT_VALUE"] = "The restatement does not contain an adjusted value."; - codes["OfflineConversionAdjustmentErrorReason.FUTURE_CONVERSION_TIME"] = "This conversion time is in the future. This only occurs when the advertiser is reporting adjustments using gclid and conversion time instead of using order id."; - codes["OfflineConversionAdjustmentErrorReason.FUTURE_ADJUSTMENT_TIME"] = "This adjustment time is in the future."; - codes["OfflineConversionAdjustmentErrorReason.TOO_RECENT_CONVERSION_TYPE"] = "The adjustment's conversion type was created too recently."; - codes["OfflineConversionAdjustmentErrorReason.INVALID_CONVERSION_TYPE"] = "This uploading account does not have a conversion type that matches the conversion type of this adjustment."; - codes["OfflineConversionAdjustmentErrorReason.CONVERSION_ALREADY_CANCELED"] = "A retraction with a different adjustment occurrence timestamp was found for this conversion."; - codes["OfflineConversionAdjustmentErrorReason.CONVERSION_NOT_FOUND"] = "A conversion for the given (order id, conversion name) or (gclid, conversion occurrence time, conversion name) could not be found."; - codes["OfflineConversionAdjustmentErrorReason.CONVERSION_EXPIRED"] = "An expired conversion was found for the given (order id, conversion name) or (gclid, conversion occurrence time, conversion name). Conversions expire after 90 days, after which adjustments cannot be reported against them."; - codes["OfflineConversionAdjustmentErrorReason.ADJUSTMENT_PRECEDES_CONVERSION"] = "The given adjustment occurrence time precedes that of the original conversion."; - codes["OfflineConversionAdjustmentErrorReason.MORE_RECENT_RESTATEMENT_FOUND"] = "A restatement was found with a more recent adjustment occurrence timestamp for the same conversion."; - codes["OfflineConversionAdjustmentErrorReason.ATTRIBUTED_CONVERSION_NOT_SUPPORTED"] = "Adjustments are currently not supported for attributed conversions."; - codes["OfflineConversionAdjustmentErrorReason.TOO_RECENT_CONVERSION"] = "The conversion was created too recently."; - codes["OfflineConversionAdjustmentErrorReason.INVALID_ORDER_ID"] = "A conversion associated with this order id cannot be adjusted because the order id is less than 2 characters or is a static value like \"order_id\" or \"undefined\"."; - codes["OfflineConversionAdjustmentErrorReason.CANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE"] = "Restatements cannot be reported for a conversion action that always uses the default value."; - codes["OfflineConversionAdjustmentErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["MediaUploadErrorReason.UNKNOWN"] = ""; - codes["MediaUploadErrorReason.FILE_TOO_BIG"] = "File is too big."; - codes["MediaUploadErrorReason.INVALID_IMAGE"] = "Image data is unrecognizable."; - codes["MediaUploadErrorReason.ANIMATED_NOT_ALLOWED"] = "Animated is not allowed."; - codes["MediaUploadErrorReason.SERVER_ERROR"] = "Server error when uploading media bytes."; - codes["AdCampaignAdSubProductTypeErrorReason.INVALID_AD_SUB_PRODUCT_TYPE"] = "AdSubProductType is not allowed to be set to given value."; - codes["AdCampaignAdSubProductTypeErrorReason.CANNOT_CHANGE_AD_SUB_PRODUCT_TYPE"] = "Cannot change creative AdSubProduct type since it is not AD_VARIATIONS."; - codes["AdCampaignAdSubProductTypeErrorReason.UNKNOWN"] = "An unexpected or unknown error occurred."; - codes["CustomAffinityErrorReason.NAME_ALREADY_USED"] = "Duplicated name ignoring cases."; - codes["CustomAffinityErrorReason.CUSTOM_AFFINITY_TOKEN_ID_AND_TYPE_PARAMETER_NOT_PRESENT_IN_REMOVE"] = "In remove custom affinity token operation, both token ID and pair [type, parameter] are not present."; - codes["CustomAffinityErrorReason.TYPE_AND_PARAMETER_NOT_FOUND"] = "The pair of [type, parameter] does not exist."; - codes["CustomAffinityErrorReason.TYPE_AND_PARAMETER_ALREADY_EXISTED"] = "The pair of [type, parameter] already exists."; - codes["CustomAffinityErrorReason.INVALID_CUSTOM_AFFINITY_TOKEN_TYPE"] = "Unsupported custom affinity token type."; - codes["CustomAffinityErrorReason.CANNOT_REMOVE_WHILE_IN_USE"] = "Cannot remove a custom affinity while it's still being used as targeting."; - codes["CustomAffinityErrorReason.FIELD_MUTATE_OPERATOR_FOR_TOKENS_IS_NOT_SUPPORTED"] = "Field mutate operator for tokens is not supported."; - codes["CustomAffinityErrorReason.READ_ONLY_ENTITY"] = "Read only entities are not editable."; - codes["CustomAffinityErrorReason.CANNOT_CHANGE_TYPE"] = "Cannot change custom affinity type."; - codes["CustomAffinityErrorReason.CUSTOM_AFFINITY_SERVICE_ERROR"] = "Default generic error."; - codes["AdParamErrorReason.AD_PARAM_CANNOT_BE_SPECIFIED_MULTIPLE_TIMES"] = "The same ad param cannot be specified in multiple operations"; - codes["AdParamErrorReason.AD_PARAM_DOES_NOT_EXIST"] = "Specified AdParam does not exist"; - codes["AdParamErrorReason.CRITERION_SPECIFIED_MUST_BE_KEYWORD"] = "Specified criterion is not a keyword"; - codes["AdParamErrorReason.INVALID_ADGROUP_CRITERION_SPECIFIED"] = "The (AdGroupId,CriterionId) is invalid"; - codes["AdParamErrorReason.INVALID_INSERTION_TEXT_FORMAT"] = "The insertion text is invalid"; - codes["AdParamErrorReason.MUST_SPECIFY_ADGROUP_ID"] = "Must specify AdGroupId in selector"; - codes["AdParamErrorReason.UNKNOWN"] = "Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version."; - codes["BatchJobProcessingErrorReason.UNKNOWN"] = ""; - codes["BatchJobProcessingErrorReason.INPUT_FILE_CORRUPTION"] = "The input file was corrupted."; - codes["BatchJobProcessingErrorReason.INTERNAL_ERROR"] = "An internal API error occurred while processing the batch."; - codes["BatchJobProcessingErrorReason.DEADLINE_EXCEEDED"] = "Unable to complete a batch in the allotted time."; - codes["BatchJobProcessingErrorReason.FILE_FORMAT_ERROR"] = "The input file had a format error."; - codes["BatchJobErrorReason.UNKNOWN"] = ""; - codes["BatchJobErrorReason.DISK_QUOTA_EXCEEDED"] = "The user exceeded allowed disk quota for in-flight jobs."; - codes["BatchJobErrorReason.FAILED_TO_CREATE_JOB"] = "An internal error resulted in a failure to create the job."; - codes["BatchJobErrorReason.INVALID_STATE_CHANGE"] = "The requested state change was invalid."; - codes["BiddingStrategyErrorReason.DUPLICATE_NAME"] = "Each bidding strategy must have a unique name."; - codes["BiddingStrategyErrorReason.CANNOT_CHANGE_BIDDING_STRATEGY_TYPE"] = "Bidding strategy type is immutable."; - codes["BiddingStrategyErrorReason.CANNOT_REMOVE_ASSOCIATED_STRATEGY"] = "Only bidding strategies not linked to campaigns, adgroups or adgroup criteria can be removed."; - codes["BiddingStrategyErrorReason.BIDDING_STRATEGY_NOT_SUPPORTED"] = "The specified bidding strategy is not supported."; - codes["BiddingStrategyErrorReason.UNKNOWN"] = ""; - codes["CustomerOrderLineErrorReason.INVALID_ORDER_LINE_ID"] = "Order Line Id does not exist."; - codes["CustomerOrderLineErrorReason.END_DATE_BEFORE_START_DATE"] = "End date must be later than start date"; - codes["CustomerOrderLineErrorReason.CREATE_IN_PAST"] = "Cannot create order line with start date in the past"; - codes["CustomerOrderLineErrorReason.ALREADY_STARTED"] = "Cannot change start date after the order line has started"; - codes["CustomerOrderLineErrorReason.ALREADY_SPENT"] = "Cannot set spending limit below what has already been spent"; - codes["CustomerOrderLineErrorReason.FINISHED_IN_THE_PAST"] = "Cannot move end date into the past"; - codes["CustomerOrderLineErrorReason.OVERLAP_DATE_RANGE"] = "Cannot make overlapping order lines."; - codes["CustomerOrderLineErrorReason.END_DATE_PAST_MAX"] = "Cannot set contract start date to be after actual start date"; - codes["CustomerOrderLineErrorReason.PARENT_IS_SELF"] = "only cancelled order lines may have themselves as parent"; - codes["CustomerOrderLineErrorReason.CANNOT_CANCEL_STARTED"] = "Cannot cancel started order line"; - codes["CustomerOrderLineErrorReason.ORDERLINE_BEING_MODIFIED_IS_NOT_NORMAL_OR_PENDING"] = "Only Order lines in normal or pending state can be modified."; - codes["CustomerOrderLineErrorReason.MORE_THAN_ONE_OPERATION_NOT_PERMITTED"] = "More than one operation not permitted per call."; - codes["CustomerOrderLineErrorReason.INVALID_TIMEZONE_IN_DATE_RANGES"] = "StartDate and EndDate should pass in the customer's account timeZone."; - codes["CustomerOrderLineErrorReason.UNKNOWN"] = ""; - codes["BudgetOrderErrorReason.BUDGET_APPROVAL_IN_PROGRESS"] = "Existing pending request is being approved."; - codes["BudgetOrderErrorReason.SERVICE_UNAVAILABLE"] = "A server backend was not available."; - codes["BudgetOrderErrorReason.INVALID_BILLING_ACCOUNT"] = "The billing account was invalid."; - codes["BudgetOrderErrorReason.GENERIC_BILLING_ERROR"] = "Unspecified billing service error."; - codes["BudgetOrderErrorReason.INVALID_BILLING_ACCOUNT_ID_FORMAT"] = "The billing account ID format was invalid."; - codes["BudgetOrderErrorReason.INVALID_BUDGET_DATE_RANGE"] = "Budget date range was invalid."; - codes["BudgetOrderErrorReason.BUDGET_UPDATE_DENIED"] = "User does not have permission to update this budget."; - codes["BudgetOrderErrorReason.BUDGET_ALREADY_STARTED"] = "User attempted to cancel a started budget."; - codes["BudgetOrderErrorReason.BUDGET_ALREADY_ENDED"] = "User attempted to change an ended budget."; - codes["BudgetOrderErrorReason.INVALID_CONSTRAINT"] = "Invalid amount, start date or end date specified."; - codes["BudgetOrderErrorReason.INVALID_BID_TOO_LARGE"] = "The bid is too high."; - codes["BudgetOrderErrorReason.NO_SUCH_BUDGET_FOUND"] = "Budget was not found."; - codes["BudgetOrderErrorReason.INVALID_BUDGET_ALREADY_SPENT"] = "The budget cannot be lowered below the amount which has already been spent."; - codes["BudgetOrderErrorReason.INVALID_TIMEZONE_IN_DATE"] = "Time zone from user input is different from user's account time zone."; - codes["BudgetOrderErrorReason.ACCOUNT_BUDGET_ID_SET_IN_ADD"] = "The BudgetOrder's ID was set in an add operation."; - codes["BudgetOrderErrorReason.MORE_THAN_ONE_OPERATIONS"] = "We don't support more than one operation per mutate call."; - codes["BudgetOrderErrorReason.INVALID_MANAGER_ACCOUNT"] = "Manager account not found."; - codes["BudgetOrderErrorReason.UNKNOWN"] = ""; - } - - /// - /// Looks up an error description by code. - /// - /// The error code. - /// The error description, or the key if no description can be found. - public static string Lookup(string key) - { - return CollectionUtilities.TryGetValue(codes, key, key.ToString()); - } - } -} -#pragma warning restore 1591 diff --git a/src/AdWords/v201806/AdWordsServiceV201806.cs b/src/AdWords/v201806/AdWordsServiceV201806.cs deleted file mode 100755 index 66aff8139f9..00000000000 --- a/src/AdWords/v201806/AdWordsServiceV201806.cs +++ /dev/null @@ -1,550 +0,0 @@ -// Copyright 2018 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.Api.Ads.Common.Lib; - -using System; - -namespace Google.Api.Ads.AdWords.Lib -{ - /// - /// Lists all the services available through this library. - /// - public partial class AdWordsService : AdsService - { - /// - /// All the services available in v201806. - /// - public class v201806 - { - #region Campaign Management. - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdGroupAdService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdGroupBidModifierService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdGroupCriterionService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdGroupFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdGroupService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdParamService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AssetService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature BatchJobService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature BiddingStrategyService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature BudgetService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignCriterionService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignBidModifierService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignGroupService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignGroupPerformanceTargetService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignSharedSetService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature ConstantDataService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature ConversionTrackerService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CustomerFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CustomerNegativeCriterionService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature DataService; - - /// - /// Factory type for v201806 services. - /// - public static readonly Type factoryType = typeof(AdWordsServiceFactory); - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature FeedItemService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature FeedMappingService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature FeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature FeedItemTargetService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature LabelService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AccountLabelService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature LocationCriterionService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature MediaService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature OfflineConversionFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature OfflineCallConversionFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature ReportDefinitionService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature SharedCriterionService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature SharedSetService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature DraftService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature DraftAsyncErrorService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature OfflineConversionAdjustmentFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature TrialService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature TrialAsyncErrorService; - - #endregion - - #region Billing. - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature BudgetOrderService; - - #endregion - - #region Remarketing. - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdwordsUserListService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature OfflineDataUploadService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CustomAffinityService; - - #endregion - - #region Optimization - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature TargetingIdeaService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature TrafficEstimatorService; - - #endregion - - #region Account Management. - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CustomerService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature ManagedCustomerService; - - #endregion - - #region Change history. - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CustomerSyncService; - - #endregion - - #region Extension setting - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdCustomizerFeedService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature AdGroupExtensionSettingService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CampaignExtensionSettingService; - - /// - /// See - /// this page for details. - /// - public static readonly ServiceSignature CustomerExtensionSettingService; - - #endregion - - /// - /// Static constructor to initialize the service constants. - /// - static v201806() - { - #region Campaign Management. - - AdGroupAdService = - AdWordsService.MakeServiceSignature("v201806", "cm", "AdGroupAdService"); - AdGroupBidModifierService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "AdGroupBidModifierService"); - AdGroupCriterionService = - AdWordsService.MakeServiceSignature("v201806", "cm", "AdGroupCriterionService"); - AdGroupFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", "AdGroupFeedService"); - AdGroupService = - AdWordsService.MakeServiceSignature("v201806", "cm", "AdGroupService"); - AssetService = AdWordsService.MakeServiceSignature("v201806", "cm", "AssetService"); - AdService = AdWordsService.MakeServiceSignature("v201806", "cm", "AdService"); - AdParamService = - AdWordsService.MakeServiceSignature("v201806", "cm", "AdParamService"); - BatchJobService = - AdWordsService.MakeServiceSignature("v201806", "cm", "BatchJobService"); - BiddingStrategyService = - AdWordsService.MakeServiceSignature("v201806", "cm", "BiddingStrategyService"); - BudgetService = - AdWordsService.MakeServiceSignature("v201806", "cm", "BudgetService"); - CampaignCriterionService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CampaignCriterionService"); - CampaignFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", "CampaignFeedService"); - CampaignService = - AdWordsService.MakeServiceSignature("v201806", "cm", "CampaignService"); - CampaignBidModifierService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CampaignBidModifierService"); - CampaignGroupService = - AdWordsService.MakeServiceSignature("v201806", "cm", "CampaignGroupService"); - CampaignGroupPerformanceTargetService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CampaignGroupPerformanceTargetService"); - CampaignSharedSetService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CampaignSharedSetService"); - ConstantDataService = - AdWordsService.MakeServiceSignature("v201806", "cm", "ConstantDataService"); - ConversionTrackerService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "ConversionTrackerService"); - CustomerNegativeCriterionService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CustomerNegativeCriterionService"); - CustomerFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", "CustomerFeedService"); - DataService = AdWordsService.MakeServiceSignature("v201806", "cm", "DataService"); - FeedItemService = - AdWordsService.MakeServiceSignature("v201806", "cm", "FeedItemService"); - FeedMappingService = - AdWordsService.MakeServiceSignature("v201806", "cm", "FeedMappingService"); - FeedService = AdWordsService.MakeServiceSignature("v201806", "cm", "FeedService"); - FeedItemTargetService = - AdWordsService.MakeServiceSignature("v201806", "cm", "FeedItemTargetService"); - LabelService = AdWordsService.MakeServiceSignature("v201806", "cm", "LabelService"); - LocationCriterionService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "LocationCriterionService"); - MediaService = AdWordsService.MakeServiceSignature("v201806", "cm", "MediaService"); - OfflineConversionAdjustmentFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "OfflineConversionAdjustmentFeedService"); - OfflineConversionFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "OfflineConversionFeedService"); - OfflineCallConversionFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "OfflineCallConversionFeedService"); - ReportDefinitionService = - AdWordsService.MakeServiceSignature("v201806", "cm", "ReportDefinitionService"); - SharedCriterionService = - AdWordsService.MakeServiceSignature("v201806", "cm", "SharedCriterionService"); - SharedSetService = - AdWordsService.MakeServiceSignature("v201806", "cm", "SharedSetService"); - - DraftService = AdWordsService.MakeServiceSignature("v201806", "cm", "DraftService"); - DraftAsyncErrorService = - AdWordsService.MakeServiceSignature("v201806", "cm", "DraftAsyncErrorService"); - TrialService = AdWordsService.MakeServiceSignature("v201806", "cm", "TrialService"); - TrialAsyncErrorService = - AdWordsService.MakeServiceSignature("v201806", "cm", "TrialAsyncErrorService"); - - #endregion - - #region Blling. - - BudgetOrderService = - AdWordsService.MakeServiceSignature("v201806", "billing", "BudgetOrderService"); - - #endregion - - #region Remarketing. - - AdwordsUserListService = - AdWordsService.MakeServiceSignature("v201806", "rm", "AdwordsUserListService"); - - OfflineDataUploadService = - AdWordsService.MakeServiceSignature("v201806", "rm", - "OfflineDataUploadService"); - - CustomAffinityService = - AdWordsService.MakeServiceSignature("v201806", "rm", "CustomAffinityService"); - - #endregion - - #region Optimization. - - TargetingIdeaService = - AdWordsService.MakeServiceSignature("v201806", "o", "TargetingIdeaService"); - TrafficEstimatorService = - AdWordsService.MakeServiceSignature("v201806", "o", "TrafficEstimatorService"); - - #endregion - - #region Change History. - - CustomerSyncService = - AdWordsService.MakeServiceSignature("v201806", "ch", "CustomerSyncService"); - - #endregion - - #region Account Management. - - AccountLabelService = - AdWordsService.MakeServiceSignature("v201806", "mcm", "AccountLabelService"); - - CustomerService = - AdWordsService.MakeServiceSignature("v201806", "mcm", "CustomerService"); - ManagedCustomerService = - AdWordsService.MakeServiceSignature("v201806", "mcm", "ManagedCustomerService"); - - #endregion - - #region Extension setting - - AdCustomizerFeedService = - AdWordsService.MakeServiceSignature("v201806", "cm", "AdCustomizerFeedService"); - AdGroupExtensionSettingService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "AdGroupExtensionSettingService"); - - CampaignExtensionSettingService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CampaignExtensionSettingService"); - CustomerExtensionSettingService = - AdWordsService.MakeServiceSignature("v201806", "cm", - "CustomerExtensionSettingService"); - - #endregion - } - } - } -} diff --git a/src/AdWords/v201806/ApiError.cs b/src/AdWords/v201806/ApiError.cs deleted file mode 100755 index 8e97b655fa7..00000000000 --- a/src/AdWords/v201806/ApiError.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2018 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.Reflection; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// The API error base class that provides details about an error that - /// occurred while processing a service request.

The OGNL field path is - /// provided for parsers to identify the request data element that may have - /// caused the error.

- ///
- public partial class ApiError - { - /// - /// Gets the index of the operation. - /// - /// Index of the operation that caused this error, or -1 if - /// the index cannot be determined. - public int GetOperationIndex() - { - return GetFieldPathIndex("operations"); - } - - /// - /// Gets the index of a field in a field path expression. - /// - /// Name of the field to search for. - /// Index of the field name in the field path, or -1 if - /// the index cannot be determined. - public int GetFieldPathIndex(string field) - { - if (this.fieldPathElements != null) - { - foreach (FieldPathElement element in this.fieldPathElements) - { - if (string.Compare(element.field, field) == 0 && element.indexSpecified) - { - return element.index; - } - } - } - - return -1; - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - PropertyInfo propertyInfo = this.GetType().GetProperty("reason"); - if (propertyInfo != null) - { - string propertyName = propertyInfo.PropertyType.Name; - string propertyValue = propertyInfo.GetValue(this, null).ToString(); - string key = propertyName + "." + propertyValue; - string description = ErrorDescriptions.Lookup(key); - return string.Format("{0}. (Error: {1}.{2}, FieldPath: {3}, Trigger: {4})", - description, this.GetType().Name, propertyValue, this.fieldPath, this.trigger); - } - - return base.ToString(); - } - } -} diff --git a/src/AdWords/v201806/ApiException.cs b/src/AdWords/v201806/ApiException.cs deleted file mode 100755 index 00605cef7c7..00000000000 --- a/src/AdWords/v201806/ApiException.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2018 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.Collections.Generic; -using System.Linq; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// Exception class for holding a list of service errors. - /// - public partial class ApiException - { - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - if (this.errors == null || this.errors.Length == 0) - { - return base.ToString(); - } - else - { - return string.Join("\n", errors); - } - } - - /// - /// Gets all errors of a given type. - /// - /// The error type to get. - /// A list of errors of specified type. - public List GetAllErrorsByType() where T : ApiError - { - return new List(this.errors.Where(x => x is T).Cast()); - } - } -} diff --git a/src/AdWords/v201806/BatchJobApi.cs b/src/AdWords/v201806/BatchJobApi.cs deleted file mode 100755 index fa214a7d9e9..00000000000 --- a/src/AdWords/v201806/BatchJobApi.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2018 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.ComponentModel; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// Represents a request that wraps the operations sent to a batch job. - /// - [System.Xml.Serialization.XmlTypeAttribute( - Namespace = "https://adwords.google.com/api/adwords/cm/v201806", TypeName = "mutate")] - public class BatchJobMutateRequest - { - private Operation[] operationsField; - - /// - /// Gets or sets the operations. - /// - [System.Xml.Serialization.XmlElementAttribute("operations")] - public Operation[] operations - { - get { return operationsField; } - set { operationsField = value; } - } - } - - /// - /// Represents the SOAP envelope node that wraps a mutate response from a - /// batch job. - /// - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "root")] - public class BatchJobMutateResponseEnvelope - { - BatchJobMutateResponse mutateResponseField; - - /// - /// Gets or sets the mutate response. - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = - "https://adwords.google.com/api/adwords/cm/v201806")] - public BatchJobMutateResponse mutateResponse - { - get { return mutateResponseField; } - set { mutateResponseField = value; } - } - } - - /// - /// Represents a mutate response from a batch job. - /// - public class BatchJobMutateResponse - { - private MutateResult[] rvalField; - - /// - /// Gets or sets the mutate results. - /// - [System.Xml.Serialization.XmlElementAttribute("rval")] - public MutateResult[] rval - { - get { return rvalField; } - set { rvalField = value; } - } - } - - /// - /// The list of API errors. - /// - public class ErrorList - { - private ApiError[] errorsField; - - /// - /// Gets or sets the errors. - /// - [System.Xml.Serialization.XmlElementAttribute("errors")] - public ApiError[] errors - { - get { return errorsField; } - set { errorsField = value; } - } - } -} diff --git a/src/AdWords/v201806/FeedValidationErrors.cs b/src/AdWords/v201806/FeedValidationErrors.cs deleted file mode 100755 index 1a431cb2687..00000000000 --- a/src/AdWords/v201806/FeedValidationErrors.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2018 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.Api.Ads.Common.Util; - -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// A class to lookup human-friendly descriptions for feed validation errors. - /// - public class FeedValidationErrors - { - /// - /// A dictionary to hold the error messages. - /// - private static readonly Dictionary codes; - - /// - /// Static constructor to initialize the error lookup dictionary. - /// - static FeedValidationErrors() - { - codes = new Dictionary(); - codes[-1] = "UNDEFINED ERROR"; - codes[1] = "STRING TOO SHORT"; - codes[2] = "STRING TOO LONG"; - codes[3] = "INVALID DESTINATION URL"; - codes[4] = "VALUE NOT SPECIFIED"; - codes[5] = "INVALID DOMESTIC PHONE NUMBER FORMAT"; - codes[6] = "INVALID PHONE NUMBER"; - codes[7] = "PHONE NUMBER NOT SUPPORTED FOR COUNTRY"; - codes[8] = "PREMIUM RATE NUMBER NOT ALLOWED"; - codes[9] = "DISALLOWED NUMBER TYPE"; - codes[10] = "VALUE OUT OF RANGE"; - codes[11] = "CALLTRACKING NOT SUPPORTED FOR COUNTRY"; - codes[12] = "CUSTOMER NOT WHITELISTED FOR CALLTRACKING"; - codes[13] = "INVALID COUNTRY CODE"; - codes[14] = "INVALID APP ID"; - codes[15] = "MISSING ATTRIBUTES FOR FIELDS"; - codes[16] = "INVALID TYPE ID"; - codes[17] = "INVALID EMAIL ADDRESS"; - codes[18] = "INVALID HTTPS URL"; - codes[19] = "MISSING DELIVERY ADDRESS"; - codes[26] = "START DATE AFTER END DATE"; - codes[28] = "MISSING FEED ITEM START TIME"; - codes[29] = "MISSING FEED ITEM END TIME"; - codes[31] = "MISSING FEED ITEM ID"; - codes[35] = "VANITY PHONE NUMBER NOT ALLOWED"; - codes[36] = "INVALID REVIEW EXTENSION SNIPPET"; - codes[37] = "INVALID NUMBER FORMAT"; - codes[38] = "INVALID DATE FORMAT"; - codes[39] = "INVALID PRICE FORMAT"; - codes[40] = "UNKNOWN PLACEHOLDER FIELD"; - codes[41] = "MISSING ENHANCED SITELINK DESCRIPTION LINE"; - codes[42] = "REVIEW EXTENSION SOURCE INELIGIBLE"; - codes[43] = "HYPHENS IN REVIEW EXTENSION SNIPPET"; - codes[44] = "DOUBLE QUOTES IN REVIEW EXTENSION SNIPPET"; - codes[45] = "QUOTES IN REVIEW EXTENSION SNIPPET"; - codes[46] = "INVALID FORM ENCODED PARAMS"; - codes[47] = "INVALID URL PARAMETER NAME"; - codes[48] = "NO GEOCODING RESULT"; - codes[49] = "SOURCE NAME IN REVIEW EXTENSION TEXT"; - codes[50] = "CARRIER SPECIFIC SHORT NUMBER NOT ALLOWED"; - codes[51] = "INVALID PLACEHOLDER FIELD ID"; - codes[52] = "INVALID URL TAG"; - codes[53] = "LIST TOO LONG"; - codes[54] = "INVALID ATTRIBUTES COMBINATION"; - codes[55] = "DUPLICATE VALUES"; - codes[56] = "INVALID CALL CONVERSION TYPE ID"; - codes[57] = "CANNOT SET WITHOUT FINAL URLS"; - codes[58] = "CANNOT SET WITH FINAL URLS"; - } - - /// - /// Looks up an error description by code. - /// - /// The error code. - /// The error description, or the key if no description can be found. - public static string Lookup(int key) - { - return CollectionUtilities.TryGetValue(codes, key, key.ToString()); - } - } -} diff --git a/src/AdWords/v201806/MapEntries.cs b/src/AdWords/v201806/MapEntries.cs deleted file mode 100755 index 82b79e4993f..00000000000 --- a/src/AdWords/v201806/MapEntries.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util; - -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.v201806 -{ - public partial class String_StringMapEntry : IMapEntry - { - } - - public partial class Media_Size_DimensionsMapEntry : IMapEntry - { - } - - public partial class Media_Size_StringMapEntry : IMapEntry - { - } - - public partial class Type_AttributeMapEntry : IMapEntry - { - } - - /// - /// A class to hold extension methods to convert MapEntry arrays into dictionary. - /// - public static class MapEntryExtensions - { - /// - /// Converts an array of IMapEntry" objects into a dictionary. - /// - /// The type of the key. - /// The type of the value. - /// The array of IMapEntry" objects to be - /// converted into a Dictionary. - /// The converted dictionary. - /// Use this method only when you can't use the equivalent extension - /// method due to a framework limitation (e.g. Mono's VBNC compiler). - public static Dictionary ToDict(IMapEntry[] array) - { - return new MapUtilities().AddEntries(array).AsDict(); - } - - /// - /// Converts an array of objects into a dictionary. - /// - /// The array of objects to be - /// converted into a Dictionary. - /// The converted dictionary. - public static Dictionary ToDict(this String_StringMapEntry[] array) - { - return new MapUtilities().AddEntries(array).AsDict(); - } - - /// - /// Converts an array of objects into - /// a dictionary. - /// - /// The array of objects - /// to be converted into a Dictionary. - /// The converted dictionary. - public static Dictionary ToDict( - this Media_Size_DimensionsMapEntry[] array) - { - return new MapUtilities().AddEntries(array).AsDict(); - } - - /// - /// Converts an array of objects into - /// a dictionary. - /// - /// The array of objects - /// to be converted into a Dictionary. - /// The converted dictionary. - public static Dictionary ToDict(this Media_Size_StringMapEntry[] array) - { - return new MapUtilities().AddEntries(array).AsDict(); - } - - /// - /// Converts an array of objects into - /// a dictionary. - /// - /// The array of objects - /// to be converted into a Dictionary. - /// The converted dictionary. - public static Dictionary ToDict( - this Type_AttributeMapEntry[] array) - { - return new MapUtilities().AddEntries(array).AsDict(); - } - } -} diff --git a/src/AdWords/v201806/OrderBy.cs b/src/AdWords/v201806/OrderBy.cs deleted file mode 100755 index 8662f0af00a..00000000000 --- a/src/AdWords/v201806/OrderBy.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2018 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.Api.Ads.Common.Logging; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// Specifies how the resulting information should be sorted. - /// - public partial class OrderBy - { - /// - /// The registry for saving feature usage information.. - /// - private static readonly AdsFeatureUsageRegistry featureUsageRegistry = - AdsFeatureUsageRegistry.Instance; - - /// - /// The feature ID for this class. - /// - private const AdsFeatureUsageRegistry.Features FEATURE_ID = - AdsFeatureUsageRegistry.Features.SelectorBuilder; - - /// - /// Creates an ascending sorting order to be used with a selector. - /// - /// The field to sort on. - /// A new object that sorts the result in - /// ascending order by value. - public static OrderBy Asc(string field) - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - return new OrderBy() - { - field = field, - sortOrder = SortOrder.ASCENDING - }; - } - - /// - /// Creates a descending sorting order to be used with a selector. - /// - /// The field to sort on. - /// A new object that sorts the result in - /// descending order by value. - public static OrderBy Desc(string field) - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - ; - - return new OrderBy() - { - field = field, - sortOrder = SortOrder.DESCENDING - }; - } - - /// - /// Gets the sort order clause when used in AWQL. - /// - /// The sort order clause for AWQL. - private string GetSortOrderForQuery() - { - switch (sortOrder) - { - case SortOrder.ASCENDING: - return "ASC"; - - case SortOrder.DESCENDING: - return "DESC"; - - default: - return ""; - } - } - - /// - /// Returns a string that represents this instance. - /// - /// - /// A string that represents this instance. - /// - public override string ToString() - { - return string.Format("{0} {1}", field, GetSortOrderForQuery()); - } - } -} diff --git a/src/AdWords/v201806/Paging.cs b/src/AdWords/v201806/Paging.cs deleted file mode 100755 index b448ed9fd61..00000000000 --- a/src/AdWords/v201806/Paging.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2018 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.Api.Ads.Common.Logging; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// Specifies the page of results to return in the response. A page is - /// specified by the result position to start at and the maximum number of - /// results to return. - /// - public partial class Paging - { - /// - /// The feature ID for this class. - /// - private const AdsFeatureUsageRegistry.Features FEATURE_ID = - AdsFeatureUsageRegistry.Features.SelectorBuilder; - - /// - /// The registry for saving feature usage information.. - /// - private static readonly AdsFeatureUsageRegistry featureUsageRegistry = - AdsFeatureUsageRegistry.Instance; - - /// - /// The default page size. - /// - public const int DEFAULT_PAGE_SIZE = 500; - - /// - /// Gets the default instance. - /// - public static Paging Default - { - get - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - return new Paging() - { - startIndex = 0, - numberResults = DEFAULT_PAGE_SIZE - }; - } - } - - /// - /// Increases the offset by a given value. - /// - /// Size of the page. - public void IncreaseOffsetBy(int pageSize) - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - this.startIndex += pageSize; - } - - /// - /// Increases the offset by . - /// - public void IncreaseOffset() - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - ; - - this.startIndex += this.numberResults; - } - - /// - /// Returns a string that represents this instance. - /// - /// - /// A string that represents this instance. - /// - public override string ToString() - { - return string.Format("LIMIT {0}, {1}", startIndex, numberResults); - } - } -} diff --git a/src/AdWords/v201806/Predicate.cs b/src/AdWords/v201806/Predicate.cs deleted file mode 100755 index d2fd5c6ec84..00000000000 --- a/src/AdWords/v201806/Predicate.cs +++ /dev/null @@ -1,462 +0,0 @@ -// Copyright 2018 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.Api.Ads.Common.Logging; - -using System.Collections.Generic; -using System.Text; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// Specifies how an entity (eg. adgroup, campaign, criterion, ad) should be - /// filtered. - /// - public partial class Predicate - { - /// - /// The feature ID for this class. - /// - private const AdsFeatureUsageRegistry.Features FEATURE_ID = - AdsFeatureUsageRegistry.Features.SelectorBuilder; - - /// - /// The registry for saving feature usage information. - /// - private static readonly AdsFeatureUsageRegistry featureUsageRegistry = - AdsFeatureUsageRegistry.Instance; - - /// - /// Adds a filter to select only items where the value of - /// satisfies a particular condition. - /// - /// The field to filter on. - /// The predicate operator. - /// The predicate values. - /// A new object that filters by specified - /// conditions. - private static Predicate WithCondition(string field, PredicateOperator @operator, - string[] values) - { - // Mark the usage. - featureUsageRegistry.MarkUsage(FEATURE_ID); - - return new Predicate() - { - field = field, - @operator = @operator, - values = values - }; - } - - /// - /// Adds a filter to select only items where the value of - /// is equal to . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is equal to - /// - public static Predicate Equals(string field, long value) - { - return Equals(field, value.ToString()); - } - - /// - /// Adds a filter to select only items where the value of - /// is equal to . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is equal to - /// - public static Predicate Equals(string field, string value) - { - return WithCondition(field, PredicateOperator.EQUALS, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// is not equal to . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is not equal to - /// - public static Predicate NotEquals(string field, string value) - { - return WithCondition(field, PredicateOperator.NOT_EQUALS, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// is equal to one of the values provided in - /// . - /// - /// The field to filter on. - /// The predicate values. - /// A new object that filters only items - /// where the value of is equal to one of the - /// values provided in . - public static Predicate In(string field, List values) - { - return In(field, values.ToArray()); - } - - /// - /// Adds a filter to select only items where the value of - /// is equal of the values provided in - /// . - /// - /// The field to filter on. - /// The predicate values. - /// A new object that filters only items - /// where the value of is equal to one of the - /// values provided in . - public static Predicate In(string field, string[] values) - { - return WithCondition(field, PredicateOperator.IN, values); - } - - /// - /// Adds a filter to select only items where the value of - /// is not equal to any of the values provided - /// in . - /// - /// The field to filter on. - /// The predicate values. - /// A new object that filters only items - /// where the value of is not equal to any of the - /// values provided in . - public static Predicate NotIn(string field, string[] values) - { - return WithCondition(field, PredicateOperator.NOT_IN, values); - } - - /// - /// Adds a filter to select only items where the value of - /// is greater than . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is greater than - /// . - public static Predicate GreaterThan(string field, string value) - { - return WithCondition(field, PredicateOperator.GREATER_THAN, new string[] - { - value - }); - } - - /// - /// Adds a filter for items where is greater than - /// or equal to . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is greater than - /// or equal to . - public static Predicate GreaterThanEquals(string field, string value) - { - return WithCondition(field, PredicateOperator.GREATER_THAN_EQUALS, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// is less than . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is less than - /// . - public static Predicate LessThan(string field, string value) - { - return WithCondition(field, PredicateOperator.LESS_THAN, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// is less than or equal to - /// . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of is less than or equal to - /// . - public static Predicate LessThanEquals(string field, string value) - { - return WithCondition(field, PredicateOperator.LESS_THAN_EQUALS, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// starts with . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of starts with - /// . - public static Predicate StartsWith(string field, string value) - { - return WithCondition(field, PredicateOperator.STARTS_WITH, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// starts with when - /// letter case is ignored. - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of starts with - /// when letter case is ignored. - public static Predicate StartsWithIgnoreCase(string field, string value) - { - return WithCondition(field, PredicateOperator.STARTS_WITH_IGNORE_CASE, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// contains . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of contains - /// . - public static Predicate Contains(string field, string value) - { - return WithCondition(field, PredicateOperator.CONTAINS, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// contains when letter - /// case is ignored. - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of contains - /// when letter case is ignored. - public static Predicate ContainsIgnoreCase(string field, string value) - { - return WithCondition(field, PredicateOperator.CONTAINS_IGNORE_CASE, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// does not contain . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of does not contain - /// . - public static Predicate DoesNotContain(string field, string value) - { - return WithCondition(field, PredicateOperator.DOES_NOT_CONTAIN, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// does not contain when - /// letter case is ignored. - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of does not contain - /// when letter case is ignored. - public static Predicate DoesNotContainIgnoreCase(string field, string value) - { - return WithCondition(field, PredicateOperator.DOES_NOT_CONTAIN_IGNORE_CASE, new string[] - { - value - }); - } - - /// - /// Adds a filter to select only items where the value of - /// contains any of the values provided in - /// . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of contains any of the values - /// provided in . - public static Predicate ContainsAny(string field, string[] values) - { - return WithCondition(field, PredicateOperator.CONTAINS_ANY, values); - } - - /// - /// Adds a filter to select only items where the value of - /// contains all of the values provided in - /// . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of contains all of the values - /// provided in . - public static Predicate ContainsAll(string field, string[] values) - { - return WithCondition(field, PredicateOperator.CONTAINS_ALL, values); - } - - /// - /// Adds a filter to select only items where the value of - /// contains none of the values provided in - /// . - /// - /// The field to filter on. - /// The predicate value. - /// A new object that filters only items - /// where the value of contains none of the values - /// provided in . - public static Predicate ContainsNone(string field, string[] values) - { - return WithCondition(field, PredicateOperator.CONTAINS_NONE, values); - } - - /// - /// Determines whether the operator is multi-valued or not. - /// - /// - /// true if the operator is multi-valued; otherwise, false. - /// - private bool IsMultiValueOperator() - { - switch (@operator) - { - case PredicateOperator.EQUALS: - case PredicateOperator.NOT_EQUALS: - case PredicateOperator.GREATER_THAN: - case PredicateOperator.GREATER_THAN_EQUALS: - case PredicateOperator.LESS_THAN: - case PredicateOperator.LESS_THAN_EQUALS: - case PredicateOperator.STARTS_WITH: - case PredicateOperator.STARTS_WITH_IGNORE_CASE: - case PredicateOperator.CONTAINS: - case PredicateOperator.CONTAINS_IGNORE_CASE: - case PredicateOperator.DOES_NOT_CONTAIN: - case PredicateOperator.DOES_NOT_CONTAIN_IGNORE_CASE: - return false; - - case PredicateOperator.IN: - case PredicateOperator.NOT_IN: - case PredicateOperator.CONTAINS_ANY: - case PredicateOperator.CONTAINS_ALL: - case PredicateOperator.CONTAINS_NONE: - default: - return true; - } - } - - /// - /// Gets the operator value when used in AWQL. - /// - /// The operator query. - private string GetOperatorForQuery() - { - switch (@operator) - { - case PredicateOperator.EQUALS: - return "="; - - case PredicateOperator.NOT_EQUALS: - return "!="; - - case PredicateOperator.GREATER_THAN: - return ">"; - - case PredicateOperator.GREATER_THAN_EQUALS: - return ">="; - - case PredicateOperator.LESS_THAN: - return "<"; - - case PredicateOperator.LESS_THAN_EQUALS: - return "<="; - - default: - return @operator.ToString(); - } - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - StringBuilder builder = new StringBuilder(); - builder.AppendFormat("{0} {1}", field, GetOperatorForQuery()); - if (IsMultiValueOperator()) - { - builder.AppendFormat(" [{0}]", string.Join(", ", values)); - } - else - { - builder.AppendFormat(" {0}", values[0]); - } - - return builder.ToString(); - } - } -} diff --git a/src/AdWords/v201806/ReportDefinition.cs b/src/AdWords/v201806/ReportDefinition.cs deleted file mode 100755 index ac352c84d4b..00000000000 --- a/src/AdWords/v201806/ReportDefinition.cs +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2018 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. - -#pragma warning disable 1591 - -namespace Google.Api.Ads.AdWords.v201806 -{ - using Google.Api.Ads.AdWords.Util.Reports; - - using System; - using System.ComponentModel; - using System.Linq; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = - "https://adwords.google.com/api/adwords/cm/v201806")] - public partial class ReportDefinition : IReportDefinition - { - private long idField; - - private bool idFieldSpecified; - - private Selector selectorField; - - private string reportNameField; - - private ReportDefinitionReportType reportTypeField; - - private bool reportTypeFieldSpecified; - - private bool hasAttachmentField; - - private bool hasAttachmentFieldSpecified; - - private ReportDefinitionDateRangeType dateRangeTypeField; - - private bool dateRangeTypeFieldSpecified; - - private DownloadFormat downloadFormatField; - - private bool downloadFormatFieldSpecified; - - private string creationTimeField; - - public long id - { - get { return this.idField; } - set - { - this.idField = value; - this.idSpecified = true; - } - } - - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool idSpecified - { - get { return this.idFieldSpecified; } - set { this.idFieldSpecified = value; } - } - - public Selector selector - { - get { return this.selectorField; } - set { this.selectorField = value; } - } - - public string reportName - { - get { return this.reportNameField; } - set { this.reportNameField = value; } - } - - public ReportDefinitionReportType reportType - { - get { return this.reportTypeField; } - set - { - this.reportTypeField = value; - this.reportTypeSpecified = true; - } - } - - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool reportTypeSpecified - { - get { return this.reportTypeFieldSpecified; } - set { this.reportTypeFieldSpecified = value; } - } - - public bool hasAttachment - { - get { return this.hasAttachmentField; } - set - { - this.hasAttachmentField = value; - this.hasAttachmentSpecified = true; - } - } - - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool hasAttachmentSpecified - { - get { return this.hasAttachmentFieldSpecified; } - set { this.hasAttachmentFieldSpecified = value; } - } - - public ReportDefinitionDateRangeType dateRangeType - { - get { return this.dateRangeTypeField; } - set - { - this.dateRangeTypeField = value; - this.dateRangeTypeSpecified = true; - } - } - - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool dateRangeTypeSpecified - { - get { return this.dateRangeTypeFieldSpecified; } - set { this.dateRangeTypeFieldSpecified = value; } - } - - public DownloadFormat downloadFormat - { - get { return this.downloadFormatField; } - set - { - this.downloadFormatField = value; - this.downloadFormatSpecified = true; - } - } - - [System.Xml.Serialization.XmlIgnoreAttribute()] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool downloadFormatSpecified - { - get { return this.downloadFormatFieldSpecified; } - set { this.downloadFormatFieldSpecified = value; } - } - - public string creationTime - { - get { return this.creationTimeField; } - set { this.creationTimeField = value; } - } - - /// - /// Gets the DURING clause for AWQL query. - /// - /// The DURING clause for AWQL query. - public string GetDuringClause() - { - if (!dateRangeTypeFieldSpecified) - { - return ""; - } - - if (dateRangeType == ReportDefinitionDateRangeType.CUSTOM_DATE) - { - return string.Format("DURING {0}, {1}", this.selector.dateRange.min, - this.selector.dateRange.max); - } - else - { - return string.Format("DURING {0}", dateRangeType); - } - } - - /// - /// Gets the FROM clause for AWQL query. - /// - /// The FROM clause for AWQL query. - private string GetFromClause() - { - return string.Format("FROM {0}", reportType); - } - - /// - /// Converts this object into an AWQL query. - /// - /// The AWQL query. - internal string ToQuery() - { - if (!reportTypeFieldSpecified) - { - throw new System.ApplicationException("Report type is not specified."); - } - - string[] parts = new string[] - { - selector.GetSelectClause(), - GetFromClause(), - selector.GetWhereClause(), - GetDuringClause() - }.Where(s => !string.IsNullOrWhiteSpace(s)).ToArray(); - return string.Join(" ", parts); - } - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName = "ReportDefinition.DateRangeType", - Namespace = "https://adwords.google.com/api/adwords/cm/v201806")] - public enum ReportDefinitionDateRangeType - { - TODAY, - YESTERDAY, - LAST_7_DAYS, - LAST_WEEK, - LAST_BUSINESS_WEEK, - THIS_MONTH, - LAST_MONTH, - ALL_TIME, - CUSTOM_DATE, - LAST_14_DAYS, - LAST_30_DAYS, - THIS_WEEK_SUN_TODAY, - THIS_WEEK_MON_TODAY, - LAST_WEEK_SUN_SAT - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = - "https://adwords.google.com/api/adwords/cm/v201806")] - public enum DownloadFormat - { - CSVFOREXCEL, - CSV, - TSV, - XML, - GZIPPED_CSV, - GZIPPED_XML - } -} diff --git a/src/AdWords/v201806/Selector.cs b/src/AdWords/v201806/Selector.cs deleted file mode 100755 index d0561fe769a..00000000000 --- a/src/AdWords/v201806/Selector.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2018 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.Linq; - -using Google.Api.Ads.Common.Util; - -namespace Google.Api.Ads.AdWords.v201806 -{ - /// - /// A generic selector to specify the type of information to return. - /// - public partial class Selector - { - /// - /// Adds a new condition to the ordering. - /// - /// The new condition. - internal void AddOrdering(OrderBy orderBy) - { - this.orderingField = CollectionUtilities.AddValueToArray(orderingField, orderBy); - } - - /// - /// Adds a new condition to the predicates. - /// - /// The new condition. - internal void AddPredicate(Predicate predicate) - { - this.predicates = CollectionUtilities.AddValueToArray(predicates, predicate); - } - - /// - /// Gets the SELECT clause for AWQL query. - /// - /// The SELECT clause for AWQL query. - internal string GetSelectClause() - { - if (fields != null && fields.Length > 0) - { - return string.Format("SELECT {0}", string.Join(", ", fields)); - } - else - { - throw new System.ApplicationException("List of fields cannot be empty."); - } - } - - /// - /// Gets the WHERE clause for AWQL query. - /// - /// The WHERE clause for AWQL query. - internal string GetWhereClause() - { - if (predicates != null && predicates.Length > 0) - { - return string.Format("WHERE {0}", string.Join(" AND ", predicates)); - } - else - { - return string.Empty; - } - } - - /// - /// Gets the ORDER BY clause for AWQL query. - /// - /// The ORDER BY clause for AWQL query. - internal string GetOrderByClause() - { - if (ordering != null && ordering.Length > 0) - { - return string.Format("ORDER BY {0}", string.Join(", ", ordering)); - } - else - { - return string.Empty; - } - } - - /// - /// Gets the LIMIT clause for AWQL query. - /// - /// The LIMIT clause for AWQL query. - internal string GetLimitClause() - { - if (this.paging != null) - { - return paging.ToString(); - } - else - { - return string.Empty; - } - } - - /// - /// Converts this object into an AWQL query. - /// - /// The AWQL query. - internal string ToQuery() - { - string[] parts = new string[] - { - GetSelectClause(), - GetWhereClause(), - GetOrderByClause(), - GetLimitClause() - }.Where(s => !string.IsNullOrWhiteSpace(s)).ToArray(); - return string.Join(" ", parts); - } - } -} diff --git a/tests/AdManager/AdManager.Tests.csproj b/tests/AdManager/AdManager.Tests.csproj index 884cd16ff42..6495100e342 100755 --- a/tests/AdManager/AdManager.Tests.csproj +++ b/tests/AdManager/AdManager.Tests.csproj @@ -8,6 +8,7 @@ full true true + true true true $(ProjectDir)..\..\src\Common\AdsApi.snk diff --git a/tests/AdWords/AdWords.Tests.csproj b/tests/AdWords/AdWords.Tests.csproj index 14852bfb308..a0100b791c3 100755 --- a/tests/AdWords/AdWords.Tests.csproj +++ b/tests/AdWords/AdWords.Tests.csproj @@ -8,6 +8,7 @@ full true true + true diff --git a/tests/AdWords/Lib/AdWordsServiceFactoryTests.cs b/tests/AdWords/Lib/AdWordsServiceFactoryTests.cs index 37182410f7f..b1cbe9321fd 100755 --- a/tests/AdWords/Lib/AdWordsServiceFactoryTests.cs +++ b/tests/AdWords/Lib/AdWordsServiceFactoryTests.cs @@ -27,7 +27,7 @@ namespace Google.Api.Ads.AdWords.Tests.Lib [TestFixture] internal class AdWordsServiceFactoryTests { - private const string TEST_API_VERSION = "v201806"; + private const string TEST_API_VERSION = "v201809"; private const string TEST_SERVICE = "MediaService"; private const string TEST_GROUP_NAME = "cm"; diff --git a/tests/AdWords/SoapMessages.v201806.Designer.cs b/tests/AdWords/SoapMessages.v201806.Designer.cs deleted file mode 100755 index 4ab80219ec7..00000000000 --- a/tests/AdWords/SoapMessages.v201806.Designer.cs +++ /dev/null @@ -1,75 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Google.Api.Ads.AdWords.Tests { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class SoapMessages_v201806 { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal SoapMessages_v201806() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Google.Api.Ads.AdWords.Tests.SoapMessages.v201806", typeof(SoapMessages_v201806).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0"?> - ///<Example> - /// <SOAP> - /// <Request>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;soap:Header&gt;&lt;RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;&lt;developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;******&lt;/developerToken&gt;&lt;clientCustomerId xmlns="h [rest of string was truncated]";. - /// - internal static string UpdateCampaign { - get { - return ResourceManager.GetString("UpdateCampaign", resourceCulture); - } - } - } -} diff --git a/tests/AdWords/SoapMessages.v201806.resx b/tests/AdWords/SoapMessages.v201806.resx deleted file mode 100755 index e43b5a5ab5f..00000000000 --- a/tests/AdWords/SoapMessages.v201806.resx +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - <?xml version="1.0"?> -<Example> - <SOAP> - <Request>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;soap:Header&gt;&lt;RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;&lt;developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;******&lt;/developerToken&gt;&lt;clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;******&lt;/clientCustomerId&gt;&lt;userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;INSERT_YOUR_COMPANY_OR_APPLICATION_NAME_HERE (AwApi-DotNet/18.3.0, Common-Dotnet/3.2.0, .NET CLR/4.0.30319.18444, gzip)&lt;/userAgent&gt;&lt;/RequestHeader&gt;&lt;/soap:Header&gt;&lt;soap:Body&gt;&lt;mutate xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;&lt;operations&gt;&lt;operator&gt;SET&lt;/operator&gt;&lt;operand&gt;&lt;id&gt;12345&lt;/id&gt;&lt;status&gt;PAUSED&lt;/status&gt;&lt;/operand&gt;&lt;/operations&gt;&lt;/mutate&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;</Request> - <Response>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soap:Header&gt;&lt;ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;&lt;requestId&gt;000504c4534d28a00ac45a4620006284&lt;/requestId&gt;&lt;serviceName&gt;CampaignService&lt;/serviceName&gt;&lt;methodName&gt;mutate&lt;/methodName&gt;&lt;operations&gt;0&lt;/operations&gt;&lt;responseTime&gt;1265&lt;/responseTime&gt;&lt;/ResponseHeader&gt;&lt;/soap:Header&gt;&lt;soap:Body&gt;&lt;mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201806"&gt;&lt;rval&gt;&lt;ListReturnValue.Type&gt;CampaignReturnValue&lt;/ListReturnValue.Type&gt;&lt;value&gt;&lt;id&gt;12345&lt;/id&gt;&lt;name&gt;Test Campaign&lt;/name&gt;&lt;status&gt;PAUSED&lt;/status&gt;&lt;servingStatus&gt;ENDED&lt;/servingStatus&gt;&lt;startDate&gt;20090901&lt;/startDate&gt;&lt;endDate&gt;20100902&lt;/endDate&gt;&lt;budget&gt;&lt;budgetId&gt;8871856&lt;/budgetId&gt;&lt;name&gt;Campaign - 2009-9-2 11:31:16&lt;/name&gt;&lt;period&gt;DAILY&lt;/period&gt;&lt;amount&gt;&lt;ComparableValue.Type&gt;Money&lt;/ComparableValue.Type&gt;&lt;microAmount&gt;52000000&lt;/microAmount&gt;&lt;/amount&gt;&lt;deliveryMethod&gt;STANDARD&lt;/deliveryMethod&gt;&lt;isExplicitlyShared&gt;false&lt;/isExplicitlyShared&gt;&lt;status&gt;ENABLED&lt;/status&gt;&lt;/budget&gt;&lt;conversionOptimizerEligibility&gt;&lt;eligible&gt;false&lt;/eligible&gt;&lt;rejectionReasons&gt;CAMPAIGN_IS_NOT_ACTIVE&lt;/rejectionReasons&gt;&lt;rejectionReasons&gt;NOT_ENOUGH_CONVERSIONS&lt;/rejectionReasons&gt;&lt;/conversionOptimizerEligibility&gt;&lt;adServingOptimizationStatus&gt;OPTIMIZE&lt;/adServingOptimizationStatus&gt;&lt;settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GeoTargetTypeSetting"&gt;&lt;Setting.Type&gt;GeoTargetTypeSetting&lt;/Setting.Type&gt;&lt;positiveGeoTargetType&gt;DONT_CARE&lt;/positiveGeoTargetType&gt;&lt;negativeGeoTargetType&gt;LOCATION_OF_PRESENCE&lt;/negativeGeoTargetType&gt;&lt;/settings&gt;&lt;advertisingChannelType&gt;DISPLAY&lt;/advertisingChannelType&gt;&lt;networkSetting&gt;&lt;targetGoogleSearch&gt;false&lt;/targetGoogleSearch&gt;&lt;targetSearchNetwork&gt;false&lt;/targetSearchNetwork&gt;&lt;targetContentNetwork&gt;true&lt;/targetContentNetwork&gt;&lt;targetPartnerSearchNetwork&gt;false&lt;/targetPartnerSearchNetwork&gt;&lt;/networkSetting&gt;&lt;labels xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TextLabel"&gt;&lt;id&gt;24946696&lt;/id&gt;&lt;name&gt;link_checker_sitelinks&lt;/name&gt;&lt;status&gt;ENABLED&lt;/status&gt;&lt;Label.Type&gt;TextLabel&lt;/Label.Type&gt;&lt;/labels&gt;&lt;biddingStrategyConfiguration&gt;&lt;biddingStrategyType&gt;MANUAL_CPC&lt;/biddingStrategyType&gt;&lt;biddingScheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ManualCpcBiddingScheme"&gt;&lt;BiddingScheme.Type&gt;ManualCpcBiddingScheme&lt;/BiddingScheme.Type&gt;&lt;enhancedCpcEnabled&gt;false&lt;/enhancedCpcEnabled&gt;&lt;/biddingScheme&gt;&lt;/biddingStrategyConfiguration&gt;&lt;/value&gt;&lt;/rval&gt;&lt;/mutateResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;</Response> - </SOAP> - <Output>Campaign with name = 'Test Campaign' and id = '12345' was updated.</Output> -</Example> - - \ No newline at end of file diff --git a/tests/AdWords/Util/BatchJob/v201806/BatchJobUtilitiesTest.cs b/tests/AdWords/Util/BatchJob/v201806/BatchJobUtilitiesTest.cs deleted file mode 100755 index 87540c34613..00000000000 --- a/tests/AdWords/Util/BatchJob/v201806/BatchJobUtilitiesTest.cs +++ /dev/null @@ -1,526 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Util.BatchJob; -using Google.Api.Ads.AdWords.Util.BatchJob.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml; - -namespace Google.Api.Ads.AdWords.Tests.Util.BatchJob.v201806 -{ - /// - /// Tests for class. - /// - public class BatchJobUtilitiesTest : BatchJobUtilities - { - /// - /// The test user for initializing purposes. - /// - private AdWordsUser TEST_USER = new AdWordsUser(); - - /// - /// The test data for upload purposes. - /// - private readonly byte[] TEST_DATA = - Encoding.UTF8.GetBytes( - string.Concat(Enumerable.Repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1000000))); - - /// - /// A random chunk size that is not multiple of 256K. - /// - private const int TEST_NON_MULTIPLE_CHUNK_SIZE = 10000; - - /// - /// The upload progress for testing resumable uploads. - /// - private const int TESTDATA_UPLOAD_PROGRESS = 123456; - - /// - /// A random chunk size for testing chunked uploads. - /// - private const int TEST_CHUNK_SIZE = CHUNK_SIZE_ALIGN * 12; - - /// - /// The number of batches for streamed upload. - /// - private const int NUM_BATCHES_FOR_STREAMED_UPLOAD = 10; - - /// - /// The number of keyword operations to generate for testing purposes. - /// - private const int NUM_KEYWORD_OPERATIONS = 100000; - - /// - /// Class to keep track of parameters passed to a method. - /// - public class UploadChunkRecord - { - /// - /// Gets or sets the start of the chunk. - /// - public int Start { get; set; } - - /// - /// Gets or sets the end of the chunk. - /// - public int End { get; set; } - - /// - /// Gets or sets the start file offset on the server. - /// - public long StartOffset { get; set; } - - /// - /// Gets or sets the total size of the upload. - /// - public long? TotalUploadSize { get; set; } - } - - /// - /// An array to keep track of calls to the mocked - /// method. - /// - private List uploadChunkRecords = new List(); - - /// - /// Initializes this instance. - /// - [SetUp] - public void Init() - { - } - - /// - /// Tests for streaming upload without chunking. - /// - [Test] - public void TestStreamedUploadNoChunking() - { - uploadChunkRecords.Clear(); - - // Initialize the uploader for chunked upload. - this.Init(TEST_USER, false, 0); - - // Generate operations for upload. - Operation[] operations = GetKeywordOperations(123); - - // Start the upload. - BatchUploadProgress progress = this.BeginStreamUpload("http://www.example.com"); - - // Split the upload into NUM_BATCHES_FOR_STREAMED_UPLOAD batches. - int[] batchSizes = new int[NUM_BATCHES_FOR_STREAMED_UPLOAD]; - - for (int i = 0; i < NUM_BATCHES_FOR_STREAMED_UPLOAD; i++) - { - Operation[] operationsToStream = - new Operation[NUM_KEYWORD_OPERATIONS / NUM_BATCHES_FOR_STREAMED_UPLOAD]; - - int dataLength = Encoding.UTF8.GetBytes(GetPostBody(operationsToStream)).Length; - int paddedLength = CHUNK_SIZE_ALIGN - (dataLength % CHUNK_SIZE_ALIGN); - batchSizes[i] = dataLength + paddedLength; - - Array.Copy(operations, i * NUM_BATCHES_FOR_STREAMED_UPLOAD, operationsToStream, 0, - NUM_BATCHES_FOR_STREAMED_UPLOAD); - progress = this.StreamUpload(progress, operationsToStream); - } - - this.EndStreamUpload(progress); - - // There should be NUM_BATCHES_FOR_STREAMED_UPLOAD + 1 batches. - Assert.That(uploadChunkRecords.Count == NUM_BATCHES_FOR_STREAMED_UPLOAD + 1); - - // StartOffset tests. - Assert.AreEqual(0, uploadChunkRecords[0].StartOffset); - - for (int i = 1; i < NUM_BATCHES_FOR_STREAMED_UPLOAD + 1; i++) - { - Assert.AreEqual(uploadChunkRecords[i].StartOffset, - uploadChunkRecords[i - 1].StartOffset + (uploadChunkRecords[i - 1].End - - uploadChunkRecords[i - 1].Start) + 1); - } - - // Start, End, totalUploadSize tests. - for (int i = 0; i < 10; i++) - { - Assert.AreEqual(0, uploadChunkRecords[i].Start); - Assert.AreEqual(batchSizes[i] - 1, uploadChunkRecords[i].End); - Assert.IsNull(uploadChunkRecords[i].TotalUploadSize); - } - - // Start, End, totalUploadSize tests. - for (int i = 0; i < 10; i++) - { - Assert.AreEqual(0, uploadChunkRecords[i].Start); - Assert.AreEqual(batchSizes[i] - 1, uploadChunkRecords[i].End); - Assert.IsNull(uploadChunkRecords[i].TotalUploadSize); - } - - // Last record. - Assert.AreEqual(0, uploadChunkRecords[10].Start); - Assert.AreEqual(POSTAMBLE.Length, uploadChunkRecords[10].End + 1); - Assert.AreEqual(uploadChunkRecords[10].StartOffset + POSTAMBLE.Length, - uploadChunkRecords[10].TotalUploadSize); - } - - /// - /// Tests for streaming upload with chunking. - /// - [Test] - [Category("MissingMonoSupport")] - public void TestStreamedUploadWithChunking() - { - uploadChunkRecords.Clear(); - - // Initialize the uploader for chunked upload. - this.Init(TEST_USER, true, CHUNK_SIZE_ALIGN * 12); - - // Generate operations for upload. - Operation[] operations = GetKeywordOperations(123); - - // Start the upload. - BatchUploadProgress progress = this.BeginStreamUpload("http://www.example.com"); - - // Split the upload into NUM_BATCHES_FOR_STREAMED_UPLOAD batches. - int[] batchSizes = new int[NUM_BATCHES_FOR_STREAMED_UPLOAD]; - - const int NUM_OPERATIONS_TO_UPLOAD_PER_BATCH = - NUM_KEYWORD_OPERATIONS / NUM_BATCHES_FOR_STREAMED_UPLOAD; - - long uploadRequestCount = 0; - for (int i = 0; i < NUM_BATCHES_FOR_STREAMED_UPLOAD; i++) - { - Operation[] operationsToStream = new Operation[NUM_OPERATIONS_TO_UPLOAD_PER_BATCH]; - - Array.Copy(operations, i * NUM_OPERATIONS_TO_UPLOAD_PER_BATCH, operationsToStream, - 0, NUM_OPERATIONS_TO_UPLOAD_PER_BATCH); - - long oldProgress = progress.BytesUploaded; - progress = this.StreamUpload(progress, operationsToStream); - long additionalDataCount = progress.BytesUploaded - oldProgress; - uploadRequestCount += (additionalDataCount) / CHUNK_SIZE; - if ((additionalDataCount % CHUNK_SIZE) != 0) - { - uploadRequestCount += 1; - } - } - - this.EndStreamUpload(progress); - uploadRequestCount += 1; - - // There should be uploadRequestCount entries in uploadChunkRecords. - Assert.That(uploadChunkRecords.Count == uploadRequestCount); - - for (int i = 0; i < uploadRequestCount - 1; i++) - { - long start = uploadChunkRecords[i].StartOffset + uploadChunkRecords[i].Start; - long end = uploadChunkRecords[i].StartOffset + uploadChunkRecords[i].End; - long uploaded = end - start; - // uploaded size is always a multiple of 256K - if (end - start == CHUNK_SIZE - 1) - { - Assert.Pass(string.Format("Chunk {0} is aligned with CHUNK_SIZE.", i)); - } - else - { - Assert.That((uploaded + 1) % (256 * 1024) == 0, - string.Format("Chunk {0} is not aligned with 256K.", i)); - } - } - } - - /// - /// Tests for the GetPayload() method. - /// - [Test] - public void TestGetPayload() - { - // Generate operations for upload. - Operation[] operations = GetKeywordOperations(123); - string postBody = GetPostBody(operations); - - XmlDocument xDoc = new XmlDocument(); - xDoc.LoadXml(postBody); - - string operationsOnly = xDoc.DocumentElement.InnerXml; - string payload = GetPayload(0, postBody); - - // Ensure that operations are not duplicated in the payload - // for the initial upload. - Assert.AreEqual(AllIndexesOf(operationsOnly, payload).Count(), 1); - - // Ensure that the SOAP envelope is not part of the payload - // if we already have an upload in progress. - payload = GetPayload(1, postBody); - Assert.AreEqual(operationsOnly, payload); - } - - /// - /// Gets alls the indexes of in . - /// - /// The substring to search for. - /// The string to search for . - /// A list of all the indices where match was found. - private static List AllIndexesOf(string needle, string haystack) - { - var indexes = new List(); - int index = 0; - - do - { - index = haystack.IndexOf(needle, index); - if (index != -1) - { - indexes.Add(index); - index++; - } - } while (index != -1); - - return indexes; - } - - /// - /// Tests for method. - /// - [Test] - [Category("MissingMonoSupport")] - public void TestInit() - { - // Any chunk size that is not a multiple of 256K should throw an - // exception if chunking is turned on. - Assert.Throws(typeof(ArgumentException), - delegate() { this.Init(TEST_USER, true, TEST_NON_MULTIPLE_CHUNK_SIZE); }); - - // Any chunk size that is a multiple of 256K should not throw an - // exception if chunking is turned on. - Assert.DoesNotThrow(delegate() { this.Init(TEST_USER, true, CHUNK_SIZE_ALIGN * 12); }); - - // Chunk size ignored if chunking is false. - Assert.DoesNotThrow(delegate() - { - this.Init(TEST_USER, false, TEST_NON_MULTIPLE_CHUNK_SIZE); - }); - } - - /// - /// Tests for uploads without chunking. - /// - [Test] - public void TestUploadNoChunking() - { - uploadChunkRecords.Clear(); - - // Upload with chunking turned off. - this.Init(TEST_USER, false, TEST_NON_MULTIPLE_CHUNK_SIZE); - Upload("http://www.example.com", TEST_DATA, 0); - - // There should be one chunk record that represents the whole data. - Assert.That(uploadChunkRecords.Count == 1); - Assert.That(uploadChunkRecords[0].Start == 0); - Assert.That(uploadChunkRecords[0].End == TEST_DATA.Length - 1); - } - - /// - /// Tests for uploads with chunking. - /// - [Test] - [Category("MissingMonoSupport")] - public void TestUploadWithChunking() - { - uploadChunkRecords.Clear(); - - int numExpectedRecords = (int) (TEST_DATA.Length / TEST_CHUNK_SIZE) + 1; - - // Upload with chunking turned off. - this.Init(TEST_USER, true, TEST_CHUNK_SIZE); - Upload("http://www.example.com", TEST_DATA, 0); - - // There should be TESTDATA.Length % TEST_CHUNK_SIZE + 1 chunk records. - Assert.That(uploadChunkRecords.Count == numExpectedRecords); - - UploadChunkRecord record; - - // There should be NUM_EXPECTED_RECORDS - 1 records of size = TEST_CHUNK_SIZE - for (int i = 0; i < numExpectedRecords - 1; i++) - { - record = uploadChunkRecords[i]; - Assert.That(record.Start == i * TEST_CHUNK_SIZE); - Assert.That(record.End == record.Start + TEST_CHUNK_SIZE - 1); - } - - // The last record should be the leftover data. - record = uploadChunkRecords[numExpectedRecords - 1]; - Assert.That(record.Start == (numExpectedRecords - 1) * TEST_CHUNK_SIZE); - Assert.That(record.End == TEST_DATA.Length - 1); - } - - /// - /// Tests for uploads with chunking and resuming an interrupted upload. - /// - [Test] - [Category("MissingMonoSupport")] - public void TestUploadWithResumeAndChunking() - { - uploadChunkRecords.Clear(); - - Operation[] operations = GetKeywordOperations(1000); - string postBody = GetPostBody(operations); - byte[] data = Encoding.UTF8.GetBytes(postBody); - - this.Init(TEST_USER, true, TEST_CHUNK_SIZE); - Upload("http://www.example.com", operations, true); - - long numExpectedRecords = - 1 + (data.Length - TESTDATA_UPLOAD_PROGRESS) / TEST_CHUNK_SIZE; - Assert.That(uploadChunkRecords.Count == numExpectedRecords); - - for (int i = 0; i < numExpectedRecords; i++) - { - Assert.AreEqual(uploadChunkRecords[i].Start, TEST_CHUNK_SIZE * i); - if (i == numExpectedRecords - 1) - { - Assert.AreEqual(uploadChunkRecords[i].End, - data.Length - TESTDATA_UPLOAD_PROGRESS - 1); - } - else - { - Assert.AreEqual(uploadChunkRecords[i].End, - uploadChunkRecords[i].Start + TEST_CHUNK_SIZE - 1); - } - - Assert.AreEqual(uploadChunkRecords[i].StartOffset, TESTDATA_UPLOAD_PROGRESS); - Assert.AreEqual(uploadChunkRecords[i].TotalUploadSize, data.Length); - } - } - - /// - /// Tests for GetTextToLog method. - /// - [Test] - public void TestGetTextToLog() - { - // When using ASCII characters only, you should get the actual number of chars - // requested, since 1 byte == 1 char. - string textToLog = "ABCDE"; - Assert.AreEqual("ABC", GetTextToLog(Encoding.UTF8.GetBytes(textToLog), 0, 3)); - - // If you pass indices out of range of the array, exception is thrown. - Assert.Throws(delegate() - { - GetTextToLog(Encoding.UTF8.GetBytes(textToLog), 10, 20); - }); - string utf8TextToLog = "こんにちは"; // Hello - - // こ is // \u3053, and its UTF-8 representation is \xe3\x81\x93. - // So you get back 1 char. - Assert.AreEqual("こ", GetTextToLog(Encoding.UTF8.GetBytes(utf8TextToLog), 0, 3)); - - // When you request 4 bytes, the first 3 bytes are used to decode to こ, and the fourth - // byte is malformed. So unicode replacement character (\uFFFD) is used. - Assert.AreEqual("こ\uFFFD", GetTextToLog(Encoding.UTF8.GetBytes(utf8TextToLog), 0, 4)); - - // When you request 3 bytes, the stream is misaligned, so you get three unicode - // replacement characters (\uFFFD\uFFFD\uFFFD). - Assert.AreEqual("\uFFFD\uFFFD\uFFFD", - GetTextToLog(Encoding.UTF8.GetBytes(utf8TextToLog), 1, 3)); - } - - /// - /// Gets an array of keyword operations for testing upload. - /// - /// The ad group ID. - /// An array of operations. - private Operation[] GetKeywordOperations(long adGroupId) - { - List operations = new List(); - for (int i = 0; i < NUM_KEYWORD_OPERATIONS; i++) - { - // Create the keyword. - Keyword keyword = new Keyword(); - keyword.text = "Test keyword " + i; - keyword.matchType = KeywordMatchType.BROAD; - - // Create the biddable ad group criterion. - BiddableAdGroupCriterion keywordCriterion = new BiddableAdGroupCriterion(); - keywordCriterion.adGroupId = adGroupId; - keywordCriterion.criterion = keyword; - - // Optional: Set the user status. - keywordCriterion.userStatus = UserStatus.PAUSED; - - // Create the operations. - AdGroupCriterionOperation operation = new AdGroupCriterionOperation(); - operation.@operator = Operator.ADD; - operation.operand = keywordCriterion; - - operations.Add(operation); - } - - return operations.ToArray(); - } - - #region Mocked methods - - /// - /// Initializes a new instance of the class. - /// - public BatchJobUtilitiesTest() : base(new AdWordsUser()) - { - } - - /// - /// Uploads a chunk of data for the batch job. - /// - /// The resumable upload URL. - /// The post body. - /// The start of range of bytes to be uploaded. - /// The end of range of bytes to be uploaded. - /// The start offset in the stream to upload to. - /// If specified, this indicates the total - /// size of the upload. When doing a streamed upload, this value will be - /// null for all except the last chunk. - protected override void UploadChunk(string url, byte[] postBody, int start, int end, - long startOffset, long? totalUploadSize) - { - uploadChunkRecords.Add(new UploadChunkRecord() - { - Start = start, - End = end, - StartOffset = startOffset, - TotalUploadSize = totalUploadSize - }); - } - - /// - /// Gets the upload progress. - /// - /// The resumable upload URL. - /// - /// The number of bytes uploaded so far. - /// - protected override int GetUploadProgress(string url) - { - return TESTDATA_UPLOAD_PROGRESS; - } - - #endregion Mocked methods - } -} diff --git a/tests/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilderTest.cs b/tests/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilderTest.cs deleted file mode 100755 index c77d35c1b16..00000000000 --- a/tests/AdWords/Util/Reports/QueryBuilder/v201806/ReportQueryBuilderTest.cs +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System; - -namespace Google.Api.Ads.AdWords.Tests.Util.Reports.QueryBuilder.v201806 -{ - /// - /// Unit tests for the class. - /// - internal class ReportQueryBuilderTest - { - /// - /// Tests the standard query construction. - /// - [Test] - public void TestStandardQueryConstruction() - { - ReportQueryBuilder queryBuilder = null; - string query = null; - - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("Clicks") - .Equals(20).During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE Clicks = 20 DURING YESTERDAY", query); - } - - /// - /// Tests if exceptions are thrown when a FROM clause is missing. - /// - [Test] - public void TestMissingFromClause() - { - ReportQueryBuilder queryBuilder = new ReportQueryBuilder(); - Assert.Throws(typeof(System.ApplicationException), delegate() - { - string query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .Where("Clicks").Equals(20).During(ReportDefinitionDateRangeType.YESTERDAY) - .Build(); - }); - } - - /// - /// Tests if the query is rendered correctly when a WHERE clause is not specified. - /// - [Test] - public void TestMissingWhereClause() - { - ReportQueryBuilder queryBuilder = new ReportQueryBuilder(); - string query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT) - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT DURING YESTERDAY", query); - } - - /// - /// Tests if query is rendered correctly when a DURING clause is not specified. - /// - [Test] - public void TestMissingDuringClause() - { - ReportQueryBuilder queryBuilder = new ReportQueryBuilder(); - string query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("Clicks") - .Equals(20).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE Clicks = 20", query); - } - - /// - /// Tests an exception is thrown if SELECT clause is not mentioned. - /// - [Test] - public void TestMissingSelectClause() - { - ReportQueryBuilder queryBuilder = null; - new ReportQueryBuilder(); - string query = null; - - Assert.Throws(typeof(System.ApplicationException), delegate() - { - queryBuilder = new ReportQueryBuilder(); - - query = queryBuilder.Where("Clicks").Equals(20) - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - }); - Assert.Throws(typeof(System.ApplicationException), delegate() - { - queryBuilder = new ReportQueryBuilder(); - - query = queryBuilder.Select().Where("Clicks").Equals(20) - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - }); - } - - /// - /// Tests if string parameters are quoted correctly. - /// - [Test] - public void TestStringParameters() - { - ReportQueryBuilder queryBuilder = null; - string query = null; - - // Single string parameter. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .Equals("TEST_CAMPAIGN").During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = 'TEST_CAMPAIGN' DURING YESTERDAY", - query); - - // Multiple string parameters. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .Equals("TEST_CAMPAIGN").Where("Status").Equals("ENABLED") - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = 'TEST_CAMPAIGN' " + - "AND Status = 'ENABLED' DURING YESTERDAY", query); - - // String parameters with quotes and backslashes in them. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .Equals("T'EST_\"CAMPAIGN").Where("Status").Equals("ENA\\BLED") - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = 'T\\'EST_\\\"CAMPAIGN' " + - "AND Status = 'ENA\\\\BLED' DURING YESTERDAY", query); - } - - /// - /// Tests if multi-argument functions are quoted correctly. - /// - [Test] - public void TestMultiArgumentFunctions() - { - ReportQueryBuilder queryBuilder = null; - string query = null; - - // Multi-argument, string parameters and non-string parameters. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .In("TEST_CAMPAIGN1", "TEST_CAMPAIGN2").Where("CampaignId").In(123, 456) - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName IN " + - "['TEST_CAMPAIGN1', 'TEST_CAMPAIGN2'] AND CampaignId IN [123, 456] " + - "DURING YESTERDAY", - query); - } - - /// - /// Tests the DURING clause with various types of input when - /// constructing queries. - /// - [Test] - public void TestDuringClauseInputTypes() - { - ReportQueryBuilder queryBuilder = null; - string query = null; - - // Exception is thrown if minDate is not in yyyyMMdd format. - Assert.Throws(delegate() - { - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT) - .Where("CampaignName").Equals("TEST_CAMPAIGN").During("Foo", "20140301") - .Build(); - }); - - // Exception is thrown if maxDate is not in yyyyMMdd format. - Assert.Throws(delegate() - { - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT) - .Where("CampaignName").Equals("TEST_CAMPAIGN").During("20140301", "Foo") - .Build(); - }); - - // DURING query accepts date strings in yyyyMMdd format. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .Equals("TEST_CAMPAIGN").During("20170101", "20170131").Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = 'TEST_CAMPAIGN' " + - "DURING 20170101, 20170131", query); - - // DURING query accepts DateTime formats. - DateTime minDate = new DateTime(2017, 1, 1); - DateTime maxDate = new DateTime(2017, 1, 31); - - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .Equals("TEST_CAMPAIGN").During(minDate, maxDate).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = 'TEST_CAMPAIGN' " + - "DURING 20170101, 20170131", query); - - // DURING supports predefined dateranges in string format. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .Equals("TEST_CAMPAIGN").During("YESTERDAY").Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = 'TEST_CAMPAIGN' " + - "DURING YESTERDAY", query); - - // Exception is thrown if DURING clause cannot be parsed into a - // known date range type. - Assert.Throws(delegate() - { - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From("CAMPAIGN_PERFORMANCE_REPORT").Where("CampaignName") - .Equals("TEST_CAMPAIGN").During("Foo").Build(); - }); - } - - /// - /// Tests the FROM clauses with various types of input when - /// constructing queries. - /// - [Test] - public void TestFromClauseInputTypes() - { - ReportQueryBuilder queryBuilder = null; - string query = null; - - // FROM clause accepts ReportDefinitionReportType values. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Where("CampaignName") - .In("TEST_CAMPAIGN1", "TEST_CAMPAIGN2").Where("CampaignId").In(123, 456) - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName IN " + - "['TEST_CAMPAIGN1', 'TEST_CAMPAIGN2'] AND CampaignId IN [123, 456] " + - "DURING YESTERDAY", - query); - - // FROM clause accepts ReportDefinitionReportType values, specified in string format. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From("CAMPAIGN_PERFORMANCE_REPORT").Where("CampaignName") - .In("TEST_CAMPAIGN1", "TEST_CAMPAIGN2").Where("CampaignId").In(123, 456) - .During(ReportDefinitionDateRangeType.YESTERDAY).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions FROM " + - "CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName IN " + - "['TEST_CAMPAIGN1', 'TEST_CAMPAIGN2'] AND CampaignId IN [123, 456] " + - "DURING YESTERDAY", - query); - // Exception is thrown if FROM clause cannot be parsed into a - // known report type. - Assert.Throws(delegate() - { - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .From("UNKNOWN_PERFORMANCE_REPORT").Where("CampaignName") - .Equals("TEST_CAMPAIGN").During("Foo", "20140301").Build(); - }); - } - - /// - /// Tests field conditions for selector. - /// - [Test] - public void TestFieldsInSelectClause() - { - ReportQueryBuilder queryBuilder = null; - string query = null; - - // Duplicate fields and order are preserved. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Status") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Status FROM CAMPAIGN_PERFORMANCE_REPORT", - query); - - // If multiple Select calls are done, only the last instance is kept. - queryBuilder = new ReportQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status").Select("Clicks", "Status") - .From(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT).Build(); - - Assert.AreEqual("SELECT Clicks, Status FROM CAMPAIGN_PERFORMANCE_REPORT", query); - } - } -} diff --git a/tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilderTest.cs b/tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilderTest.cs deleted file mode 100755 index 14c31c51cb0..00000000000 --- a/tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryBuilderTest.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Reports.v201806; - -using NUnit.Framework; - -using System.Text.RegularExpressions; - -namespace Google.Api.Ads.AdWords.Tests.Util.Reports.QueryBuilder.v201806 -{ - /// - /// Unit tests for the class. - /// - internal class SelectQueryBuilderTest - { - /// - /// Tests the standard query construction. - /// - [Test] - public void TestStandardQueryConstruction() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .Where("Clicks").Equals(20).OrderByAscending("CampaignId") - .OrderByDescending("Status").Limit(1, 20).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions WHERE Clicks = 20 " + - "ORDER BY CampaignId ASC, Status DESC LIMIT 1, 20", query); - } - - /// - /// Tests an exception is thrown if SELECT clause is not mentioned. - /// - [Test] - public void TestMissingSelectClause() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - // Select clause cannot be missing. - Assert.Throws(typeof(System.ApplicationException), delegate() - { - queryBuilder = new SelectQueryBuilder(); - - query = queryBuilder.Where("Clicks").Equals(20).Build(); - }); - - // Fields cannot be empty. - Assert.Throws(typeof(System.ApplicationException), delegate() - { - queryBuilder = new SelectQueryBuilder(); - - query = queryBuilder.Select().Where("Clicks").Equals(20).Build(); - }); - } - - /// - /// Tests if the query is rendered correctly when a WHERE clause is not specified. - /// - [Test] - public void TestMissingWhereClause() - { - SelectQueryBuilder queryBuilder = new SelectQueryBuilder(); - string query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .OrderByAscending("CampaignId").OrderByDescending("Status").Limit(1, 20).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions ORDER BY " + - "CampaignId ASC, Status DESC LIMIT 1, 20", query); - } - - /// - /// Tests if the query is rendered correctly when a ORDER BY clause is not specified. - /// - [Test] - public void TestMissingOrderByClause() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .Where("Clicks").Equals(20).Limit(1, 20).Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions WHERE Clicks = 20 " + "LIMIT 1, 20", - query); - } - - /// - /// Tests if the query is rendered correctly when a LIMIT clause is not specified. - /// - [Test] - public void TestMissingLimitClause() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Impressions") - .Where("Clicks").Equals(20).OrderByAscending("CampaignId") - .OrderByDescending("Status").Build(); - - Assert.AreEqual( - "SELECT CampaignId, Status, Clicks, Impressions WHERE Clicks = 20 " + - "ORDER BY CampaignId ASC, Status DESC", query); - } - - /// - /// Tests if string parameters are quoted correctly. - /// - [Test] - public void TestStringParameters() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - // Single string parameter. - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .Where("CampaignName").Equals("TEST_CAMPAIGN").Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions WHERE " + - "CampaignName = 'TEST_CAMPAIGN'", query); - - // Multiple string parameters. - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .Where("CampaignName").Equals("TEST_CAMPAIGN").Where("Status").Equals("ENABLED") - .Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions WHERE " + - "CampaignName = 'TEST_CAMPAIGN' AND Status = 'ENABLED'", query); - - // String parameters with quotes and backslashes in them. - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .Where("CampaignName").Equals("T'EST_\"CAMPAIGN").Where("Status") - .Equals("ENA\\BLED").Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions WHERE " + - "CampaignName = 'T\\'EST_\\\"CAMPAIGN' AND Status = 'ENA\\\\BLED'", query); - } - - /// - /// Tests if multi-argument functions are quoted correctly. - /// - [Test] - public void TestMultiArgumentFunctions() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - // Multi-argument, string parameters and non-string parameters. - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignName", "Status", "Clicks", "Impressions") - .Where("CampaignName").In("TEST_CAMPAIGN1", "TEST_CAMPAIGN2").Where("CampaignId") - .In(123, 456).Build(); - - Assert.AreEqual( - "SELECT CampaignName, Status, Clicks, Impressions WHERE " + - "CampaignName IN ['TEST_CAMPAIGN1', 'TEST_CAMPAIGN2'] AND CampaignId IN [123, 456]", - query); - } - - /// - /// Tests field conditions for selector. - /// - [Test] - public void TestFieldsInSelectClause() - { - SelectQueryBuilder queryBuilder = null; - string query = null; - - // Duplicate fields are removed. - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status", "Clicks", "Status").Build(); - int count = new Regex(Regex.Escape("Status")).Matches(query).Count; - - Assert.AreEqual(1, count); - - // If multiple Select calls are done, only the last instance is kept. - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder.Select("CampaignId", "Status").Select("Clicks", "Status").Build(); - - Assert.AreEqual("SELECT Clicks, Status", query); - } - } -} diff --git a/tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryTest.cs b/tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryTest.cs deleted file mode 100755 index 848b69b19b7..00000000000 --- a/tests/AdWords/Util/Reports/QueryBuilder/v201806/SelectQueryTest.cs +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright 2018, Google Inc. All Rights Reserved. -// -// 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.Api.Ads.AdWords.Util.Reports.v201806; -using Google.Api.Ads.AdWords.v201806; -using NUnit.Framework; - -namespace Google.Api.Ads.AdWords.Tests.Util.Reports.QueryBuilder.v201806 { - - /// - /// Unit tests for the class. - /// - internal class SelectQueryTest { - - /// - /// Tests for . - /// - [Test] - public void TestHasNextPage() { - SelectQueryBuilder queryBuilder = null; - SelectQuery query = null; - - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder - .Select("CampaignId", "Status", "Clicks", "Impressions") - .Where("Clicks").Equals(20) - .OrderByAscending("CampaignId") - .OrderByDescending("Status") - .Build(); - - // Tests for regular pages. - CampaignPage campaignPage = new CampaignPage(); - - // Start index is less than total number of entries. - query.Limit(1, 20); - campaignPage.totalNumEntries = 15; - Assert.IsTrue(query.HasNextPage(campaignPage)); - - // Start index is greater than total number of entries. - query.Limit(18, 20); - campaignPage.totalNumEntries = 15; - Assert.IsFalse(query.HasNextPage(campaignPage)); - - // Tests for AdGroupBidLandscapePage. - AdGroupBidLandscapePage adGroupBidLandscapePage = new AdGroupBidLandscapePage(); - adGroupBidLandscapePage.entries = new AdGroupBidLandscape[] { - new AdGroupBidLandscape() { - campaignId = 123, - adGroupId = 456, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 12, - impressions = 232 - }, - } - }, - new AdGroupBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 5, - impressions = 232 - }, - new BidLandscapeLandscapePoint() { - clicks = 66, - impressions = 550 - }, - } - } - }; - - // Start index is less than total number of landscape points (5). - query.Limit(1, 20); - Assert.IsTrue(query.HasNextPage(adGroupBidLandscapePage)); - - adGroupBidLandscapePage.entries = new AdGroupBidLandscape[] { - new AdGroupBidLandscape() { - campaignId = 123, - adGroupId = 456, - landscapePoints = new BidLandscapeLandscapePoint[] {} - }, - new AdGroupBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = null - } - }; - - // Start index is less than total number of landscape points (0). - query.Limit(1, 20); - Assert.IsFalse(query.HasNextPage(adGroupBidLandscapePage)); - - // Tests for CriterionBidLandscapePage. - CriterionBidLandscapePage criterionBidLandscapePage = new CriterionBidLandscapePage() { - entries = new CriterionBidLandscape[] { - new CriterionBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 5, - impressions = 232 - }, - new BidLandscapeLandscapePoint() { - clicks = 66, - impressions = 550 - }, - } - }, new CriterionBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 5, - impressions = 232 - }, - new BidLandscapeLandscapePoint() { - clicks = 66, - impressions = 550 - }, - } - } - } - }; - - // Start index is less than total number of landscape points (5). - query.Limit(1, 20); - Assert.IsTrue(query.HasNextPage(criterionBidLandscapePage)); - - // Start index is less than total number of landscape points (0). - criterionBidLandscapePage.entries = new CriterionBidLandscape[] { - new CriterionBidLandscape() { - campaignId = 123, - adGroupId = 456, - landscapePoints = new BidLandscapeLandscapePoint[] {} - }, - new CriterionBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = null - } - }; - query.Limit(1, 20); - Assert.IsFalse(query.HasNextPage(criterionBidLandscapePage)); - } - - /// - /// Tests for . - /// - [Test] - public void TestNextPage() { - SelectQueryBuilder queryBuilder = null; - SelectQuery query = null; - - queryBuilder = new SelectQueryBuilder(); - query = queryBuilder - .Select("CampaignId", "Status", "Clicks", "Impressions") - .Where("Clicks").Equals(20) - .OrderByAscending("CampaignId") - .OrderByDescending("Status") - .Build(); - - // Test for regular pages. - CampaignPage campaignPage = new CampaignPage(); - - // Query limits should increment by numberResults (20). - query.Limit(1, 20); - query.NextPage(campaignPage); - Assert.IsTrue(query.ToString().Contains("LIMIT 21, 20")); - - // Test for AdGroupBidLandscapePage. - AdGroupBidLandscapePage adGroupBidLandscapePage = new AdGroupBidLandscapePage(); - adGroupBidLandscapePage.entries = new AdGroupBidLandscape[] { - new AdGroupBidLandscape() { - campaignId = 123, - adGroupId = 456, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 12, - impressions = 232 - }, - } - }, - new AdGroupBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 5, - impressions = 232 - }, - new BidLandscapeLandscapePoint() { - clicks = 66, - impressions = 550 - }, - } - } - }; - - // Query limits should increment by total landscapePoints (5). - query.Limit(1, 20); - query.NextPage(adGroupBidLandscapePage); - Assert.IsTrue(query.ToString().Contains("LIMIT 6, 20")); - - // Query limits should increment by total landscapePoints (0). - adGroupBidLandscapePage.entries = new AdGroupBidLandscape[] { - new AdGroupBidLandscape() { - campaignId = 123, - adGroupId = 456, - landscapePoints = new BidLandscapeLandscapePoint[] {} - }, - new AdGroupBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = null - } - }; - - query.Limit(1, 20); - query.NextPage(adGroupBidLandscapePage); - Assert.IsTrue(query.ToString().Contains("LIMIT 1, 20")); - - CriterionBidLandscapePage criterionBidLandscapePage = new CriterionBidLandscapePage() { - entries = new CriterionBidLandscape[] { - new CriterionBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 5, - impressions = 232 - }, - new BidLandscapeLandscapePoint() { - clicks = 66, - impressions = 550 - }, - } - }, new CriterionBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = new BidLandscapeLandscapePoint[] { - new BidLandscapeLandscapePoint() { - clicks = 10, - impressions = 200 - }, - new BidLandscapeLandscapePoint() { - clicks = 5, - impressions = 232 - }, - new BidLandscapeLandscapePoint() { - clicks = 66, - impressions = 550 - }, - } - } - } - }; - - // Query limits should increment by total landscapePoints (6). - query.Limit(1, 20); - query.NextPage(criterionBidLandscapePage); - Assert.IsTrue(query.ToString().Contains("LIMIT 7, 20")); - - // Query limits should increment by total landscapePoints (0). - criterionBidLandscapePage.entries = new CriterionBidLandscape[] { - new CriterionBidLandscape() { - campaignId = 123, - adGroupId = 456, - landscapePoints = new BidLandscapeLandscapePoint[] {} - }, - new CriterionBidLandscape() { - campaignId = 125, - adGroupId = 454, - landscapePoints = null - } - }; - - query.Limit(1, 20); - query.NextPage(criterionBidLandscapePage); - Assert.IsTrue(query.ToString().Contains("LIMIT 1, 20")); - } - } -} diff --git a/tests/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilderTest.cs b/tests/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilderTest.cs deleted file mode 100755 index 074b1fbae1b..00000000000 --- a/tests/AdWords/Util/Reports/QueryBuilder/v201806/WhereBuilderTest.cs +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Reports.v201806; - -using NUnit.Framework; - -namespace Google.Api.Ads.AdWords.Tests.Util.Reports.QueryBuilder.v201806 -{ - /// - /// Unit tests for the class. - /// - internal class WhereBuilderTest - { - private class MockWhereBuilder : WhereBuilder - { - internal MockWhereBuilder(string field) : base() - { - Init(field, this); - } - } - - private const string TEST_FIELDNAME = "CampaignId"; - private MockWhereBuilder builder = new MockWhereBuilder(TEST_FIELDNAME); - - private void TestCondition(string builderCondition, string expectedCondition) - { - Assert.AreEqual(string.Format("{0}{1}", TEST_FIELDNAME, expectedCondition), - builderCondition); - } - - /// - /// Tests the Equals method. - /// - [Test] - public void TestEquals() - { - TestCondition(builder.Equals("A").ToString(), " = 'A'"); - TestCondition(builder.Equals(20).ToString(), " = 20"); - TestCondition(builder.Equals(false).ToString(), " = FALSE"); - TestCondition(builder.Equals(20L).ToString(), " = 20"); - } - - /// - /// Tests the NotEquals method. - /// - [Test] - public void TestNotEquals() - { - TestCondition(builder.NotEquals("A").ToString(), " != 'A'"); - TestCondition(builder.NotEquals(20).ToString(), " != 20"); - TestCondition(builder.NotEquals(false).ToString(), " != FALSE"); - TestCondition(builder.NotEquals(20L).ToString(), " != 20"); - } - - /// - /// Tests the In method. - /// - [Test] - public void TestIn() - { - TestCondition(builder.In("A", "B").ToString(), " IN ['A', 'B']"); - TestCondition(builder.In(20, 30).ToString(), " IN [20, 30]"); - } - - /// - /// Tests the NotIn method. - /// - [Test] - public void TestNotIn() - { - TestCondition(builder.NotIn("A", "B").ToString(), " NOT_IN ['A', 'B']"); - TestCondition(builder.NotIn(20, 30).ToString(), " NOT_IN [20, 30]"); - } - - /// - /// Tests the Contains method. - /// - [Test] - public void TestContains() - { - TestCondition(builder.Contains("A").ToString(), " CONTAINS 'A'"); - } - - /// - /// Tests the ContainsIgnoreCase method. - /// - [Test] - public void TestContainsIgnoreCase() - { - TestCondition(builder.ContainsIgnoreCase("A").ToString(), " CONTAINS_IGNORE_CASE 'A'"); - } - - /// - /// Tests the DoesNotContain method. - /// - [Test] - public void TestDoesNotContain() - { - TestCondition(builder.DoesNotContain("A").ToString(), " DOES_NOT_CONTAIN 'A'"); - } - - /// - /// Tests the DoesNotContainIgnoreCase method. - /// - [Test] - public void TestDoesNotContainIgnoreCase() - { - TestCondition(builder.DoesNotContainIgnoreCase("A").ToString(), - " DOES_NOT_CONTAIN_IGNORE_CASE 'A'"); - } - - /// - /// Tests the ContainsAll method. - /// - [Test] - public void TestContainsAll() - { - TestCondition(builder.ContainsAll("A", "B").ToString(), " CONTAINS_ALL ['A', 'B']"); - TestCondition(builder.ContainsAll(20, 30).ToString(), " CONTAINS_ALL [20, 30]"); - } - - /// - /// Tests the ContainsAny method. - /// - [Test] - public void TestContainsAny() - { - TestCondition(builder.ContainsAny("A", "B").ToString(), " CONTAINS_ANY ['A', 'B']"); - TestCondition(builder.ContainsAny(20, 30).ToString(), " CONTAINS_ANY [20, 30]"); - } - - /// - /// Tests the ContainsNone method. - /// - [Test] - public void TestContainsNone() - { - TestCondition(builder.ContainsNone("A", "B").ToString(), " CONTAINS_NONE ['A', 'B']"); - TestCondition(builder.ContainsNone(20, 30).ToString(), " CONTAINS_NONE [20, 30]"); - TestCondition(builder.ContainsNone(20.3, 30.4).ToString(), - " CONTAINS_NONE [20.3, 30.4]"); - TestCondition(builder.ContainsNone(20L, 30L).ToString(), " CONTAINS_NONE [20, 30]"); - } - - /// - /// Tests the LessThan method. - /// - [Test] - public void TestLessThan() - { - TestCondition(builder.LessThan(20).ToString(), " < 20"); - TestCondition(builder.LessThan(20L).ToString(), " < 20"); - TestCondition(builder.LessThan(20.3).ToString(), " < 20.3"); - } - - /// - /// Tests the LessThanOrEqualTo method. - /// - [Test] - public void TestLessThanOrEqualTo() - { - TestCondition(builder.LessThanOrEqualTo(20).ToString(), " <= 20"); - TestCondition(builder.LessThanOrEqualTo(20L).ToString(), " <= 20"); - } - - /// - /// Tests the GreaterThan method. - /// - [Test] - public void TestGreaterThan() - { - TestCondition(builder.GreaterThan(20).ToString(), " > 20"); - TestCondition(builder.GreaterThan(20L).ToString(), " > 20"); - TestCondition(builder.GreaterThan(20.3).ToString(), " > 20.3"); - } - - /// - /// Tests the GreaterThanOrEqualTo method. - /// - [Test] - public void TestGreaterThanOrEqualTo() - { - TestCondition(builder.GreaterThanOrEqualTo(20).ToString(), " >= 20"); - TestCondition(builder.GreaterThanOrEqualTo(20L).ToString(), " >= 20"); - } - - /// - /// Tests the StartsWith method. - /// - [Test] - public void TestStartsWith() - { - TestCondition(builder.StartsWith("A").ToString(), " STARTS_WITH 'A'"); - } - - /// - /// Tests the StartsWithIgnoreCase method. - /// - [Test] - public void TestStartsWithIgnoreCase() - { - TestCondition(builder.StartsWithIgnoreCase("A").ToString(), - " STARTS_WITH_IGNORE_CASE 'A'"); - } - } -} diff --git a/tests/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparerTest.cs b/tests/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparerTest.cs deleted file mode 100755 index f9195e60fc7..00000000000 --- a/tests/AdWords/Util/Shopping/v201806/ProductDimensionEqualityComparerTest.cs +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -namespace Google.Api.Ads.AdWords.Tests.Util.Shopping.v201806 -{ - /// - /// Tests for class. - /// - public class ProductDimensionEqualityComparerTest - { - /// - /// The instance for running tests. - /// - private ProductDimensionEqualityComparer comparer = new ProductDimensionEqualityComparer(); - - /// - /// Initializes this instance. - /// - [SetUp] - public void Init() - { - } - - /// - /// Tests equality for null objects. - /// - [Test] - public void TestNullEquals() - { - ProductDimension dimension = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 2L - }; - - Assert.False(comparer.Equals(dimension, null)); - Assert.False(comparer.Equals(null, dimension)); - Assert.True(comparer.Equals(null, null)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductBiddingCategoryEquals() - { - ProductBiddingCategory categoryA = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 2L - }; - - ProductBiddingCategory categoryB = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 2L - }; - - ProductBiddingCategory categoryC = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L2, - value = 2L - }; - - ProductBiddingCategory categoryD = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 5L - }; - - ProductBiddingCategory categoryE = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - }; - - ProductBiddingCategory categoryF = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - }; - - ProductBiddingCategory categoryG = new ProductBiddingCategory(); - ProductBiddingCategory categoryH = new ProductBiddingCategory(); - - Assert.True(comparer.Equals(categoryA, categoryB)); - Assert.False(comparer.Equals(categoryA, categoryC)); - Assert.False(comparer.Equals(categoryA, categoryD)); - - // Null value is handled gracefully. - Assert.False(comparer.Equals(categoryA, categoryD)); - Assert.False(comparer.Equals(categoryA, categoryE)); - Assert.True(comparer.Equals(categoryE, categoryF)); - Assert.True(comparer.Equals(categoryG, categoryH)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductBrandEquals() - { - ProductBrand brandA = new ProductBrand() - { - value = "google" - }; - - ProductBrand brandATitleCase = new ProductBrand() - { - value = "Google" - }; - - ProductBrand brandB = new ProductBrand() - { - value = "google" - }; - - ProductBrand brandC = new ProductBrand() - { - value = "motorola" - }; - - ProductBrand brandD = new ProductBrand(); - ProductBrand brandE = new ProductBrand(); - - Assert.True(comparer.Equals(brandA, brandB)); - Assert.False(comparer.Equals(brandA, brandC)); - - // Case of value is ignored. - Assert.True(comparer.Equals(brandA, brandATitleCase)); - - //Null value is handled gracefully. - Assert.False(comparer.Equals(brandA, brandD)); - Assert.True(comparer.Equals(brandD, brandE)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductCanonicalConditionEquals() - { - ProductCanonicalCondition conditionA = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.NEW - }; - - ProductCanonicalCondition conditionB = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.NEW - }; - - ProductCanonicalCondition conditionC = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.REFURBISHED - }; - - ProductCanonicalCondition conditionD = new ProductCanonicalCondition(); - ProductCanonicalCondition conditionE = new ProductCanonicalCondition(); - - Assert.True(comparer.Equals(conditionA, conditionB)); - Assert.False(comparer.Equals(conditionA, conditionC)); - - //Null value is handled gracefully. - Assert.False(comparer.Equals(conditionA, conditionD)); - Assert.True(comparer.Equals(conditionD, conditionE)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductCustomAttributeEquals() - { - ProductCustomAttribute customAttributeA = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "google" - }; - - ProductCustomAttribute customAttributeATitleCase = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "Google" - }; - - ProductCustomAttribute customAttributeB = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "google" - }; - - ProductCustomAttribute customAttributeC = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "motorola" - }; - - ProductCustomAttribute customAttributeD = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L2, - value = "google" - }; - - ProductCustomAttribute customAttributeE = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - }; - - ProductCustomAttribute customAttributeF = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - }; - - ProductCustomAttribute customAttributeG = new ProductCustomAttribute(); - ProductCustomAttribute customAttributeH = new ProductCustomAttribute(); - - Assert.True(comparer.Equals(customAttributeA, customAttributeB)); - Assert.False(comparer.Equals(customAttributeA, customAttributeC)); - Assert.False(comparer.Equals(customAttributeA, customAttributeD)); - Assert.False(comparer.Equals(customAttributeA, customAttributeE)); - - // Case of value is ignored. - Assert.True(comparer.Equals(customAttributeA, customAttributeATitleCase)); - - //Null value is handled gracefully. - Assert.False(comparer.Equals(customAttributeA, customAttributeE)); - Assert.True(comparer.Equals(customAttributeE, customAttributeF)); - Assert.True(comparer.Equals(customAttributeG, customAttributeH)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductOfferIdEquals() - { - ProductOfferId productOfferIdA = new ProductOfferId() - { - value = "google" - }; - - ProductOfferId productOfferIdATitleCase = new ProductOfferId() - { - value = "Google" - }; - - ProductOfferId productOfferIdB = new ProductOfferId() - { - value = "google" - }; - - ProductOfferId productOfferIdC = new ProductOfferId() - { - value = "motorola" - }; - - ProductOfferId productOfferIdD = new ProductOfferId(); - ProductOfferId productOfferIdE = new ProductOfferId(); - - Assert.True(comparer.Equals(productOfferIdA, productOfferIdB)); - Assert.False(comparer.Equals(productOfferIdA, productOfferIdC)); - - // Case of value is ignored. - Assert.True(comparer.Equals(productOfferIdA, productOfferIdATitleCase)); - - //Null value is handled gracefully. - Assert.False(comparer.Equals(productOfferIdA, productOfferIdD)); - Assert.True(comparer.Equals(productOfferIdD, productOfferIdE)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductTypeEquals() - { - ProductType productTypeA = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "google", - }; - - ProductType productTypeATitleCase = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "Google", - }; - - ProductType productTypeB = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "google" - }; - - ProductType productTypeC = new ProductType() - { - type = ProductDimensionType.CHANNEL, - value = "google" - }; - - ProductType productTypeD = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "motorola" - }; - - ProductType productTypeE = new ProductType() - { - type = ProductDimensionType.BRAND, - }; - - ProductType productTypeF = new ProductType() - { - type = ProductDimensionType.BRAND, - }; - - ProductType productTypeG = new ProductType(); - ProductType productTypeH = new ProductType(); - - Assert.True(comparer.Equals(productTypeA, productTypeB)); - Assert.False(comparer.Equals(productTypeA, productTypeC)); - Assert.False(comparer.Equals(productTypeA, productTypeD)); - - // Case of value is ignored. - Assert.True(comparer.Equals(productTypeA, productTypeATitleCase)); - - //Null value is handled gracefully. - Assert.False(comparer.Equals(productTypeA, productTypeE)); - Assert.True(comparer.Equals(productTypeE, productTypeF)); - Assert.True(comparer.Equals(productTypeG, productTypeH)); - } - - /// - /// Tests equality for objects. - /// - [Test] - public void TestProductChannelExclusivityEquals() - { - ProductChannelExclusivity channelExclusivityA = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.MULTI_CHANNEL - }; - - ProductChannelExclusivity channelExclusivityB = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.MULTI_CHANNEL - }; - - ProductChannelExclusivity channelExclusivityC = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.SINGLE_CHANNEL - }; - - ProductChannelExclusivity channelExclusivityD = new ProductChannelExclusivity(); - ProductChannelExclusivity channelExclusivityE = new ProductChannelExclusivity(); - - Assert.True(comparer.Equals(channelExclusivityA, channelExclusivityB)); - Assert.False(comparer.Equals(channelExclusivityA, channelExclusivityC)); - - //Null value is handled gracefully. - Assert.False(comparer.Equals(channelExclusivityA, channelExclusivityE)); - Assert.True(comparer.Equals(channelExclusivityD, channelExclusivityE)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductBiddingCategoryGetHashcode() - { - ProductBiddingCategory categoryA = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 2L - }; - - ProductBiddingCategory categoryB = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 2L - }; - - ProductBiddingCategory categoryC = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L2, - value = 2L - }; - - ProductBiddingCategory categoryD = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 5L - }; - - Assert.AreEqual(comparer.GetHashCode(categoryA), comparer.GetHashCode(categoryB)); - Assert.AreNotEqual(comparer.GetHashCode(categoryA), comparer.GetHashCode(categoryC)); - Assert.AreNotEqual(comparer.GetHashCode(categoryA), comparer.GetHashCode(categoryD)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductBrandGetHashcode() - { - ProductBrand brandA = new ProductBrand() - { - value = "google" - }; - - ProductBrand brandATitleCase = new ProductBrand() - { - value = "Google" - }; - - ProductBrand brandB = new ProductBrand() - { - value = "google" - }; - - ProductBrand brandC = new ProductBrand() - { - value = "motorola" - }; - - Assert.AreEqual(comparer.GetHashCode(brandA), comparer.GetHashCode(brandB)); - Assert.AreNotEqual(comparer.GetHashCode(brandA), comparer.GetHashCode(brandC)); - - // Case of value is ignored. - Assert.AreEqual(comparer.GetHashCode(brandA), comparer.GetHashCode(brandATitleCase)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductCanonicalConditionGetHashcode() - { - ProductCanonicalCondition conditionA = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.NEW - }; - - ProductCanonicalCondition conditionB = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.NEW - }; - - ProductCanonicalCondition conditionC = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.REFURBISHED - }; - - Assert.AreEqual(comparer.GetHashCode(conditionA), comparer.GetHashCode(conditionB)); - Assert.AreNotEqual(comparer.GetHashCode(conditionA), comparer.GetHashCode(conditionC)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductCustomAttributeGetHashcode() - { - ProductCustomAttribute customAttributeA = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "google" - }; - - ProductCustomAttribute customAttributeATitleCase = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "Google" - }; - - ProductCustomAttribute customAttributeB = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "google" - }; - - ProductCustomAttribute customAttributeC = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "motorola" - }; - - ProductCustomAttribute customAttributeD = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L2, - value = "google" - }; - - Assert.AreEqual(comparer.GetHashCode(customAttributeA), - comparer.GetHashCode(customAttributeB)); - Assert.AreNotEqual(comparer.GetHashCode(customAttributeA), - comparer.GetHashCode(customAttributeC)); - Assert.AreNotEqual(comparer.GetHashCode(customAttributeA), - comparer.GetHashCode(customAttributeD)); - - // Case of value is ignored. - Assert.AreEqual(comparer.GetHashCode(customAttributeA), - comparer.GetHashCode(customAttributeATitleCase)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductOfferIdGetHashcode() - { - ProductOfferId productOfferIdA = new ProductOfferId() - { - value = "google" - }; - - ProductOfferId productOfferIdATitleCase = new ProductOfferId() - { - value = "Google" - }; - - ProductOfferId productOfferIdB = new ProductOfferId() - { - value = "google" - }; - - ProductOfferId productOfferIdC = new ProductOfferId() - { - value = "motorola" - }; - - Assert.AreEqual(comparer.GetHashCode(productOfferIdA), - comparer.GetHashCode(productOfferIdA)); - Assert.AreNotEqual(comparer.GetHashCode(productOfferIdA), - comparer.GetHashCode(productOfferIdC)); - - // Case of value is ignored. - Assert.AreEqual(comparer.GetHashCode(productOfferIdA), - comparer.GetHashCode(productOfferIdATitleCase)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductTypeGetHashcode() - { - ProductType productTypeA = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "google", - }; - - ProductType productTypeATitleCase = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "Google", - }; - - ProductType productTypeB = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "google" - }; - - ProductType productTypeC = new ProductType() - { - type = ProductDimensionType.CHANNEL, - value = "google" - }; - - ProductType productTypeD = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "motorola" - }; - - Assert.AreEqual(comparer.GetHashCode(productTypeA), comparer.GetHashCode(productTypeB)); - Assert.AreNotEqual(comparer.GetHashCode(productTypeA), - comparer.GetHashCode(productTypeC)); - Assert.AreNotEqual(comparer.GetHashCode(productTypeA), - comparer.GetHashCode(productTypeD)); - - Assert.AreEqual(comparer.GetHashCode(productTypeA), - comparer.GetHashCode(productTypeATitleCase)); - } - - /// - /// Tests the calculation of hashcodes for objects. - /// - [Test] - public void TestProductChannelExclusivityGetHashcode() - { - ProductChannelExclusivity channelExclusivityA = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.MULTI_CHANNEL - }; - - ProductChannelExclusivity channelExclusivityB = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.MULTI_CHANNEL - }; - - ProductChannelExclusivity channelExclusivityC = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.SINGLE_CHANNEL - }; - - Assert.AreEqual(comparer.GetHashCode(channelExclusivityA), - comparer.GetHashCode(channelExclusivityB)); - Assert.AreNotEqual(comparer.GetHashCode(channelExclusivityA), - comparer.GetHashCode(channelExclusivityC)); - } - } -} diff --git a/tests/AdWords/Util/Shopping/v201806/ProductDimensionsTest.cs b/tests/AdWords/Util/Shopping/v201806/ProductDimensionsTest.cs deleted file mode 100755 index d8754349843..00000000000 --- a/tests/AdWords/Util/Shopping/v201806/ProductDimensionsTest.cs +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -namespace Google.Api.Ads.AdWords.Tests.Util.Shopping.v201806 -{ - /// - /// Tests for class. - /// - public class ProductDimensionsTest - { - /// - /// The class to check for - /// equality of newly created objects with - /// existing instances. - /// - private ProductDimensionEqualityComparer comparer = new ProductDimensionEqualityComparer(); - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestCreateBiddingCategory() - { - ProductBiddingCategory categoryA = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = 2L - }; - - ProductBiddingCategory categoryB = - ProductDimensions.CreateBiddingCategory(ProductDimensionType.BIDDING_CATEGORY_L1, - 2L); - - Assert.True(comparer.Equals(categoryA, categoryB)); - - ProductBiddingCategory categoryC = new ProductBiddingCategory() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - }; - - ProductBiddingCategory categoryD = - ProductDimensions.CreateBiddingCategory(ProductDimensionType.BIDDING_CATEGORY_L1); - - Assert.True(comparer.Equals(categoryC, categoryD)); - } - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestCreateBrand() - { - ProductBrand brandA = new ProductBrand() - { - value = "google" - }; - - ProductBrand brandB = ProductDimensions.CreateBrand("google"); - - Assert.True(comparer.Equals(brandA, brandB)); - - ProductBrand brandC = new ProductBrand() - { - }; - - ProductBrand brandD = ProductDimensions.CreateBrand(); - - Assert.True(comparer.Equals(brandC, brandD)); - } - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestCreateCanonicalCondition() - { - ProductCanonicalCondition conditionA = new ProductCanonicalCondition() - { - condition = ProductCanonicalConditionCondition.NEW - }; - - ProductCanonicalCondition conditionB = - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition.NEW); - - Assert.True(comparer.Equals(conditionA, conditionB)); - - ProductCanonicalCondition conditionC = new ProductCanonicalCondition() - { - }; - - ProductCanonicalCondition conditionD = ProductDimensions.CreateCanonicalCondition(); - - Assert.True(comparer.Equals(conditionC, conditionD)); - } - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestCreateCustomAttribute() - { - ProductCustomAttribute customAttributeA = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - value = "google" - }; - - ProductCustomAttribute customAttributeB = - ProductDimensions.CreateCustomAttribute(ProductDimensionType.BIDDING_CATEGORY_L1, - "google"); - - Assert.True(comparer.Equals(customAttributeA, customAttributeB)); - - ProductCustomAttribute customAttributeC = new ProductCustomAttribute() - { - type = ProductDimensionType.BIDDING_CATEGORY_L1, - }; - - ProductCustomAttribute customAttributeD = - ProductDimensions.CreateCustomAttribute(ProductDimensionType.BIDDING_CATEGORY_L1); - - Assert.True(comparer.Equals(customAttributeC, customAttributeD)); - } - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestCreateOfferId() - { - ProductOfferId productOfferIdA = new ProductOfferId() - { - value = "google" - }; - - ProductOfferId productOfferIdB = ProductDimensions.CreateOfferId("google"); - - Assert.True(comparer.Equals(productOfferIdA, productOfferIdB)); - - ProductOfferId productOfferIdC = new ProductOfferId() - { - }; - - ProductOfferId productOfferIdD = ProductDimensions.CreateOfferId(); - - Assert.True(comparer.Equals(productOfferIdC, productOfferIdD)); - } - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestProductTypeEquals() - { - ProductType productTypeA = new ProductType() - { - type = ProductDimensionType.BRAND, - value = "google", - }; - - ProductType productTypeB = - ProductDimensions.CreateType(ProductDimensionType.BRAND, "google"); - - Assert.True(comparer.Equals(productTypeA, productTypeB)); - - ProductType productTypeC = new ProductType() - { - type = ProductDimensionType.BRAND, - }; - - ProductType productTypeD = ProductDimensions.CreateType(ProductDimensionType.BRAND); - - Assert.True(comparer.Equals(productTypeC, productTypeD)); - } - - /// - /// Tests the creation of objects. - /// - [Test] - public void TestProductChannelExclusivityEquals() - { - ProductChannelExclusivity channelExclusivityA = new ProductChannelExclusivity() - { - channelExclusivity = ShoppingProductChannelExclusivity.MULTI_CHANNEL - }; - - ProductChannelExclusivity channelExclusivityB = - ProductDimensions.CreateChannelExclusivity(ShoppingProductChannelExclusivity - .MULTI_CHANNEL); - - Assert.True(comparer.Equals(channelExclusivityA, channelExclusivityB)); - - ProductChannelExclusivity channelExclusivityC = new ProductChannelExclusivity() - { - }; - - ProductChannelExclusivity channelExclusivityD = - ProductDimensions.CreateChannelExclusivity(); - - Assert.True(comparer.Equals(channelExclusivityC, channelExclusivityD)); - } - } -} diff --git a/tests/AdWords/Util/Shopping/v201806/ProductPartitionNodeTest.cs b/tests/AdWords/Util/Shopping/v201806/ProductPartitionNodeTest.cs deleted file mode 100755 index 657ce6477d3..00000000000 --- a/tests/AdWords/Util/Shopping/v201806/ProductPartitionNodeTest.cs +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System; -using System.Linq; - -namespace Google.Api.Ads.AdWords.Tests.Util.Shopping.v201806 -{ - /// - /// Tests for the class. - /// - public class ProductPartitionNodeTest - { - /// - /// The root node. - /// - private ProductPartitionNode rootNode; - - private const int ROOT_NODE_ID = ProductPartitionTree.NEW_ROOT_ID; - - /// - /// Initializes this instance. - /// - [SetUp] - public void Init() - { - rootNode = new ProductPartitionNode(null, null, ROOT_NODE_ID); - } - - /// - /// Tests the basic functionality for a root node. - /// - [Test] - public void TestRootNodeBasicFunctionality() - { - Assert.Null(rootNode.Parent, "Parent of parentNode should be null."); - Assert.Null(rootNode.Dimension, "ParentNode dimension should be null."); - Assert.Null(rootNode.Dimension, "ParentNode should be null."); - Assert.AreEqual(ROOT_NODE_ID, rootNode.ProductPartitionId, - "Partition ID is incorrect after constructor."); - - rootNode.ProductPartitionId = -2L; - Assert.AreEqual(-2L, rootNode.ProductPartitionId, - "Partition ID is incorrect after setting productPartitionId."); - - Assert.That(rootNode.Children.Count() == 0, "ParentNode should not have any children."); - Assert.True(rootNode.IsUnit, "New node should be a unit node by default"); - Assert.False(rootNode.IsSubdivision, - "New node should not be a subdivision by default."); - Assert.True(rootNode.IsBiddableUnit, - "New node should be a biddable unit node by default."); - } - - /// - /// Tests the basic functionality for a child node. - /// - [Test] - public void TestChildNodeBasicFunctionality() - { - rootNode = rootNode.AsSubdivision(); - Assert.False(rootNode.IsUnit, "Parent should not be a unit."); - Assert.True(rootNode.IsSubdivision, "Parent should be a subdivision."); - ProductBrand childDimension = ProductDimensions.CreateBrand("google"); - ProductPartitionNode childNode = rootNode.AddChild(childDimension); - - Assert.AreSame(childDimension, childNode.Dimension, - "Child node merely wraps the " + "underlying dimension node."); - Assert.AreSame(rootNode, childNode.Parent, "child.GetParent should return parentNode."); - Assert.That(childNode.ProductPartitionId == 0, "Partition ID is incorrect."); - - Assert.That(childNode.Children.Count() == 0, "ChildNode should not have any children."); - Assert.True(childNode.IsUnit, "New node should be a unit node by default."); - Assert.True(childNode.IsBiddableUnit, - "New node should be a biddable unit node by default."); - - Assert.That(rootNode.HasChild(childDimension), - "rootNode.HasChild should return true when " + - "passed the dimension of the added child"); - Assert.False(rootNode.HasChild(ProductDimensions.CreateBrand("xyz")), - "rootNode.HasChild " + - "should return false when passed a dimension for a nonexistent child"); - Assert.False(rootNode.HasChild(null), - "rootNode.HasChild should return false when passed " + - "a dimension for a nonexistent child"); - } - - /// - /// Make sure that you cannot add a child node to a Unit node. - /// - [Test] - public void TestAddChildToUnitFails() - { - Assert.True(rootNode.IsUnit, "Root should be a unit by default."); - Assert.Throws(delegate() - { - rootNode.AddChild(ProductDimensions.CreateBrand("google")); - }); - } - - /// - /// Make sure that you cannot exclude the root node. - /// - [Test] - public void TestCreateExcludedRootFails() - { - Assert.Throws(delegate() { rootNode.AsExcludedUnit(); }); - } - - /// - /// Make sure you cannot retrieve a child node that doesn't exist. - /// - [Test] - public void TestGetChildThatDoesNotExistFails() - { - rootNode = rootNode.AsSubdivision(); - Assert.Throws(delegate() - { - rootNode.GetChild(ProductDimensions.CreateBrand("google")); - }); - } - - /// - /// Make sure you cannot remove a child node that doesn't exist. - /// - [Test] - public void TestRemoveChildThatDoesNotExistFails() - { - rootNode = rootNode.AsSubdivision(); - Assert.Throws(delegate() - { - rootNode.RemoveChild(ProductDimensions.CreateBrand("google")); - }); - } - - /// - /// Make sure you cannot add an existing node again. - /// - [Test] - public void TestAddChildThatExistsFails() - { - rootNode = rootNode.AsSubdivision(); - rootNode.AddChild(ProductDimensions.CreateBrand("google")); - - // Add the same child again. The call should fail. - Assert.Throws(delegate() - { - rootNode.AddChild(ProductDimensions.CreateBrand("google")); - }); - - // Add the same child again, this time with a different case. - // The call should fail. - Assert.Throws(delegate() - { - rootNode.AddChild(ProductDimensions.CreateBrand("GOOGLE")); - }); - } - - /// - /// Make sure that setting a bid on a SUBDIVISION node fails. - /// - [Test] - public void TestSetBidOnSubdivisionFails() - { - rootNode = rootNode.AsSubdivision(); - Assert.Throws(delegate() { rootNode.CpcBid = 1; }); - } - - /// - /// Make sure that setting a negative bid on a UNIT node fails. - /// - [Test] - public void TestSetNegativeBidFails() - { - Assert.True(rootNode.IsUnit, "root should be a unit by default."); - Assert.Throws(delegate() { rootNode.CpcBid = -1; }); - } - - /// - /// Tests setting bids on a . - /// - [Test] - public void TestSetBidOnUnit() - { - rootNode = rootNode.AsSubdivision(); - ProductBrand childDimension = ProductDimensions.CreateBrand("google"); - ProductPartitionNode childNode = rootNode.AddChild(childDimension); - - Assert.That(childNode.CpcBidSpecified == false, "Bid should be null by default."); - - childNode.CpcBid = 1L; - - Assert.AreEqual(1L, childNode.CpcBid, "Bid does not reflect setBid."); - Assert.True(childNode.IsBiddableUnit, "Node should be a biddable unit."); - - childNode = childNode.AsExcludedUnit(); - Assert.True(childNode.IsExcludedUnit, "Node should be an excluded unit."); - Assert.False(childNode.IsBiddableUnit, "Node should not be a biddable unit."); - Assert.False(childNode.CpcBidSpecified, "Excluded unit should have a null bid"); - - // Set back to biddable. - childNode = childNode.AsBiddableUnit(); - Assert.True(childNode.IsBiddableUnit, "Node should be a biddable unit."); - } - - /// - /// Tests the navigation on a Product partition node and its children. - /// - [Test] - public void TestNavigation() - { - rootNode = rootNode.AsSubdivision(); - ProductBrand brandGoogle = ProductDimensions.CreateBrand("google"); - ProductBrand brandOther = ProductDimensions.CreateBrand(null); - ProductCanonicalCondition conditionNew = - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition.NEW); - ProductCanonicalCondition conditionUsed = - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition.USED); - ProductCanonicalCondition conditionOther = ProductDimensions.CreateCanonicalCondition(); - - // Build up the brand = Google node under the root. - ProductPartitionNode brandGoogleNode = rootNode.AddChild(brandGoogle).AsSubdivision(); - brandGoogleNode.AddChild(conditionNew); - brandGoogleNode.AddChild(conditionUsed); - brandGoogleNode.AddChild(conditionOther); - - Assert.True(brandGoogleNode.HasChild(conditionNew), - "HasChild should return true for existing child dimension."); - Assert.AreSame(brandGoogleNode, brandGoogleNode.GetChild(conditionNew).Parent, - "parent->GetChild->getParent should return parent."); - Assert.True(brandGoogleNode.HasChild(conditionUsed), - "HasChild should return true for existing child dimension."); - Assert.AreSame(brandGoogleNode, brandGoogleNode.GetChild(conditionUsed).Parent, - "parent->GetChild->getParent should return parent."); - Assert.True(brandGoogleNode.HasChild(conditionOther), - "HasChild should return true for existing child dimension."); - Assert.AreSame(brandGoogleNode, brandGoogleNode.GetChild(conditionOther).Parent, - "parent->GetChild->getParent should return parent."); - - // Build up the brand = null (other) node under the root. - ProductPartitionNode brandOtherNode = rootNode.AddChild(brandOther).AsSubdivision(); - brandOtherNode.AddChild(conditionNew); - Assert.True(brandOtherNode.HasChild(conditionNew), - "HasChild should return true for existing child dimension."); - Assert.AreSame(brandOtherNode, brandOtherNode.GetChild(conditionNew).Parent, - "parent->GetChild->getParent should return parent."); - Assert.False(brandOtherNode.HasChild(conditionUsed), - "HasChild should return false for nonexistent child dimension."); - Assert.False(brandOtherNode.HasChild(conditionOther), - "HasChild should return false for nonexistent child dimension."); - brandOtherNode.AddChild(conditionOther); - Assert.True(brandOtherNode.HasChild(conditionOther), - "HasChild should return true for existing child dimension."); - Assert.AreSame(brandOtherNode, brandOtherNode.GetChild(conditionOther).Parent, - "parent->GetChild->getParent should return parent."); - - // Remove one of the children of brand = null. - brandOtherNode.RemoveChild(conditionOther); - Assert.False(brandOtherNode.HasChild(conditionOther), - "HasChild should return false for a removed child dimension."); - - // Remove the rest of the children of brand = null. - brandOtherNode.RemoveAllChildren(); - Assert.False(brandOtherNode.HasChild(conditionNew), - "HasChild should return false for any removed child dimension."); - Assert.False(brandOtherNode.HasChild(conditionUsed), - "HasChild should return false for any removed child dimension."); - } - } -} diff --git a/tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeIntegrationTests.cs b/tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeIntegrationTests.cs deleted file mode 100755 index e3673bcee64..00000000000 --- a/tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeIntegrationTests.cs +++ /dev/null @@ -1,567 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Tests.v201806; -using Google.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System; -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Tests.Util.Shopping.v201806 -{ - /// - /// Integration tests for class. - /// - internal class ProductPartitionTreeIntegrationTests : VersionedExampleTestsBase - { - /// - /// The campaign ID for running tests. - /// - private long CAMPAIGN_ID = 0; - - /// - /// The adgroup ID for running tests. - /// - private long ADGROUP_ID = 0; - - /// - /// The utility class for running tests. - /// - private ShoppingTestUtils shoppingTestUtils = new ShoppingTestUtils(); - - private ProductPartitionTree tree = null; - - /// - /// Initializes this instance. - /// - [SetUp] - public void Init() - { - CAMPAIGN_ID = utils.CreateShoppingCampaign(user, BiddingStrategyType.MANUAL_CPC); - ADGROUP_ID = utils.CreateAdGroup(user, CAMPAIGN_ID); - - tree = ProductPartitionTree.CreateAdGroupTree(ADGROUP_ID, new List()); - ProductPartitionNode root = tree.Root.AsSubdivision(); - - ProductPartitionNode clothing = root.AddChild( - ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, "clothing")); - clothing.AsBiddableUnit().CpcBid = 200000; - ProductPartitionNode shoes = - root.AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - "shoes")); - shoes.AsBiddableUnit().CpcBid = 400000; - ProductPartitionNode otherNode = - root.AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1)); - otherNode.AsBiddableUnit().CpcBid = 300000; - - tree = ExecuteTreeOperations(); - } - - /// - /// Executes the tree operations. - /// - /// The synced product partition tree. - private ProductPartitionTree ExecuteTreeOperations() - { - AdGroupCriterionOperation[] operations = tree.GetMutateOperations(); - AdGroupCriterionService service = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - service.mutate(operations); - return ProductPartitionTree.DownloadAdGroupTree(user, ADGROUP_ID); - } - - /// - /// Does a sequence of tree transformations. - /// - [Test] - public void DoEverything() - { - SetRootToEmpty(); - RebuildSingleNodeTree(); - RebuildMultiNodeTree(); - RebuildComplexTree(); - - RebuildMultiNodeTree(); - SubdivideShoes(); - CollapseShoes(); - SubdivideShoes(); - SubdivideNewShoes(); - CollapseNewShoes(); - SubdivideThenCollapseNewShoes(); - RemoveShoes(); - - UpdateClothingBid(); - UpdateClothingBidTwice(); - - UseObsoleteCategory(); - CreateTreeFromCriteria(); - } - - /// - /// Removes the root of the tree. - /// - private void SetRootToEmpty() - { - ProductPartitionNode root = tree.Root; - if (root != null && root.ProductPartitionId >= 0L) - { - AdGroupCriterion rootCriterion = new AdGroupCriterion() - { - adGroupId = ADGROUP_ID, - criterion = new Criterion() - { - id = root.ProductPartitionId - } - }; - - AdGroupCriterionOperation removeOp = new AdGroupCriterionOperation() - { - @operator = Operator.REMOVE, - operand = rootCriterion - }; - - AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - adGroupCriterionService.mutate(new AdGroupCriterionOperation[] - { - removeOp - }); - } - - Assert.DoesNotThrow(delegate() - { - tree = ProductPartitionTree.DownloadAdGroupTree(user, ADGROUP_ID); - }); - } - - /// - /// Creates a tree of the form: - /// - ///
-        ///   ROOT $2.50
-        /// 
- ///
- private void RebuildSingleNodeTree() - { - // Clear out the tree and set the root bid. - tree.Root.RemoveAllChildren().AsBiddableUnit().CpcBid = 2500000L; - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - private void RebuildMultiNodeTree() - { - // Clear out the tree. - ProductPartitionNode rootNode = tree.Root.RemoveAllChildren().AsSubdivision(); - - long[] bids = new long[] - { - 2500000L, - 1500000L, - 1000000L - }; - String[] productTypeValues = new String[] - { - "shoes", - "clothing", - null - }; - for (int i = 0; i < productTypeValues.Length; i++) - { - rootNode.AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - productTypeValues[i])).AsBiddableUnit().CpcBid = bids[i]; - } - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Creates a tree of the form: - /// - ///
-        /// ROOT
-        ///   ProductType Level1 shoes
-        ///     ProductType Level2 athletic shoes
-        ///       Condition new $2.50
-        ///       Condition used $1.00
-        ///       Other - exclude from bidding
-        ///     ProductType Level2 walking shoes
-        ///       Condition new $3.50
-        ///       Condition used $1.25
-        ///       Other $1.00
-        ///     ProductType Level2 null (everything else) - exclude from bidding
-        ///   ProductType Level1 clothing
-        ///     ProductType Level2 winter clothing
-        ///       Condition new $1.00
-        ///       Condition used $1.25
-        ///       Other $1.50
-        ///     ProductType Level2 summer clothing
-        ///       Condition new $1.10
-        ///       Condition used $1.00
-        ///       Other $1.25
-        ///     ProductType Level2 null (everything else)
-        ///       Condition new $0.90
-        ///       Condition used $0.85
-        ///       Other $0.75
-        ///   ProductType Level1 null (everything else) - exclude from bidding
-        /// 
- ///
- private void RebuildComplexTree() - { - // Clear out the tree. - ProductPartitionNode rootNode = tree.Root.RemoveAllChildren().AsSubdivision(); - - ProductPartitionNode shoesLevel1 = rootNode - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - "shoes")).AsSubdivision(); - - ProductPartitionNode athleticShoesLevel2 = shoesLevel1 - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L2, - "athletic shoes")).AsSubdivision(); - athleticShoesLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 2500000L; - athleticShoesLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)).AsBiddableUnit().CpcBid = 1000000L; - athleticShoesLevel2.AddChild(ProductDimensions.CreateCanonicalCondition()) - .AsExcludedUnit(); - - ProductPartitionNode walkingShoesLevel2 = shoesLevel1 - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L2, - "walking shoes")).AsSubdivision(); - walkingShoesLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 3500000L; - walkingShoesLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)).AsBiddableUnit().CpcBid = 1250000L; - walkingShoesLevel2.AddChild(ProductDimensions.CreateCanonicalCondition()) - .AsBiddableUnit().CpcBid = 1000000L; - - shoesLevel1.AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L2)) - .AsExcludedUnit(); - - ProductPartitionNode clothingLevel1 = rootNode - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - "clothing")).AsSubdivision(); - - ProductPartitionNode winterClothingLevel2 = clothingLevel1 - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L2, - "winter clothing")).AsSubdivision(); - winterClothingLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 1000000L; - winterClothingLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)).AsBiddableUnit().CpcBid = 1250000L; - winterClothingLevel2.AddChild(ProductDimensions.CreateCanonicalCondition()) - .AsBiddableUnit().CpcBid = 1500000L; - - ProductPartitionNode summerClothingLevel2 = clothingLevel1 - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L2, - "summer clothing")).AsSubdivision(); - summerClothingLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 1100000L; - summerClothingLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)).AsBiddableUnit().CpcBid = 1000000L; - summerClothingLevel2.AddChild(ProductDimensions.CreateCanonicalCondition()) - .AsBiddableUnit().CpcBid = 1250000L; - - ProductPartitionNode otherClothingLevel2 = clothingLevel1 - .AddChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L2, null)) - .AsSubdivision(); - otherClothingLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 900000L; - otherClothingLevel2 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .USED)).AsBiddableUnit().CpcBid = 850000L; - otherClothingLevel2.AddChild(ProductDimensions.CreateCanonicalCondition()) - .AsBiddableUnit().CpcBid = 750000L; - - rootNode.AddChild( - ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, null)) - .AsExcludedUnit(); - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Takes a tree with product type L1 "shoes" UNIT and subdivides that node into UNITs: - /// - ///
-        /// shoes
-        ///   new $1.00
-        ///   refurbished $1.50
-        ///   other - excluded
-        /// 
- ///
- private void SubdivideShoes() - { - ProductPartitionNode shoesLevel1 = tree.Root - .GetChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - "shoes")).AsSubdivision(); - shoesLevel1 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 1000000L; - shoesLevel1 - .AddChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .REFURBISHED)).AsBiddableUnit().CpcBid = 1500000L; - shoesLevel1.AddChild(ProductDimensions.CreateCanonicalCondition()).AsExcludedUnit(); - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Subdivides the new shoes. - /// - /// Takes a tree with: - ///
-        /// ROOT
-        ///   ...
-        ///   shoes
-        ///     new some bid
-        /// 
- /// - /// and changes it to: - /// - ///
-        ///   ROOT
-        ///     ...
-        ///     shoes
-        ///       new
-        ///       other offerId $1.00
-        ///       offerId=2 $2.00
-        ///       ...
-        ///       offerId=20 $20.00
-        /// 
- private void SubdivideNewShoes() - { - ProductPartitionNode shoesLevel1 = tree.Root - .GetChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - "shoes")).AsSubdivision(); - ProductPartitionNode newShoesLevel2 = shoesLevel1 - .GetChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsSubdivision(); - - for (int i = 1; i <= 20; i++) - { - ProductOfferId offerId = ProductDimensions.CreateOfferId(); - if (i > 1) - { - offerId.value = i.ToString(); - } - - newShoesLevel2.AddChild(offerId).AsBiddableUnit().CpcBid = i * 1000000L; - } - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Takes a tree with: - /// - ///
-        /// ROOT
-        ///  ...
-        ///  shoes
-        ///    new
-        ///      offerId=1 $1.00
-        ///      offerId=2 $2.00
-        ///      ...
-        ///      offerId=20 $20.00
-        ///    other - excluded
-        /// 
- /// - /// and changes it to: - /// - ///
-        /// ROOT
-        ///  ...
-        ///  shoes
-        ///    new $1.25
-        ///    other $0.50
-        /// 
- ///
- private void CollapseNewShoes() - { - ProductPartitionNode shoesLevel1 = tree.Root.GetChild( - ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, "shoes")); - shoesLevel1 - .GetChild( - ProductDimensions.CreateCanonicalCondition(ProductCanonicalConditionCondition - .NEW)).AsBiddableUnit().CpcBid = 1250000L; - shoesLevel1.GetChild(ProductDimensions.CreateCanonicalCondition()).AsBiddableUnit() - .CpcBid = 500000L; - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Subdivides and then collapse new shoes. - /// - private void SubdivideThenCollapseNewShoes() - { - SubdivideNewShoes(); - CollapseNewShoes(); - } - - /// - /// Removes product type L1 "shoes". - /// - private void RemoveShoes() - { - tree.Root.RemoveChild( - ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, "shoes")); - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Takes a tree with product type L1 "shoes" SUBDIVISION and collapses that node to a UNIT. - /// - private void CollapseShoes() - { - tree.Root.GetChild( - ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, "shoes")) - .AsBiddableUnit().CpcBid = (1500000L); - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Takes a tree with product type L1 "clothing" and sets its bid. - /// - private void UpdateClothingBid() - { - UpdateClothingBid(990000L); - } - - /// - /// Takes a tree with product type L1 "clothing" and sets its bid. - /// - /// The bid. - private void UpdateClothingBid(long bid) - { - tree.Root.GetChild(ProductDimensions.CreateType(ProductDimensionType.PRODUCT_TYPE_L1, - "clothing")).AsBiddableUnit().CpcBid = bid; - - Assert.DoesNotThrow(delegate() { tree = ExecuteTreeOperations(); }); - } - - /// - /// Updates the clothing bid twice. - /// - private void UpdateClothingBidTwice() - { - UpdateClothingBid(1500000L); - UpdateClothingBid(2500000L); - } - - /// - /// Uses obsolete category Hardware > Flooring (5264193646140135688). This is expected to - /// fail with the error {@code CriterionError.INVALID_PRODUCT_BIDDING_CATEGORY}. - /// - private void UseObsoleteCategory() - { - tree.Root.RemoveAllChildren(); - ProductPartitionNode hardwareLevel1 = tree.Root.AsSubdivision() - .AddChild(ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L1, 1689639310991627077L)) - .AsSubdivision(); - hardwareLevel1 - .AddChild(ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L2, 5264193646140135688L)).CpcBid = - 1000000L; - hardwareLevel1 - .AddChild( - ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L2)).AsExcludedUnit(); - tree.Root.AddChild( - ProductDimensions.CreateBiddingCategory( - ProductDimensionType.BIDDING_CATEGORY_L1)) - .AsExcludedUnit(); - try - { - tree = ExecuteTreeOperations(); - Assert.Fail("Did not throw CriterionError.INVALID_PRODUCT_BIDDING_CATEGORY"); - } - catch (AdWordsApiException e) - { - ApiError[] errors = (e.ApiException as ApiException).errors; - Assert.That(errors != null && errors.Length == 1); - Assert.That(errors[0] is CriterionError); - Assert.That((errors[0] as CriterionError).reason == - CriterionErrorReason.INVALID_PRODUCT_BIDDING_CATEGORY); - } - } - - /// - /// Creates a tree from criteria passed into the factory method. - /// - private void CreateTreeFromCriteria() - { - AdGroupCriterionService service = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - - string[] REQUIRED_SELECTOR_FIELD_ENUMS = new string[] - { - AdGroupCriterion.Fields.AdGroupId, - Criterion.Fields.Id, - ProductPartition.Fields.ParentCriterionId, - ProductPartition.Fields.PartitionType, - ProductPartition.Fields.CriteriaType, - ProductPartition.Fields.CaseValue, - CpcBid.Fields.CpcBid, - CpcBid.Fields.CpcBidSource, - BiddableAdGroupCriterion.Fields.Status - }; - - Selector selector = new Selector() - { - fields = REQUIRED_SELECTOR_FIELD_ENUMS, - predicates = new Predicate[] - { - Predicate.Equals(AdGroupCriterion.Fields.AdGroupId, ADGROUP_ID) - } - }; - - AdGroupCriterionPage retval = service.get(selector); - - tree = ProductPartitionTree.CreateAdGroupTree(ADGROUP_ID, - new List(retval.entries)); - } - } -} diff --git a/tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeTest.cs b/tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeTest.cs deleted file mode 100755 index 125a93b83e9..00000000000 --- a/tests/AdWords/Util/Shopping/v201806/ProductPartitionTreeTest.cs +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.Tests.v201806; -using Google.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System.Collections.Generic; -using System.Linq; - -namespace Google.Api.Ads.AdWords.Tests.Util.Shopping.v201806 -{ - /// - /// Tests for ProductPartitionTree class. - /// - internal class ProductPartitionTreeTest : VersionedExampleTestsBase - { - /// - /// The campaign ID for running tests. - /// - private long CAMPAIGN_ID = 0; - - /// - /// The adgroup ID for running tests. - /// - private long ADGROUP_ID = 0; - - /// - /// The utility class for running tests. - /// - private ShoppingTestUtils shoppingTestUtils = new ShoppingTestUtils(); - - /// - /// Initializes this instance. - /// - [SetUp] - public void Init() - { - CAMPAIGN_ID = utils.CreateShoppingCampaign(user, BiddingStrategyType.MANUAL_CPC); - ADGROUP_ID = utils.CreateAdGroup(user, CAMPAIGN_ID); - } - - /// - /// Tests if a product partition tree can be constructed from criteria - /// downloaded from an ad group. - /// - [Test] - public void TestDownloadAdGroupTree() - { - ProductPartitionTree partitionTree = - shoppingTestUtils.CreateTestTreeForAddition(ADGROUP_ID); - AdGroupCriterionOperation[] operations = partitionTree.GetMutateOperations(); - AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - - AdGroupCriterionReturnValue value = adGroupCriterionService.mutate(operations); - - ProductPartitionTree newPartitionTree = - ProductPartitionTree.DownloadAdGroupTree(user, ADGROUP_ID); - - CompareTree(newPartitionTree.Root, partitionTree.Root); - } - - /// - /// Compares two product partition nodes. - /// - /// The left node. - /// The right node. - private static void CompareTree(ProductPartitionNode leftNode, - ProductPartitionNode rightNode) - { - ProductDimensionEqualityComparer comparer = new ProductDimensionEqualityComparer(); - Assert.True(comparer.Equals(leftNode.Dimension, rightNode.Dimension)); - - Assert.AreEqual(leftNode.Children.Count(), rightNode.Children.Count()); - - for (int i = 0; i < leftNode.Children.Count(); i++) - { - ProductPartitionNode leftChildNode = leftNode.Children.ElementAt(i); - bool foundMatch = false; - for (int j = 0; j < rightNode.Children.Count(); j++) - { - ProductPartitionNode rightChildNode = rightNode.Children.ElementAt(j); - - if (comparer.Equals(leftChildNode.Dimension, rightChildNode.Dimension)) - { - CompareTree(leftChildNode, rightChildNode); - foundMatch = true; - break; - } - } - - Assert.True(foundMatch, "Matching node not found."); - } - } - - /// - /// Tests creating an empty ad group tree. In this case, all operations - /// generated should be ADD operations. - /// - [Test] - public void TestCreateEmptyTree() - { - ProductPartitionTree tree = - ProductPartitionTree.CreateAdGroupTree(new List()); - Assert.NotNull(tree.Root, "Even an empty tree should automatically have a root node."); - Assert.True(tree.Root.ProductPartitionId < 0L, - "The root node for an empty tree should have a negative (temporary) ID."); - Assert.True(tree.Root.IsUnit, "The root node for an empty tree should be a UNIT."); - - AdGroupCriterionOperation[] mutateOperations = tree.GetMutateOperations(); - - Assert.That(mutateOperations.Count() == 1, "Number of operations is incorrect."); - AdGroupCriterionOperation operation = mutateOperations[0]; - Assert.AreEqual(Operator.ADD, operation.@operator, - "Should have a single operation to ADD the root node."); - BiddableAdGroupCriterion adGroupCriterion = - (BiddableAdGroupCriterion) operation.operand; - Assert.Null(((ProductPartition) adGroupCriterion.criterion).caseValue, - "Product dimension of operation's operand should be null."); - Assert.True(adGroupCriterion.criterion.id < 0L); - } - - /// - /// Tests creating a tree that in its final state is just an - /// empty tree. - /// - [Test] - public void TestCreateUltimatelyEmptyTree() - { - ProductPartitionTree tree = - ProductPartitionTree.CreateAdGroupTree(new List()); - - ProductPartitionNode rootNode = tree.Root.AsSubdivision(); - ProductPartitionNode brand1 = rootNode.AddChild(ProductDimensions.CreateBrand("google")) - .AsSubdivision(); - ProductPartitionNode offerNode = brand1.AddChild(ProductDimensions.CreateOfferId("A")); - offerNode.AsBiddableUnit().CpcBid = 1000000L; - - brand1.AddChild(ProductDimensions.CreateOfferId()).AsExcludedUnit(); - ProductPartitionNode brand2 = - rootNode.AddChild(ProductDimensions.CreateBrand()).AsExcludedUnit(); - - // Now remove the two child nodes under the root and set the root back - // to a UNIT. This should result in operations that simply create the - // root node. - rootNode.RemoveChild(brand1.Dimension); - rootNode.RemoveChild(brand2.Dimension); - rootNode = rootNode.AsBiddableUnit(); - - AdGroupCriterionOperation[] mutateOperations = tree.GetMutateOperations(); - - Assert.AreEqual(mutateOperations.Count(), 1, "Number of operations is incorrect."); - AdGroupCriterionOperation operation = mutateOperations[0]; - Assert.AreEqual(Operator.ADD, operation.@operator, - "Should have a single operation to ADD the root node."); - BiddableAdGroupCriterion adGroupCriterion = - (BiddableAdGroupCriterion) operation.operand; - Assert.Null(((ProductPartition) adGroupCriterion.criterion).caseValue, - "Product dimension of operation's operand should be null."); - Assert.True(adGroupCriterion.criterion.id < 0L, - "Partition ID of the operand should be negative."); - } - - /// - /// Tests mutating an existing tree with multiple nodes. - /// - [Test] - public void TestMutateMultiNodeTree() - { - ProductPartitionTree tree = - shoppingTestUtils.CreateTestTreeForTransformation(ADGROUP_ID); - Assert.AreEqual(ADGROUP_ID, tree.AdGroupId, "ad group ID is incorrect"); - - // Change the bids on leaf nodes. - ProductPartitionNode brandGoogleNode = - tree.Root.GetChild(shoppingTestUtils.BRAND_GOOGLE); - ProductPartitionNode offerANode = brandGoogleNode.GetChild(shoppingTestUtils.OFFER_A); - // This should produce 1 SET operation. - offerANode.CpcBid = offerANode.CpcBid * 10; - - // Offer B is changed from Exclude to Biddable. This should produce 1 - // REMOVE operation + 1 ADD operation. - ProductPartitionNode offerBNode = brandGoogleNode.GetChild(shoppingTestUtils.OFFER_B); - offerBNode.AsBiddableUnit().CpcBid = 5000000L; - - // Other Brand node is changed from Exclude to Biddable. This should - // produce 1 REMOVE operation + 1 ADD operation. - ProductPartitionNode brandOtherNode = tree.Root.GetChild(shoppingTestUtils.BRAND_OTHER); - brandOtherNode = brandOtherNode.AsBiddableUnit(); - - // Add an offer C node. This should produce 1 ADD operation. - ProductPartitionNode offerCNode = brandGoogleNode.AddChild(shoppingTestUtils.OFFER_C); - offerCNode.AsBiddableUnit().CpcBid = 1500000L; - - // Remove the brand Motorola node. This should produce 1 REMOVE operation. - ProductPartitionNode brandMotorolaNode = - tree.Root.GetChild(shoppingTestUtils.BRAND_MOTOROLA); - tree.Root.RemoveChild(shoppingTestUtils.BRAND_MOTOROLA); - - // Get the mutate operations generated by the modifications made to the tree. - AdGroupCriterionOperation[] mutateOperations = tree.GetMutateOperations(); - Assert.AreEqual(7, mutateOperations.Length); - - List operations = null; - - // Since Offer A node only has modified attributes, there should only be - // one SET operation. - operations = shoppingTestUtils.GetOperationsForNode(offerANode, mutateOperations); - Assert.That(operations.Count == 1); - Assert.That(operations[0].@operator == Operator.SET); - - // Since Offer B node is being converted from Exclude to Biddable node, - // there should be one REMOVE operation, and another ADD operation. - operations = shoppingTestUtils.GetOperationsForNode(offerBNode, mutateOperations); - Assert.That(operations.Count == 2); - Assert.That(operations[0].@operator == Operator.REMOVE); - Assert.That(operations[1].@operator == Operator.ADD); - - // Since Offer C node is being added, there should be one ADD operation. - operations = shoppingTestUtils.GetOperationsForNode(offerCNode, mutateOperations); - Assert.That(operations.Count == 1); - Assert.That(operations[0].@operator == Operator.ADD); - - // Since Other Brand node is being converted from Exclude to Biddable node, - // there should be one REMOVE operation, and another ADD operation. - operations = shoppingTestUtils.GetOperationsForNode(brandOtherNode, mutateOperations); - Assert.That(operations.Count == 2); - Assert.That(operations[0].@operator == Operator.REMOVE); - Assert.That(operations[1].@operator == Operator.ADD); - - // Since Offer B node is being removed, there should be one REMOVE - // operation. - operations = - shoppingTestUtils.GetOperationsForNode(brandMotorolaNode, mutateOperations); - Assert.That(operations.Count == 1); - Assert.That(operations[0].@operator == Operator.REMOVE); - } - - /// - /// Tests creating an empty tree and then adding several levels of nodes. - /// - [Test] - public void TestCreateMultiNodeTreeFromScratch() - { - ProductPartitionTree tree = - ProductPartitionTree.CreateAdGroupTree(new List()); - - ProductPartitionNode rootNode = tree.Root.AsSubdivision(); - ProductPartitionNode brand1 = rootNode.AddChild(ProductDimensions.CreateBrand("google")) - .AsSubdivision(); - ProductPartitionNode brand1Offer1 = - brand1.AddChild(ProductDimensions.CreateOfferId("A")); - brand1Offer1.AsBiddableUnit().CpcBid = 1000000L; - ProductPartitionNode brand1Offer2 = - brand1.AddChild(ProductDimensions.CreateOfferId()).AsExcludedUnit(); - ProductPartitionNode brand2 = - rootNode.AddChild(ProductDimensions.CreateBrand()).AsExcludedUnit(); - - ProductPartitionNode[] nodes = new ProductPartitionNode[] - { - rootNode, - brand1, - brand1Offer1, - brand1Offer2, - brand2 - }; - - AdGroupCriterionOperation[] mutateOperations = tree.GetMutateOperations(); - - for (int i = 0; i < nodes.Length; i++) - { - List nodeOperations = - shoppingTestUtils.GetOperationsForNode(nodes[i], mutateOperations); - Assert.That(nodeOperations.Count == 1); - Assert.That(nodeOperations[0].@operator == Operator.ADD); - ProductPartition partition = (ProductPartition) nodeOperations[0].operand.criterion; - Assert.That(partition.id == nodes[i].ProductPartitionId); - if (nodes[i].Parent == null) - { - Assert.That(partition.parentCriterionIdSpecified == false); - } - else - { - Assert.That(partition.parentCriterionId == nodes[i].Parent.ProductPartitionId); - } - - Assert.That(partition.caseValue == nodes[i].Dimension); - } - } - - /// - /// Tests that the factory method ignores removed criteria. - /// - [Test] - public void TestRemovedCriteriaIgnored() - { - AdGroupCriterion rootCriterion = - ShoppingTestUtils.CreateCriterionForProductPartition(1L, 0L, null, true, false); - List criteria = new List(); - criteria.Add(rootCriterion); - - // Create a criteria for a child node and set its UserStatus to REMOVED. - ProductBrand brandGoogle = ProductDimensions.CreateBrand("google"); - AdGroupCriterion removedCriterion = - ShoppingTestUtils.CreateCriterionForProductPartition(2L, 1L, brandGoogle, true, - false); - ((BiddableAdGroupCriterion) removedCriterion).userStatus = UserStatus.REMOVED; - criteria.Add(removedCriterion); - - ProductPartitionTree tree = ProductPartitionTree.CreateAdGroupTree(criteria); - - Assert.False(tree.Root.HasChild(brandGoogle), - "Brand = google criteria had status removed, but it is in the tree."); - } - } -} diff --git a/tests/AdWords/v201806/AccountManagementTest.cs b/tests/AdWords/v201806/AccountManagementTest.cs deleted file mode 100755 index 95f8b78fd35..00000000000 --- a/tests/AdWords/v201806/AccountManagementTest.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2018 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 NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\AccountManagement. - /// - internal class AccountManagementTest : VersionedExampleTestsBase - { - /// - /// Tests the GetAccountChanges VB.NET code example. - /// - [Test] - public void TestGetAccountChangesVBExample() - { - RunExample(delegate() { new VBExamples.GetAccountChanges().Run(user); }); - } - - /// - /// Tests the GetAccountChanges C# code example. - /// - [Test] - public void TestGetAccountChangesCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetAccountChanges().Run(user); }); - } - } -} diff --git a/tests/AdWords/v201806/AdvancedOperationsTest.cs b/tests/AdWords/v201806/AdvancedOperationsTest.cs deleted file mode 100755 index a48199a508e..00000000000 --- a/tests/AdWords/v201806/AdvancedOperationsTest.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Lib; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\AdvancedOperations. - /// - internal class AdvancedOperationsTest : VersionedExampleTestsBase - { - private long campaignId; - private long adGroupId1; - private long adGroupId2; - private const double BID_MODIFIER = 0.2; - - private long mobileCampaignId; - private long mobileAdGroupId; - - private long sharedSetId; - - /// - /// Campaign for testing GmailAd examples. - /// - private long gmailCampaignId; - - /// - /// Ad group for testing GmailAd examples. - /// - private long gmailAdGroupId; - - /// - /// Campaign for testing ResponsiveDisplayAd examples. - /// - private long displayCampaignId; - - /// - /// Ad group for testing ResponsiveDisplayAd examples. - /// - private long displayAdGroupId; - - /// - /// Campaign for DSA examples. - /// - private long dsaCampaignId; - - /// - /// Ad group for DSA examples. - /// - private long dsaAdGroupId; - - /// - /// The budget ID for AddShoppingDynamicRemarketingCampaign example. - /// - private long budgetId; - - /// - /// The user list ID for AddShoppingDynamicRemarketingCampaign example. - /// - private long userListId; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId1 = utils.CreateAdGroup(user, campaignId); - adGroupId2 = utils.CreateAdGroup(user, campaignId); - displayCampaignId = utils.CreateDisplayCampaign(user, BiddingStrategyType.MANUAL_CPM); - displayAdGroupId = utils.CreateAdGroup(user, displayCampaignId); - - mobileCampaignId = - utils.CreateMobileSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - mobileAdGroupId = utils.CreateAdGroup(user, mobileCampaignId); - - dsaCampaignId = utils.CreateDSACampaign(user); - dsaAdGroupId = utils.CreateAdGroup(user, dsaCampaignId, AdGroupType.SEARCH_DYNAMIC_ADS, - false); - - gmailCampaignId = utils.CreateGmailCampaign(user); - gmailAdGroupId = - utils.CreateAdGroup(user, gmailCampaignId, AdGroupType.DISPLAY_STANDARD, true); - - sharedSetId = utils.CreateSharedKeywordSet(user); - utils.AttachSharedSetToCampaign(user, campaignId, sharedSetId); - - budgetId = utils.CreateBudget(user); - userListId = utils.CreateUserList(user); - - // Load defaults from config file. - AdWordsAppConfig appConfig = new AdWordsAppConfig(); - appConfig.OAuth2RefreshToken = appConfig.GMBOAuth2RefreshToken; - - AdsOAuthProviderForApplications oAuth2Provider = - new OAuth2ProviderForApplications(appConfig); - oAuth2Provider.RefreshAccessToken(); - } - - /// - /// Tears down the test case. - /// - [TearDown] - public void TearDown() - { - utils.DetachSharedSetFromCampaign(user, campaignId, sharedSetId); - utils.DeleteSharedSet(user, sharedSetId); - } - - /// - /// Tests the AddUniversalAppCampaign VB.NET code example. - /// - [Test] - public void TestAddUniversalAppCampaignVBExample() - { - RunExample(delegate() { new VBExamples.AddUniversalAppCampaign().Run(user); }); - } - - /// - /// Tests the AddUniversalAppCampaign C# code example. - /// - [Test] - public void TestAddUniversalAppCampaignCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddUniversalAppCampaign().Run(user); }); - } - - /// - /// Tests the AddResponsiveDisplayAd VB.NET code example. - /// - [Test] - public void TestAddResponsiveDisplayAdVBExample() - { - RunExample(delegate() - { - new VBExamples.AddResponsiveDisplayAd().Run(user, displayAdGroupId); - }); - } - - /// - /// Tests the AddResponsiveDisplayAd C# code example. - /// - [Test] - public void TestAddResponsiveDisplayAdCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddResponsiveDisplayAd().Run(user, displayAdGroupId); - }); - } - - /// - /// Tests the AddAdGroupBidModifier C# code example. - /// - [Test] - public void TestAddAdGroupBidModifierCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddAdGroupBidModifier().Run(user, adGroupId1, BID_MODIFIER); - }); - } - - /// - /// Tests the AddAdGroupBidModifier VB.NET code example. - /// - [Test] - public void TestAddAdGroupBidModifierVBExample() - { - RunExample(delegate() - { - new VBExamples.AddAdGroupBidModifier().Run(user, adGroupId1, BID_MODIFIER); - }); - } - - /// - /// Tests the GetAdGroupBidModifiers C# code example. - /// - [Test] - public void TestGetAdGroupBidModifiersCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetAdGroupBidModifiers().Run(user, campaignId); - }); - } - - /// - /// Tests the GetAdGroupBidModifiers VB.NET code example. - /// - [Test] - public void TestGetAdGroupBidModifiersVBExample() - { - RunExample( - delegate() { new VBExamples.GetAdGroupBidModifiers().Run(user, campaignId); }); - } - - /// - /// Tests the AddAdCustomizers C# code example. - /// - [Test] - public void TestAddAdCustomizersCSharpExample() - { - string feedName = "AdCustomizerFeed" + utils.GetTimeStampAlpha(); - RunExample(delegate() - { - new CSharpExamples.AddAdCustomizers().Run(user, adGroupId1, adGroupId2, - feedName); - }); - } - - /// - /// Tests the AddAdCustomizers VB.NET code example. - /// - [Test] - public void TestAddAdCustomizersVBExample() - { - string feedName = "AdCustomizerFeed" + utils.GetTimeStampAlpha(); - RunExample(delegate() - { - new VBExamples.AddAdCustomizers().Run(user, adGroupId1, adGroupId2, feedName); - }); - } - - /// - /// Tests the CreateAndAttachSharedKeywordSet C# code example. - /// - [Test] - public void TestCreateAndAttachSharedKeywordSetCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.CreateAndAttachSharedKeywordSet().Run(user, campaignId); - }); - } - - /// - /// Tests the AddAdCustomizers VB.NET code example. - /// - [Test] - public void TestCreateAndAttachSharedKeywordSetVBExample() - { - RunExample(delegate() - { - new VBExamples.CreateAndAttachSharedKeywordSet().Run(user, campaignId); - }); - } - - /// - /// Tests the FindAndRemoveCriteriaFromSharedSet C# code example. - /// - [Test] - public void TestFindAndRemoveCriteriaFromSharedSetCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.FindAndRemoveCriteriaFromSharedSet().Run(user, campaignId); - }); - } - - /// - /// Tests the FindAndRemoveCriteriaFromSharedSet VB.NET code example. - /// - [Test] - public void TestFindAndRemoveCriteriaFromSharedSetVBExample() - { - RunExample(delegate() - { - new VBExamples.FindAndRemoveCriteriaFromSharedSet().Run(user, campaignId); - }); - } - - /// - /// Tests the AddHtml5Ad C# code example. - /// - [Test] - public void TestAddHtml5AdCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddHtml5Ad().Run(user, adGroupId1); }); - } - - /// - /// Tests the AddHtml5Ad VB.NET code example. - /// - [Test] - public void TestAddHtml5AdVBExample() - { - RunExample(delegate() { new VBExamples.AddHtml5Ad().Run(user, adGroupId1); }); - } - - /// - /// Tests the AddDynamicSearchAdsCampaign C# code example. - /// - [Test] - public void TestAddDynamicSearchAdsCampaignCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddDynamicSearchAdsCampaign().Run(user); }); - } - - /// - /// Tests the AddDynamicSearchAdsCampaign VB.NET code example. - /// - [Test] - public void TestAddDynamicSearchAdsCampaignVBExample() - { - RunExample(delegate() { new VBExamples.AddDynamicSearchAdsCampaign().Run(user); }); - } - - /// - /// Tests the AddDynamicPageFeed C# code example. - /// - [Test] - public void TestAddDynamicPageFeedCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddDynamicPageFeed().Run(user, dsaCampaignId, dsaAdGroupId); - }); - } - - /// - /// Tests the AddDynamicPageFeed VB.NET code example. - /// - [Test] - public void TestAddDynamicPageFeedVBExample() - { - RunExample(delegate() - { - new VBExamples.AddDynamicPageFeed().Run(user, dsaCampaignId, dsaAdGroupId); - }); - } - - /// - /// Tests the UsePortfolioBiddingStrategy C# code example. - /// - [Test] - public void TestUsePortfolioBiddingStrategyCSharpExample() - { - RunExample(delegate() { new CSharpExamples.UsePortfolioBiddingStrategy().Run(user); }); - } - - /// - /// Tests the UsePortfolioBiddingStrategy VB.NET code example. - /// - [Test] - public void TestUsePortfolioBiddingStrategyVBExample() - { - RunExample(delegate() { new VBExamples.UsePortfolioBiddingStrategy().Run(user); }); - } - - /// - /// Tests the AddExpandedTextAdWithUpgradedUrls C# code example. - /// - [Test] - public void TestAddExpandedTextAdWithUpgradedUrlsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddExpandedTextAdWithUpgradedUrls().Run(user, adGroupId1); - }); - } - - /// - /// Tests the AddExpandedTextAdWithUpgradedUrls VB.NET code example. - /// - [Test] - public void TestAddExpandedTextAdWithUpgradedUrlsVBExample() - { - RunExample(delegate() - { - new VBExamples.AddExpandedTextAdWithUpgradedUrls().Run(user, adGroupId1); - }); - } - - /// - /// Tests the AddGmailAd C# code example. - /// - [Test] - public void TestAddGmailAdCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddGmailAd().Run(user, gmailAdGroupId); }); - } - - /// - /// Tests the AddGmailAd VB.NET code example. - /// - [Test] - public void TestAddGmailAdVBExample() - { - RunExample(delegate() { new VBExamples.AddGmailAd().Run(user, gmailAdGroupId); }); - } - - /// - /// Tests the AddShoppingDynamicRemarketingCampaign C# code example. - /// - [Test] - public void TestAddShoppingDynamicRemarketingCampaignCSharpExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new CSharpExamples.AddShoppingDynamicRemarketingCampaign().Run(user, - config.MerchantCenterId, budgetId, userListId); - }); - } - - /// - /// Tests the AddShoppingDynamicRemarketingCampaign VB.NET code example. - /// - [Test] - public void TestAddShoppingDynamicRemarketingCampaignVBExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new VBExamples.AddShoppingDynamicRemarketingCampaign().Run(user, - config.MerchantCenterId, budgetId, userListId); - }); - } - - /// - /// Tests the AddMultiAssetResponsiveDisplayAd C# code example. - /// - [Test] - public void TestAddMultiAssetResponsiveDisplayAdCSharpExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new CSharpExamples.AddMultiAssetResponsiveDisplayAd().Run(user, - displayAdGroupId); - }); - } - - /// - /// Tests the AddMultiAssetResponsiveDisplayAd VB.NET code example. - /// - [Test] - public void TestAddMultiAssetResponsiveDisplayAdVBExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new VBExamples.AddMultiAssetResponsiveDisplayAd().Run(user, displayAdGroupId); - }); - } - } -} diff --git a/tests/AdWords/v201806/BasicOperationsTest.cs b/tests/AdWords/v201806/BasicOperationsTest.cs deleted file mode 100755 index edb9cb6ab4e..00000000000 --- a/tests/AdWords/v201806/BasicOperationsTest.cs +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\BasicOperations. - /// - internal class BasicOperationsTest : VersionedExampleTestsBase - { - private long campaignId; - private long adGroupId; - private long adId; - private long keywordId; - private const long CPC_BID = 4000000; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId = utils.CreateAdGroup(user, campaignId); - adId = utils.CreateExpandedTextAd(user, adGroupId, false); - keywordId = utils.CreateKeyword(user, adGroupId); - } - - /// - /// Tests the AddAdGroup VB.NET code example. - /// - [Test] - public void TestAddAdGroupVBExample() - { - RunExample(delegate() { new VBExamples.AddAdGroups().Run(user, campaignId); }); - } - - /// - /// Tests the AddAdGroup C# code example. - /// - [Test] - public void TestAddAdGroupCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddAdGroups().Run(user, campaignId); }); - } - - /// - /// Tests the AddCampaign VB.NET code example. - /// - [Test] - public void TestAddCampaignVBExample() - { - RunExample(delegate() { new VBExamples.AddCampaigns().Run(user); }); - } - - /// - /// Tests the AddCampaign C# code example. - /// - [Test] - public void TestAddCampaignCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddCampaigns().Run(user); }); - } - - /// - /// Tests the AddKeywords VB.NET code example. - /// - [Test] - public void TestAddKeywordsVBExample() - { - RunExample(delegate() { new VBExamples.AddKeywords().Run(user, adGroupId); }); - } - - /// - /// Tests the AddKeywords C# code example. - /// - [Test] - public void TestAddKeywordsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddKeywords().Run(user, adGroupId); }); - } - - /// - /// Tests the AddExpandedTextAds VB.NET code example. - /// - [Test] - public void TestAddExpandedTextAdsVBExample() - { - RunExample(delegate() { new VBExamples.AddExpandedTextAds().Run(user, adGroupId); }); - } - - /// - /// Tests the AddExpandedTextAds C# code example. - /// - [Test] - public void TestAddExpandedTextAdsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddExpandedTextAds().Run(user, adGroupId); - }); - } - - /// - /// Tests the RemoveAdGroup VB.NET code example. - /// - [Test] - public void TestRemoveAdGroupVBExample() - { - RunExample(delegate() { new VBExamples.RemoveAdGroup().Run(user, adGroupId); }); - } - - /// - /// Tests the RemoveAdGroup C# code example. - /// - [Test] - public void TestRemoveAdGroupCSharpExample() - { - RunExample(delegate() { new CSharpExamples.RemoveAdGroup().Run(user, adGroupId); }); - } - - /// - /// Tests the RemoveAd VB.NET code example. - /// - [Test] - public void TestRemoveAdVBExample() - { - RunExample(delegate() { new VBExamples.RemoveAd().Run(user, adGroupId, adId); }); - } - - /// - /// Tests the RemoveAd C# code example. - /// - [Test] - public void TestRemoveAdCSharpExample() - { - RunExample(delegate() { new CSharpExamples.RemoveAd().Run(user, adGroupId, adId); }); - } - - /// - /// Tests the RemoveCampaign VB.NET code example. - /// - [Test] - public void TestRemoveCampaignVBExample() - { - RunExample(delegate() { new VBExamples.RemoveCampaign().Run(user, campaignId); }); - } - - /// - /// Tests the RemoveCampaign C# code example. - /// - [Test] - public void TestRemoveCampaignCSharpExample() - { - RunExample(delegate() { new CSharpExamples.RemoveCampaign().Run(user, campaignId); }); - } - - /// - /// Tests the RemoveKeyword VB.NET code example. - /// - [Test] - public void TestRemoveKeywordVBExample() - { - RunExample(delegate() - { - new VBExamples.RemoveKeyword().Run(user, adGroupId, keywordId); - }); - } - - /// - /// Tests the RemoveKeyword C# code example. - /// - [Test] - public void TestRemoveKeywordCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.RemoveKeyword().Run(user, adGroupId, keywordId); - }); - } - - /// - /// Tests the GetAdGroups VB.NET code example. - /// - [Test] - public void TestGetAdGroupsVBExample() - { - RunExample(delegate() { new VBExamples.GetAdGroups().Run(user, campaignId); }); - } - - /// - /// Tests the GetAdGroups C# code example. - /// - [Test] - public void TestGetAdGroupsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetAdGroups().Run(user, campaignId); }); - } - - /// - /// Tests the GetCampaigns VB.NET code example. - /// - [Test] - public void TestGetCampaignsVBExample() - { - RunExample(delegate() { new VBExamples.GetCampaigns().Run(user); }); - } - - /// - /// Tests the GetCampaigns C# code example. - /// - [Test] - public void TestGetCampaignsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetCampaigns().Run(user); }); - } - - /// - /// Tests the GetKeywords VB.NET code example. - /// - [Test] - public void TestGetKeywordsVBExample() - { - RunExample(delegate() { new VBExamples.GetKeywords().Run(user, adGroupId); }); - } - - /// - /// Tests the GetKeywords C# code example. - /// - [Test] - public void TestGetKeywordsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetKeywords().Run(user, adGroupId); }); - } - - /// - /// Tests the GetExpandedTextAds VB.NET code example. - /// - [Test] - public void TestGetExpandedTextAdsVBExample() - { - RunExample(delegate() { new VBExamples.GetExpandedTextAds().Run(user, adGroupId); }); - } - - /// - /// Tests the GetExpandedTextAds C# code example. - /// - [Test] - public void TestGetExpandedTextAdsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetExpandedTextAds().Run(user, adGroupId); - }); - } - - /// - /// Tests the PauseAd VB.NET code example. - /// - [Test] - public void TestPauseAdVBExample() - { - RunExample(delegate() { new VBExamples.PauseAd().Run(user, adGroupId, adId); }); - } - - /// - /// Tests the PauseAd C# code example. - /// - [Test] - public void TestPauseAdCSharpExample() - { - RunExample(delegate() { new CSharpExamples.PauseAd().Run(user, adGroupId, adId); }); - } - - /// - /// Tests the UpdateAdGroup VB.NET code example. - /// - [Test] - public void TestUpdateAdGroupVBExample() - { - VBExamples.UpdateAdGroup example = new VBExamples.UpdateAdGroup(); - RunExample(delegate() - { - example.Run(user, adGroupId, CPC_BID); - example.Run(user, adGroupId, null); - }); - } - - /// - /// Tests the UpdateAdGroup C# code example. - /// - [Test] - public void TestUpdateAdGroupCSharpExample() - { - CSharpExamples.UpdateAdGroup example = new CSharpExamples.UpdateAdGroup(); - RunExample(delegate() - { - example.Run(user, adGroupId, CPC_BID); - example.Run(user, adGroupId, null); - }); - } - - /// - /// Tests the UpdateCampaign VB.NET code example. - /// - [Test] - public void TestUpdateCampaignVBExample() - { - RunExample(delegate() { new VBExamples.UpdateCampaign().Run(user, campaignId); }); - } - - /// - /// Tests the UpdateCampaign C# code example. - /// - [Test] - public void TestUpdateCampaignCSharpExample() - { - RunExample(delegate() { new CSharpExamples.UpdateCampaign().Run(user, campaignId); }); - } - - /// - /// Tests the UpdateKeyword VB.NET code example. - /// - [Test] - public void TestUpdateKeywordVBExample() - { - RunExample(delegate() - { - new VBExamples.UpdateKeyword().Run(user, adGroupId, keywordId); - }); - } - - /// - /// Tests the UpdateKeyword C# code example. - /// - [Test] - public void TestUpdateKeywordCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.UpdateKeyword().Run(user, adGroupId, keywordId); - }); - } - - /// - /// Tests the AddResponsiveSearchAd VB.NET code example. - /// - [Test] - public void TestAddResponsiveSearchAdVBExample() - { - RunExample(delegate() { new VBExamples.AddResponsiveSearchAd().Run(user, adGroupId); }); - } - - /// - /// Tests the AddResponsiveSearchAd C# code example. - /// - [Test] - public void TestAddResponsiveSearchAdCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddResponsiveSearchAd().Run(user, adGroupId); - }); - } - - /// - /// Tests the UpdateExpandedTextAd VB.NET code example. - /// - [Test] - public void TestUpdateExpandedTextAdVBExample() - { - RunExample(delegate() { new VBExamples.UpdateExpandedTextAd().Run(user, adId); }); - } - - /// - /// Tests the UpdateExpandedTextAd C# code example. - /// - [Test] - public void TestUpdateExpandedTextAdCSharpExample() - { - RunExample(delegate() { new CSharpExamples.UpdateExpandedTextAd().Run(user, adId); }); - } - } -} diff --git a/tests/AdWords/v201806/CampaignManagementTest.cs b/tests/AdWords/v201806/CampaignManagementTest.cs deleted file mode 100755 index 246a36c5251..00000000000 --- a/tests/AdWords/v201806/CampaignManagementTest.cs +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\CampaignManagement. - /// - internal class CampaignManagementTest : VersionedExampleTestsBase - { - private long campaignId; - private long anotherCampaignId; - private long adGroupId; - private long criterionId; - private long adId; - private long draftId; - - private long labelId; - - private const Double BID_MODIFIER = 1.5; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - anotherCampaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - labelId = utils.CreateLabel(user); - adGroupId = utils.CreateAdGroup(user, campaignId); - criterionId = utils.CreateKeyword(user, adGroupId); - adId = utils.CreateExpandedTextAd(user, adGroupId, false); - draftId = utils.AddDraft(user, campaignId).draftId; - } - - /// - /// Tests the AddCampaignLabels VB.NET code example. - /// - [Test] - public void TestAddCampaignLabelsVBExample() - { - long campaignId1ForLabeling = - utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - long campaignId2ForLabeling = - utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - RunExample(delegate() - { - new VBExamples.AddCampaignLabels().Run(user, campaignId1ForLabeling, - campaignId2ForLabeling, labelId); - }); - } - - /// - /// Tests the AddCampaignLabels C# code example. - /// - [Test] - public void TestAddCampaignLabelsCSharpExample() - { - long campaignId1ForLabeling = - utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - long campaignId2ForLabeling = - utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - RunExample(delegate() - { - new CSharpExamples.AddCampaignLabels().Run(user, campaignId1ForLabeling, - campaignId2ForLabeling, labelId); - }); - } - - /// - /// Tests the GetCampaignsByLabel VB.NET code example. - /// - [Test] - public void TestGetCampaignsByLabelVBExample() - { - RunExample(delegate() { new VBExamples.GetCampaignsByLabel().Run(user, labelId); }); - } - - /// - /// Tests the GetCampaignsByLabel C# code example. - /// - [Test] - public void TestGetCampaignsByLabelCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetCampaignsByLabel().Run(user, labelId); }); - } - - /// - /// Tests the GetAllDisapprovedAds VB.NET code example. - /// - [Test] - public void TestGetAllDisapprovedAdsVBExample() - { - RunExample(delegate() { new VBExamples.GetAllDisapprovedAds().Run(user, campaignId); }); - } - - /// - /// Tests the GetAllDisapprovedAds C# code example. - /// - [Test] - public void TestGetAllDisapprovedAdsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetAllDisapprovedAds().Run(user, campaignId); - }); - } - - /// - /// Tests the GetAllDisapprovedAdsWithAwql VB.NET code example. - /// - [Test] - public void TestGetAllDisapprovedAdsWithAwqlVBExample() - { - RunExample(delegate() - { - new VBExamples.GetAllDisapprovedAdsWithAwql().Run(user, campaignId); - }); - } - - /// - /// Tests the GetAllDisapprovedAdsWithAwql C# code example. - /// - [Test] - public void TestGetAllDisapprovedAdsWithAwqlCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetAllDisapprovedAdsWithAwql().Run(user, campaignId); - }); - } - - /// - /// Tests the SetAdParameters VB.NET code example. - /// - [Test] - public void TestSetAdParametersVBExample() - { - RunExample(delegate() - { - new VBExamples.SetAdParameters().Run(user, adGroupId, criterionId); - }); - } - - /// - /// Tests the SetAdParameters C# code example. - /// - [Test] - public void TestSetAdParametersCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.SetAdParameters().Run(user, adGroupId, criterionId); - }); - } - - /// - /// Tests the ValidateTextAd VB.NET code example. - /// - [Test] - public void TestValidateTextAdVBExample() - { - RunExample(delegate() { new VBExamples.ValidateTextAd().Run(user, adGroupId); }); - } - - /// - /// Tests the ValidateTextAd C# code example. - /// - [Test] - public void TestValidateTextAdCSharpExample() - { - RunExample(delegate() { new CSharpExamples.ValidateTextAd().Run(user, adGroupId); }); - } - - /// - /// Tests the SetBidModifier C# code example. - /// - [Test] - public void TestSetBidModifierCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.SetBidModifier().Run(user, campaignId, BID_MODIFIER); - }); - } - - /// - /// Tests the SetBidModifier VB.NET code example. - /// - [Test] - public void TestSetBidModifierVBExample() - { - RunExample(delegate() - { - new VBExamples.SetBidModifier().Run(user, campaignId, BID_MODIFIER); - }); - } - - /// - /// Tests the AddDraft C# code example. - /// - [Test] - public void TestAddDraftCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddDraft().Run(user, campaignId); }); - } - - /// - /// Tests the AddDraft VB.NET code example. - /// - [Test] - public void TestAddDraftVBExample() - { - RunExample(delegate() { new VBExamples.AddDraft().Run(user, campaignId); }); - } - - /// - /// Tests the AddCampaignGroupsAndPerformanceTargets C# code example. - /// - [Test] - public void TestAddCampaignGroupsAndPerformanceTargetsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddCampaignGroupsAndPerformanceTargets().Run(user, - campaignId, anotherCampaignId); - }); - } - - /// - /// Tests the AddCampaignGroupsAndPerformanceTargets VB.NET code example. - /// - [Test] - public void TestAddCampaignGroupsAndPerformanceTargetsVBExample() - { - RunExample(delegate() - { - new VBExamples.AddCampaignGroupsAndPerformanceTargets().Run(user, campaignId, - anotherCampaignId); - }); - } - - #region tests that take a long while. - - /// - /// Tests the AddCompleteCampaignUsingBatchJob C# code example. - /// - [Test] - public void TestAddCompleteCampaignUsingBatchJobCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddCompleteCampaignsUsingBatchJob().Run(user); - }); - } - - /// - /// Tests the AddCompleteCampaignUsingBatchJob VB.NET code example. - /// - [Test] - public void TestAddCompleteCampaignUsingBatchJobVBExample() - { - RunExample(delegate() - { - new VBExamples.AddCompleteCampaignsUsingBatchJob().Run(user); - }); - } - - /// - /// Tests the AddCompleteCampaignsUsingStreamingBatchJob C# code example. - /// - [Test] - public void TestAddCompleteCampaignUsingStreamingBatchJobCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddCompleteCampaignsUsingStreamingBatchJob().Run(user); - }); - } - - /// - /// Tests the AddCompleteCampaignsUsingStreamingBatchJob VB.NET code example. - /// - [Test] - public void TestAddCompleteCampaignsUsingStreamingBatchJobVBExample() - { - RunExample(delegate() - { - new VBExamples.AddCompleteCampaignsUsingStreamingBatchJob().Run(user); - }); - } - - /// - /// Tests the AddKeywordsUsingIncrementalBatchJob C# code example. - /// - [Test] - public void TestAddKeywordsUsingIncrementalBatchJobCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddKeywordsUsingIncrementalBatchJob().Run(user, adGroupId); - }); - } - - /// - /// Tests the AddTrial C# code example. - /// - [Test] - public void TestAddTrialCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddTrial().Run(user, draftId, campaignId); - }); - } - - /// - /// Tests the AddTrial VB.NET code example. - /// - [Test] - public void TestAddTrialVBExample() - { - RunExample(delegate() { new VBExamples.AddTrial().Run(user, draftId, campaignId); }); - } - - /// - /// Tests the GraduateTrial C# code example. - /// - [Test] - public void TestGraduateTrialCSharpExample() - { - // Moving the initialization code here, since creating a trial ID is - // very expensive and slows down other tests significantly. - long trialId = utils.CreateTrial(user, draftId, campaignId); - RunExample(delegate() { new CSharpExamples.GraduateTrial().Run(user, trialId); }); - } - - /// - /// Tests the GraduateTrial VB.NET code example. - /// - [Test] - public void TestGraduateTrialVBExample() - { - // Moving the initialization code here, since creating a trial ID is - // very expensive and slows down other tests significantly. - long trialId = utils.CreateTrial(user, draftId, campaignId); - RunExample(delegate() { new VBExamples.GraduateTrial().Run(user, trialId); }); - } - - #endregion tests that take a long while. - } -} diff --git a/tests/AdWords/v201806/ErrorHandlingTest.cs b/tests/AdWords/v201806/ErrorHandlingTest.cs deleted file mode 100755 index 0405f22830a..00000000000 --- a/tests/AdWords/v201806/ErrorHandlingTest.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\ErrorHandling. - /// - internal class ErrorHandlingTest : VersionedExampleTestsBase - { - private long campaignId; - private long adGroupId; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId = utils.CreateAdGroup(user, campaignId); - } - - /// - /// Tests the HandlePartialFailures VB.NET code example. - /// - [Test] - public void TestHandlePartialFailuresVBExample() - { - RunExample(delegate() { new VBExamples.HandlePartialFailures().Run(user, adGroupId); }); - } - - /// - /// Tests the HandlePartialFailures C# code example. - /// - [Test] - public void TestHandlePartialFailuresCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.HandlePartialFailures().Run(user, adGroupId); - }); - } - - /// - /// Tests the HandlePolicyViolationError VB.NET code example. - /// - [Test] - public void TestHandlePolicyViolationErrorVBExample() - { - RunExample(delegate() - { - new VBExamples.HandlePolicyViolationError().Run(user, adGroupId); - }); - } - - /// - /// Tests the HandlePolicyViolationError C# code example. - /// - [Test] - public void TestHandlePolicyViolationErrorCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.HandlePolicyViolationError().Run(user, adGroupId); - }); - } - } -} diff --git a/tests/AdWords/v201806/ExtensionsTest.cs b/tests/AdWords/v201806/ExtensionsTest.cs deleted file mode 100755 index 59723101457..00000000000 --- a/tests/AdWords/v201806/ExtensionsTest.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Lib; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\Extensions. - /// - internal class ExtensionsTest : VersionedExampleTestsBase - { - private long campaignId; - private long adGroupId; - private string gmbAccessToken = ""; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId = utils.CreateAdGroup(user, campaignId); - - // Load defaults from config file. - AdWordsAppConfig appConfig = new AdWordsAppConfig(); - appConfig.OAuth2RefreshToken = appConfig.GMBOAuth2RefreshToken; - - AdsOAuthProviderForApplications oAuth2Provider = - new OAuth2ProviderForApplications(appConfig); - oAuth2Provider.RefreshAccessToken(); - - gmbAccessToken = oAuth2Provider.Config.OAuth2AccessToken; - } - - /// - /// Tests the AddSitelinks VB.NET code example. - /// - [Test] - public void TestAddSitelinksVBExample() - { - RunExample(delegate() { new VBExamples.AddSitelinks().Run(user, campaignId); }); - } - - /// - /// Tests the AddSitelinks C# code example. - /// - [Test] - public void TestAddSitelinksCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddSitelinks().Run(user, campaignId); }); - } - - /// - /// Tests the AddPrices VB.NET code example. - /// - [Test] - public void TestAddPricesVBExample() - { - RunExample(delegate() { new VBExamples.AddPrices().Run(user, campaignId); }); - } - - /// - /// Tests the AddSitelinks C# code example. - /// - [Test] - public void TestAddPricesCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddPrices().Run(user, campaignId); }); - } - - /// - /// Tests the AddSitelinksUsingFeeds VB.NET code example. - /// - [Test] - public void TestAddSitelinksUsingFeedsVBExample() - { - string feedName = "SitelinkFeed" + utils.GetTimeStampAlpha(); - RunExample(delegate() - { - new VBExamples.AddSitelinksUsingFeeds().Run(user, campaignId, feedName, - adGroupId); - }); - } - - /// - /// Tests the AddSitelinksUsingFeeds C# code example. - /// - [Test] - public void TestAddSitelinksUsingFeedsCSharpExample() - { - string feedName = "SitelinkFeed" + utils.GetTimeStampAlpha(); - RunExample(delegate() - { - new CSharpExamples.AddSitelinksUsingFeeds().Run(user, campaignId, feedName, - adGroupId); - }); - } - - /// - /// Tests the AddGoogleMyBusinessLocationExtension C# code example. - /// - [Test] - public void TestAddGoogleMyBusinessLocationExtensionCSharpExample() - { - // Delete any enabled GMB feeds and their customer feeds, since only one enabled GMB feed - // is allowed per account. - utils.DeleteEnabledGmbFeeds(user); - utils.DeleteEnabledGmbCustomerFeeds(user); - - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - - RunExample(delegate() - { - new CSharpExamples.AddGoogleMyBusinessLocationExtensions().Run(user, - config.GMBLoginEmail, gmbAccessToken, null); - }); - } - - /// - /// Tests the AddGoogleMyBusinessLocationExtension VB.NET code example. - /// - [Test] - public void TestAddGoogleMyBusinessLocationExtensionVBExample() - { - // Delete any enabled GMB feeds and their customer feeds, since only one enabled GMB feed - // is allowed per account. - utils.DeleteEnabledGmbFeeds(user); - utils.DeleteEnabledGmbCustomerFeeds(user); - - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - - RunExample(delegate() - { - new VBExamples.AddGoogleMyBusinessLocationExtensions().Run(user, - config.GMBLoginEmail, gmbAccessToken, null); - }); - } - } -} diff --git a/tests/AdWords/v201806/MigrationTest.cs b/tests/AdWords/v201806/MigrationTest.cs deleted file mode 100755 index b81c24ebc81..00000000000 --- a/tests/AdWords/v201806/MigrationTest.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\Migration. - /// - internal class MigrationTest : VersionedExampleTestsBase - { - private long campaignId; - private long adGroupId; - private long adId; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId = utils.CreateAdGroup(user, campaignId); - adId = utils.CreateExpandedTextAd(user, adGroupId, false); - } - - /// - /// Tests the MigrateToExtensionSettings VB.NET code example. - /// - [Test] - public void MigrateToExtensionSettingsVBExample() - { - RunExample(delegate() { new VBExamples.MigrateToExtensionSettings().Run(user); }); - } - - /// - /// Tests the MigrateToExtensionSettings C# code example. - /// - [Test] - public void MigrateToExtensionSettingsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.MigrateToExtensionSettings().Run(user); }); - } - } -} diff --git a/tests/AdWords/v201806/MiscellaneousTest.cs b/tests/AdWords/v201806/MiscellaneousTest.cs deleted file mode 100755 index f9c21651982..00000000000 --- a/tests/AdWords/v201806/MiscellaneousTest.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2018 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 NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\Miscellaneous. - /// - internal class MiscellaneousTest : VersionedExampleTestsBase - { - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - } - - /// - /// Tests the GetAllVideosAndImages VB.NET code example. - /// - [Test] - public void TestGetAllVideosAndImagesVBExample() - { - RunExample(delegate() { new VBExamples.GetAllVideosAndImages().Run(user); }); - } - - /// - /// Tests the GetAllVideosAndImages C# code example. - /// - [Test] - public void TestGetAllVideosAndImagesCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetAllVideosAndImages().Run(user); }); - } - - /// - /// Tests the UploadImage VB.NET code example. - /// - [Test] - public void TestUploadImageVBExample() - { - RunExample(delegate() { new VBExamples.UploadImage().Run(user); }); - } - - /// - /// Tests the UploadImage C# code example. - /// - [Test] - public void TestUploadImageCSharpExample() - { - RunExample(delegate() { new CSharpExamples.UploadImage().Run(user); }); - } - - /// - /// Tests the UploadHtml5 VB.NET code example. - /// - [Test] - public void TestUploadHtml5VBExample() - { - RunExample(delegate() { new VBExamples.UploadMediaBundle().Run(user); }); - } - - /// - /// Tests the UploadHtml5 C# code example. - /// - [Test] - public void TestUploadHtml5CSharpExample() - { - RunExample(delegate() { new CSharpExamples.UploadMediaBundle().Run(user); }); - } - - /// - /// Tests the UploadImageAsset VB.NET code example. - /// - [Test] - public void TestUploadImageAssetVBExample() - { - RunExample(delegate() { new VBExamples.UploadImageAsset().Run(user); }); - } - - /// - /// Tests the UploadImageAsset C# code example. - /// - [Test] - public void TestUploadImageAssetCSharpExample() - { - RunExample(delegate() { new CSharpExamples.UploadImageAsset().Run(user); }); - } - - /// - /// Tests the GetAllImageAssets VB.NET code example. - /// - [Test] - public void TestGetAllImageAssetsVBExample() - { - RunExample(delegate() { new VBExamples.GetAllImageAssets().Run(user); }); - } - - /// - /// Tests the GetAllImageAssets C# code example. - /// - [Test] - public void TestGetAllImageAssetsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetAllImageAssets().Run(user); }); - } - } -} diff --git a/tests/AdWords/v201806/OptimizationTest.cs b/tests/AdWords/v201806/OptimizationTest.cs deleted file mode 100755 index dc005f674c1..00000000000 --- a/tests/AdWords/v201806/OptimizationTest.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\Optimization. - /// - internal class OptimizationTest : VersionedExampleTestsBase - { - private long campaignId; - private long adGroupId; - private long keywordId; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId = utils.CreateAdGroup(user, campaignId); - keywordId = utils.CreateKeyword(user, adGroupId); - } - - /// - /// Tests the EstimateKeywordTraffic VB.NET code example. - /// - [Test] - public void TestEstimateKeywordTrafficVBExample() - { - RunExample(delegate() { new VBExamples.EstimateKeywordTraffic().Run(user); }); - } - - /// - /// Tests the EstimateKeywordTraffic C# code example. - /// - [Test] - public void TestEstimateKeywordTrafficCSharpExample() - { - RunExample(delegate() { new CSharpExamples.EstimateKeywordTraffic().Run(user); }); - } - - /// - /// Tests the GetAdGroupBidSimulations VB.NET code example. - /// - [Test] - public void TestGetAdGroupBidSimulationsVBExample() - { - RunExample(delegate() - { - new VBExamples.GetAdGroupBidSimulations().Run(user, adGroupId); - }); - } - - /// - /// Tests the GetAdGroupBidSimulations C# code example. - /// - [Test] - public void TestGetAdGroupBidSimulationsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetAdGroupBidSimulations().Run(user, adGroupId); - }); - } - - /// - /// Tests the GetKeywordBidSimulations VB.NET code example. - /// - [Test] - public void TestGetKeywordBidSimulationsVBExample() - { - RunExample(delegate() - { - new VBExamples.GetKeywordBidSimulations().Run(user, adGroupId, keywordId); - }); - } - - /// - /// Tests the GetKeywordBidSimulations C# code example. - /// - [Test] - public void TestGetKeywordBidSimulationsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetKeywordBidSimulations().Run(user, adGroupId, keywordId); - }); - } - - /// - /// Tests the GetCampaignCriterionBidModifierSimulations VB.NET code example. - /// - [Test] - public void TestGetCampaignCriterionBidModifierSimulationsVBExample() - { - RunExample(delegate() - { - new VBExamples.GetCampaignCriterionBidModifierSimulations().Run(user, - campaignId); - }); - } - - /// - /// Tests the GetCampaignCriterionBidModifierSimulations C# code example. - /// - [Test] - public void TestGetCampaignCriterionBidModifierSimulationsCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetCampaignCriterionBidModifierSimulations().Run(user, - campaignId); - }); - } - } -} diff --git a/tests/AdWords/v201806/RemarketingTest.cs b/tests/AdWords/v201806/RemarketingTest.cs deleted file mode 100755 index dc0cf41e8f9..00000000000 --- a/tests/AdWords/v201806/RemarketingTest.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2018 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 NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under - /// v201806\AudienceAndConversionManagement. - /// - internal class RemarketingTest : VersionedExampleTestsBase - { - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - } - - /// - /// Tests the AddAudience VB.NET code example. - /// - [Test] - public void TestAddAudienceVBExample() - { - RunExample(delegate() { new VBExamples.AddAudience().Run(user); }); - } - - /// - /// Tests the AddAudience C# code example. - /// - [Test] - public void TestAddAudienceCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddAudience().Run(user); }); - } - - /// - /// Tests the AddRuleBasedRemarketingList VB.NET code example. - /// - [Test] - public void TestAddRuleBasedRemarketingListVBExample() - { - RunExample(delegate() { new VBExamples.AddRuleBasedRemarketingList().Run(user); }); - } - - /// - /// Tests the AddRuleBasedRemarketingList C# code example. - /// - [Test] - public void TestAddRuleBasedRemarketingListCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddRuleBasedRemarketingList().Run(user); }); - } - - /// - /// Tests the AddConversionTracker VB.NET code example. - /// - [Test] - public void TestAddConversionTrackerVBExample() - { - RunExample(delegate() { new VBExamples.AddConversionTrackers().Run(user); }); - } - - /// - /// Tests the AddConversionTracker C# code example. - /// - [Test] - public void TestAddConversionTrackerCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddConversionTrackers().Run(user); }); - } - - /// - /// Tests the AddCrmBasedUserList VB.NET code example. - /// - [Test] - public void TestAddCrmBasedUserListVBExample() - { - RunExample(delegate() { new VBExamples.AddCrmBasedUserList().Run(user); }); - } - - /// - /// Tests the AddCrmBasedUserList C# code example. - /// - [Test] - public void TestAddCrmBasedUserListCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddCrmBasedUserList().Run(user); }); - } - } -} diff --git a/tests/AdWords/v201806/ReportingTest.cs b/tests/AdWords/v201806/ReportingTest.cs deleted file mode 100755 index 53785b0d0fd..00000000000 --- a/tests/AdWords/v201806/ReportingTest.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using System.IO; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\Reporting. - /// - internal class ReportingTest : VersionedExampleTestsBase - { - private string outputFolderPath; - private string outputFileName; - - private ReportDefinitionReportType reportType; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - outputFolderPath = Path.GetTempPath(); - outputFileName = utils.GetTimeStampAlpha() + ".gz"; - reportType = ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT; - } - - /// - /// Tests the DownloadCriteriaReportWithSelector VB.NET code example. - /// - [Test] - public void TestDownloadCriteriaReportWithSelectorVBExample() - { - RunExample(delegate() - { - new VBExamples.DownloadCriteriaReportWithSelector().Run(user, outputFileName); - }); - } - - /// - /// Tests the DownloadCriteriaReportWithSelector C# code example. - /// - [Test] - public void TestDownloadCriteriaReportWithSelectorCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.DownloadCriteriaReportWithSelector().Run(user, - outputFileName); - }); - } - - /// - /// Tests the DownloadCriteriaReportWithAwql VB.NET code example. - /// - [Test] - public void TestDownloadCriteriaReportWithAwqlVBExample() - { - RunExample(delegate() - { - new VBExamples.DownloadCriteriaReportWithAwql().Run(user, outputFileName); - }); - } - - /// - /// Tests the DownloadCriteriaReportWithAwql C# code example. - /// - [Test] - public void TestDownloadCriteriaReportWithAwqlCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.DownloadCriteriaReportWithAwql().Run(user, outputFileName); - }); - } - - /// - /// Tests the GetReportFields VB.NET code example. - /// - [Test] - public void TestGetReportFieldsVBExample() - { - RunExample(delegate() { new VBExamples.GetReportFields().Run(user, reportType); }); - } - - /// - /// Tests the GetReportFields C# code example. - /// - [Test] - public void TestGetReportFieldsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetReportFields().Run(user, reportType); }); - } - - /// - /// Tests the StreamCriteriaReportResults VB.NET code example. - /// - [Test] - public void TestStreamCriteriaReportResultsVBExample() - { - RunExample(delegate() { new VBExamples.StreamCriteriaReportResults().Run(user); }); - } - - /// - /// Tests the StreamCriteriaReportResults C# code example. - /// - [Test] - public void TestStreamCriteriaReportResultsCSharpExample() - { - RunExample(delegate() { new CSharpExamples.StreamCriteriaReportResults().Run(user); }); - } - - /// - /// Tests the StreamCriteriaReportToPoco C# code example. - /// - [Test] - public void TestStreamCriteriaReportToPocoCSharpExample() - { - RunExample(delegate() { new CSharpExamples.StreamCriteriaReportToPoco().Run(user); }); - } - - /// - /// Tests the StreamCriteriaReportToPoco VB.NET code example. - /// - [Test] - public void TestStreamCriteriaReportToPocoVBExample() - { - RunExample(delegate() { new VBExamples.StreamCriteriaReportToPoco().Run(user); }); - } - - /// - /// Tests the StreamReportToPredefinedReportRowType VB.NET code example. - /// - [Test] - public void TestStreamReportToPredefinedReportRowTypeVBExample() - { - RunExample(delegate() - { - new VBExamples.StreamReportToPredefinedReportRowType().Run(user); - }); - } - - /// - /// Tests the StreamReportToPredefinedReportRowType C# code example. - /// - [Test] - public void TestStreamReportToPredefinedReportRowTypeCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.StreamReportToPredefinedReportRowType().Run(user); - }); - } - - /// - /// Tests the ParallelReportDownload C# code example. - /// - [Test] - public void TestParallelReportDownloadCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.ParallelReportDownload().Run(user, outputFolderPath); - }); - } - } -} diff --git a/tests/AdWords/v201806/ShoppingCampaignsTest.cs b/tests/AdWords/v201806/ShoppingCampaignsTest.cs deleted file mode 100755 index 5730bbe35b2..00000000000 --- a/tests/AdWords/v201806/ShoppingCampaignsTest.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\ShoppingCampaigns. - /// - internal class ShoppingCampaignsTest : VersionedExampleTestsBase - { - private long adGroupId; - private long budgetId; - private long campaignId; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - budgetId = utils.CreateBudget(user); - campaignId = utils.CreateShoppingCampaign(user, BiddingStrategyType.MANUAL_CPC); - adGroupId = utils.CreateAdGroup(user, campaignId); - } - - /// - /// Tests the AddProductPartitionTree C# code example. - /// - [Test] - public void TestAddProductPartitionTreeCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddProductPartitionTree().Run(user, adGroupId); - }); - } - - /// - /// Tests the AddProductPartitionTree VB.NET code example. - /// - [Test] - public void TestAddProductPartitionTreeVBExample() - { - RunExample( - delegate() { new VBExamples.AddProductPartitionTree().Run(user, adGroupId); }); - } - - /// - /// Tests the AddProductScope C# code example. - /// - [Test] - public void TestAddProductScopeCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddProductScope().Run(user, campaignId); }); - } - - /// - /// Tests the AddProductScope VB.NET code example. - /// - [Test] - public void TestAddProductScopeVBExample() - { - RunExample(delegate() { new VBExamples.AddProductScope().Run(user, campaignId); }); - } - - /// - /// Tests the GetAccountChanges C# code example. - /// - [Test] - public void TestAddShoppingCampaignCSharpExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new CSharpExamples.AddShoppingCampaign().Run(user, budgetId, - config.MerchantCenterId, true); - }); - } - - /// - /// Tests the GetAccountChanges VB.NET code example. - /// - [Test] - public void TestAddShoppingCampaignVBExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new VBExamples.AddShoppingCampaign().Run(user, budgetId, - config.MerchantCenterId, true); - }); - } - - /// - /// Tests the GetProductCategoryTaxonomy C# code example. - /// - [Test] - public void TestGetProductCategoryTaxonomyCSharpExample() - { - RunExample(delegate() { new CSharpExamples.GetProductCategoryTaxonomy().Run(user); }); - } - - /// - /// Tests the GetProductCategoryTaxonomy VB.NET code example. - /// - [Test] - public void TestGetProductCategoryTaxonomyVBExample() - { - RunExample(delegate() { new VBExamples.GetProductCategoryTaxonomy().Run(user); }); - } - - /// - /// Tests the AddShoppingCampaignForShowcaseAds C# code example. - /// - [Test] - public void TestAddShoppingCampaignForShowcaseAdsCSharpExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new CSharpExamples.AddShoppingCampaignForShowcaseAds().Run(user, budgetId, - config.MerchantCenterId); - }); - } - - /// - /// Tests the AddShoppingCampaignForShowcaseAds VB.NET code example. - /// - [Test] - public void TestAddShoppingCampaignForShowcaseAdsVBExample() - { - AdWordsAppConfig config = (AdWordsAppConfig) user.Config; - RunExample(delegate() - { - new VBExamples.AddShoppingCampaignForShowcaseAds().Run(user, budgetId, - config.MerchantCenterId); - }); - } - } -} diff --git a/tests/AdWords/v201806/ShoppingTestUtils.cs b/tests/AdWords/v201806/ShoppingTestUtils.cs deleted file mode 100755 index 13eff882d58..00000000000 --- a/tests/AdWords/v201806/ShoppingTestUtils.cs +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Util.Shopping.v201806; -using Google.Api.Ads.AdWords.v201806; - -using System.Collections.Generic; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Utility functions for testing shopping utility classes. - /// - internal class ShoppingTestUtils - { - /// - /// A ProductBrand node for Google brand. - /// - internal readonly ProductDimension BRAND_GOOGLE = ProductDimensions.CreateBrand("google"); - - /// - /// A ProductBrand node for Motorola brand. - /// - internal readonly ProductDimension BRAND_MOTOROLA = - ProductDimensions.CreateBrand("motorola"); - - /// - /// A ProductBrand node for Everything else. - /// - internal readonly ProductDimension BRAND_OTHER = ProductDimensions.CreateBrand(); - - /// - /// A ProductOfferId node for Offer A. - /// - internal readonly ProductDimension OFFER_A = ProductDimensions.CreateOfferId("A"); - - /// - /// A ProductOfferId node for Offer B. - /// - internal readonly ProductDimension OFFER_B = ProductDimensions.CreateOfferId("B"); - - /// - /// A ProductOfferId node for Offer C. - /// - internal readonly ProductDimension OFFER_C = ProductDimensions.CreateOfferId("C"); - - /// - /// A ProductOfferId node for Everything else. - /// - internal readonly ProductDimension OFFER_OTHER = ProductDimensions.CreateOfferId(); - - /// - /// Creates a tree for testing various ADD operations. - /// - /// The ad group ID. - /// A product partition tree for running tests. - internal ProductPartitionTree CreateTestTreeForAddition(long adGroupId) - { - return CreateTestTree(adGroupId, ProductPartitionTree.NEW_ROOT_ID); - } - - /// - /// Creates a tree for testing various tree transformation operations. - /// - /// The ad group ID. - /// A product partition tree for running tests. - internal ProductPartitionTree CreateTestTreeForTransformation(long adGroupId) - { - // The root ID is kept high enough so that the tree doesn't interpret - // the nodes as candidates for ADD operation. - return CreateTestTree(adGroupId, ProductPartitionTree.NEW_ROOT_ID + 10); - } - - /// - /// Creates the test tree. - /// - /// The ad group ID. - /// The root product partition ID. - /// A product partition tree for running tests. - private ProductPartitionTree CreateTestTree(long adGroupId, long rootId) - { - // The tree structure is: - // root - // Google - // offerA, - // offerB, - // Other - // Motorola - // Other - - long counterStart = rootId - 1; - - List adGroupCriteria = new List() - { - CreateCriterionForProductPartition(rootId, ProductPartitionTree.ROOT_PARENT_ID, - null, false, false), // root - CreateCriterionForProductPartition(counterStart - 1L, rootId, BRAND_GOOGLE, true, - false, 100000L), // google - CreateCriterionForProductPartition(counterStart - 2L, rootId, BRAND_MOTOROLA, true, - false, 50000L), // Motorola - CreateCriterionForProductPartition(counterStart - 3L, rootId, BRAND_OTHER, true, - true), // Other - - CreateCriterionForProductPartition(counterStart - 4L, counterStart - 1L, OFFER_A, - true, false, 30000L), // offerA - CreateCriterionForProductPartition(counterStart - 5L, counterStart - 1L, OFFER_B, - true, true, 30000L), // offerB - CreateCriterionForProductPartition(counterStart - 6L, counterStart - 1L, - OFFER_OTHER, true, false, 50000L), // Other - }; - - return ProductPartitionTree.CreateAdGroupTree(adGroupId, adGroupCriteria); - } - - /// - /// Creates the criterion for product partition. - /// - /// The product partition ID. - /// The proudct partition ID for parent node. - /// The case value. - /// True, if the node is UNIT node, false otherwise. - /// True, if the node is EXCLUDE node, false otherwise. - /// An ad group criterion node for the product partition. - internal static AdGroupCriterion CreateCriterionForProductPartition(long partitionId, - long parentPartitionId, ProductDimension caseValue, bool isUnit, bool isExcluded) - { - return CreateCriterionForProductPartition(partitionId, parentPartitionId, caseValue, - isUnit, isExcluded, 0); - } - - /// - /// Creates the criterion for product partition. - /// - /// The product partition ID. - /// The proudct partition ID for parent node. - /// The case value. - /// True, if the node is UNIT node, false otherwise. - /// True, if the node is EXCLUDE node, false otherwise. - /// The bid to be set on a node, if it is UNIT. - /// An ad group criterion node for the product partition. - internal static AdGroupCriterion CreateCriterionForProductPartition(long partitionId, - long parentPartitionId, ProductDimension caseValue, bool isUnit, bool isExcluded, - long bid) - { - AdGroupCriterion adGroupCriterion; - ProductPartition partition = new ProductPartition() - { - id = partitionId, - parentCriterionId = parentPartitionId, - caseValue = caseValue, - partitionType = - isUnit ? ProductPartitionType.UNIT : ProductPartitionType.SUBDIVISION - }; - - if (isExcluded) - { - NegativeAdGroupCriterion negative = new NegativeAdGroupCriterion(); - adGroupCriterion = negative; - } - else - { - BiddableAdGroupCriterion biddable = new BiddableAdGroupCriterion(); - biddable.userStatus = UserStatus.ENABLED; - - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration(); - if (isUnit && bid != 0) - { - CpcBid cpcBid = new CpcBid() - { - bid = new Money() - { - microAmount = bid - }, - cpcBidSource = BidSource.CRITERION - }; - biddingConfig.bids = new Bids[] - { - cpcBid - }; - } - - biddable.biddingStrategyConfiguration = biddingConfig; - adGroupCriterion = biddable; - } - - adGroupCriterion.criterion = partition; - return adGroupCriterion; - } - - /// - /// Gets the operations for node. - /// - /// The partition node. - /// The list of all mutate operations. - /// The list of operations that apply to partitionNode. - internal List GetOperationsForNode( - ProductPartitionNode partitionNode, AdGroupCriterionOperation[] mutateOperations) - { - ProductDimensionEqualityComparer comparer = new ProductDimensionEqualityComparer(); - List retval = new List(); - - foreach (AdGroupCriterionOperation operation in mutateOperations) - { - switch (operation.@operator) - { - case Operator.SET: - case Operator.REMOVE: - if (operation.operand.criterion.id == partitionNode.ProductPartitionId) - { - retval.Add(operation); - } - - break; - - case Operator.ADD: - if (comparer.Equals( - (operation.operand.criterion as ProductPartition).caseValue, - partitionNode.Dimension)) - { - retval.Add(operation); - } - - break; - } - } - - return retval; - } - } -} diff --git a/tests/AdWords/v201806/TargetingTest.cs b/tests/AdWords/v201806/TargetingTest.cs deleted file mode 100755 index 9edf4317f41..00000000000 --- a/tests/AdWords/v201806/TargetingTest.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.v201806; - -using NUnit.Framework; - -using CSharpExamples = Google.Api.Ads.AdWords.Examples.CSharp.v201806; -using VBExamples = Google.Api.Ads.AdWords.Examples.VB.v201806; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Test cases for all the code examples under v201806\Targeting. - /// - internal class TargetingTest : VersionedExampleTestsBase - { - private long campaignId; - private long campaignCriterionId; - - /// - /// Inits this instance. - /// - [SetUp] - public void Init() - { - campaignId = utils.CreateSearchCampaign(user, BiddingStrategyType.MANUAL_CPC); - campaignCriterionId = utils.AddCampaignTargetingCriteria(user, campaignId); - } - - /// - /// Tests the AddCampaignTargetingCriteria VB.NET code example. - /// - [Test] - public void TestAddCampaignTargetingCriteriaVBExample() - { - RunExample(delegate() - { - new VBExamples.AddCampaignTargetingCriteria().Run(user, campaignId, null); - }); - } - - /// - /// Tests the AddCampaignTargetingCriteria C# code example. - /// - [Test] - public void TestAddCampaignTargetingCriteriaCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.AddCampaignTargetingCriteria().Run(user, campaignId, null); - }); - } - - /// - /// Tests the GetCampaignTargetingCriteria VB.NET code example. - /// - [Test] - public void TestGetCampaignTargetingCriteriaVBExample() - { - RunExample(delegate() - { - new VBExamples.GetCampaignTargetingCriteria().Run(user, campaignId); - }); - } - - /// - /// Tests the GetCampaignTargetingCriteria C# code example. - /// - [Test] - public void TestGetCampaignTargetingCriteriaCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetCampaignTargetingCriteria().Run(user, campaignId); - }); - } - - /// - /// Tests the GetTargetableLanguagesAndCarriers VB.NET code example. - /// - [Test] - public void TestGetTargetableLanguagesAndCarriersVBExample() - { - RunExample(delegate() - { - new VBExamples.GetTargetableLanguagesAndCarriers().Run(user); - }); - } - - /// - /// Tests the GetTargetableLanguagesAndCarriers C# code example. - /// - [Test] - public void TestGetTargetableLanguagesAndCarriersCSharpExample() - { - RunExample(delegate() - { - new CSharpExamples.GetTargetableLanguagesAndCarriers().Run(user); - }); - } - - /// - /// Tests the LookupLocation VB.NET code example. - /// - [Test] - public void TestLookupLocationVBExample() - { - RunExample(delegate() { new VBExamples.LookupLocation().Run(user); }); - } - - /// - /// Tests the LookupLocation C# code example. - /// - [Test] - public void TestLookupLocationCSharpExample() - { - RunExample(delegate() { new CSharpExamples.LookupLocation().Run(user); }); - } - - /// - /// Tests the AddCustomerNegativeCriteria VB.NET code example. - /// - [Test] - public void TestAddCustomerNegativeCriteriaVBExample() - { - RunExample(delegate() { new VBExamples.AddCustomerNegativeCriteria().Run(user); }); - } - - /// - /// Tests the AddCustomerNegativeCriteria C# code example. - /// - [Test] - public void TestAddCustomerNegativeCriteriaCSharpExample() - { - RunExample(delegate() { new CSharpExamples.AddCustomerNegativeCriteria().Run(user); }); - } - } -} diff --git a/tests/AdWords/v201806/TestUtils.cs b/tests/AdWords/v201806/TestUtils.cs deleted file mode 100755 index 99c59ec8533..00000000000 --- a/tests/AdWords/v201806/TestUtils.cs +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright 2018 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.Api.Ads.AdWords.Lib; -using Google.Api.Ads.AdWords.v201806; -using Google.Api.Ads.Common.Util; - -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// A utility class to assist the testing of v201806 services. - /// - internal class TestUtils - { - /// - /// The polling interval base to be used for exponential backoff. - /// - private const int POLL_INTERVAL_SECONDS_BASE = 30; - - /// - /// The placeholder ID for GMB location extension feeds. - /// - private const int PLACEHOLDER_LOCATION = 7; - - /// - /// The maximum number of retries. - /// - private const long MAX_RETRIES = 5; - - /// - /// The default budget to be used when creating campaigns. - /// - private const long DEFAULT_BUDGET = 500000; - - public long CreateBudget(AdWordsUser user) - { - BudgetService budgetService = - (BudgetService) user.GetService(AdWordsService.v201806.BudgetService); - - // Create the campaign budget. - Budget budget = new Budget(); - budget.name = "Interplanetary Cruise Budget #" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"); - budget.deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD; - budget.amount = new Money(); - budget.amount.microAmount = DEFAULT_BUDGET; - budget.isExplicitlyShared = false; - - BudgetOperation budgetOperation = new BudgetOperation(); - budgetOperation.@operator = Operator.ADD; - budgetOperation.operand = budget; - - BudgetReturnValue budgetRetval = budgetService.mutate(new BudgetOperation[] - { - budgetOperation - }); - return budgetRetval.value[0].budgetId; - } - - /// - /// Deletes the enabled GMB feeds. - /// - /// The AdWords user. - public void DeleteEnabledGmbFeeds(AdWordsUser user) - { - FeedService feedService = - (FeedService) user.GetService(AdWordsService.v201806.FeedService); - - List feedsToDelete = new List(); - string query = - "Select Id, SystemFeedGenerationData, FeedStatus where FeedStatus=ENABLED"; - - FeedPage page = feedService.query(query); - - for (int i = 0; i < page.entries.Length; i++) - { - Feed f = page.entries[i]; - PlacesLocationFeedData systemData = - (f.systemFeedGenerationData as PlacesLocationFeedData); - if (systemData != null) - { - feedsToDelete.Add(f); - } - } - - if (feedsToDelete.Count > 0) - { - List operations = new List(); - - for (int i = 0; i < feedsToDelete.Count; i++) - { - FeedOperation operation = new FeedOperation() - { - @operator = Operator.REMOVE, - operand = new Feed() - { - id = feedsToDelete[i].id - } - }; - operations.Add(operation); - } - - feedService.mutate(operations.ToArray()); - } - - return; - } - - /// - /// Deletes the active GMB customer feeds. - /// - /// The AdWords user. - public void DeleteEnabledGmbCustomerFeeds(AdWordsUser user) - { - CustomerFeedService customerFeedService = - (CustomerFeedService) user.GetService(AdWordsService.v201806.CustomerFeedService); - - string query = "Select FeedId, PlaceholderTypes where PlaceholderTypes CONTAINS_ANY[" + - PLACEHOLDER_LOCATION + "] AND Status = ENABLED"; - - List operations = new List(); - - CustomerFeedPage page = customerFeedService.query(query); - - if (page != null && page.entries != null) - { - for (int i = 0; i < page.entries.Length; i++) - { - CustomerFeed customerFeed = page.entries[i]; - CustomerFeedOperation operation = new CustomerFeedOperation() - { - @operator = Operator.REMOVE, - operand = customerFeed - }; - operations.Add(operation); - } - - customerFeedService.mutate(operations.ToArray()); - } - } - - /// - /// Creates a label for test purposes. - /// - /// The AdWords user. - /// ID of the newly created label. - public long CreateLabel(AdWordsUser user) - { - LabelService labelService = - (LabelService) user.GetService(AdWordsService.v201806.LabelService); - - // Create the campaign budget. - TextLabel label = new TextLabel() - { - name = "Interplanetary Cruise Label #" + - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"), - }; - - LabelOperation labelOperation = new LabelOperation() - { - @operator = Operator.ADD, - operand = label - }; - - LabelReturnValue labelRetval = labelService.mutate(new LabelOperation[] - { - labelOperation - }); - return labelRetval.value[0].id; - } - - /// - /// Creates a test search campaign for running further tests. - /// - /// The AdWords user. - /// The bidding strategy to be used. - /// The campaign id. - public long CreateMobileSearchCampaign(AdWordsUser user, BiddingStrategyType strategyType) - { - return CreateCampaign(user, AdvertisingChannelType.SEARCH, strategyType, true, false, - false); - } - - /// - /// Creates a test search campaign for running further tests. - /// - /// The AdWords user. - /// The bidding strategy to be used. - /// The campaign id. - public long CreateSearchCampaign(AdWordsUser user, BiddingStrategyType strategyType) - { - return CreateCampaign(user, AdvertisingChannelType.SEARCH, strategyType); - } - - /// - /// Creates a display campaign for running further tests. - /// - /// The AdWords user. - /// The bidding strategy to be used. - /// The campaign id. - public long CreateDisplayCampaign(AdWordsUser user, BiddingStrategyType strategyType) - { - return CreateCampaign(user, AdvertisingChannelType.DISPLAY, strategyType); - } - - /// - /// Creates a test shopping campaign for running further tests. - /// - /// The AdWords user. - /// The bidding strategy to be used. - /// The campaign id. - public long CreateShoppingCampaign(AdWordsUser user, BiddingStrategyType strategyType) - { - return CreateCampaign(user, AdvertisingChannelType.SHOPPING, strategyType); - } - - /// - /// Creates a test shopping campaign for running further tests. - /// - /// The AdWords user. - public long CreateDSACampaign(AdWordsUser user) - { - return CreateCampaign(user, AdvertisingChannelType.SEARCH, - BiddingStrategyType.MANUAL_CPC, false, true, false); - } - - /// - /// Creates a test campaign for running further tests. - /// - /// The AdWords user. - /// The advertising channel type for this - /// campaign. - /// The bidding strategy to be used for - /// this campaign. - /// The campaign id. - private long CreateCampaign(AdWordsUser user, AdvertisingChannelType channelType, - BiddingStrategyType strategyType) - { - return CreateCampaign(user, channelType, strategyType, false, false, false); - } - - public long CreateGmailCampaign(AdWordsUser user) - { - return CreateCampaign(user, AdvertisingChannelType.DISPLAY, - BiddingStrategyType.MANUAL_CPC, false, false, true); - } - - /// - /// Creates a test campaign for running further tests. - /// - /// The AdWords user. - /// The advertising channel type for this - /// campaign. - /// The bidding strategy to be used for - /// this campaign. - /// True, if this campaign is mobile-only, false - /// otherwise. - /// True, if this campaign is for DSA, false - /// otherwise. - /// True, if this campaign is for GMail Ads, false - /// otherwise. - /// The campaign id. - private long CreateCampaign(AdWordsUser user, AdvertisingChannelType channelType, - BiddingStrategyType strategyType, bool isMobile, bool isDsa, bool isGmail) - { - CampaignService campaignService = - (CampaignService) user.GetService(AdWordsService.v201806.CampaignService); - - Campaign campaign = new Campaign() - { - name = string.Format("Campaign {0}", - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff")), - advertisingChannelType = channelType, - - // Set the test campaign to PAUSED when creating it to prevent the ads from serving. - status = CampaignStatus.PAUSED, - - biddingStrategyConfiguration = new BiddingStrategyConfiguration() - { - biddingStrategyType = strategyType - }, - budget = new Budget() - { - budgetId = CreateBudget(user), - amount = new Money() - { - microAmount = 100000000, - }, - deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD - } - }; - - // Campaign setups that cannot be inferred just from AdvertisingChannelType uses flags. - List settings = new List(); - - // The following flags are all mutually exclusive for the purpose of testing. - if (isMobile) - { - switch (campaign.advertisingChannelType) - { - case AdvertisingChannelType.SEARCH: - campaign.advertisingChannelSubType = - AdvertisingChannelSubType.SEARCH_MOBILE_APP; - break; - - case AdvertisingChannelType.DISPLAY: - campaign.advertisingChannelSubType = - AdvertisingChannelSubType.DISPLAY_MOBILE_APP; - break; - } - } - else if (isDsa) - { - // Required: Set the campaign's Dynamic Search Ads settings. - DynamicSearchAdsSetting dynamicSearchAdsSetting = new DynamicSearchAdsSetting(); - - // Required: Set the domain name and language. - dynamicSearchAdsSetting.domainName = "example.com"; - dynamicSearchAdsSetting.languageCode = "en"; - settings.Add(dynamicSearchAdsSetting); - } - else if (isGmail) - { - campaign.advertisingChannelSubType = AdvertisingChannelSubType.DISPLAY_GMAIL_AD; - } - else if (channelType == AdvertisingChannelType.SHOPPING) - { - // All Shopping campaigns need a ShoppingSetting. - ShoppingSetting shoppingSetting = new ShoppingSetting() - { - salesCountry = "US", - campaignPriority = 0, - merchantId = (user.Config as AdWordsAppConfig).MerchantCenterId - }; - settings.Add(shoppingSetting); - } - - campaign.settings = settings.ToArray(); - - CampaignOperation campaignOperation = new CampaignOperation() - { - @operator = Operator.ADD, - operand = campaign - }; - - CampaignReturnValue retVal = campaignService.mutate(new CampaignOperation[] - { - campaignOperation - }); - return retVal.value[0].id; - } - - /// - /// Creates a test adgroup for running further tests. - /// - /// The AdWords user. - /// The campaign id for which the adgroup is created. - /// The adgroup id. - public long CreateAdGroup(AdWordsUser user, long campaignId) - { - return CreateAdGroup(user, campaignId, false); - } - - /// - /// Creates a test ad group for running further tests. - /// - /// The AdWords user. - /// The campaign id for which the adgroup is created. - /// The ad group type. - /// The ad group ID. - public long CreateAdGroup(AdWordsUser user, long campaignId, AdGroupType adGroupType) - { - return CreateAdGroup(user, campaignId, adGroupType, false); - } - - /// - /// Creates a test ad group for running further tests. - /// - /// The AdWords user. - /// The campaign id for which the adgroup is created. - /// True, if a ManualCPM bid is to be used. - /// The ad group ID. - public long CreateAdGroup(AdWordsUser user, long campaignId, bool isCpmBid) - { - return CreateAdGroup(user, campaignId, AdGroupType.UNKNOWN, isCpmBid); - } - - /// - /// Creates a test ad group for running further tests. - /// - /// The AdWords user. - /// The campaign id for which the adgroup is created. - /// The ad group type. - /// True, if a ManualCPM bid is to be used. - /// The ad group ID. - public long CreateAdGroup(AdWordsUser user, long campaignId, AdGroupType adGroupType, - bool isCpmBid) - { - AdGroupService adGroupService = - (AdGroupService) user.GetService(AdWordsService.v201806.AdGroupService); - - AdGroupOperation adGroupOperation = new AdGroupOperation(); - adGroupOperation.@operator = Operator.ADD; - adGroupOperation.operand = new AdGroup(); - adGroupOperation.operand.campaignId = campaignId; - adGroupOperation.operand.name = string.Format("AdGroup {0}", - DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff")); - adGroupOperation.operand.status = AdGroupStatus.ENABLED; - - if (adGroupType != AdGroupType.UNKNOWN) - { - adGroupOperation.operand.adGroupType = adGroupType; - } - - if (isCpmBid) - { - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration(); - CpmBid cpmBid = new CpmBid(); - cpmBid.bid = new Money(); - cpmBid.bid.microAmount = 10000000; - biddingConfig.bids = new Bids[] - { - cpmBid - }; - adGroupOperation.operand.biddingStrategyConfiguration = biddingConfig; - } - else - { - BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration(); - CpcBid cpcBid = new CpcBid(); - cpcBid.bid = new Money(); - cpcBid.bid.microAmount = 10000000; - biddingConfig.bids = new Bids[] - { - cpcBid - }; - adGroupOperation.operand.biddingStrategyConfiguration = biddingConfig; - } - - AdGroupReturnValue retVal = adGroupService.mutate(new AdGroupOperation[] - { - adGroupOperation - }); - return retVal.value[0].id; - } - - /// - /// Creates a test expanded text ad for running further tests. - /// - /// The AdWords user. - /// The adgroup id for which the ad is created. - /// - /// True, if an ad param placeholder should be - /// added. - /// The expanded text ad id. - public long CreateExpandedTextAd(AdWordsUser user, long adGroupId, bool hasAdParam) - { - AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService); - AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation(); - adGroupAdOperation.@operator = Operator.ADD; - adGroupAdOperation.operand = new AdGroupAd(); - adGroupAdOperation.operand.adGroupId = adGroupId; - - ExpandedTextAd expandedTextAd = new ExpandedTextAd(); - expandedTextAd.headlinePart1 = "Luxury Cruise to Mars"; - expandedTextAd.headlinePart2 = "Best Space Cruise Line"; - expandedTextAd.description = "Buy your tickets now!"; - if (hasAdParam) - { - expandedTextAd.description = "Low-gravity fun for {param1:cheap}!"; - } - else - { - expandedTextAd.description = "Low-gravity fun for everyone!"; - } - - expandedTextAd.finalUrls = new string[] - { - "http://www.example.com/" - }; - - adGroupAdOperation.operand.ad = expandedTextAd; - - AdGroupAdReturnValue retVal = adGroupAdService.mutate(new AdGroupAdOperation[] - { - adGroupAdOperation - }); - return retVal.value[0].ad.id; - } - - /// - /// Creates a test draft for running further tests. - /// - /// The AdWords user. - /// The base campaign ID for the draft. - /// The draft. - /// We are returning the Draft itself, since there's no way to get - /// the draft campaign ID given a draft ID. - public Draft AddDraft(AdWordsUser user, long baseCampaignId) - { - // Get the DraftService. - DraftService draftService = - (DraftService) user.GetService(AdWordsService.v201806.DraftService); - Draft draft = new Draft() - { - baseCampaignId = baseCampaignId, - draftName = "Test Draft #" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff") - }; - - DraftOperation draftOperation = new DraftOperation() - { - @operator = Operator.ADD, - operand = draft - }; - - return draftService.mutate(new DraftOperation[] - { - draftOperation - }).value[0]; - } - - /// - /// Creates a test trial for running further tests. - /// - /// The AdWords user. - /// The base campaign ID for the draft. - /// ID of the draft to use when creating trial. - /// The trial ID. - public long CreateTrial(AdWordsUser user, long draftId, long baseCampaignId) - { - // Get the TrialService. - TrialService trialService = - (TrialService) user.GetService(AdWordsService.v201806.TrialService); - - Trial trial = new Trial() - { - draftId = draftId, - baseCampaignId = baseCampaignId, - name = "Test Trial #" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"), - trafficSplitPercent = 50 - }; - - TrialOperation trialOperation = new TrialOperation() - { - @operator = Operator.ADD, - operand = trial - }; - - long trialId = trialService.mutate(new TrialOperation[] - { - trialOperation - }).value[0].id; - - // Since creating a trial is asynchronous, we have to poll it to wait - // for it to finish. - Selector trialSelector = new Selector() - { - fields = new string[] - { - Trial.Fields.Id, - Trial.Fields.Status, - Trial.Fields.BaseCampaignId, - Trial.Fields.TrialCampaignId - }, - predicates = new Predicate[] - { - Predicate.Equals(Trial.Fields.Id, trialId) - } - }; - - trial = null; - bool isPending = true; - int pollAttempts = 0; - - do - { - int sleepMillis = (int) Math.Pow(2, pollAttempts) * POLL_INTERVAL_SECONDS_BASE * - 1000; - Console.WriteLine("Sleeping {0} millis...", sleepMillis); - Thread.Sleep(sleepMillis); - - trial = trialService.get(trialSelector).entries[0]; - - Console.WriteLine("Trial ID {0} has status '{1}'.", trial.id, trial.status); - pollAttempts++; - isPending = (trial.status == TrialStatus.CREATING); - } while (isPending && pollAttempts <= MAX_RETRIES); - - if (trial.status == TrialStatus.ACTIVE) - { - return trial.id; - } - else - { - throw new System.ApplicationException( - "Failed to create an active trial for testing."); - } - } - - /// - /// Creates a test ThirdPartyRedirectAd for running further tests. - /// - /// The AdWords user. - /// The adgroup id for which the ad is created. - /// - /// The text ad id. - public long CreateThirdPartyRedirectAd(AdWordsUser user, long adGroupId) - { - AdGroupAdService adGroupAdService = - (AdGroupAdService) user.GetService(AdWordsService.v201806.AdGroupAdService); - AdGroupAdOperation adGroupAdOperation = new AdGroupAdOperation(); - adGroupAdOperation.@operator = Operator.ADD; - adGroupAdOperation.operand = new AdGroupAd(); - adGroupAdOperation.operand.adGroupId = adGroupId; - - // Create the third party redirect ad. - ThirdPartyRedirectAd redirectAd = new ThirdPartyRedirectAd(); - redirectAd.name = string.Format("Example third party ad #{0}", this.GetTimeStamp()); - redirectAd.url = "http://www.example.com"; - - redirectAd.dimensions = new Dimensions(); - redirectAd.dimensions.height = 250; - redirectAd.dimensions.width = 300; - - // This field normally contains the javascript ad tag. - redirectAd.snippet = - ""; - redirectAd.impressionBeaconUrl = "http://www.examples.com/beacon"; - redirectAd.certifiedVendorFormatId = 119; - redirectAd.isCookieTargeted = false; - redirectAd.isUserInterestTargeted = false; - redirectAd.isTagged = false; - - adGroupAdOperation.operand.ad = redirectAd; - - AdGroupAdReturnValue retVal = adGroupAdService.mutate(new AdGroupAdOperation[] - { - adGroupAdOperation - }); - return retVal.value[0].ad.id; - } - - /// - /// Sets an adparam for running further tests. - /// - /// The AdWords user. - /// The adgroup id to which criterionId belongs. - /// - /// The criterion id to which adparam is set. - /// - public void SetAdParam(AdWordsUser user, long adGroupId, long criterionId) - { - AdParamService adParamService = - (AdParamService) user.GetService(AdWordsService.v201806.AdParamService); - - // Prepare for setting ad parameters. - AdParam adParam = new AdParam(); - adParam.adGroupId = adGroupId; - adParam.criterionId = criterionId; - adParam.paramIndex = 1; - adParam.insertionText = "$100"; - - AdParamOperation adParamOperation = new AdParamOperation(); - adParamOperation.@operator = Operator.SET; - adParamOperation.operand = adParam; - - // Set ad parameters. - AdParam[] newAdParams = adParamService.mutate(new AdParamOperation[] - { - adParamOperation - }); - return; - } - - /// - /// Creates a keyword for running further tests. - /// - /// The AdWords user. - /// The adgroup id for which the keyword is - /// created. - /// The keyword id. - public long CreateKeyword(AdWordsUser user, long adGroupId) - { - AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - - AdGroupCriterionOperation operation = new AdGroupCriterionOperation(); - operation.@operator = Operator.ADD; - operation.operand = new BiddableAdGroupCriterion(); - operation.operand.adGroupId = adGroupId; - - Keyword keyword = new Keyword(); - keyword.matchType = KeywordMatchType.BROAD; - keyword.text = "mars cruise"; - - operation.operand.criterion = keyword; - AdGroupCriterionReturnValue retVal = adGroupCriterionService.mutate( - new AdGroupCriterionOperation[] - { - operation - }); - return retVal.value[0].criterion.id; - } - - /// - /// Creates the placement. - /// - /// The AdWords user. - /// The adgroup id for which the placement is - /// created. - /// The placement id. - public long CreatePlacement(AdWordsUser user, long adGroupId) - { - AdGroupCriterionService adGroupCriterionService = - (AdGroupCriterionService) user.GetService(AdWordsService.v201806 - .AdGroupCriterionService); - - Placement placement = new Placement(); - placement.url = "http://mars.google.com"; - - AdGroupCriterion placementCriterion = new BiddableAdGroupCriterion(); - placementCriterion.adGroupId = adGroupId; - placementCriterion.criterion = placement; - - AdGroupCriterionOperation placementOperation = new AdGroupCriterionOperation(); - placementOperation.@operator = Operator.ADD; - placementOperation.operand = placementCriterion; - - AdGroupCriterionReturnValue retVal = adGroupCriterionService.mutate( - new AdGroupCriterionOperation[] - { - placementOperation - }); - - return retVal.value[0].criterion.id; - } - - /// - /// Adds the campaign targeting criteria to a campaign. - /// - /// The AdWords user. - /// The campaign id. - /// The campaign criteria id. - public long AddCampaignTargetingCriteria(AdWordsUser user, long campaignId) - { - // Get the CampaignCriterionService. - CampaignCriterionService campaignCriterionService = - (CampaignCriterionService) user.GetService(AdWordsService.v201806 - .CampaignCriterionService); - - // Create language criteria. - // See http://code.google.com/apis/adwords/docs/appendix/languagecodes.html - // for a detailed list of language codes. - Language language1 = new Language(); - language1.id = 1002; // French - CampaignCriterion languageCriterion1 = new CampaignCriterion(); - languageCriterion1.campaignId = campaignId; - languageCriterion1.criterion = language1; - - CampaignCriterion[] criteria = new CampaignCriterion[] - { - languageCriterion1 - }; - - List operations = new List(); - - foreach (CampaignCriterion criterion in criteria) - { - CampaignCriterionOperation operation = new CampaignCriterionOperation(); - operation.@operator = Operator.ADD; - operation.operand = criterion; - operations.Add(operation); - } - - CampaignCriterionReturnValue retVal = - campaignCriterionService.mutate(operations.ToArray()); - return retVal.value[0].criterion.id; - } - - /// - /// Returns an image which can be used for creating image ads. - /// - /// The image data, as an array of bytes. - public byte[] GetTestImage(AdWordsAppConfig config) - { - return MediaUtilities.GetAssetDataFromUrl("http://goo.gl/HJM3L", config); - } - - /// - /// Creates the shared keyword set. - /// - /// The AdWords user. - /// A shared keyword set. - public long CreateSharedKeywordSet(AdWordsUser user) - { - // Get the SharedSetService. - SharedSetService sharedSetService = - (SharedSetService) user.GetService(AdWordsService.v201806.SharedSetService); - - SharedSetOperation operation = new SharedSetOperation(); - operation.@operator = Operator.ADD; - SharedSet sharedSet = new SharedSet(); - sharedSet.name = "API Negative keyword list - " + GetTimeStampAlpha(); - sharedSet.type = SharedSetType.NEGATIVE_KEYWORDS; - operation.operand = sharedSet; - - SharedSetReturnValue retval = sharedSetService.mutate(new SharedSetOperation[] - { - operation - }); - return retval.value[0].sharedSetId; - } - - /// - /// Attaches a shared set to a campaign. - /// - /// The AdWords user. - /// The campaign id. - /// The shared set id. - /// A CampaignSharedSet object that represents a binding between - /// the specified campaign and the shared set. - public void AttachSharedSetToCampaign(AdWordsUser user, long campaignId, long sharedSetId) - { - // Get the CampaignSharedSetService. - CampaignSharedSetService campaignSharedSetService = - (CampaignSharedSetService) user.GetService(AdWordsService.v201806 - .CampaignSharedSetService); - - CampaignSharedSet campaignSharedSet = new CampaignSharedSet(); - campaignSharedSet.campaignId = campaignId; - campaignSharedSet.sharedSetId = sharedSetId; - - CampaignSharedSetOperation operation = new CampaignSharedSetOperation(); - operation.@operator = Operator.ADD; - operation.operand = campaignSharedSet; - - campaignSharedSetService.mutate(new CampaignSharedSetOperation[] - { - operation - }); - } - - /// - /// Detaches the shared set from campaign. - /// - /// The AdWords user. - /// The campaign identifier. - /// The shared set identifier. - public void DetachSharedSetFromCampaign(AdWordsUser user, long campaignId, long sharedSetId) - { - // Get the CampaignSharedSetService. - CampaignSharedSetService campaignSharedSetService = - (CampaignSharedSetService) user.GetService(AdWordsService.v201806 - .CampaignSharedSetService); - - CampaignSharedSet campaignSharedSet = new CampaignSharedSet(); - campaignSharedSet.campaignId = campaignId; - campaignSharedSet.sharedSetId = sharedSetId; - - CampaignSharedSetOperation operation = new CampaignSharedSetOperation(); - operation.@operator = Operator.REMOVE; - operation.operand = campaignSharedSet; - - campaignSharedSetService.mutate(new CampaignSharedSetOperation[] - { - operation - }); - } - - /// - /// Deletes the shared set. - /// - /// The AdWords user. - /// The shared set ID. - public void DeleteSharedSet(AdWordsUser user, long sharedSetId) - { - // Get the SharedSetService. - SharedSetService sharedSetService = - (SharedSetService) user.GetService(AdWordsService.v201806.SharedSetService); - - SharedSetOperation operation = new SharedSetOperation(); - operation.@operator = Operator.REMOVE; - SharedSet sharedSet = new SharedSet(); - sharedSet.sharedSetId = sharedSetId; - operation.operand = sharedSet; - - SharedSetReturnValue retval = sharedSetService.mutate(new SharedSetOperation[] - { - operation - }); - } - - /// - /// Creates the user list. - /// - /// The AdWords user. - /// The user list ID. - public long CreateUserList(AdWordsUser user) - { - using (AdwordsUserListService userListService = - (AdwordsUserListService) user.GetService(AdWordsService.v201806 - .AdwordsUserListService)) - { - BasicUserList userList = new BasicUserList(); - userList.name = "Mars cruise customers #" + GetTimeStamp(); - userList.description = "A list of mars cruise customers in the last year."; - userList.status = UserListMembershipStatus.OPEN; - userList.membershipLifeSpan = 365; - - UserListConversionType conversionType = new UserListConversionType(); - conversionType.name = userList.name; - userList.conversionTypes = new UserListConversionType[] - { - conversionType - }; - - // Optional: Set the user list status. - userList.status = UserListMembershipStatus.OPEN; - - // Create the operation. - UserListOperation operation = new UserListOperation(); - operation.operand = userList; - operation.@operator = Operator.ADD; - - UserListReturnValue retval = userListService.mutate(new UserListOperation[] - { - operation - }); - - return retval.value[0].id; - } - } - - /// - /// Gets the current timestamp. - /// - /// The timestamp as a string. - public string GetTimeStamp() - { - return (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds.ToString(); - } - - /// - /// Gets the current timestamp as an alphabetic string. - /// - /// The timestamp as a string. - public string GetTimeStampAlpha() - { - string timeStamp = GetTimeStamp(); - StringBuilder builder = new StringBuilder(); - for (int i = 0; i < timeStamp.Length; i++) - { - if (timeStamp[i] == '.') - { - continue; - } - - builder.Append(Convert.ToChar('a' + int.Parse(timeStamp[i].ToString()))); - } - - return builder.ToString(); - } - } -} diff --git a/tests/AdWords/v201806/VersionedExampleTestsBase.cs b/tests/AdWords/v201806/VersionedExampleTestsBase.cs deleted file mode 100755 index 2a078cb3eeb..00000000000 --- a/tests/AdWords/v201806/VersionedExampleTestsBase.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 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. - -namespace Google.Api.Ads.AdWords.Tests.v201806 -{ - /// - /// Base class for code examples that adds version-specific features. - /// - internal class VersionedExampleTestsBase : ExampleTestsBase - { - /// - /// Test utilities instance for support functionality when running tests. - /// - protected TestUtils utils = new TestUtils(); - - /// - /// Default public constructor. - /// - public VersionedExampleTestsBase() : base() - { - } - } -} diff --git a/tests/Common/Common.Tests.csproj b/tests/Common/Common.Tests.csproj index d75d1f9d702..9cb1285c618 100755 --- a/tests/Common/Common.Tests.csproj +++ b/tests/Common/Common.Tests.csproj @@ -11,6 +11,7 @@ true true $(ProjectDir)..\..\src\Common\AdsApi.snk + true