--- v18/common/extensions.proto 2025-08-05 14:36:11.000000000 +0000 +++ v19/common/extensions.proto 2025-08-05 14:36:14.000000000 +0000 @@ -30,49 +30,8 @@ - - - - - - - // Proto file describing extension types. -// Represents an App extension. -message AppFeedItem { - // The visible text displayed when the link is rendered in an ad. - // This string must not be empty, and the length of this string should - // be between 1 and 25, inclusive. - optional string link_text = 9; - - // The store-specific ID for the target application. - // This string must not be empty. - optional string app_id = 10; - - // The application store that the target application belongs to. - // This field is required. - google.ads.googleads.v18.enums.AppStoreEnum.AppStore app_store = 3; - - // A list of possible final URLs after all cross domain redirects. - // This list must not be empty. - repeated string final_urls = 11; - - // A list of possible final mobile URLs after all cross domain redirects. - repeated string final_mobile_urls = 12; - - // URL template for constructing a tracking URL. Default value is "{lpurl}". - optional string tracking_url_template = 13; - - // A list of mappings to be used for substituting URL custom parameter tags in - // the tracking_url_template, final_urls, and/or final_mobile_urls. - repeated CustomParameter url_custom_parameters = 7; - - // URL template for appending params to landing page URLs served with parallel - // tracking. - optional string final_url_suffix = 14; -} - // Represents a Call extension. message CallFeedItem { // The advertiser's phone number to append to the ad. @@ -110,212 +69,6 @@ optional string callout_text = 2; } -// Represents a location extension. -message LocationFeedItem { - // The name of the business. - optional string business_name = 9; - - // Line 1 of the business address. - optional string address_line_1 = 10; - - // Line 2 of the business address. - optional string address_line_2 = 11; - - // City of the business address. - optional string city = 12; - - // Province of the business address. - optional string province = 13; - - // Postal code of the business address. - optional string postal_code = 14; - - // Country code of the business address. - optional string country_code = 15; - - // Phone number of the business. - optional string phone_number = 16; -} - -// Represents an affiliate location extension. -message AffiliateLocationFeedItem { - // The name of the business. - optional string business_name = 11; - - // Line 1 of the business address. - optional string address_line_1 = 12; - - // Line 2 of the business address. - optional string address_line_2 = 13; - - // City of the business address. - optional string city = 14; - - // Province of the business address. - optional string province = 15; - - // Postal code of the business address. - optional string postal_code = 16; - - // Country code of the business address. - optional string country_code = 17; - - // Phone number of the business. - optional string phone_number = 18; - - // Id of the retail chain that is advertised as a seller of your product. - optional int64 chain_id = 19; - - // Name of chain. - optional string chain_name = 20; -} - -// An extension that users can click on to send a text message to the -// advertiser. -message TextMessageFeedItem { - // The business name to prepend to the message text. - // This field is required. - optional string business_name = 6; - - // Uppercase two-letter country code of the advertiser's phone number. - // This field is required. - optional string country_code = 7; - - // The advertiser's phone number the message will be sent to. Required. - optional string phone_number = 8; - - // The text to show in the ad. - // This field is required. - optional string text = 9; - - // The message extension_text populated in the messaging app. - optional string extension_text = 10; -} - -// Represents a Price extension. -message PriceFeedItem { - // Price extension type of this extension. - google.ads.googleads.v18.enums.PriceExtensionTypeEnum.PriceExtensionType - type = 1; - - // Price qualifier for all offers of this price extension. - google.ads.googleads.v18.enums.PriceExtensionPriceQualifierEnum - .PriceExtensionPriceQualifier price_qualifier = 2; - - // Tracking URL template for all offers of this price extension. - optional string tracking_url_template = 7; - - // The code of the language used for this price extension. - optional string language_code = 8; - - // The price offerings in this price extension. - repeated PriceOffer price_offerings = 5; - - // Tracking URL template for all offers of this price extension. - optional string final_url_suffix = 9; -} - -// Represents one price offer in a price extension. -message PriceOffer { - // Header text of this offer. - optional string header = 7; - - // Description text of this offer. - optional string description = 8; - - // Price value of this offer. - Money price = 3; - - // Price unit for this offer. - google.ads.googleads.v18.enums.PriceExtensionPriceUnitEnum - .PriceExtensionPriceUnit unit = 4; - - // A list of possible final URLs after all cross domain redirects. - repeated string final_urls = 9; - - // A list of possible final mobile URLs after all cross domain redirects. - repeated string final_mobile_urls = 10; -} - -// Represents a Promotion extension. -message PromotionFeedItem { - // A freeform description of what the promotion is targeting. - // This field is required. - optional string promotion_target = 16; - - // Enum that modifies the qualification of the discount. - google.ads.googleads.v18.enums.PromotionExtensionDiscountModifierEnum - .PromotionExtensionDiscountModifier discount_modifier = 2; - - // Start date of when the promotion is eligible to be redeemed. - optional string promotion_start_date = 19; - - // Last date when the promotion is eligible to be redeemed. - optional string promotion_end_date = 20; - - // The occasion the promotion was intended for. - // If an occasion is set, the redemption window will need to fall within - // the date range associated with the occasion. - google.ads.googleads.v18.enums.PromotionExtensionOccasionEnum - .PromotionExtensionOccasion occasion = 9; - - // A list of possible final URLs after all cross domain redirects. - // This field is required. - repeated string final_urls = 21; - - // A list of possible final mobile URLs after all cross domain redirects. - repeated string final_mobile_urls = 22; - - // URL template for constructing a tracking URL. - optional string tracking_url_template = 23; - - // A list of mappings to be used for substituting URL custom parameter tags in - // the tracking_url_template, final_urls, and/or final_mobile_urls. - repeated CustomParameter url_custom_parameters = 13; - - // URL template for appending params to landing page URLs served with parallel - // tracking. - optional string final_url_suffix = 24; - - // The language of the promotion. - // Represented as BCP 47 language tag. - optional string language_code = 25; - - // Discount type, can be percentage off or amount off. - oneof discount_type { - // Percentage off discount in the promotion in micros. - // One million is equivalent to one percent. - // Either this or money_off_amount is required. - int64 percent_off = 17; - - // Money amount off for discount in the promotion. - // Either this or percent_off is required. - Money money_amount_off = 4; - } - - // Promotion trigger. Can be by promotion code or promo by eligible order - // amount. - oneof promotion_trigger { - // A code the user should use in order to be eligible for the promotion. - string promotion_code = 18; - - // The amount the total order needs to be for the user to be eligible for - // the promotion. - Money orders_over_amount = 6; - } -} - -// Represents a structured snippet extension. -message StructuredSnippetFeedItem { - // The header of the snippet. - // This string must not be empty. - optional string header = 3; - - // The values in the snippet. - // The maximum size of this collection is 10. - repeated string values = 4; -} - // Represents a sitelink. message SitelinkFeedItem { // URL display text for the sitelink. @@ -349,23 +102,3 @@ // parallel tracking. optional string final_url_suffix = 15; } - -// Represents a hotel callout extension. -message HotelCalloutFeedItem { - // The callout text. - // The length of this string should be between 1 and 25, inclusive. - optional string text = 3; - - // The language of the hotel callout text. - // IETF BCP 47 compliant language code. - optional string language_code = 4; -} - -// Represents an advertiser provided image extension. -message ImageFeedItem { - // Required. Resource name of the image asset. - string image_asset = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "googleads.googleapis.com/Asset" } - ]; -}
/common/extensions.proto
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# /common/extensions.proto\n\n```diff\n--- v18/common/extensions.proto 2025-08-05 14:36:11.000000000 +0000\n+++ v19/common/extensions.proto 2025-08-05 14:36:14.000000000 +0000\n@@ -30,49 +30,8 @@\n\n\n\n-\n-\n-\n-\n-\n-\n-\n // Proto file describing extension types.\n\n-// Represents an App extension.\n-message AppFeedItem {\n- // The visible text displayed when the link is rendered in an ad.\n- // This string must not be empty, and the length of this string should\n- // be between 1 and 25, inclusive.\n- optional string link_text = 9;\n-\n- // The store-specific ID for the target application.\n- // This string must not be empty.\n- optional string app_id = 10;\n-\n- // The application store that the target application belongs to.\n- // This field is required.\n- google.ads.googleads.v18.enums.AppStoreEnum.AppStore app_store = 3;\n-\n- // A list of possible final URLs after all cross domain redirects.\n- // This list must not be empty.\n- repeated string final_urls = 11;\n-\n- // A list of possible final mobile URLs after all cross domain redirects.\n- repeated string final_mobile_urls = 12;\n-\n- // URL template for constructing a tracking URL. Default value is \"{lpurl}\".\n- optional string tracking_url_template = 13;\n-\n- // A list of mappings to be used for substituting URL custom parameter tags in\n- // the tracking_url_template, final_urls, and/or final_mobile_urls.\n- repeated CustomParameter url_custom_parameters = 7;\n-\n- // URL template for appending params to landing page URLs served with parallel\n- // tracking.\n- optional string final_url_suffix = 14;\n-}\n-\n // Represents a Call extension.\n message CallFeedItem {\n // The advertiser's phone number to append to the ad.\n@@ -110,212 +69,6 @@\n optional string callout_text = 2;\n }\n\n-// Represents a location extension.\n-message LocationFeedItem {\n- // The name of the business.\n- optional string business_name = 9;\n-\n- // Line 1 of the business address.\n- optional string address_line_1 = 10;\n-\n- // Line 2 of the business address.\n- optional string address_line_2 = 11;\n-\n- // City of the business address.\n- optional string city = 12;\n-\n- // Province of the business address.\n- optional string province = 13;\n-\n- // Postal code of the business address.\n- optional string postal_code = 14;\n-\n- // Country code of the business address.\n- optional string country_code = 15;\n-\n- // Phone number of the business.\n- optional string phone_number = 16;\n-}\n-\n-// Represents an affiliate location extension.\n-message AffiliateLocationFeedItem {\n- // The name of the business.\n- optional string business_name = 11;\n-\n- // Line 1 of the business address.\n- optional string address_line_1 = 12;\n-\n- // Line 2 of the business address.\n- optional string address_line_2 = 13;\n-\n- // City of the business address.\n- optional string city = 14;\n-\n- // Province of the business address.\n- optional string province = 15;\n-\n- // Postal code of the business address.\n- optional string postal_code = 16;\n-\n- // Country code of the business address.\n- optional string country_code = 17;\n-\n- // Phone number of the business.\n- optional string phone_number = 18;\n-\n- // Id of the retail chain that is advertised as a seller of your product.\n- optional int64 chain_id = 19;\n-\n- // Name of chain.\n- optional string chain_name = 20;\n-}\n-\n-// An extension that users can click on to send a text message to the\n-// advertiser.\n-message TextMessageFeedItem {\n- // The business name to prepend to the message text.\n- // This field is required.\n- optional string business_name = 6;\n-\n- // Uppercase two-letter country code of the advertiser's phone number.\n- // This field is required.\n- optional string country_code = 7;\n-\n- // The advertiser's phone number the message will be sent to. Required.\n- optional string phone_number = 8;\n-\n- // The text to show in the ad.\n- // This field is required.\n- optional string text = 9;\n-\n- // The message extension_text populated in the messaging app.\n- optional string extension_text = 10;\n-}\n-\n-// Represents a Price extension.\n-message PriceFeedItem {\n- // Price extension type of this extension.\n- google.ads.googleads.v18.enums.PriceExtensionTypeEnum.PriceExtensionType\n- type = 1;\n-\n- // Price qualifier for all offers of this price extension.\n- google.ads.googleads.v18.enums.PriceExtensionPriceQualifierEnum\n- .PriceExtensionPriceQualifier price_qualifier = 2;\n-\n- // Tracking URL template for all offers of this price extension.\n- optional string tracking_url_template = 7;\n-\n- // The code of the language used for this price extension.\n- optional string language_code = 8;\n-\n- // The price offerings in this price extension.\n- repeated PriceOffer price_offerings = 5;\n-\n- // Tracking URL template for all offers of this price extension.\n- optional string final_url_suffix = 9;\n-}\n-\n-// Represents one price offer in a price extension.\n-message PriceOffer {\n- // Header text of this offer.\n- optional string header = 7;\n-\n- // Description text of this offer.\n- optional string description = 8;\n-\n- // Price value of this offer.\n- Money price = 3;\n-\n- // Price unit for this offer.\n- google.ads.googleads.v18.enums.PriceExtensionPriceUnitEnum\n- .PriceExtensionPriceUnit unit = 4;\n-\n- // A list of possible final URLs after all cross domain redirects.\n- repeated string final_urls = 9;\n-\n- // A list of possible final mobile URLs after all cross domain redirects.\n- repeated string final_mobile_urls = 10;\n-}\n-\n-// Represents a Promotion extension.\n-message PromotionFeedItem {\n- // A freeform description of what the promotion is targeting.\n- // This field is required.\n- optional string promotion_target = 16;\n-\n- // Enum that modifies the qualification of the discount.\n- google.ads.googleads.v18.enums.PromotionExtensionDiscountModifierEnum\n- .PromotionExtensionDiscountModifier discount_modifier = 2;\n-\n- // Start date of when the promotion is eligible to be redeemed.\n- optional string promotion_start_date = 19;\n-\n- // Last date when the promotion is eligible to be redeemed.\n- optional string promotion_end_date = 20;\n-\n- // The occasion the promotion was intended for.\n- // If an occasion is set, the redemption window will need to fall within\n- // the date range associated with the occasion.\n- google.ads.googleads.v18.enums.PromotionExtensionOccasionEnum\n- .PromotionExtensionOccasion occasion = 9;\n-\n- // A list of possible final URLs after all cross domain redirects.\n- // This field is required.\n- repeated string final_urls = 21;\n-\n- // A list of possible final mobile URLs after all cross domain redirects.\n- repeated string final_mobile_urls = 22;\n-\n- // URL template for constructing a tracking URL.\n- optional string tracking_url_template = 23;\n-\n- // A list of mappings to be used for substituting URL custom parameter tags in\n- // the tracking_url_template, final_urls, and/or final_mobile_urls.\n- repeated CustomParameter url_custom_parameters = 13;\n-\n- // URL template for appending params to landing page URLs served with parallel\n- // tracking.\n- optional string final_url_suffix = 24;\n-\n- // The language of the promotion.\n- // Represented as BCP 47 language tag.\n- optional string language_code = 25;\n-\n- // Discount type, can be percentage off or amount off.\n- oneof discount_type {\n- // Percentage off discount in the promotion in micros.\n- // One million is equivalent to one percent.\n- // Either this or money_off_amount is required.\n- int64 percent_off = 17;\n-\n- // Money amount off for discount in the promotion.\n- // Either this or percent_off is required.\n- Money money_amount_off = 4;\n- }\n-\n- // Promotion trigger. Can be by promotion code or promo by eligible order\n- // amount.\n- oneof promotion_trigger {\n- // A code the user should use in order to be eligible for the promotion.\n- string promotion_code = 18;\n-\n- // The amount the total order needs to be for the user to be eligible for\n- // the promotion.\n- Money orders_over_amount = 6;\n- }\n-}\n-\n-// Represents a structured snippet extension.\n-message StructuredSnippetFeedItem {\n- // The header of the snippet.\n- // This string must not be empty.\n- optional string header = 3;\n-\n- // The values in the snippet.\n- // The maximum size of this collection is 10.\n- repeated string values = 4;\n-}\n-\n // Represents a sitelink.\n message SitelinkFeedItem {\n // URL display text for the sitelink.\n@@ -349,23 +102,3 @@\n // parallel tracking.\n optional string final_url_suffix = 15;\n }\n-\n-// Represents a hotel callout extension.\n-message HotelCalloutFeedItem {\n- // The callout text.\n- // The length of this string should be between 1 and 25, inclusive.\n- optional string text = 3;\n-\n- // The language of the hotel callout text.\n- // IETF BCP 47 compliant language code.\n- optional string language_code = 4;\n-}\n-\n-// Represents an advertiser provided image extension.\n-message ImageFeedItem {\n- // Required. Resource name of the image asset.\n- string image_asset = 1 [\n- (google.api.field_behavior) = REQUIRED,\n- (google.api.resource_reference) = { type: \"googleads.googleapis.com/Asset\" }\n- ];\n-}\n```"]]