1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v1.common;
20 import "google/ads/googleads/v1/enums/age_range_type.proto";
21 import "google/ads/googleads/v1/enums/app_payment_model_type.proto";
22 import "google/ads/googleads/v1/enums/content_label_type.proto";
23 import "google/ads/googleads/v1/enums/day_of_week.proto";
24 import "google/ads/googleads/v1/enums/device.proto";
25 import "google/ads/googleads/v1/enums/gender_type.proto";
26 import "google/ads/googleads/v1/enums/hotel_date_selection_type.proto";
27 import "google/ads/googleads/v1/enums/income_range_type.proto";
28 import "google/ads/googleads/v1/enums/interaction_type.proto";
29 import "google/ads/googleads/v1/enums/keyword_match_type.proto";
30 import "google/ads/googleads/v1/enums/listing_custom_attribute_index.proto";
31 import "google/ads/googleads/v1/enums/listing_group_type.proto";
32 import "google/ads/googleads/v1/enums/minute_of_hour.proto";
33 import "google/ads/googleads/v1/enums/parental_status_type.proto";
34 import "google/ads/googleads/v1/enums/preferred_content_type.proto";
35 import "google/ads/googleads/v1/enums/product_bidding_category_level.proto";
36 import "google/ads/googleads/v1/enums/product_channel.proto";
37 import "google/ads/googleads/v1/enums/product_channel_exclusivity.proto";
38 import "google/ads/googleads/v1/enums/product_condition.proto";
39 import "google/ads/googleads/v1/enums/product_type_level.proto";
40 import "google/ads/googleads/v1/enums/proximity_radius_units.proto";
41 import "google/ads/googleads/v1/enums/webpage_condition_operand.proto";
42 import "google/ads/googleads/v1/enums/webpage_condition_operator.proto";
43 import "google/protobuf/wrappers.proto";
44 import "google/api/annotations.proto";
46 option csharp_namespace = "Google.Ads.GoogleAds.V1.Common";
47 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/common;common";
48 option java_multiple_files = true;
49 option java_outer_classname = "CriteriaProto";
50 option java_package = "com.google.ads.googleads.v1.common";
51 option objc_class_prefix = "GAA";
52 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Common";
53 option ruby_package = "Google::Ads::GoogleAds::V1::Common";
54 // Proto file describing criteria types.
56 // A keyword criterion.
58 // The text of the keyword (at most 80 characters and 10 words).
59 google.protobuf.StringValue text = 1;
61 // The match type of the keyword.
62 google.ads.googleads.v1.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2;
65 // A placement criterion. This can be used to modify bids for sites when
66 // targeting the content network.
67 message PlacementInfo {
68 // URL of the placement.
70 // For example, "http://www.domain.com".
71 google.protobuf.StringValue url = 1;
74 // A mobile app category criterion.
75 message MobileAppCategoryInfo {
76 // The mobile app category constant resource name.
77 google.protobuf.StringValue mobile_app_category_constant = 1;
80 // A mobile application criterion.
81 message MobileApplicationInfo {
82 // A string that uniquely identifies a mobile application to Google Ads API.
83 // The format of this string is "{platform}-{platform_native_id}", where
84 // platform is "1" for iOS apps and "2" for Android apps, and where
85 // platform_native_id is the mobile application identifier native to the
86 // corresponding platform.
87 // For iOS, this native identifier is the 9 digit string that appears at the
88 // end of an App Store URL (e.g., "476943146" for "Flood-It! 2" whose App
89 // Store link is http://itunes.apple.com/us/app/flood-it!-2/id476943146).
90 // For Android, this native identifier is the application's package name
91 // (e.g., "com.labpixies.colordrips" for "Color Drips" given Google Play link
92 // https://play.google.com/store/apps/details?id=com.labpixies.colordrips).
93 // A well formed app id for Google Ads API would thus be "1-476943146" for iOS
94 // and "2-com.labpixies.colordrips" for Android.
95 // This field is required and must be set in CREATE operations.
96 google.protobuf.StringValue app_id = 2;
99 // A location criterion.
100 message LocationInfo {
101 // The geo target constant resource name.
102 google.protobuf.StringValue geo_target_constant = 1;
105 // A device criterion.
107 // Type of the device.
108 google.ads.googleads.v1.enums.DeviceEnum.Device type = 1;
111 // A preferred content criterion.
112 message PreferredContentInfo {
113 // Type of the preferred content.
114 google.ads.googleads.v1.enums.PreferredContentTypeEnum.PreferredContentType type = 2;
117 // A listing group criterion.
118 message ListingGroupInfo {
119 // Type of the listing group.
120 google.ads.googleads.v1.enums.ListingGroupTypeEnum.ListingGroupType type = 1;
122 // Dimension value with which this listing group is refining its parent.
123 // Undefined for the root group.
124 ListingDimensionInfo case_value = 2;
126 // Resource name of ad group criterion which is the parent listing group
127 // subdivision. Null for the root group.
128 google.protobuf.StringValue parent_ad_group_criterion = 3;
131 // A listing scope criterion.
132 message ListingScopeInfo {
133 // Scope of the campaign criterion.
134 repeated ListingDimensionInfo dimensions = 2;
137 // Listing dimensions for listing group criterion.
138 message ListingDimensionInfo {
139 // Dimension of one of the types below is always present.
141 // Brand of the listing.
142 ListingBrandInfo listing_brand = 1;
144 // Advertiser-specific hotel ID.
145 HotelIdInfo hotel_id = 2;
147 // Class of the hotel as a number of stars 1 to 5.
148 HotelClassInfo hotel_class = 3;
150 // Country or Region the hotel is located in.
151 HotelCountryRegionInfo hotel_country_region = 4;
153 // State the hotel is located in.
154 HotelStateInfo hotel_state = 5;
156 // City the hotel is located in.
157 HotelCityInfo hotel_city = 6;
159 // Listing custom attribute.
160 ListingCustomAttributeInfo listing_custom_attribute = 7;
162 // Bidding category of a product offer.
163 ProductBiddingCategoryInfo product_bidding_category = 13;
165 // Locality of a product offer.
166 ProductChannelInfo product_channel = 8;
168 // Availability of a product offer.
169 ProductChannelExclusivityInfo product_channel_exclusivity = 9;
171 // Condition of a product offer.
172 ProductConditionInfo product_condition = 10;
174 // Item id of a product offer.
175 ProductItemIdInfo product_item_id = 11;
177 // Type of a product offer.
178 ProductTypeInfo product_type = 12;
182 // Brand of the listing.
183 message ListingBrandInfo {
184 // String value of the listing brand.
185 google.protobuf.StringValue value = 1;
188 // Advertiser-specific hotel ID.
189 message HotelIdInfo {
190 // String value of the hotel ID.
191 google.protobuf.StringValue value = 1;
194 // Class of the hotel as a number of stars 1 to 5.
195 message HotelClassInfo {
196 // Long value of the hotel class.
197 google.protobuf.Int64Value value = 1;
200 // Country or Region the hotel is located in.
201 message HotelCountryRegionInfo {
202 // The Geo Target Constant resource name.
203 google.protobuf.StringValue country_region_criterion = 1;
206 // State the hotel is located in.
207 message HotelStateInfo {
208 // The Geo Target Constant resource name.
209 google.protobuf.StringValue state_criterion = 1;
212 // City the hotel is located in.
213 message HotelCityInfo {
214 // The Geo Target Constant resource name.
215 google.protobuf.StringValue city_criterion = 1;
218 // Listing custom attribute.
219 message ListingCustomAttributeInfo {
220 // String value of the listing custom attribute.
221 google.protobuf.StringValue value = 1;
223 // Indicates the index of the custom attribute.
224 google.ads.googleads.v1.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2;
227 // Bidding category of a product offer.
228 message ProductBiddingCategoryInfo {
229 // ID of the product bidding category.
231 // This ID is equivalent to the google_product_category ID as described in
232 // this article: https://support.google.com/merchants/answer/6324436.
233 google.protobuf.Int64Value id = 1;
235 // Two-letter upper-case country code of the product bidding category. It must
236 // match the campaign.shopping_setting.sales_country field.
237 google.protobuf.StringValue country_code = 2;
239 // Level of the product bidding category.
240 google.ads.googleads.v1.enums.ProductBiddingCategoryLevelEnum.ProductBiddingCategoryLevel level = 3;
243 // Locality of a product offer.
244 message ProductChannelInfo {
245 // Value of the locality.
246 google.ads.googleads.v1.enums.ProductChannelEnum.ProductChannel channel = 1;
249 // Availability of a product offer.
250 message ProductChannelExclusivityInfo {
251 // Value of the availability.
252 google.ads.googleads.v1.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity channel_exclusivity = 1;
255 // Condition of a product offer.
256 message ProductConditionInfo {
257 // Value of the condition.
258 google.ads.googleads.v1.enums.ProductConditionEnum.ProductCondition condition = 1;
261 // Item id of a product offer.
262 message ProductItemIdInfo {
264 google.protobuf.StringValue value = 1;
267 // Type of a product offer.
268 message ProductTypeInfo {
269 // Value of the type.
270 google.protobuf.StringValue value = 1;
272 // Level of the type.
273 google.ads.googleads.v1.enums.ProductTypeLevelEnum.ProductTypeLevel level = 2;
276 // Criterion for hotel date selection (default dates vs. user selected).
277 message HotelDateSelectionTypeInfo {
278 // Type of the hotel date selection
279 google.ads.googleads.v1.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType type = 1;
282 // Criterion for number of days prior to the stay the booking is being made.
283 message HotelAdvanceBookingWindowInfo {
284 // Low end of the number of days prior to the stay.
285 google.protobuf.Int64Value min_days = 1;
287 // High end of the number of days prior to the stay.
288 google.protobuf.Int64Value max_days = 2;
291 // Criterion for length of hotel stay in nights.
292 message HotelLengthOfStayInfo {
293 // Low end of the number of nights in the stay.
294 google.protobuf.Int64Value min_nights = 1;
296 // High end of the number of nights in the stay.
297 google.protobuf.Int64Value max_nights = 2;
300 // Criterion for day of the week the booking is for.
301 message HotelCheckInDayInfo {
302 // The day of the week.
303 google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1;
306 // Criterion for Interaction Type.
307 message InteractionTypeInfo {
308 // The interaction type.
309 google.ads.googleads.v1.enums.InteractionTypeEnum.InteractionType type = 1;
312 // Represents an AdSchedule criterion.
314 // AdSchedule is specified as the day of the week and a time interval
315 // within which ads will be shown.
317 // No more than six AdSchedules can be added for the same day.
318 message AdScheduleInfo {
319 // Minutes after the start hour at which this schedule starts.
321 // This field is required for CREATE operations and is prohibited on UPDATE
323 google.ads.googleads.v1.enums.MinuteOfHourEnum.MinuteOfHour start_minute = 1;
325 // Minutes after the end hour at which this schedule ends. The schedule is
326 // exclusive of the end minute.
328 // This field is required for CREATE operations and is prohibited on UPDATE
330 google.ads.googleads.v1.enums.MinuteOfHourEnum.MinuteOfHour end_minute = 2;
332 // Starting hour in 24 hour time.
333 // This field must be between 0 and 23, inclusive.
335 // This field is required for CREATE operations and is prohibited on UPDATE
337 google.protobuf.Int32Value start_hour = 3;
339 // Ending hour in 24 hour time; 24 signifies end of the day.
340 // This field must be between 0 and 24, inclusive.
342 // This field is required for CREATE operations and is prohibited on UPDATE
344 google.protobuf.Int32Value end_hour = 4;
346 // Day of the week the schedule applies to.
348 // This field is required for CREATE operations and is prohibited on UPDATE
350 google.ads.googleads.v1.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5;
353 // An age range criterion.
354 message AgeRangeInfo {
355 // Type of the age range.
356 google.ads.googleads.v1.enums.AgeRangeTypeEnum.AgeRangeType type = 1;
359 // A gender criterion.
361 // Type of the gender.
362 google.ads.googleads.v1.enums.GenderTypeEnum.GenderType type = 1;
365 // An income range criterion.
366 message IncomeRangeInfo {
367 // Type of the income range.
368 google.ads.googleads.v1.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1;
371 // A parental status criterion.
372 message ParentalStatusInfo {
373 // Type of the parental status.
374 google.ads.googleads.v1.enums.ParentalStatusTypeEnum.ParentalStatusType type = 1;
377 // A YouTube Video criterion.
378 message YouTubeVideoInfo {
379 // YouTube video id as it appears on the YouTube watch page.
380 google.protobuf.StringValue video_id = 1;
383 // A YouTube Channel criterion.
384 message YouTubeChannelInfo {
385 // The YouTube uploader channel id or the channel code of a YouTube channel.
386 google.protobuf.StringValue channel_id = 1;
389 // A User List criterion. Represents a user list that is defined by the
390 // advertiser to be targeted.
391 message UserListInfo {
392 // The User List resource name.
393 google.protobuf.StringValue user_list = 1;
396 // A Proximity criterion. The geo point and radius determine what geographical
397 // area is included. The address is a description of the geo point that does
398 // not affect ad serving.
400 // There are two ways to create a proximity. First, by setting an address
401 // and radius. The geo point will be automatically computed. Second, by
402 // setting a geo point and radius. The address is an optional label that won't
404 message ProximityInfo {
405 // Latitude and longitude.
406 GeoPointInfo geo_point = 1;
408 // The radius of the proximity.
409 google.protobuf.DoubleValue radius = 2;
411 // The unit of measurement of the radius. Default is KILOMETERS.
412 google.ads.googleads.v1.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits radius_units = 3;
415 AddressInfo address = 4;
418 // Geo point for proximity criterion.
419 message GeoPointInfo {
420 // Micro degrees for the longitude.
421 google.protobuf.Int32Value longitude_in_micro_degrees = 1;
423 // Micro degrees for the latitude.
424 google.protobuf.Int32Value latitude_in_micro_degrees = 2;
427 // Address for proximity criterion.
428 message AddressInfo {
430 google.protobuf.StringValue postal_code = 1;
432 // Province or state code.
433 google.protobuf.StringValue province_code = 2;
436 google.protobuf.StringValue country_code = 3;
438 // Province or state name.
439 google.protobuf.StringValue province_name = 4;
441 // Street address line 1.
442 google.protobuf.StringValue street_address = 5;
444 // Street address line 2. This field is write-only. It is only used for
445 // calculating the longitude and latitude of an address when geo_point is
447 google.protobuf.StringValue street_address2 = 6;
450 google.protobuf.StringValue city_name = 7;
453 // A topic criterion. Use topics to target or exclude placements in the
454 // Google Display Network based on the category into which the placement falls
455 // (for example, "Pets & Animals/Pets/Dogs").
457 // The Topic Constant resource name.
458 google.protobuf.StringValue topic_constant = 1;
460 // The category to target or exclude. Each subsequent element in the array
461 // describes a more specific sub-category. For example,
462 // "Pets & Animals", "Pets", "Dogs" represents the "Pets & Animals/Pets/Dogs"
464 repeated google.protobuf.StringValue path = 2;
467 // A language criterion.
468 message LanguageInfo {
469 // The language constant resource name.
470 google.protobuf.StringValue language_constant = 1;
473 // An IpBlock criterion used for IP exclusions. We allow:
474 // - IPv4 and IPv6 addresses
475 // - individual addresses (192.168.0.1)
476 // - masks for individual addresses (192.168.0.1/32)
477 // - masks for Class C networks (192.168.0.1/24)
478 message IpBlockInfo {
479 // The IP address of this IP block.
480 google.protobuf.StringValue ip_address = 1;
483 // Content Label for category exclusion.
484 message ContentLabelInfo {
485 // Content label type, required for CREATE operations.
486 google.ads.googleads.v1.enums.ContentLabelTypeEnum.ContentLabelType type = 1;
489 // Represents a Carrier Criterion.
490 message CarrierInfo {
491 // The Carrier constant resource name.
492 google.protobuf.StringValue carrier_constant = 1;
495 // Represents a particular interest-based topic to be targeted.
496 message UserInterestInfo {
497 // The UserInterest resource name.
498 google.protobuf.StringValue user_interest_category = 1;
501 // Represents a criterion for targeting webpages of an advertiser's website.
502 message WebpageInfo {
503 // The name of the criterion that is defined by this parameter. The name value
504 // will be used for identifying, sorting and filtering criteria with this type
507 // This field is required for CREATE operations and is prohibited on UPDATE
509 google.protobuf.StringValue criterion_name = 1;
511 // Conditions, or logical expressions, for webpage targeting. The list of
512 // webpage targeting conditions are and-ed together when evaluated
515 // This field is required for CREATE operations and is prohibited on UPDATE
517 repeated WebpageConditionInfo conditions = 2;
520 // Logical expression for targeting webpages of an advertiser's website.
521 message WebpageConditionInfo {
522 // Operand of webpage targeting condition.
523 google.ads.googleads.v1.enums.WebpageConditionOperandEnum.WebpageConditionOperand operand = 1;
525 // Operator of webpage targeting condition.
526 google.ads.googleads.v1.enums.WebpageConditionOperatorEnum.WebpageConditionOperator operator = 2;
528 // Argument of webpage targeting condition.
529 google.protobuf.StringValue argument = 3;
532 // Represents an operating system version to be targeted.
533 message OperatingSystemVersionInfo {
534 // The operating system version constant resource name.
535 google.protobuf.StringValue operating_system_version_constant = 1;
538 // An app payment model criterion.
539 message AppPaymentModelInfo {
540 // Type of the app payment model.
541 google.ads.googleads.v1.enums.AppPaymentModelTypeEnum.AppPaymentModelType type = 1;
544 // A mobile device criterion.
545 message MobileDeviceInfo {
546 // The mobile device constant resource name.
547 google.protobuf.StringValue mobile_device_constant = 1;
550 // A custom affinity criterion.
551 // A criterion of this type is only targetable.
552 message CustomAffinityInfo {
553 // The CustomInterest resource name.
554 google.protobuf.StringValue custom_affinity = 1;
557 // A custom intent criterion.
558 // A criterion of this type is only targetable.
559 message CustomIntentInfo {
560 // The CustomInterest resource name.
561 google.protobuf.StringValue custom_intent = 1;