1 // Copyright 2018 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.v0.common;
20 import "google/ads/googleads/v0/enums/age_range_type.proto";
21 import "google/ads/googleads/v0/enums/app_payment_model_type.proto";
22 import "google/ads/googleads/v0/enums/content_label_type.proto";
23 import "google/ads/googleads/v0/enums/day_of_week.proto";
24 import "google/ads/googleads/v0/enums/device.proto";
25 import "google/ads/googleads/v0/enums/gender_type.proto";
26 import "google/ads/googleads/v0/enums/hotel_date_selection_type.proto";
27 import "google/ads/googleads/v0/enums/income_range_type.proto";
28 import "google/ads/googleads/v0/enums/interaction_type.proto";
29 import "google/ads/googleads/v0/enums/keyword_match_type.proto";
30 import "google/ads/googleads/v0/enums/listing_custom_attribute_index.proto";
31 import "google/ads/googleads/v0/enums/listing_group_type.proto";
32 import "google/ads/googleads/v0/enums/minute_of_hour.proto";
33 import "google/ads/googleads/v0/enums/parental_status_type.proto";
34 import "google/ads/googleads/v0/enums/preferred_content_type.proto";
35 import "google/ads/googleads/v0/enums/product_channel.proto";
36 import "google/ads/googleads/v0/enums/product_channel_exclusivity.proto";
37 import "google/ads/googleads/v0/enums/product_condition.proto";
38 import "google/ads/googleads/v0/enums/product_type_level.proto";
39 import "google/ads/googleads/v0/enums/proximity_radius_units.proto";
40 import "google/ads/googleads/v0/enums/webpage_condition_operand.proto";
41 import "google/ads/googleads/v0/enums/webpage_condition_operator.proto";
42 import "google/protobuf/wrappers.proto";
44 option csharp_namespace = "Google.Ads.GoogleAds.V0.Common";
45 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/common;common";
46 option java_multiple_files = true;
47 option java_outer_classname = "CriteriaProto";
48 option java_package = "com.google.ads.googleads.v0.common";
49 option objc_class_prefix = "GAA";
50 option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Common";
51 option ruby_package = "Google::Ads::GoogleAds::V0::Common";
53 // Proto file describing criteria types.
55 // A keyword criterion.
57 // The text of the keyword (at most 80 characters and 10 words).
58 google.protobuf.StringValue text = 1;
60 // The match type of the keyword.
61 google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType
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 location criterion.
81 message LocationInfo {
82 // The geo target constant resource name.
83 google.protobuf.StringValue geo_target_constant = 1;
86 // A device criterion.
88 // Type of the device.
89 google.ads.googleads.v0.enums.DeviceEnum.Device type = 1;
92 // A preferred content criterion.
93 message PreferredContentInfo {
94 // Type of the preferred content.
95 google.ads.googleads.v0.enums.PreferredContentTypeEnum.PreferredContentType
99 // A listing group criterion.
100 message ListingGroupInfo {
101 // Type of the listing group.
102 google.ads.googleads.v0.enums.ListingGroupTypeEnum.ListingGroupType type = 1;
104 // Dimension value with which this listing group is refining its parent.
105 // Undefined for the root group.
106 ListingDimensionInfo case_value = 2;
108 // Resource name of ad group criterion which is the parent listing group
109 // subdivision. Null for the root group.
110 google.protobuf.StringValue parent_ad_group_criterion = 3;
113 // A listing scope criterion.
114 message ListingScopeInfo {
115 // Scope of the campaign criterion.
116 repeated ListingDimensionInfo dimensions = 2;
119 // Listing dimensions for listing group criterion.
120 message ListingDimensionInfo {
121 // Dimension of one of the types below is always present.
123 // Brand of the listing.
124 ListingBrandInfo listing_brand = 1;
126 // Advertiser-specific hotel ID.
127 HotelIdInfo hotel_id = 2;
129 // Class of the hotel as a number of stars 1 to 5.
130 HotelClassInfo hotel_class = 3;
132 // Country or Region the hotel is located in.
133 HotelCountryRegionInfo hotel_country_region = 4;
135 // State the hotel is located in.
136 HotelStateInfo hotel_state = 5;
138 // City the hotel is located in.
139 HotelCityInfo hotel_city = 6;
141 // Listing custom attribute.
142 ListingCustomAttributeInfo listing_custom_attribute = 7;
144 // Locality of a product offer.
145 ProductChannelInfo product_channel = 8;
147 // Availability of a product offer.
148 ProductChannelExclusivityInfo product_channel_exclusivity = 9;
150 // Condition of a product offer.
151 ProductConditionInfo product_condition = 10;
153 // Id of a product offer.
154 ProductOfferIdInfo product_offer_id = 11;
156 // Type of a product offer.
157 ProductTypeInfo product_type = 12;
161 // Brand of the listing.
162 message ListingBrandInfo {
163 // String value of the listing brand.
164 google.protobuf.StringValue value = 1;
167 // Advertiser-specific hotel ID.
168 message HotelIdInfo {
169 // String value of the hotel ID.
170 google.protobuf.StringValue value = 1;
173 // Class of the hotel as a number of stars 1 to 5.
174 message HotelClassInfo {
175 // Long value of the hotel class.
176 google.protobuf.Int64Value value = 1;
179 // Country or Region the hotel is located in.
180 message HotelCountryRegionInfo {
181 // The Geo Target Constant resource name.
182 google.protobuf.StringValue country_region_criterion = 1;
185 // State the hotel is located in.
186 message HotelStateInfo {
187 // The Geo Target Constant resource name.
188 google.protobuf.StringValue state_criterion = 1;
191 // City the hotel is located in.
192 message HotelCityInfo {
193 // The Geo Target Constant resource name.
194 google.protobuf.StringValue city_criterion = 1;
197 // Listing custom attribute.
198 message ListingCustomAttributeInfo {
199 // String value of the listing custom attribute.
200 google.protobuf.StringValue value = 1;
202 // Indicates the index of the custom attribute.
203 google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum
204 .ListingCustomAttributeIndex index = 2;
207 // Locality of a product offer.
208 message ProductChannelInfo {
209 // Value of the locality.
210 google.ads.googleads.v0.enums.ProductChannelEnum.ProductChannel channel = 1;
213 // Availability of a product offer.
214 message ProductChannelExclusivityInfo {
215 // Value of the availability.
216 google.ads.googleads.v0.enums.ProductChannelExclusivityEnum
217 .ProductChannelExclusivity channel_exclusivity = 1;
220 // Condition of a product offer.
221 message ProductConditionInfo {
222 // Value of the condition.
223 google.ads.googleads.v0.enums.ProductConditionEnum.ProductCondition
227 // Id of a product offer.
228 message ProductOfferIdInfo {
230 google.protobuf.StringValue value = 1;
233 // Type of a product offer.
234 message ProductTypeInfo {
235 // Value of the type.
236 google.protobuf.StringValue value = 1;
238 // Level of the type.
239 google.ads.googleads.v0.enums.ProductTypeLevelEnum.ProductTypeLevel level = 2;
242 // Criterion for hotel date selection (default dates vs. user selected).
243 message HotelDateSelectionTypeInfo {
244 // Type of the hotel date selection
245 google.ads.googleads.v0.enums.HotelDateSelectionTypeEnum
246 .HotelDateSelectionType type = 1;
249 // Criterion for number of days prior to the stay the booking is being made.
250 message HotelAdvanceBookingWindowInfo {
251 // Low end of the number of days prior to the stay.
252 google.protobuf.Int64Value min_days = 1;
254 // High end of the number of days prior to the stay.
255 google.protobuf.Int64Value max_days = 2;
258 // Criterion for length of hotel stay in nights.
259 message HotelLengthOfStayInfo {
260 // Low end of the number of nights in the stay.
261 google.protobuf.Int64Value min_nights = 1;
263 // High end of the number of nights in the stay.
264 google.protobuf.Int64Value max_nights = 2;
267 // Criterion for day of the week the booking is for.
268 message HotelCheckInDayInfo {
269 // The day of the week.
270 google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 1;
273 // Criterion for Interaction Type.
274 message InteractionTypeInfo {
275 // The interaction type.
276 google.ads.googleads.v0.enums.InteractionTypeEnum.InteractionType type = 1;
279 // Represents an AdSchedule criterion.
281 // AdSchedule is specified as the day of the week and a time interval
282 // within which ads will be shown.
284 // No more than six AdSchedules can be added for the same day.
285 message AdScheduleInfo {
286 // Minutes after the start hour at which this schedule starts.
288 // This field is required for CREATE operations and is prohibited on UPDATE
290 google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour start_minute = 1;
292 // Minutes after the end hour at which this schedule ends. The schedule is
293 // exclusive of the end minute.
295 // This field is required for CREATE operations and is prohibited on UPDATE
297 google.ads.googleads.v0.enums.MinuteOfHourEnum.MinuteOfHour end_minute = 2;
299 // Starting hour in 24 hour time.
300 // This field must be between 0 and 23, inclusive.
302 // This field is required for CREATE operations and is prohibited on UPDATE
304 google.protobuf.Int32Value start_hour = 3;
306 // Ending hour in 24 hour time; 24 signifies end of the day.
307 // This field must be between 0 and 24, inclusive.
309 // This field is required for CREATE operations and is prohibited on UPDATE
311 google.protobuf.Int32Value end_hour = 4;
313 // Day of the week the schedule applies to.
315 // This field is required for CREATE operations and is prohibited on UPDATE
317 google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 5;
320 // An age range criterion.
321 message AgeRangeInfo {
322 // Type of the age range.
323 google.ads.googleads.v0.enums.AgeRangeTypeEnum.AgeRangeType type = 1;
326 // A gender criterion.
328 // Type of the gender.
329 google.ads.googleads.v0.enums.GenderTypeEnum.GenderType type = 1;
332 // An income range criterion.
333 message IncomeRangeInfo {
334 // Type of the income range.
335 google.ads.googleads.v0.enums.IncomeRangeTypeEnum.IncomeRangeType type = 1;
338 // A parental status criterion.
339 message ParentalStatusInfo {
340 // Type of the parental status.
341 google.ads.googleads.v0.enums.ParentalStatusTypeEnum.ParentalStatusType type =
345 // A YouTube Video criterion.
346 message YouTubeVideoInfo {
347 // YouTube video id as it appears on the YouTube watch page.
348 google.protobuf.StringValue video_id = 1;
351 // A YouTube Channel criterion.
352 message YouTubeChannelInfo {
353 // The YouTube uploader channel id or the channel code of a YouTube channel.
354 google.protobuf.StringValue channel_id = 1;
357 // A User List criterion. Represents a user list that is defined by the
358 // advertiser to be targeted.
359 message UserListInfo {
360 // The User List resource name.
361 google.protobuf.StringValue user_list = 1;
364 // A Proximity criterion. The geo point and radius determine what geographical
365 // area is included. The address is a description of the geo point that does
366 // not affect ad serving.
368 // There are two ways to create a proximity. First, by setting an address
369 // and radius. The geo point will be automatically computed. Second, by
370 // setting a geo point and radius. The address is an optional label that won't
372 message ProximityInfo {
373 // Latitude and longitude.
374 GeoPointInfo geo_point = 1;
376 // The radius of the proximity.
377 google.protobuf.DoubleValue radius = 2;
379 // The unit of measurement of the radius. Default is KILOMETERS.
380 google.ads.googleads.v0.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits
384 AddressInfo address = 4;
387 // Geo point for proximity criterion.
388 message GeoPointInfo {
389 // Micro degrees for the longitude.
390 google.protobuf.Int32Value longitude_in_micro_degrees = 1;
392 // Micro degrees for the latitude.
393 google.protobuf.Int32Value latitude_in_micro_degrees = 2;
396 // Address for proximity criterion.
397 message AddressInfo {
399 google.protobuf.StringValue postal_code = 1;
401 // Province or state code.
402 google.protobuf.StringValue province_code = 2;
405 google.protobuf.StringValue country_code = 3;
407 // Province or state name.
408 google.protobuf.StringValue province_name = 4;
410 // Street address line 1.
411 google.protobuf.StringValue street_address = 5;
413 // Street address line 2. This field is write-only. It is only used for
414 // calculating the longitude and latitude of an address when geo_point is
416 google.protobuf.StringValue street_address2 = 6;
419 google.protobuf.StringValue city_name = 7;
422 // A topic criterion. Use topics to target or exclude placements in the
423 // Google Display Network based on the category into which the placement falls
424 // (for example, "Pets & Animals/Pets/Dogs").
426 // The Topic Constant resource name.
427 google.protobuf.StringValue topic_constant = 1;
429 // The category to target or exclude. Each subsequent element in the array
430 // describes a more specific sub-category. For example,
431 // "Pets & Animals", "Pets", "Dogs" represents the "Pets & Animals/Pets/Dogs"
433 repeated google.protobuf.StringValue path = 2;
436 // A language criterion.
437 message LanguageInfo {
438 // The language constant resource name.
439 google.protobuf.StringValue language_constant = 1;
442 // An IpBlock criterion used for IP exclusions. We allow:
443 // - IPv4 and IPv6 addresses
444 // - individual addresses (192.168.0.1)
445 // - masks for individual addresses (192.168.0.1/32)
446 // - masks for Class C networks (192.168.0.1/24)
447 message IpBlockInfo {
448 // The IP address of this IP block.
449 google.protobuf.StringValue ip_address = 1;
452 // Content Label for category exclusion.
453 message ContentLabelInfo {
454 // Content label type, required for CREATE operations.
455 google.ads.googleads.v0.enums.ContentLabelTypeEnum.ContentLabelType type = 1;
458 // Represents a Carrier Criterion.
459 message CarrierInfo {
460 // The Carrier constant resource name.
461 google.protobuf.StringValue carrier_constant = 1;
464 // Represents a particular interest-based topic to be targeted.
465 message UserInterestInfo {
466 // The UserInterest resource name.
467 google.protobuf.StringValue user_interest_category = 1;
470 // Represents a criterion for targeting webpages of an advertiser's website.
471 message WebpageInfo {
472 // The name of the criterion that is defined by this parameter. The name value
473 // will be used for identifying, sorting and filtering criteria with this type
476 // This field is required for CREATE operations and is prohibited on UPDATE
478 google.protobuf.StringValue criterion_name = 1;
480 // Conditions, or logical expressions, for webpage targeting. The list of
481 // webpage targeting conditions are and-ed together when evaluated
484 // This field is required for CREATE operations and is prohibited on UPDATE
486 repeated WebpageConditionInfo conditions = 2;
489 // Logical expression for targeting webpages of an advertiser's website.
490 message WebpageConditionInfo {
491 // Operand of webpage targeting condition.
492 google.ads.googleads.v0.enums.WebpageConditionOperandEnum
493 .WebpageConditionOperand operand = 1;
495 // Operator of webpage targeting condition.
496 google.ads.googleads.v0.enums.WebpageConditionOperatorEnum
497 .WebpageConditionOperator
500 // Argument of webpage targeting condition.
501 google.protobuf.StringValue argument = 3;
504 // Represents an operating system version to be targeted.
505 message OperatingSystemVersionInfo {
506 // The operating system version constant resource name.
507 google.protobuf.StringValue operating_system_version_constant = 1;
510 // An app payment model criterion.
511 message AppPaymentModelInfo {
512 // Type of the app payment model.
513 google.ads.googleads.v0.enums.AppPaymentModelTypeEnum.AppPaymentModelType