// 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
//
//     http://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.


// Proto file describing criterion errors.
syntax = "proto3";

package google.ads.googleads.v0.errors;

option java_package = "com.google.ads.googleads.v0.errors";
option java_outer_classname = "CriterionErrorProto";
option java_multiple_files = true;

// Objective-C prefix. Google Ads API.
option objc_class_prefix = "GAA";
option csharp_namespace = "Google.Ads.GoogleAds.V0.Errors";
option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";
option php_metadata_namespace = "Google\\Ads\\GoogleAds\\V0\\Errors";

// Container for enum describing possible criterion errors.
message CriterionErrorEnum {

  // Enum describing possible criterion errors.
  enum CriterionError {
    // Enum unspecified.
    UNSPECIFIED = 0;
    // The received error code is not known in this version.
    UNKNOWN = 1;
    // Concrete type of criterion is required for CREATE and UPDATE operations.
    CONCRETE_TYPE_REQUIRED = 2;
    // The category requested for exclusion is invalid.
    INVALID_EXCLUDED_CATEGORY = 3;
    // Invalid keyword criteria text.
    INVALID_KEYWORD_TEXT = 4;
    // Keyword text should be less than 80 chars.
    KEYWORD_TEXT_TOO_LONG = 5;
    // Keyword text has too many words.
    KEYWORD_HAS_TOO_MANY_WORDS = 6;
    // Keyword text has invalid characters or symbols.
    KEYWORD_HAS_INVALID_CHARS = 7;
    // Invalid placement URL.
    INVALID_PLACEMENT_URL = 8;
    // Invalid user list criterion.
    INVALID_USER_LIST = 9;
    // Invalid user interest criterion.
    INVALID_USER_INTEREST = 10;
    // Placement URL has wrong format.
    INVALID_FORMAT_FOR_PLACEMENT_URL = 11;
    // Placement URL is too long.
    PLACEMENT_URL_IS_TOO_LONG = 12;
    // Indicates the URL contains an illegal character.
    PLACEMENT_URL_HAS_ILLEGAL_CHAR = 13;
    // Indicates the URL contains multiple comma separated URLs.
    PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 14;
    // Indicates the domain is blacklisted.
    PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 15;
    // Invalid vertical path.
    INVALID_VERTICAL_PATH = 16;
    // The YouTube Channel Id is invalid.
    INVALID_YOUTUBE_CHANNEL_ID = 17;
    // The YouTube Video Id is invalid.
    INVALID_YOUTUBE_VIDEO_ID = 18;
    // Indicates the placement is a YouTube vertical channel, which is no longer
    // supported.
    YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 19;
    // Indicates the placement is a YouTube demographic channel, which is no
    // longer supported.
    YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 20;
    // YouTube urls are not supported in Placement criterion. Use YouTubeChannel
    // and YouTubeVideo criterion instead.
    YOUTUBE_URL_UNSUPPORTED = 21;
    // Criteria type can not be excluded by the customer, like AOL account type
    // cannot target site type criteria.
    CANNOT_EXCLUDE_CRITERIA_TYPE = 22;
    // Criteria type can not be targeted.
    CANNOT_ADD_CRITERIA_TYPE = 23;
    // Product filter in the product criteria has invalid characters. Operand
    // and the argument in the filter can not have "==" or "&+".
    INVALID_PRODUCT_FILTER = 24;
    // Product filter in the product criteria is translated to a string as
    // operand1==argument1&+operand2==argument2, maximum allowed length for the
    // string is 255 chars.
    PRODUCT_FILTER_TOO_LONG = 25;
    // Not allowed to exclude similar user list.
    CANNOT_EXCLUDE_SIMILAR_USER_LIST = 26;
    // Not allowed to target a closed user list.
    CANNOT_ADD_CLOSED_USER_LIST = 27;
    // Not allowed to add display only UserLists to search only campaigns.
    CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 28;
    // Not allowed to add display only UserLists to search plus campaigns.
    CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 29;
    // Not allowed to add display only UserLists to shopping campaigns.
    CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 30;
    // Not allowed to add User interests to search only campaigns.
    CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 31;
    // Not allowed to set bids for this criterion type in search campaigns
    CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 32;
    // Final URLs, URL Templates and CustomParameters cannot be set for the
    // criterion types of Gender, AgeRange, UserList, Placement, MobileApp, and
    // MobileAppCategory in search campaigns and shopping campaigns.
    CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 33;
    // IP address is not valid.
    INVALID_IP_ADDRESS = 34;
    // IP format is not valid.
    INVALID_IP_FORMAT = 35;
    // Mobile application is not valid.
    INVALID_MOBILE_APP = 36;
    // Mobile application category is not valid.
    INVALID_MOBILE_APP_CATEGORY = 37;
    // The CriterionId does not exist or is of the incorrect type.
    INVALID_CRITERION_ID = 38;
    // The Criterion is not allowed to be targeted.
    CANNOT_TARGET_CRITERION = 39;
    // The criterion is not allowed to be targeted as it is deprecated.
    CANNOT_TARGET_OBSOLETE_CRITERION = 40;
    // The CriterionId is not valid for the type.
    CRITERION_ID_AND_TYPE_MISMATCH = 41;
    // Distance for the radius for the proximity criterion is invalid.
    INVALID_PROXIMITY_RADIUS = 42;
    // Units for the distance for the radius for the proximity criterion is
    // invalid.
    INVALID_PROXIMITY_RADIUS_UNITS = 43;
    // Street address is too short.
    INVALID_STREETADDRESS_LENGTH = 44;
    // City name in the address is too short.
    INVALID_CITYNAME_LENGTH = 45;
    // Region code in the address is too short.
    INVALID_REGIONCODE_LENGTH = 46;
    // Region name in the address is not valid.
    INVALID_REGIONNAME_LENGTH = 47;
    // Postal code in the address is not valid.
    INVALID_POSTALCODE_LENGTH = 48;
    // Country code in the address is not valid.
    INVALID_COUNTRY_CODE = 49;
    // Latitude for the GeoPoint is not valid.
    INVALID_LATITUDE = 50;
    // Longitude for the GeoPoint is not valid.
    INVALID_LONGITUDE = 51;
    // The Proximity input is not valid. Both address and geoPoint cannot be
    // null.
    PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 52;
    // The Proximity address cannot be geocoded to a valid lat/long.
    INVALID_PROXIMITY_ADDRESS = 53;
    // User domain name is not valid.
    INVALID_USER_DOMAIN_NAME = 54;
    // Length of serialized criterion parameter exceeded size limit.
    CRITERION_PARAMETER_TOO_LONG = 55;
    // Time interval in the AdSchedule overlaps with another AdSchedule.
    AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 56;
    // AdSchedule time interval cannot span multiple days.
    AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 57;
    // AdSchedule time interval specified is invalid, endTime cannot be earlier
    // than startTime.
    AD_SCHEDULE_INVALID_TIME_INTERVAL = 58;
    // The number of AdSchedule entries in a day exceeds the limit.
    AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 59;
    // CriteriaId does not match the interval of the AdSchedule specified.
    AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 60;
    // Cannot set bid modifier for this criterion type.
    CANNOT_BID_MODIFY_CRITERION_TYPE = 61;
    // Cannot bid modify criterion, since it is opted out of the campaign.
    CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 62;
    // Cannot set bid modifier for a negative criterion.
    CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 63;
    // Bid Modifier already exists. Use SET operation to update.
    BID_MODIFIER_ALREADY_EXISTS = 64;
    // Feed Id is not allowed in these Location Groups.
    FEED_ID_NOT_ALLOWED = 65;
    // The account may not use the requested criteria type. For example, some
    // accounts are restricted to keywords only.
    ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 66;
    // The requested criteria type cannot be used with campaign or ad group
    // bidding strategy.
    CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 67;
    // The Criterion is not allowed to be excluded.
    CANNOT_EXCLUDE_CRITERION = 68;
    // The criterion is not allowed to be removed. For example, we cannot remove
    // any of the platform criterion.
    CANNOT_REMOVE_CRITERION = 69;
    // The combined length of product dimension values of the product scope
    // criterion is too long.
    PRODUCT_SCOPE_TOO_LONG = 70;
    // Product scope contains too many dimensions.
    PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 71;
    // The combined length of product dimension values of the product partition
    // criterion is too long.
    PRODUCT_PARTITION_TOO_LONG = 72;
    // Product partition contains too many dimensions.
    PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 73;
    // The product dimension is invalid (e.g. dimension contains illegal value,
    // dimension type is represented with wrong class, etc). Product dimension
    // value can not contain "==" or "&+".
    INVALID_PRODUCT_DIMENSION = 74;
    // Product dimension type is either invalid for campaigns of this type or
    // cannot be used in the current context. BIDDING_CATEGORY_Lx and
    // PRODUCT_TYPE_Lx product dimensions must be used in ascending order of
    // their levels: L1, L2, L3, L4, L5... The levels must be specified
    // sequentially and start from L1. Furthermore, an "others" product
    // partition cannot be subdivided with a dimension of the same type but of a
    // higher level ("others" BIDDING_CATEGORY_L3 can be subdivided with BRAND
    // but not with BIDDING_CATEGORY_L4).
    INVALID_PRODUCT_DIMENSION_TYPE = 75;
    // Bidding categories do not form a valid path in the Shopping bidding
    // category taxonomy.
    INVALID_PRODUCT_BIDDING_CATEGORY = 76;
    // ShoppingSetting must be added to the campaign before ProductScope
    // criteria can be added.
    MISSING_SHOPPING_SETTING = 77;
    // Matching function is invalid.
    INVALID_MATCHING_FUNCTION = 78;
    // Filter parameters not allowed for location groups targeting.
    LOCATION_FILTER_NOT_ALLOWED = 79;
    // Given location filter parameter is invalid for location groups targeting.
    LOCATION_FILTER_INVALID = 80;
    // Criteria type cannot be associated with a campaign and its ad group(s)
    // simultaneously.
    CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 81;
    // Range represented by hotel length of stay's min nights and max nights
    // overlaps with an existing criterion.
    HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION = 82;
    // Range represented by hotel advance booking window's min days and max days
    // overlaps with an existing criterion.
    HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION = 83;
    // The field is not allowed to be set when the negative field is set to
    // true, e.g. we don't allow bids in negative ad group or campaign criteria.
    FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING = 84;
  }
}
