xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v14/common/extensions.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.ads.googleads.v14.common;
18
19import "google/ads/googleads/v14/common/custom_parameter.proto";
20import "google/ads/googleads/v14/common/feed_common.proto";
21import "google/ads/googleads/v14/enums/app_store.proto";
22import "google/ads/googleads/v14/enums/call_conversion_reporting_state.proto";
23import "google/ads/googleads/v14/enums/price_extension_price_qualifier.proto";
24import "google/ads/googleads/v14/enums/price_extension_price_unit.proto";
25import "google/ads/googleads/v14/enums/price_extension_type.proto";
26import "google/ads/googleads/v14/enums/promotion_extension_discount_modifier.proto";
27import "google/ads/googleads/v14/enums/promotion_extension_occasion.proto";
28import "google/api/field_behavior.proto";
29import "google/api/resource.proto";
30
31option csharp_namespace = "Google.Ads.GoogleAds.V14.Common";
32option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/common;common";
33option java_multiple_files = true;
34option java_outer_classname = "ExtensionsProto";
35option java_package = "com.google.ads.googleads.v14.common";
36option objc_class_prefix = "GAA";
37option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Common";
38option ruby_package = "Google::Ads::GoogleAds::V14::Common";
39
40// Proto file describing extension types.
41
42// Represents an App extension.
43message AppFeedItem {
44  // The visible text displayed when the link is rendered in an ad.
45  // This string must not be empty, and the length of this string should
46  // be between 1 and 25, inclusive.
47  optional string link_text = 9;
48
49  // The store-specific ID for the target application.
50  // This string must not be empty.
51  optional string app_id = 10;
52
53  // The application store that the target application belongs to.
54  // This field is required.
55  google.ads.googleads.v14.enums.AppStoreEnum.AppStore app_store = 3;
56
57  // A list of possible final URLs after all cross domain redirects.
58  // This list must not be empty.
59  repeated string final_urls = 11;
60
61  // A list of possible final mobile URLs after all cross domain redirects.
62  repeated string final_mobile_urls = 12;
63
64  // URL template for constructing a tracking URL. Default value is "{lpurl}".
65  optional string tracking_url_template = 13;
66
67  // A list of mappings to be used for substituting URL custom parameter tags in
68  // the tracking_url_template, final_urls, and/or final_mobile_urls.
69  repeated CustomParameter url_custom_parameters = 7;
70
71  // URL template for appending params to landing page URLs served with parallel
72  // tracking.
73  optional string final_url_suffix = 14;
74}
75
76// Represents a Call extension.
77message CallFeedItem {
78  // The advertiser's phone number to append to the ad.
79  // This string must not be empty.
80  optional string phone_number = 7;
81
82  // Uppercase two-letter country code of the advertiser's phone number.
83  // This string must not be empty.
84  optional string country_code = 8;
85
86  // Indicates whether call tracking is enabled. By default, call tracking is
87  // not enabled.
88  optional bool call_tracking_enabled = 9;
89
90  // The conversion action to attribute a call conversion to. If not set a
91  // default conversion action is used. This field only has effect if
92  // call_tracking_enabled is set to true. Otherwise this field is ignored.
93  optional string call_conversion_action = 10;
94
95  // If true, disable call conversion tracking. call_conversion_action should
96  // not be set if this is true. Optional.
97  optional bool call_conversion_tracking_disabled = 11;
98
99  // Enum value that indicates whether this call extension uses its own call
100  // conversion setting (or just have call conversion disabled), or following
101  // the account level setting.
102  google.ads.googleads.v14.enums.CallConversionReportingStateEnum
103      .CallConversionReportingState call_conversion_reporting_state = 6;
104}
105
106// Represents a callout extension.
107message CalloutFeedItem {
108  // The callout text.
109  // The length of this string should be between 1 and 25, inclusive.
110  optional string callout_text = 2;
111}
112
113// Represents a location extension.
114message LocationFeedItem {
115  // The name of the business.
116  optional string business_name = 9;
117
118  // Line 1 of the business address.
119  optional string address_line_1 = 10;
120
121  // Line 2 of the business address.
122  optional string address_line_2 = 11;
123
124  // City of the business address.
125  optional string city = 12;
126
127  // Province of the business address.
128  optional string province = 13;
129
130  // Postal code of the business address.
131  optional string postal_code = 14;
132
133  // Country code of the business address.
134  optional string country_code = 15;
135
136  // Phone number of the business.
137  optional string phone_number = 16;
138}
139
140// Represents an affiliate location extension.
141message AffiliateLocationFeedItem {
142  // The name of the business.
143  optional string business_name = 11;
144
145  // Line 1 of the business address.
146  optional string address_line_1 = 12;
147
148  // Line 2 of the business address.
149  optional string address_line_2 = 13;
150
151  // City of the business address.
152  optional string city = 14;
153
154  // Province of the business address.
155  optional string province = 15;
156
157  // Postal code of the business address.
158  optional string postal_code = 16;
159
160  // Country code of the business address.
161  optional string country_code = 17;
162
163  // Phone number of the business.
164  optional string phone_number = 18;
165
166  // Id of the retail chain that is advertised as a seller of your product.
167  optional int64 chain_id = 19;
168
169  // Name of chain.
170  optional string chain_name = 20;
171}
172
173// An extension that users can click on to send a text message to the
174// advertiser.
175message TextMessageFeedItem {
176  // The business name to prepend to the message text.
177  // This field is required.
178  optional string business_name = 6;
179
180  // Uppercase two-letter country code of the advertiser's phone number.
181  // This field is required.
182  optional string country_code = 7;
183
184  // The advertiser's phone number the message will be sent to. Required.
185  optional string phone_number = 8;
186
187  // The text to show in the ad.
188  // This field is required.
189  optional string text = 9;
190
191  // The message extension_text populated in the messaging app.
192  optional string extension_text = 10;
193}
194
195// Represents a Price extension.
196message PriceFeedItem {
197  // Price extension type of this extension.
198  google.ads.googleads.v14.enums.PriceExtensionTypeEnum.PriceExtensionType
199      type = 1;
200
201  // Price qualifier for all offers of this price extension.
202  google.ads.googleads.v14.enums.PriceExtensionPriceQualifierEnum
203      .PriceExtensionPriceQualifier price_qualifier = 2;
204
205  // Tracking URL template for all offers of this price extension.
206  optional string tracking_url_template = 7;
207
208  // The code of the language used for this price extension.
209  optional string language_code = 8;
210
211  // The price offerings in this price extension.
212  repeated PriceOffer price_offerings = 5;
213
214  // Tracking URL template for all offers of this price extension.
215  optional string final_url_suffix = 9;
216}
217
218// Represents one price offer in a price extension.
219message PriceOffer {
220  // Header text of this offer.
221  optional string header = 7;
222
223  // Description text of this offer.
224  optional string description = 8;
225
226  // Price value of this offer.
227  Money price = 3;
228
229  // Price unit for this offer.
230  google.ads.googleads.v14.enums.PriceExtensionPriceUnitEnum
231      .PriceExtensionPriceUnit unit = 4;
232
233  // A list of possible final URLs after all cross domain redirects.
234  repeated string final_urls = 9;
235
236  // A list of possible final mobile URLs after all cross domain redirects.
237  repeated string final_mobile_urls = 10;
238}
239
240// Represents a Promotion extension.
241message PromotionFeedItem {
242  // A freeform description of what the promotion is targeting.
243  // This field is required.
244  optional string promotion_target = 16;
245
246  // Enum that modifies the qualification of the discount.
247  google.ads.googleads.v14.enums.PromotionExtensionDiscountModifierEnum
248      .PromotionExtensionDiscountModifier discount_modifier = 2;
249
250  // Start date of when the promotion is eligible to be redeemed.
251  optional string promotion_start_date = 19;
252
253  // Last date when the promotion is eligible to be redeemed.
254  optional string promotion_end_date = 20;
255
256  // The occasion the promotion was intended for.
257  // If an occasion is set, the redemption window will need to fall within
258  // the date range associated with the occasion.
259  google.ads.googleads.v14.enums.PromotionExtensionOccasionEnum
260      .PromotionExtensionOccasion occasion = 9;
261
262  // A list of possible final URLs after all cross domain redirects.
263  // This field is required.
264  repeated string final_urls = 21;
265
266  // A list of possible final mobile URLs after all cross domain redirects.
267  repeated string final_mobile_urls = 22;
268
269  // URL template for constructing a tracking URL.
270  optional string tracking_url_template = 23;
271
272  // A list of mappings to be used for substituting URL custom parameter tags in
273  // the tracking_url_template, final_urls, and/or final_mobile_urls.
274  repeated CustomParameter url_custom_parameters = 13;
275
276  // URL template for appending params to landing page URLs served with parallel
277  // tracking.
278  optional string final_url_suffix = 24;
279
280  // The language of the promotion.
281  // Represented as BCP 47 language tag.
282  optional string language_code = 25;
283
284  // Discount type, can be percentage off or amount off.
285  oneof discount_type {
286    // Percentage off discount in the promotion in micros.
287    // One million is equivalent to one percent.
288    // Either this or money_off_amount is required.
289    int64 percent_off = 17;
290
291    // Money amount off for discount in the promotion.
292    // Either this or percent_off is required.
293    Money money_amount_off = 4;
294  }
295
296  // Promotion trigger. Can be by promotion code or promo by eligible order
297  // amount.
298  oneof promotion_trigger {
299    // A code the user should use in order to be eligible for the promotion.
300    string promotion_code = 18;
301
302    // The amount the total order needs to be for the user to be eligible for
303    // the promotion.
304    Money orders_over_amount = 6;
305  }
306}
307
308// Represents a structured snippet extension.
309message StructuredSnippetFeedItem {
310  // The header of the snippet.
311  // This string must not be empty.
312  optional string header = 3;
313
314  // The values in the snippet.
315  // The maximum size of this collection is 10.
316  repeated string values = 4;
317}
318
319// Represents a sitelink.
320message SitelinkFeedItem {
321  // URL display text for the sitelink.
322  // The length of this string should be between 1 and 25, inclusive.
323  optional string link_text = 9;
324
325  // First line of the description for the sitelink.
326  // If this value is set, line2 must also be set.
327  // The length of this string should be between 0 and 35, inclusive.
328  optional string line1 = 10;
329
330  // Second line of the description for the sitelink.
331  // If this value is set, line1 must also be set.
332  // The length of this string should be between 0 and 35, inclusive.
333  optional string line2 = 11;
334
335  // A list of possible final URLs after all cross domain redirects.
336  repeated string final_urls = 12;
337
338  // A list of possible final mobile URLs after all cross domain redirects.
339  repeated string final_mobile_urls = 13;
340
341  // URL template for constructing a tracking URL.
342  optional string tracking_url_template = 14;
343
344  // A list of mappings to be used for substituting URL custom parameter tags in
345  // the tracking_url_template, final_urls, and/or final_mobile_urls.
346  repeated CustomParameter url_custom_parameters = 7;
347
348  // Final URL suffix to be appended to landing page URLs served with
349  // parallel tracking.
350  optional string final_url_suffix = 15;
351}
352
353// Represents a hotel callout extension.
354message HotelCalloutFeedItem {
355  // The callout text.
356  // The length of this string should be between 1 and 25, inclusive.
357  optional string text = 3;
358
359  // The language of the hotel callout text.
360  // IETF BCP 47 compliant language code.
361  optional string language_code = 4;
362}
363
364// Represents an advertiser provided image extension.
365message ImageFeedItem {
366  // Required. Resource name of the image asset.
367  string image_asset = 1 [
368    (google.api.field_behavior) = REQUIRED,
369    (google.api.resource_reference) = { type: "googleads.googleapis.com/Asset" }
370  ];
371}
372