# Encoding: utf-8 # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Utility that looks up references to generated classes for proto objects. module Google module Ads module GoogleAds module Utils module V1 class ProtoLookupUtil # Variables: Version, folder (resources/common), filename RESOURCE_PATH = 'google/ads/google_ads/%s/%s/%s'.freeze # Variables: Version, class name RESOURCE_CLASS_PATH = 'Google::Ads::GoogleAds::%s::Resources::%s'.freeze # Variables: Version, class name COMMON_CLASS_PATH = 'Google::Ads::GoogleAds::%s::Common::%s'.freeze # Variables: Version, filename ENUM_PATH = 'google/ads/google_ads/%s/enums/%s'.freeze # Variables: Version, enum name, enum name (again) ENUM_CLASS_PATH = 'Google::Ads::GoogleAds::%s::Enums::%sEnum::%s'.freeze # Variables: Version, filename SERVICE_PATH = 'google/ads/google_ads/%s/services/%s'.freeze # Variables: Version, entity name SERVICE_CLASS_PATH = 'Google::Ads::GoogleAds::%s::Services::%s'.freeze RESOURCES = { AccountBudget: ['resources', 'account_budget_pb', 'AccountBudget'], PendingAccountBudgetProposal: ['resources', 'account_budget_pb', 'AccountBudget::PendingAccountBudgetProposal'], AccountBudgetProposal: ['resources', 'account_budget_proposal_pb', 'AccountBudgetProposal'], AdGroupAdLabel: ['resources', 'ad_group_ad_label_pb', 'AdGroupAdLabel'], AdGroupAd: ['resources', 'ad_group_ad_pb', 'AdGroupAd'], AdGroupAdPolicySummary: ['resources', 'ad_group_ad_pb', 'AdGroupAdPolicySummary'], AdGroupAudienceView: ['resources', 'ad_group_audience_view_pb', 'AdGroupAudienceView'], AdGroupBidModifier: ['resources', 'ad_group_bid_modifier_pb', 'AdGroupBidModifier'], AdGroupCriterionLabel: ['resources', 'ad_group_criterion_label_pb', 'AdGroupCriterionLabel'], AdGroupCriterion: ['resources', 'ad_group_criterion_pb', 'AdGroupCriterion'], QualityInfo: ['resources', 'ad_group_criterion_pb', 'AdGroupCriterion::QualityInfo'], PositionEstimates: ['resources', 'ad_group_criterion_pb', 'AdGroupCriterion::PositionEstimates'], AdGroupExtensionSetting: ['resources', 'ad_group_extension_setting_pb', 'AdGroupExtensionSetting'], AdGroupFeed: ['resources', 'ad_group_feed_pb', 'AdGroupFeed'], AdGroupLabel: ['resources', 'ad_group_label_pb', 'AdGroupLabel'], AdGroup: ['resources', 'ad_group_pb', 'AdGroup'], AdParameter: ['resources', 'ad_parameter_pb', 'AdParameter'], Ad: ['resources', 'ad_pb', 'Ad'], AdScheduleView: ['resources', 'ad_schedule_view_pb', 'AdScheduleView'], AgeRangeView: ['resources', 'age_range_view_pb', 'AgeRangeView'], Asset: ['resources', 'asset_pb', 'Asset'], BiddingStrategy: ['resources', 'bidding_strategy_pb', 'BiddingStrategy'], BillingSetup: ['resources', 'billing_setup_pb', 'BillingSetup'], PaymentsAccountInfo: ['resources', 'billing_setup_pb', 'BillingSetup::PaymentsAccountInfo'], CampaignAudienceView: ['resources', 'campaign_audience_view_pb', 'CampaignAudienceView'], CampaignBidModifier: ['resources', 'campaign_bid_modifier_pb', 'CampaignBidModifier'], CampaignBudget: ['resources', 'campaign_budget_pb', 'CampaignBudget'], CampaignCriterion: ['resources', 'campaign_criterion_pb', 'CampaignCriterion'], CampaignExtensionSetting: ['resources', 'campaign_extension_setting_pb', 'CampaignExtensionSetting'], CampaignFeed: ['resources', 'campaign_feed_pb', 'CampaignFeed'], CampaignLabel: ['resources', 'campaign_label_pb', 'CampaignLabel'], Campaign: ['resources', 'campaign_pb', 'Campaign'], NetworkSettings: ['resources', 'campaign_pb', 'Campaign::NetworkSettings'], HotelSettingInfo: ['resources', 'campaign_pb', 'Campaign::HotelSettingInfo'], AppCampaignSetting: ['resources', 'campaign_pb', 'Campaign::AppCampaignSetting'], DynamicSearchAdsSetting: ['resources', 'campaign_pb', 'Campaign::DynamicSearchAdsSetting'], ShoppingSetting: ['resources', 'campaign_pb', 'Campaign::ShoppingSetting'], TrackingSetting: ['resources', 'campaign_pb', 'Campaign::TrackingSetting'], GeoTargetTypeSetting: ['resources', 'campaign_pb', 'Campaign::GeoTargetTypeSetting'], VanityPharma: ['resources', 'campaign_pb', 'Campaign::VanityPharma'], SelectiveOptimization: ['resources', 'campaign_pb', 'Campaign::SelectiveOptimization'], CampaignSharedSet: ['resources', 'campaign_shared_set_pb', 'CampaignSharedSet'], CarrierConstant: ['resources', 'carrier_constant_pb', 'CarrierConstant'], ChangeStatus: ['resources', 'change_status_pb', 'ChangeStatus'], ClickView: ['resources', 'click_view_pb', 'ClickView'], ConversionAction: ['resources', 'conversion_action_pb', 'ConversionAction'], AttributionModelSettings: ['resources', 'conversion_action_pb', 'ConversionAction::AttributionModelSettings'], ValueSettings: ['resources', 'conversion_action_pb', 'ConversionAction::ValueSettings'], CustomInterest: ['resources', 'custom_interest_pb', 'CustomInterest'], CustomInterestMember: ['resources', 'custom_interest_pb', 'CustomInterestMember'], CustomerClientLink: ['resources', 'customer_client_link_pb', 'CustomerClientLink'], CustomerClient: ['resources', 'customer_client_pb', 'CustomerClient'], CustomerExtensionSetting: ['resources', 'customer_extension_setting_pb', 'CustomerExtensionSetting'], CustomerFeed: ['resources', 'customer_feed_pb', 'CustomerFeed'], CustomerLabel: ['resources', 'customer_label_pb', 'CustomerLabel'], CustomerManagerLink: ['resources', 'customer_manager_link_pb', 'CustomerManagerLink'], CustomerNegativeCriterion: ['resources', 'customer_negative_criterion_pb', 'CustomerNegativeCriterion'], Customer: ['resources', 'customer_pb', 'Customer'], CallReportingSetting: ['resources', 'customer_pb', 'CallReportingSetting'], ConversionTrackingSetting: ['resources', 'customer_pb', 'ConversionTrackingSetting'], RemarketingSetting: ['resources', 'customer_pb', 'RemarketingSetting'], DetailPlacementView: ['resources', 'detail_placement_view_pb', 'DetailPlacementView'], DisplayKeywordView: ['resources', 'display_keyword_view_pb', 'DisplayKeywordView'], DomainCategory: ['resources', 'domain_category_pb', 'DomainCategory'], DynamicSearchAdsSearchTermView: ['resources', 'dynamic_search_ads_search_term_view_pb', 'DynamicSearchAdsSearchTermView'], ExtensionFeedItem: ['resources', 'extension_feed_item_pb', 'ExtensionFeedItem'], FeedItem: ['resources', 'feed_item_pb', 'FeedItem'], FeedItemAttributeValue: ['resources', 'feed_item_pb', 'FeedItemAttributeValue'], FeedItemPlaceholderPolicyInfo: ['resources', 'feed_item_pb', 'FeedItemPlaceholderPolicyInfo'], FeedItemValidationError: ['resources', 'feed_item_pb', 'FeedItemValidationError'], FeedItemTarget: ['resources', 'feed_item_target_pb', 'FeedItemTarget'], FeedMapping: ['resources', 'feed_mapping_pb', 'FeedMapping'], AttributeFieldMapping: ['resources', 'feed_mapping_pb', 'AttributeFieldMapping'], Feed: ['resources', 'feed_pb', 'Feed'], PlacesLocationFeedData: ['resources', 'feed_pb', 'Feed::PlacesLocationFeedData'], OAuthInfo: ['resources', 'feed_pb', 'Feed::PlacesLocationFeedData::OAuthInfo'], AffiliateLocationFeedData: ['resources', 'feed_pb', 'Feed::AffiliateLocationFeedData'], FeedAttribute: ['resources', 'feed_pb', 'FeedAttribute'], FeedAttributeOperation: ['resources', 'feed_pb', 'FeedAttributeOperation'], Operator: ['resources', 'feed_pb', 'FeedAttributeOperation::Operator'], FeedPlaceholderView: ['resources', 'feed_placeholder_view_pb', 'FeedPlaceholderView'], GenderView: ['resources', 'gender_view_pb', 'GenderView'], GeoTargetConstant: ['resources', 'geo_target_constant_pb', 'GeoTargetConstant'], GeographicView: ['resources', 'geographic_view_pb', 'GeographicView'], GoogleAdsField: ['resources', 'google_ads_field_pb', 'GoogleAdsField'], GroupPlacementView: ['resources', 'group_placement_view_pb', 'GroupPlacementView'], HotelGroupView: ['resources', 'hotel_group_view_pb', 'HotelGroupView'], HotelPerformanceView: ['resources', 'hotel_performance_view_pb', 'HotelPerformanceView'], KeywordPlanAdGroup: ['resources', 'keyword_plan_ad_group_pb', 'KeywordPlanAdGroup'], KeywordPlanCampaign: ['resources', 'keyword_plan_campaign_pb', 'KeywordPlanCampaign'], KeywordPlanGeoTarget: ['resources', 'keyword_plan_campaign_pb', 'KeywordPlanGeoTarget'], KeywordPlanKeyword: ['resources', 'keyword_plan_keyword_pb', 'KeywordPlanKeyword'], KeywordPlanNegativeKeyword: ['resources', 'keyword_plan_negative_keyword_pb', 'KeywordPlanNegativeKeyword'], KeywordPlan: ['resources', 'keyword_plan_pb', 'KeywordPlan'], KeywordPlanForecastPeriod: ['resources', 'keyword_plan_pb', 'KeywordPlanForecastPeriod'], KeywordView: ['resources', 'keyword_view_pb', 'KeywordView'], Label: ['resources', 'label_pb', 'Label'], LanguageConstant: ['resources', 'language_constant_pb', 'LanguageConstant'], LocationView: ['resources', 'location_view_pb', 'LocationView'], ManagedPlacementView: ['resources', 'managed_placement_view_pb', 'ManagedPlacementView'], MediaFile: ['resources', 'media_file_pb', 'MediaFile'], MediaImage: ['resources', 'media_file_pb', 'MediaImage'], MediaBundle: ['resources', 'media_file_pb', 'MediaBundle'], MediaAudio: ['resources', 'media_file_pb', 'MediaAudio'], MediaVideo: ['resources', 'media_file_pb', 'MediaVideo'], MerchantCenterLink: ['resources', 'merchant_center_link_pb', 'MerchantCenterLink'], MobileAppCategoryConstant: ['resources', 'mobile_app_category_constant_pb', 'MobileAppCategoryConstant'], MobileDeviceConstant: ['resources', 'mobile_device_constant_pb', 'MobileDeviceConstant'], MutateJob: ['resources', 'mutate_job_pb', 'MutateJob'], MutateJobMetadata: ['resources', 'mutate_job_pb', 'MutateJob::MutateJobMetadata'], OperatingSystemVersionConstant: ['resources', 'operating_system_version_constant_pb', 'OperatingSystemVersionConstant'], ParentalStatusView: ['resources', 'parental_status_view_pb', 'ParentalStatusView'], PaymentsAccount: ['resources', 'payments_account_pb', 'PaymentsAccount'], ProductBiddingCategoryConstant: ['resources', 'product_bidding_category_constant_pb', 'ProductBiddingCategoryConstant'], ProductGroupView: ['resources', 'product_group_view_pb', 'ProductGroupView'], Recommendation: ['resources', 'recommendation_pb', 'Recommendation'], RecommendationImpact: ['resources', 'recommendation_pb', 'Recommendation::RecommendationImpact'], RecommendationMetrics: ['resources', 'recommendation_pb', 'Recommendation::RecommendationMetrics'], CampaignBudgetRecommendation: ['resources', 'recommendation_pb', 'Recommendation::CampaignBudgetRecommendation'], CampaignBudgetRecommendationOption: ['resources', 'recommendation_pb', 'Recommendation::CampaignBudgetRecommendation::CampaignBudgetRecommendationOption'], KeywordRecommendation: ['resources', 'recommendation_pb', 'Recommendation::KeywordRecommendation'], SearchPartnersOptInRecommendation: ['resources', 'recommendation_pb', 'Recommendation::SearchPartnersOptInRecommendation'], TextAdRecommendation: ['resources', 'recommendation_pb', 'Recommendation::TextAdRecommendation'], TargetCpaOptInRecommendation: ['resources', 'recommendation_pb', 'Recommendation::TargetCpaOptInRecommendation'], TargetCpaOptInRecommendationOption: ['resources', 'recommendation_pb', 'Recommendation::TargetCpaOptInRecommendation::TargetCpaOptInRecommendationOption'], MaximizeClicksOptInRecommendation: ['resources', 'recommendation_pb', 'Recommendation::MaximizeClicksOptInRecommendation'], MaximizeConversionsOptInRecommendation: ['resources', 'recommendation_pb', 'Recommendation::MaximizeConversionsOptInRecommendation'], MoveUnusedBudgetRecommendation: ['resources', 'recommendation_pb', 'Recommendation::MoveUnusedBudgetRecommendation'], EnhancedCpcOptInRecommendation: ['resources', 'recommendation_pb', 'Recommendation::EnhancedCpcOptInRecommendation'], OptimizeAdRotationRecommendation: ['resources', 'recommendation_pb', 'Recommendation::OptimizeAdRotationRecommendation'], KeywordMatchTypeRecommendation: ['resources', 'recommendation_pb', 'Recommendation::KeywordMatchTypeRecommendation'], RemarketingAction: ['resources', 'remarketing_action_pb', 'RemarketingAction'], SearchTermView: ['resources', 'search_term_view_pb', 'SearchTermView'], SharedCriterion: ['resources', 'shared_criterion_pb', 'SharedCriterion'], SharedSet: ['resources', 'shared_set_pb', 'SharedSet'], ShoppingPerformanceView: ['resources', 'shopping_performance_view_pb', 'ShoppingPerformanceView'], TopicConstant: ['resources', 'topic_constant_pb', 'TopicConstant'], TopicView: ['resources', 'topic_view_pb', 'TopicView'], UserInterest: ['resources', 'user_interest_pb', 'UserInterest'], UserList: ['resources', 'user_list_pb', 'UserList'], Video: ['resources', 'video_pb', 'Video'], AdTextAsset: ['common', 'ad_asset_pb', 'AdTextAsset'], AdImageAsset: ['common', 'ad_asset_pb', 'AdImageAsset'], AdVideoAsset: ['common', 'ad_asset_pb', 'AdVideoAsset'], AdMediaBundleAsset: ['common', 'ad_asset_pb', 'AdMediaBundleAsset'], TextAdInfo: ['common', 'ad_type_infos_pb', 'TextAdInfo'], ExpandedTextAdInfo: ['common', 'ad_type_infos_pb', 'ExpandedTextAdInfo'], CallOnlyAdInfo: ['common', 'ad_type_infos_pb', 'CallOnlyAdInfo'], ExpandedDynamicSearchAdInfo: ['common', 'ad_type_infos_pb', 'ExpandedDynamicSearchAdInfo'], HotelAdInfo: ['common', 'ad_type_infos_pb', 'HotelAdInfo'], ShoppingSmartAdInfo: ['common', 'ad_type_infos_pb', 'ShoppingSmartAdInfo'], ShoppingProductAdInfo: ['common', 'ad_type_infos_pb', 'ShoppingProductAdInfo'], GmailAdInfo: ['common', 'ad_type_infos_pb', 'GmailAdInfo'], GmailTeaser: ['common', 'ad_type_infos_pb', 'GmailTeaser'], DisplayCallToAction: ['common', 'ad_type_infos_pb', 'DisplayCallToAction'], ProductImage: ['common', 'ad_type_infos_pb', 'ProductImage'], ProductVideo: ['common', 'ad_type_infos_pb', 'ProductVideo'], ImageAdInfo: ['common', 'ad_type_infos_pb', 'ImageAdInfo'], VideoBumperInStreamAdInfo: ['common', 'ad_type_infos_pb', 'VideoBumperInStreamAdInfo'], VideoNonSkippableInStreamAdInfo: ['common', 'ad_type_infos_pb', 'VideoNonSkippableInStreamAdInfo'], VideoTrueViewInStreamAdInfo: ['common', 'ad_type_infos_pb', 'VideoTrueViewInStreamAdInfo'], VideoOutstreamAdInfo: ['common', 'ad_type_infos_pb', 'VideoOutstreamAdInfo'], VideoAdInfo: ['common', 'ad_type_infos_pb', 'VideoAdInfo'], ResponsiveSearchAdInfo: ['common', 'ad_type_infos_pb', 'ResponsiveSearchAdInfo'], LegacyResponsiveDisplayAdInfo: ['common', 'ad_type_infos_pb', 'LegacyResponsiveDisplayAdInfo'], AppAdInfo: ['common', 'ad_type_infos_pb', 'AppAdInfo'], LegacyAppInstallAdInfo: ['common', 'ad_type_infos_pb', 'LegacyAppInstallAdInfo'], ResponsiveDisplayAdInfo: ['common', 'ad_type_infos_pb', 'ResponsiveDisplayAdInfo'], YoutubeVideoAsset: ['common', 'asset_types_pb', 'YoutubeVideoAsset'], MediaBundleAsset: ['common', 'asset_types_pb', 'MediaBundleAsset'], ImageAsset: ['common', 'asset_types_pb', 'ImageAsset'], ImageDimension: ['common', 'asset_types_pb', 'ImageDimension'], Commission: ['common', 'bidding_pb', 'Commission'], EnhancedCpc: ['common', 'bidding_pb', 'EnhancedCpc'], ManualCpc: ['common', 'bidding_pb', 'ManualCpc'], ManualCpm: ['common', 'bidding_pb', 'ManualCpm'], ManualCpv: ['common', 'bidding_pb', 'ManualCpv'], MaximizeConversions: ['common', 'bidding_pb', 'MaximizeConversions'], MaximizeConversionValue: ['common', 'bidding_pb', 'MaximizeConversionValue'], PageOnePromoted: ['common', 'bidding_pb', 'PageOnePromoted'], TargetCpa: ['common', 'bidding_pb', 'TargetCpa'], TargetCpm: ['common', 'bidding_pb', 'TargetCpm'], TargetImpressionShare: ['common', 'bidding_pb', 'TargetImpressionShare'], TargetOutrankShare: ['common', 'bidding_pb', 'TargetOutrankShare'], TargetRoas: ['common', 'bidding_pb', 'TargetRoas'], TargetSpend: ['common', 'bidding_pb', 'TargetSpend'], PercentCpc: ['common', 'bidding_pb', 'PercentCpc'], ClickLocation: ['common', 'click_location_pb', 'ClickLocation'], KeywordInfo: ['common', 'criteria_pb', 'KeywordInfo'], PlacementInfo: ['common', 'criteria_pb', 'PlacementInfo'], MobileAppCategoryInfo: ['common', 'criteria_pb', 'MobileAppCategoryInfo'], MobileApplicationInfo: ['common', 'criteria_pb', 'MobileApplicationInfo'], LocationInfo: ['common', 'criteria_pb', 'LocationInfo'], DeviceInfo: ['common', 'criteria_pb', 'DeviceInfo'], PreferredContentInfo: ['common', 'criteria_pb', 'PreferredContentInfo'], ListingGroupInfo: ['common', 'criteria_pb', 'ListingGroupInfo'], ListingScopeInfo: ['common', 'criteria_pb', 'ListingScopeInfo'], ListingDimensionInfo: ['common', 'criteria_pb', 'ListingDimensionInfo'], ListingBrandInfo: ['common', 'criteria_pb', 'ListingBrandInfo'], HotelIdInfo: ['common', 'criteria_pb', 'HotelIdInfo'], HotelClassInfo: ['common', 'criteria_pb', 'HotelClassInfo'], HotelCountryRegionInfo: ['common', 'criteria_pb', 'HotelCountryRegionInfo'], HotelStateInfo: ['common', 'criteria_pb', 'HotelStateInfo'], HotelCityInfo: ['common', 'criteria_pb', 'HotelCityInfo'], ListingCustomAttributeInfo: ['common', 'criteria_pb', 'ListingCustomAttributeInfo'], ProductBiddingCategoryInfo: ['common', 'criteria_pb', 'ProductBiddingCategoryInfo'], ProductChannelInfo: ['common', 'criteria_pb', 'ProductChannelInfo'], ProductChannelExclusivityInfo: ['common', 'criteria_pb', 'ProductChannelExclusivityInfo'], ProductConditionInfo: ['common', 'criteria_pb', 'ProductConditionInfo'], ProductItemIdInfo: ['common', 'criteria_pb', 'ProductItemIdInfo'], ProductTypeInfo: ['common', 'criteria_pb', 'ProductTypeInfo'], UnknownListingDimensionInfo: ['common', 'criteria_pb', 'UnknownListingDimensionInfo'], HotelDateSelectionTypeInfo: ['common', 'criteria_pb', 'HotelDateSelectionTypeInfo'], HotelAdvanceBookingWindowInfo: ['common', 'criteria_pb', 'HotelAdvanceBookingWindowInfo'], HotelLengthOfStayInfo: ['common', 'criteria_pb', 'HotelLengthOfStayInfo'], HotelCheckInDayInfo: ['common', 'criteria_pb', 'HotelCheckInDayInfo'], InteractionTypeInfo: ['common', 'criteria_pb', 'InteractionTypeInfo'], AdScheduleInfo: ['common', 'criteria_pb', 'AdScheduleInfo'], AgeRangeInfo: ['common', 'criteria_pb', 'AgeRangeInfo'], GenderInfo: ['common', 'criteria_pb', 'GenderInfo'], IncomeRangeInfo: ['common', 'criteria_pb', 'IncomeRangeInfo'], ParentalStatusInfo: ['common', 'criteria_pb', 'ParentalStatusInfo'], YouTubeVideoInfo: ['common', 'criteria_pb', 'YouTubeVideoInfo'], YouTubeChannelInfo: ['common', 'criteria_pb', 'YouTubeChannelInfo'], UserListInfo: ['common', 'criteria_pb', 'UserListInfo'], ProximityInfo: ['common', 'criteria_pb', 'ProximityInfo'], GeoPointInfo: ['common', 'criteria_pb', 'GeoPointInfo'], AddressInfo: ['common', 'criteria_pb', 'AddressInfo'], TopicInfo: ['common', 'criteria_pb', 'TopicInfo'], LanguageInfo: ['common', 'criteria_pb', 'LanguageInfo'], IpBlockInfo: ['common', 'criteria_pb', 'IpBlockInfo'], ContentLabelInfo: ['common', 'criteria_pb', 'ContentLabelInfo'], CarrierInfo: ['common', 'criteria_pb', 'CarrierInfo'], UserInterestInfo: ['common', 'criteria_pb', 'UserInterestInfo'], WebpageInfo: ['common', 'criteria_pb', 'WebpageInfo'], WebpageConditionInfo: ['common', 'criteria_pb', 'WebpageConditionInfo'], OperatingSystemVersionInfo: ['common', 'criteria_pb', 'OperatingSystemVersionInfo'], AppPaymentModelInfo: ['common', 'criteria_pb', 'AppPaymentModelInfo'], MobileDeviceInfo: ['common', 'criteria_pb', 'MobileDeviceInfo'], CustomAffinityInfo: ['common', 'criteria_pb', 'CustomAffinityInfo'], CustomIntentInfo: ['common', 'criteria_pb', 'CustomIntentInfo'], CriterionCategoryAvailability: ['common', 'criterion_category_availability_pb', 'CriterionCategoryAvailability'], CriterionCategoryChannelAvailability: ['common', 'criterion_category_availability_pb', 'CriterionCategoryChannelAvailability'], CriterionCategoryLocaleAvailability: ['common', 'criterion_category_availability_pb', 'CriterionCategoryLocaleAvailability'], CustomParameter: ['common', 'custom_parameter_pb', 'CustomParameter'], DateRange: ['common', 'dates_pb', 'DateRange'], ExplorerAutoOptimizerSetting: ['common', 'explorer_auto_optimizer_setting_pb', 'ExplorerAutoOptimizerSetting'], AppFeedItem: ['common', 'extensions_pb', 'AppFeedItem'], CallFeedItem: ['common', 'extensions_pb', 'CallFeedItem'], CalloutFeedItem: ['common', 'extensions_pb', 'CalloutFeedItem'], TextMessageFeedItem: ['common', 'extensions_pb', 'TextMessageFeedItem'], PriceFeedItem: ['common', 'extensions_pb', 'PriceFeedItem'], PriceOffer: ['common', 'extensions_pb', 'PriceOffer'], PromotionFeedItem: ['common', 'extensions_pb', 'PromotionFeedItem'], StructuredSnippetFeedItem: ['common', 'extensions_pb', 'StructuredSnippetFeedItem'], SitelinkFeedItem: ['common', 'extensions_pb', 'SitelinkFeedItem'], Money: ['common', 'feed_common_pb', 'Money'], FrequencyCapEntry: ['common', 'frequency_cap_pb', 'FrequencyCapEntry'], FrequencyCapKey: ['common', 'frequency_cap_pb', 'FrequencyCapKey'], KeywordPlanHistoricalMetrics: ['common', 'keyword_plan_common_pb', 'KeywordPlanHistoricalMetrics'], MatchingFunction: ['common', 'matching_function_pb', 'MatchingFunction'], Operand: ['common', 'matching_function_pb', 'Operand'], ConstantOperand: ['common', 'matching_function_pb', 'Operand::ConstantOperand'], FeedAttributeOperand: ['common', 'matching_function_pb', 'Operand::FeedAttributeOperand'], FunctionOperand: ['common', 'matching_function_pb', 'Operand::FunctionOperand'], RequestContextOperand: ['common', 'matching_function_pb', 'Operand::RequestContextOperand'], Metrics: ['common', 'metrics_pb', 'Metrics'], PolicyViolationKey: ['common', 'policy_pb', 'PolicyViolationKey'], PolicyValidationParameter: ['common', 'policy_pb', 'PolicyValidationParameter'], PolicyTopicEntry: ['common', 'policy_pb', 'PolicyTopicEntry'], PolicyTopicEvidence: ['common', 'policy_pb', 'PolicyTopicEvidence'], TextList: ['common', 'policy_pb', 'PolicyTopicEvidence::TextList'], WebsiteList: ['common', 'policy_pb', 'PolicyTopicEvidence::WebsiteList'], DestinationTextList: ['common', 'policy_pb', 'PolicyTopicEvidence::DestinationTextList'], DestinationMismatch: ['common', 'policy_pb', 'PolicyTopicEvidence::DestinationMismatch'], PolicyTopicConstraint: ['common', 'policy_pb', 'PolicyTopicConstraint'], CountryConstraintList: ['common', 'policy_pb', 'PolicyTopicConstraint::CountryConstraintList'], ResellerConstraint: ['common', 'policy_pb', 'PolicyTopicConstraint::ResellerConstraint'], CountryConstraint: ['common', 'policy_pb', 'PolicyTopicConstraint::CountryConstraint'], RealTimeBiddingSetting: ['common', 'real_time_bidding_setting_pb', 'RealTimeBiddingSetting'], Segments: ['common', 'segments_pb', 'Segments'], Keyword: ['common', 'segments_pb', 'Keyword'], TagSnippet: ['common', 'tag_snippet_pb', 'TagSnippet'], TargetingSetting: ['common', 'targeting_setting_pb', 'TargetingSetting'], TargetRestriction: ['common', 'targeting_setting_pb', 'TargetRestriction'], TextLabel: ['common', 'text_label_pb', 'TextLabel'], UrlCollection: ['common', 'url_collection_pb', 'UrlCollection'], SimilarUserListInfo: ['common', 'user_lists_pb', 'SimilarUserListInfo'], CrmBasedUserListInfo: ['common', 'user_lists_pb', 'CrmBasedUserListInfo'], UserListRuleInfo: ['common', 'user_lists_pb', 'UserListRuleInfo'], UserListRuleItemGroupInfo: ['common', 'user_lists_pb', 'UserListRuleItemGroupInfo'], UserListRuleItemInfo: ['common', 'user_lists_pb', 'UserListRuleItemInfo'], UserListDateRuleItemInfo: ['common', 'user_lists_pb', 'UserListDateRuleItemInfo'], UserListNumberRuleItemInfo: ['common', 'user_lists_pb', 'UserListNumberRuleItemInfo'], UserListStringRuleItemInfo: ['common', 'user_lists_pb', 'UserListStringRuleItemInfo'], CombinedRuleUserListInfo: ['common', 'user_lists_pb', 'CombinedRuleUserListInfo'], DateSpecificRuleUserListInfo: ['common', 'user_lists_pb', 'DateSpecificRuleUserListInfo'], ExpressionRuleUserListInfo: ['common', 'user_lists_pb', 'ExpressionRuleUserListInfo'], RuleBasedUserListInfo: ['common', 'user_lists_pb', 'RuleBasedUserListInfo'], LogicalUserListInfo: ['common', 'user_lists_pb', 'LogicalUserListInfo'], UserListLogicalRuleInfo: ['common', 'user_lists_pb', 'UserListLogicalRuleInfo'], LogicalUserListOperandInfo: ['common', 'user_lists_pb', 'LogicalUserListOperandInfo'], BasicUserListInfo: ['common', 'user_lists_pb', 'BasicUserListInfo'], UserListActionInfo: ['common', 'user_lists_pb', 'UserListActionInfo'], Value: ['common', 'value_pb', 'Value'], ConversionAdjustment: ['services', 'conversion_adjustment_upload_service_pb', 'ConversionAdjustment'], CallConversion: ['services', 'conversion_upload_service_pb', 'CallConversion'], CampaignBudgetParameters: ['services', 'recommendation_service_pb', 'ApplyRecommendationOperation::CampaignBudgetParameters'], TextAdParameters: ['services', 'recommendation_service_pb', 'ApplyRecommendationOperation::TextAdParameters'], KeywordParameters: ['services', 'recommendation_service_pb', 'ApplyRecommendationOperation::KeywordParameters'], TargetCpaOptInParameters: ['services', 'recommendation_service_pb', 'ApplyRecommendationOperation::TargetCpaOptInParameters'], MoveUnusedBudgetParameters: ['services', 'recommendation_service_pb', 'ApplyRecommendationOperation::MoveUnusedBudgetParameters'], LocationNames: ['services', 'geo_target_constant_service_pb', 'SuggestGeoTargetConstantsRequest::LocationNames'], GeoTargets: ['services', 'geo_target_constant_service_pb', 'SuggestGeoTargetConstantsRequest::GeoTargets'], KeywordAndUrlSeed: ['services', 'keyword_plan_idea_service_pb', 'KeywordAndUrlSeed'], KeywordSeed: ['services', 'keyword_plan_idea_service_pb', 'KeywordSeed'], UrlSeed: ['services', 'keyword_plan_idea_service_pb', 'UrlSeed'] }.freeze ENUMS = { AccessReason: ['access_reason_pb', 'AccessReason'], AccountBudgetProposalStatus: ['account_budget_proposal_status_pb', 'AccountBudgetProposalStatus'], AccountBudgetProposalType: ['account_budget_proposal_type_pb', 'AccountBudgetProposalType'], AccountBudgetStatus: ['account_budget_status_pb', 'AccountBudgetStatus'], AdCustomizerPlaceholderField: ['ad_customizer_placeholder_field_pb', 'AdCustomizerPlaceholderField'], AdGroupAdRotationMode: ['ad_group_ad_rotation_mode_pb', 'AdGroupAdRotationMode'], AdGroupAdStatus: ['ad_group_ad_status_pb', 'AdGroupAdStatus'], AdGroupCriterionApprovalStatus: ['ad_group_criterion_approval_status_pb', 'AdGroupCriterionApprovalStatus'], AdGroupCriterionStatus: ['ad_group_criterion_status_pb', 'AdGroupCriterionStatus'], AdGroupStatus: ['ad_group_status_pb', 'AdGroupStatus'], AdGroupType: ['ad_group_type_pb', 'AdGroupType'], AdNetworkType: ['ad_network_type_pb', 'AdNetworkType'], AdServingOptimizationStatus: ['ad_serving_optimization_status_pb', 'AdServingOptimizationStatus'], AdStrength: ['ad_strength_pb', 'AdStrength'], AdType: ['ad_type_pb', 'AdType'], AdvertisingChannelSubType: ['advertising_channel_sub_type_pb', 'AdvertisingChannelSubType'], AdvertisingChannelType: ['advertising_channel_type_pb', 'AdvertisingChannelType'], AffiliateLocationFeedRelationshipType: ['affiliate_location_feed_relationship_type_pb', 'AffiliateLocationFeedRelationshipType'], AffiliateLocationPlaceholderField: ['affiliate_location_placeholder_field_pb', 'AffiliateLocationPlaceholderField'], AgeRangeType: ['age_range_type_pb', 'AgeRangeType'], AppCampaignAppStore: ['app_campaign_app_store_pb', 'AppCampaignAppStore'], AppCampaignBiddingStrategyGoalType: ['app_campaign_bidding_strategy_goal_type_pb', 'AppCampaignBiddingStrategyGoalType'], AppPaymentModelType: ['app_payment_model_type_pb', 'AppPaymentModelType'], AppPlaceholderField: ['app_placeholder_field_pb', 'AppPlaceholderField'], AppStore: ['app_store_pb', 'AppStore'], AssetType: ['asset_type_pb', 'AssetType'], AttributionModel: ['attribution_model_pb', 'AttributionModel'], BidModifierSource: ['bid_modifier_source_pb', 'BidModifierSource'], BiddingSource: ['bidding_source_pb', 'BiddingSource'], BiddingStrategyStatus: ['bidding_strategy_status_pb', 'BiddingStrategyStatus'], BiddingStrategyType: ['bidding_strategy_type_pb', 'BiddingStrategyType'], BillingSetupStatus: ['billing_setup_status_pb', 'BillingSetupStatus'], BrandSafetySuitability: ['brand_safety_suitability_pb', 'BrandSafetySuitability'], BudgetDeliveryMethod: ['budget_delivery_method_pb', 'BudgetDeliveryMethod'], BudgetPeriod: ['budget_period_pb', 'BudgetPeriod'], BudgetStatus: ['budget_status_pb', 'BudgetStatus'], BudgetType: ['budget_type_pb', 'BudgetType'], CallConversionReportingState: ['call_conversion_reporting_state_pb', 'CallConversionReportingState'], CallPlaceholderField: ['call_placeholder_field_pb', 'CallPlaceholderField'], CalloutPlaceholderField: ['callout_placeholder_field_pb', 'CalloutPlaceholderField'], CampaignServingStatus: ['campaign_serving_status_pb', 'CampaignServingStatus'], CampaignSharedSetStatus: ['campaign_shared_set_status_pb', 'CampaignSharedSetStatus'], CampaignStatus: ['campaign_status_pb', 'CampaignStatus'], ChangeStatusOperation: ['change_status_operation_pb', 'ChangeStatusOperation'], ChangeStatusResourceType: ['change_status_resource_type_pb', 'ChangeStatusResourceType'], ClickType: ['click_type_pb', 'ClickType'], ContentLabelType: ['content_label_type_pb', 'ContentLabelType'], ConversionActionCategory: ['conversion_action_category_pb', 'ConversionActionCategory'], ConversionActionCountingType: ['conversion_action_counting_type_pb', 'ConversionActionCountingType'], ConversionActionStatus: ['conversion_action_status_pb', 'ConversionActionStatus'], ConversionActionType: ['conversion_action_type_pb', 'ConversionActionType'], ConversionAdjustmentType: ['conversion_adjustment_type_pb', 'ConversionAdjustmentType'], ConversionAttributionEventType: ['conversion_attribution_event_type_pb', 'ConversionAttributionEventType'], ConversionLagBucket: ['conversion_lag_bucket_pb', 'ConversionLagBucket'], ConversionOrAdjustmentLagBucket: ['conversion_or_adjustment_lag_bucket_pb', 'ConversionOrAdjustmentLagBucket'], CriterionCategoryChannelAvailabilityMode: ['criterion_category_channel_availability_mode_pb', 'CriterionCategoryChannelAvailabilityMode'], CriterionCategoryLocaleAvailabilityMode: ['criterion_category_locale_availability_mode_pb', 'CriterionCategoryLocaleAvailabilityMode'], CriterionSystemServingStatus: ['criterion_system_serving_status_pb', 'CriterionSystemServingStatus'], CriterionType: ['criterion_type_pb', 'CriterionType'], CustomInterestMemberType: ['custom_interest_member_type_pb', 'CustomInterestMemberType'], CustomInterestStatus: ['custom_interest_status_pb', 'CustomInterestStatus'], CustomInterestType: ['custom_interest_type_pb', 'CustomInterestType'], CustomPlaceholderField: ['custom_placeholder_field_pb', 'CustomPlaceholderField'], CustomerMatchUploadKeyType: ['customer_match_upload_key_type_pb', 'CustomerMatchUploadKeyType'], DataDrivenModelStatus: ['data_driven_model_status_pb', 'DataDrivenModelStatus'], DayOfWeek: ['day_of_week_pb', 'DayOfWeek'], Device: ['device_pb', 'Device'], DisplayAdFormatSetting: ['display_ad_format_setting_pb', 'DisplayAdFormatSetting'], DsaPageFeedCriterionField: ['dsa_page_feed_criterion_field_pb', 'DsaPageFeedCriterionField'], EducationPlaceholderField: ['education_placeholder_field_pb', 'EducationPlaceholderField'], ExtensionSettingDevice: ['extension_setting_device_pb', 'ExtensionSettingDevice'], ExtensionType: ['extension_type_pb', 'ExtensionType'], ExternalConversionSource: ['external_conversion_source_pb', 'ExternalConversionSource'], FeedAttributeType: ['feed_attribute_type_pb', 'FeedAttributeType'], FeedItemQualityApprovalStatus: ['feed_item_quality_approval_status_pb', 'FeedItemQualityApprovalStatus'], FeedItemQualityDisapprovalReason: ['feed_item_quality_disapproval_reason_pb', 'FeedItemQualityDisapprovalReason'], FeedItemStatus: ['feed_item_status_pb', 'FeedItemStatus'], FeedItemTargetDevice: ['feed_item_target_device_pb', 'FeedItemTargetDevice'], FeedItemTargetType: ['feed_item_target_type_pb', 'FeedItemTargetType'], FeedItemValidationStatus: ['feed_item_validation_status_pb', 'FeedItemValidationStatus'], FeedLinkStatus: ['feed_link_status_pb', 'FeedLinkStatus'], FeedMappingCriterionType: ['feed_mapping_criterion_type_pb', 'FeedMappingCriterionType'], FeedMappingStatus: ['feed_mapping_status_pb', 'FeedMappingStatus'], FeedOrigin: ['feed_origin_pb', 'FeedOrigin'], FeedStatus: ['feed_status_pb', 'FeedStatus'], FlightPlaceholderField: ['flight_placeholder_field_pb', 'FlightPlaceholderField'], FrequencyCapEventType: ['frequency_cap_event_type_pb', 'FrequencyCapEventType'], FrequencyCapLevel: ['frequency_cap_level_pb', 'FrequencyCapLevel'], FrequencyCapTimeUnit: ['frequency_cap_time_unit_pb', 'FrequencyCapTimeUnit'], GenderType: ['gender_type_pb', 'GenderType'], GeoTargetConstantStatus: ['geo_target_constant_status_pb', 'GeoTargetConstantStatus'], GeoTargetingRestriction: ['geo_targeting_restriction_pb', 'GeoTargetingRestriction'], GeoTargetingType: ['geo_targeting_type_pb', 'GeoTargetingType'], GoogleAdsFieldCategory: ['google_ads_field_category_pb', 'GoogleAdsFieldCategory'], GoogleAdsFieldDataType: ['google_ads_field_data_type_pb', 'GoogleAdsFieldDataType'], HotelDateSelectionType: ['hotel_date_selection_type_pb', 'HotelDateSelectionType'], HotelPlaceholderField: ['hotel_placeholder_field_pb', 'HotelPlaceholderField'], IncomeRangeType: ['income_range_type_pb', 'IncomeRangeType'], InteractionEventType: ['interaction_event_type_pb', 'InteractionEventType'], InteractionType: ['interaction_type_pb', 'InteractionType'], JobPlaceholderField: ['job_placeholder_field_pb', 'JobPlaceholderField'], KeywordMatchType: ['keyword_match_type_pb', 'KeywordMatchType'], KeywordPlanCompetitionLevel: ['keyword_plan_competition_level_pb', 'KeywordPlanCompetitionLevel'], KeywordPlanForecastInterval: ['keyword_plan_forecast_interval_pb', 'KeywordPlanForecastInterval'], KeywordPlanNetwork: ['keyword_plan_network_pb', 'KeywordPlanNetwork'], LabelStatus: ['label_status_pb', 'LabelStatus'], LegacyAppInstallAdAppStore: ['legacy_app_install_ad_app_store_pb', 'LegacyAppInstallAdAppStore'], ListingCustomAttributeIndex: ['listing_custom_attribute_index_pb', 'ListingCustomAttributeIndex'], ListingGroupType: ['listing_group_type_pb', 'ListingGroupType'], LocalPlaceholderField: ['local_placeholder_field_pb', 'LocalPlaceholderField'], LocationExtensionTargetingCriterionField: ['location_extension_targeting_criterion_field_pb', 'LocationExtensionTargetingCriterionField'], LocationPlaceholderField: ['location_placeholder_field_pb', 'LocationPlaceholderField'], ManagerLinkStatus: ['manager_link_status_pb', 'ManagerLinkStatus'], MatchingFunctionContextType: ['matching_function_context_type_pb', 'MatchingFunctionContextType'], MatchingFunctionOperator: ['matching_function_operator_pb', 'MatchingFunctionOperator'], MediaType: ['media_type_pb', 'MediaType'], MerchantCenterLinkStatus: ['merchant_center_link_status_pb', 'MerchantCenterLinkStatus'], MessagePlaceholderField: ['message_placeholder_field_pb', 'MessagePlaceholderField'], MimeType: ['mime_type_pb', 'MimeType'], MinuteOfHour: ['minute_of_hour_pb', 'MinuteOfHour'], MobileDeviceType: ['mobile_device_type_pb', 'MobileDeviceType'], MonthOfYear: ['month_of_year_pb', 'MonthOfYear'], MutateJobStatus: ['mutate_job_status_pb', 'MutateJobStatus'], NegativeGeoTargetType: ['negative_geo_target_type_pb', 'NegativeGeoTargetType'], OperatingSystemVersionOperatorType: ['operating_system_version_operator_type_pb', 'OperatingSystemVersionOperatorType'], PageOnePromotedStrategyGoal: ['page_one_promoted_strategy_goal_pb', 'PageOnePromotedStrategyGoal'], ParentalStatusType: ['parental_status_type_pb', 'ParentalStatusType'], PaymentMode: ['payment_mode_pb', 'PaymentMode'], PlaceholderType: ['placeholder_type_pb', 'PlaceholderType'], PlacementType: ['placement_type_pb', 'PlacementType'], PolicyApprovalStatus: ['policy_approval_status_pb', 'PolicyApprovalStatus'], PolicyReviewStatus: ['policy_review_status_pb', 'PolicyReviewStatus'], PolicyTopicEntryType: ['policy_topic_entry_type_pb', 'PolicyTopicEntryType'], PolicyTopicEvidenceDestinationMismatchUrlType: ['policy_topic_evidence_destination_mismatch_url_type_pb', 'PolicyTopicEvidenceDestinationMismatchUrlType'], PositiveGeoTargetType: ['positive_geo_target_type_pb', 'PositiveGeoTargetType'], PreferredContentType: ['preferred_content_type_pb', 'PreferredContentType'], PriceExtensionPriceQualifier: ['price_extension_price_qualifier_pb', 'PriceExtensionPriceQualifier'], PriceExtensionPriceUnit: ['price_extension_price_unit_pb', 'PriceExtensionPriceUnit'], PriceExtensionType: ['price_extension_type_pb', 'PriceExtensionType'], PricePlaceholderField: ['price_placeholder_field_pb', 'PricePlaceholderField'], ProductBiddingCategoryLevel: ['product_bidding_category_level_pb', 'ProductBiddingCategoryLevel'], ProductBiddingCategoryStatus: ['product_bidding_category_status_pb', 'ProductBiddingCategoryStatus'], ProductChannelExclusivity: ['product_channel_exclusivity_pb', 'ProductChannelExclusivity'], ProductChannel: ['product_channel_pb', 'ProductChannel'], ProductCondition: ['product_condition_pb', 'ProductCondition'], ProductTypeLevel: ['product_type_level_pb', 'ProductTypeLevel'], PromotionExtensionDiscountModifier: ['promotion_extension_discount_modifier_pb', 'PromotionExtensionDiscountModifier'], PromotionExtensionOccasion: ['promotion_extension_occasion_pb', 'PromotionExtensionOccasion'], PromotionPlaceholderField: ['promotion_placeholder_field_pb', 'PromotionPlaceholderField'], ProximityRadiusUnits: ['proximity_radius_units_pb', 'ProximityRadiusUnits'], QualityScoreBucket: ['quality_score_bucket_pb', 'QualityScoreBucket'], RealEstatePlaceholderField: ['real_estate_placeholder_field_pb', 'RealEstatePlaceholderField'], RecommendationType: ['recommendation_type_pb', 'RecommendationType'], SearchTermMatchType: ['search_term_match_type_pb', 'SearchTermMatchType'], SearchTermTargetingStatus: ['search_term_targeting_status_pb', 'SearchTermTargetingStatus'], ServedAssetFieldType: ['served_asset_field_type_pb', 'ServedAssetFieldType'], SharedSetStatus: ['shared_set_status_pb', 'SharedSetStatus'], SharedSetType: ['shared_set_type_pb', 'SharedSetType'], SitelinkPlaceholderField: ['sitelink_placeholder_field_pb', 'SitelinkPlaceholderField'], Slot: ['slot_pb', 'Slot'], SpendingLimitType: ['spending_limit_type_pb', 'SpendingLimitType'], StructuredSnippetPlaceholderField: ['structured_snippet_placeholder_field_pb', 'StructuredSnippetPlaceholderField'], SystemManagedEntitySource: ['system_managed_entity_source_pb', 'SystemManagedEntitySource'], TargetCpaOptInRecommendationGoal: ['target_cpa_opt_in_recommendation_goal_pb', 'TargetCpaOptInRecommendationGoal'], TargetImpressionShareLocation: ['target_impression_share_location_pb', 'TargetImpressionShareLocation'], TargetingDimension: ['targeting_dimension_pb', 'TargetingDimension'], TimeType: ['time_type_pb', 'TimeType'], TrackingCodePageFormat: ['tracking_code_page_format_pb', 'TrackingCodePageFormat'], TrackingCodeType: ['tracking_code_type_pb', 'TrackingCodeType'], TravelPlaceholderField: ['travel_placeholder_field_pb', 'TravelPlaceholderField'], UserInterestTaxonomyType: ['user_interest_taxonomy_type_pb', 'UserInterestTaxonomyType'], UserListAccessStatus: ['user_list_access_status_pb', 'UserListAccessStatus'], UserListClosingReason: ['user_list_closing_reason_pb', 'UserListClosingReason'], UserListCombinedRuleOperator: ['user_list_combined_rule_operator_pb', 'UserListCombinedRuleOperator'], UserListCrmDataSourceType: ['user_list_crm_data_source_type_pb', 'UserListCrmDataSourceType'], UserListDateRuleItemOperator: ['user_list_date_rule_item_operator_pb', 'UserListDateRuleItemOperator'], UserListLogicalRuleOperator: ['user_list_logical_rule_operator_pb', 'UserListLogicalRuleOperator'], UserListMembershipStatus: ['user_list_membership_status_pb', 'UserListMembershipStatus'], UserListNumberRuleItemOperator: ['user_list_number_rule_item_operator_pb', 'UserListNumberRuleItemOperator'], UserListPrepopulationStatus: ['user_list_prepopulation_status_pb', 'UserListPrepopulationStatus'], UserListRuleType: ['user_list_rule_type_pb', 'UserListRuleType'], UserListSizeRange: ['user_list_size_range_pb', 'UserListSizeRange'], UserListStringRuleItemOperator: ['user_list_string_rule_item_operator_pb', 'UserListStringRuleItemOperator'], UserListType: ['user_list_type_pb', 'UserListType'], VanityPharmaDisplayUrlMode: ['vanity_pharma_display_url_mode_pb', 'VanityPharmaDisplayUrlMode'], VanityPharmaText: ['vanity_pharma_text_pb', 'VanityPharmaText'], WebpageConditionOperand: ['webpage_condition_operand_pb', 'WebpageConditionOperand'], WebpageConditionOperator: ['webpage_condition_operator_pb', 'WebpageConditionOperator'], }.freeze SERVICES = { AccountBudgetProposal: ['account_budget_proposal_service_client', 'AccountBudgetProposalServiceClient'], AccountBudget: ['account_budget_service_client', 'AccountBudgetServiceClient'], AdGroupAdLabel: ['ad_group_ad_label_service_client', 'AdGroupAdLabelServiceClient'], AdGroupAd: ['ad_group_ad_service_client', 'AdGroupAdServiceClient'], AdGroupAudienceView: ['ad_group_audience_view_service_client', 'AdGroupAudienceViewServiceClient'], AdGroupBidModifier: ['ad_group_bid_modifier_service_client', 'AdGroupBidModifierServiceClient'], AdGroupCriterionLabel: ['ad_group_criterion_label_service_client', 'AdGroupCriterionLabelServiceClient'], AdGroupCriterion: ['ad_group_criterion_service_client', 'AdGroupCriterionServiceClient'], AdGroupExtensionSetting: ['ad_group_extension_setting_service_client', 'AdGroupExtensionSettingServiceClient'], AdGroupFeed: ['ad_group_feed_service_client', 'AdGroupFeedServiceClient'], AdGroupLabel: ['ad_group_label_service_client', 'AdGroupLabelServiceClient'], AdGroup: ['ad_group_service_client', 'AdGroupServiceClient'], AdParameter: ['ad_parameter_service_client', 'AdParameterServiceClient'], AdScheduleView: ['ad_schedule_view_service_client', 'AdScheduleViewServiceClient'], AgeRangeView: ['age_range_view_service_client', 'AgeRangeViewServiceClient'], Asset: ['asset_service_client', 'AssetServiceClient'], BiddingStrategy: ['bidding_strategy_service_client', 'BiddingStrategyServiceClient'], BillingSetup: ['billing_setup_service_client', 'BillingSetupServiceClient'], CampaignAudienceView: ['campaign_audience_view_service_client', 'CampaignAudienceViewServiceClient'], CampaignBidModifier: ['campaign_bid_modifier_service_client', 'CampaignBidModifierServiceClient'], CampaignBudget: ['campaign_budget_service_client', 'CampaignBudgetServiceClient'], CampaignCriterion: ['campaign_criterion_service_client', 'CampaignCriterionServiceClient'], CampaignExtensionSetting: ['campaign_extension_setting_service_client', 'CampaignExtensionSettingServiceClient'], CampaignFeed: ['campaign_feed_service_client', 'CampaignFeedServiceClient'], CampaignLabel: ['campaign_label_service_client', 'CampaignLabelServiceClient'], Campaign: ['campaign_service_client', 'CampaignServiceClient'], CampaignSharedSet: ['campaign_shared_set_service_client', 'CampaignSharedSetServiceClient'], CarrierConstant: ['carrier_constant_service_client', 'CarrierConstantServiceClient'], ChangeStatus: ['change_status_service_client', 'ChangeStatusServiceClient'], ClickView: ['click_view_service_client', 'ClickViewServiceClient'], ConversionAction: ['conversion_action_service_client', 'ConversionActionServiceClient'], ConversionAdjustmentUpload: ['conversion_adjustment_upload_service_client', 'ConversionAdjustmentUploadServiceClient'], ConversionUpload: ['conversion_upload_service_client', 'ConversionUploadServiceClient'], CustomInterest: ['custom_interest_service_client', 'CustomInterestServiceClient'], CustomerClientLink: ['customer_client_link_service_client', 'CustomerClientLinkServiceClient'], CustomerClient: ['customer_client_service_client', 'CustomerClientServiceClient'], CustomerExtensionSetting: ['customer_extension_setting_service_client', 'CustomerExtensionSettingServiceClient'], CustomerFeed: ['customer_feed_service_client', 'CustomerFeedServiceClient'], CustomerLabel: ['customer_label_service_client', 'CustomerLabelServiceClient'], CustomerManagerLink: ['customer_manager_link_service_client', 'CustomerManagerLinkServiceClient'], CustomerNegativeCriterion: ['customer_negative_criterion_service_client', 'CustomerNegativeCriterionServiceClient'], Customer: ['customer_service_client', 'CustomerServiceClient'], DetailPlacementView: ['detail_placement_view_service_client', 'DetailPlacementViewServiceClient'], DisplayKeywordView: ['display_keyword_view_service_client', 'DisplayKeywordViewServiceClient'], DomainCategory: ['domain_category_service_client', 'DomainCategoryServiceClient'], DynamicSearchAdsSearchTermView: ['dynamic_search_ads_search_term_view_service_client', 'DynamicSearchAdsSearchTermViewServiceClient'], ExtensionFeedItem: ['extension_feed_item_service_client', 'ExtensionFeedItemServiceClient'], FeedItem: ['feed_item_service_client', 'FeedItemServiceClient'], FeedItemTarget: ['feed_item_target_service_client', 'FeedItemTargetServiceClient'], FeedMapping: ['feed_mapping_service_client', 'FeedMappingServiceClient'], FeedPlaceholderView: ['feed_placeholder_view_service_client', 'FeedPlaceholderViewServiceClient'], Feed: ['feed_service_client', 'FeedServiceClient'], GenderView: ['gender_view_service_client', 'GenderViewServiceClient'], GeoTargetConstant: ['geo_target_constant_service_client', 'GeoTargetConstantServiceClient'], GeographicView: ['geographic_view_service_client', 'GeographicViewServiceClient'], GoogleAdsField: ['google_ads_field_service_client', 'GoogleAdsFieldServiceClient'], GoogleAds: ['google_ads_service_client', 'GoogleAdsServiceClient'], GroupPlacementView: ['group_placement_view_service_client', 'GroupPlacementViewServiceClient'], HotelGroupView: ['hotel_group_view_service_client', 'HotelGroupViewServiceClient'], HotelPerformanceView: ['hotel_performance_view_service_client', 'HotelPerformanceViewServiceClient'], KeywordPlanAdGroup: ['keyword_plan_ad_group_service_client', 'KeywordPlanAdGroupServiceClient'], KeywordPlanCampaign: ['keyword_plan_campaign_service_client', 'KeywordPlanCampaignServiceClient'], KeywordPlanIdea: ['keyword_plan_idea_service_client', 'KeywordPlanIdeaServiceClient'], KeywordPlanKeyword: ['keyword_plan_keyword_service_client', 'KeywordPlanKeywordServiceClient'], KeywordPlanNegativeKeyword: ['keyword_plan_negative_keyword_service_client', 'KeywordPlanNegativeKeywordServiceClient'], KeywordPlan: ['keyword_plan_service_client', 'KeywordPlanServiceClient'], KeywordView: ['keyword_view_service_client', 'KeywordViewServiceClient'], Label: ['label_service_client', 'LabelServiceClient'], LanguageConstant: ['language_constant_service_client', 'LanguageConstantServiceClient'], LocationView: ['location_view_service_client', 'LocationViewServiceClient'], ManagedPlacementView: ['managed_placement_view_service_client', 'ManagedPlacementViewServiceClient'], MediaFile: ['media_file_service_client', 'MediaFileServiceClient'], MerchantCenterLink: ['merchant_center_link_service_client', 'MerchantCenterLinkServiceClient'], MobileAppCategoryConstant: ['mobile_app_category_constant_service_client', 'MobileAppCategoryConstantServiceClient'], MobileDeviceConstant: ['mobile_device_constant_service_client', 'MobileDeviceConstantServiceClient'], MutateJob: ['mutate_job_service_client', 'MutateJobServiceClient'], OperatingSystemVersionConstant: ['operating_system_version_constant_service_client', 'OperatingSystemVersionConstantServiceClient'], ParentalStatusView: ['parental_status_view_service_client', 'ParentalStatusViewServiceClient'], PaymentsAccount: ['payments_account_service_client', 'PaymentsAccountServiceClient'], ProductBiddingCategoryConstant: ['product_bidding_category_constant_service_client', 'ProductBiddingCategoryConstantServiceClient'], ProductGroupView: ['product_group_view_service_client', 'ProductGroupViewServiceClient'], Recommendation: ['recommendation_service_client', 'RecommendationServiceClient'], RemarketingAction: ['remarketing_action_service_client', 'RemarketingActionServiceClient'], SearchTermView: ['search_term_view_service_client', 'SearchTermViewServiceClient'], SharedCriterion: ['shared_criterion_service_client', 'SharedCriterionServiceClient'], SharedSet: ['shared_set_service_client', 'SharedSetServiceClient'], ShoppingPerformanceView: ['shopping_performance_view_service_client', 'ShoppingPerformanceViewServiceClient'], TopicConstant: ['topic_constant_service_client', 'TopicConstantServiceClient'], TopicView: ['topic_view_service_client', 'TopicViewServiceClient'], UserInterest: ['user_interest_service_client', 'UserInterestServiceClient'], UserList: ['user_list_service_client', 'UserListServiceClient'], Video: ['video_service_client', 'VideoServiceClient'] }.freeze OPERATIONS = { AccountBudgetProposal: ['account_budget_proposal_service_pb', 'AccountBudgetProposalOperation'], AdGroupAdLabel: ['ad_group_ad_label_service_pb', 'AdGroupAdLabelOperation'], AdGroupAd: ['ad_group_ad_service_pb', 'AdGroupAdOperation'], AdGroupBidModifier: ['ad_group_bid_modifier_service_pb', 'AdGroupBidModifierOperation'], AdGroupCriterionLabel: ['ad_group_criterion_label_service_pb', 'AdGroupCriterionLabelOperation'], AdGroupCriterion: ['ad_group_criterion_service_pb', 'AdGroupCriterionOperation'], AdGroupExtensionSetting: ['ad_group_extension_setting_service_pb', 'AdGroupExtensionSettingOperation'], AdGroupFeed: ['ad_group_feed_service_pb', 'AdGroupFeedOperation'], AdGroupLabel: ['ad_group_label_service_pb', 'AdGroupLabelOperation'], AdGroup: ['ad_group_service_pb', 'AdGroupOperation'], AdParameter: ['ad_parameter_service_pb', 'AdParameterOperation'], ApplyRecommendation: ['recommendation_service_pb', 'ApplyRecommendationOperation'], Asset: ['asset_service_pb', 'AssetOperation'], BiddingStrategy: ['bidding_strategy_service_pb', 'BiddingStrategyOperation'], BillingSetup: ['billing_setup_service_pb', 'BillingSetupOperation'], CampaignBidModifier: ['campaign_bid_modifier_service_pb', 'CampaignBidModifierOperation'], CampaignBudget: ['campaign_budget_service_pb', 'CampaignBudgetOperation'], CampaignCriterion: ['campaign_criterion_service_pb', 'CampaignCriterionOperation'], CampaignExtensionSetting: ['campaign_extension_setting_service_pb', 'CampaignExtensionSettingOperation'], CampaignFeed: ['campaign_feed_service_pb', 'CampaignFeedOperation'], CampaignLabel: ['campaign_label_service_pb', 'CampaignLabelOperation'], Campaign: ['campaign_service_pb', 'CampaignOperation'], CampaignSharedSet: ['campaign_shared_set_service_pb', 'CampaignSharedSetOperation'], CustomInterest: ['custom_interest_service_pb', 'CustomInterestOperation'], CustomerExtensionSetting: ['customer_extension_setting_service_pb', 'CustomerExtensionSettingOperation'], CustomerFeed: ['customer_feed_service_pb', 'CustomerFeedOperation'], CustomerLabel: ['customer_label_service_pb', 'CustomerLabelOperation'], CustomerNegativeCriterion: ['customer_negative_criterion_service_pb', 'CustomerNegativeCriterionOperation'], Customer: ['customer_service_pb', 'CustomerOperation'], ConversionAction: ['conversion_action_service_pb', 'ConversionActionOperation'], DismissRecommendation: ['recommendation_service_pb', 'DismissRecommendationRequest::DismissRecommendationOperation'], ExtensionFeedItemOperation: ['extension_feed_item_service_pb', 'ExtensionFeedItemOperation'], FeedItem: ['feed_item_service_pb', 'FeedItemOperation'], FeedItemTarget: ['feed_item_target_service_pb', 'FeedItemTargetOperation'], FeedMapping: ['feed_mapping_service_pb', 'FeedMappingOperation'], Feed: ['feed_service_pb', 'FeedOperation'], KeywordPlanAdGroup: ['keyword_plan_ad_group_service_pb', 'KeywordPlanAdGroupOperation'], KeywordPlanCampaign: ['keyword_plan_campaign_service_pb', 'KeywordPlanCampaignOperation'], KeywordPlanKeyword: ['keyword_plan_keyword_service_pb','KeywordPlanKeywordOperation'], KeywordPlanNegativeKeyword: ['keyword_plan_negative_keyword_service_pb', 'KeywordPlanNegativeKeywordOperation'], KeywordPlan: ['keyword_plan_service_pb', 'KeywordPlanOperation'], Label: ['label_service_pb', 'LabelOperation'], MediaFile: ['media_file_service_pb', 'MediaFileOperation'], MerchantCenterLink: ['merchant_center_link_service_pb', 'MerchantCenterLinkOperation'], Mutate: ['google_ads_service_pb', 'MutateOperation'], RemarketingAction: ['remarketing_action_service_pb', 'RemarketingActionOperation'], SharedCriterion: ['shared_criterion_service_pb', 'SharedCriterionOperation'], SharedSet: ['shared_set_service_pb', 'SharedSetOperation'], UserList: ['user_list_service_pb', 'UserListOperation'] }.freeze def initialize() @version = :V1 @path_version = @version.downcase end # Look up the class for a resource by name. def resource(name) name = name.to_sym resource_info = RESOURCES[name] if resource_info.nil? raise ArgumentError, sprintf('No resource found with name %s', name) end require_path = sprintf(RESOURCE_PATH, @path_version, resource_info[0], resource_info[1]) require require_path class_path = RESOURCE_CLASS_PATH class_path = COMMON_CLASS_PATH if resource_info.first == 'common' class_path = SERVICE_CLASS_PATH if resource_info.first == 'services' class_path = sprintf(class_path, @version, resource_info[2]) return class_for_path(class_path) end # Look up the class for an enum by name. def enum(name) name = name.to_sym enum_info = ENUMS[name] if enum_info.nil? raise ArgumentError, sprintf('No enum found with name %s', name) end require_path = sprintf(ENUM_PATH, @path_version, enum_info.first) require require_path class_path = sprintf(ENUM_CLASS_PATH, @version, enum_info.last, enum_info.last) return class_for_path(class_path) end # Look up the class for a service by name. def service(name) name = name.to_sym service_info = SERVICES[name] if service_info.nil? raise ArgumentError, sprintf('No service found with name %s', name) end require_path = sprintf(SERVICE_PATH, @path_version, service_info.first) require require_path class_path = sprintf(SERVICE_CLASS_PATH, @version, service_info.last) return class_for_path(class_path) end # Look up the class for an operation by name. def operation(name) name = name.to_sym operation_info = OPERATIONS[name] if operation_info.nil? raise ArgumentError, sprintf('No operation found with name %s', name) end require_path = sprintf(SERVICE_PATH, @path_version, operation_info.first) require require_path class_path = sprintf(SERVICE_CLASS_PATH, @version, operation_info.last) return class_for_path(class_path) end private # Converts complete class path into class object. def class_for_path(path) path.split('::').inject(Kernel) do |scope, const_name| scope.const_get(const_name) end end end end end end end end