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.errors; 18 19option csharp_namespace = "Google.Ads.GoogleAds.V14.Errors"; 20option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/errors;errors"; 21option java_multiple_files = true; 22option java_outer_classname = "QueryErrorProto"; 23option java_package = "com.google.ads.googleads.v14.errors"; 24option objc_class_prefix = "GAA"; 25option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Errors"; 26option ruby_package = "Google::Ads::GoogleAds::V14::Errors"; 27 28// Proto file describing query errors. 29 30// Container for enum describing possible query errors. 31message QueryErrorEnum { 32 // Enum describing possible query errors. 33 enum QueryError { 34 // Name unspecified. 35 UNSPECIFIED = 0; 36 37 // The received error code is not known in this version. 38 UNKNOWN = 1; 39 40 // Returned if all other query error reasons are not applicable. 41 QUERY_ERROR = 50; 42 43 // A condition used in the query references an invalid enum constant. 44 BAD_ENUM_CONSTANT = 18; 45 46 // Query contains an invalid escape sequence. 47 BAD_ESCAPE_SEQUENCE = 7; 48 49 // Field name is invalid. 50 BAD_FIELD_NAME = 12; 51 52 // Limit value is invalid (for example, not a number) 53 BAD_LIMIT_VALUE = 15; 54 55 // Encountered number can not be parsed. 56 BAD_NUMBER = 5; 57 58 // Invalid operator encountered. 59 BAD_OPERATOR = 3; 60 61 // Parameter unknown or not supported. 62 BAD_PARAMETER_NAME = 61; 63 64 // Parameter have invalid value. 65 BAD_PARAMETER_VALUE = 62; 66 67 // Invalid resource type was specified in the FROM clause. 68 BAD_RESOURCE_TYPE_IN_FROM_CLAUSE = 45; 69 70 // Non-ASCII symbol encountered outside of strings. 71 BAD_SYMBOL = 2; 72 73 // Value is invalid. 74 BAD_VALUE = 4; 75 76 // Date filters fail to restrict date to a range smaller than 31 days. 77 // Applicable if the query is segmented by date. 78 DATE_RANGE_TOO_WIDE = 36; 79 80 // Filters on date/week/month/quarter have a start date after 81 // end date. 82 DATE_RANGE_TOO_NARROW = 60; 83 84 // Expected AND between values with BETWEEN operator. 85 EXPECTED_AND = 30; 86 87 // Expecting ORDER BY to have BY. 88 EXPECTED_BY = 14; 89 90 // There was no dimension field selected. 91 EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE = 37; 92 93 // Missing filters on date related fields. 94 EXPECTED_FILTERS_ON_DATE_RANGE = 55; 95 96 // Missing FROM clause. 97 EXPECTED_FROM = 44; 98 99 // The operator used in the conditions requires the value to be a list. 100 EXPECTED_LIST = 41; 101 102 // Fields used in WHERE or ORDER BY clauses are missing from the SELECT 103 // clause. 104 EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE = 16; 105 106 // SELECT is missing at the beginning of query. 107 EXPECTED_SELECT = 13; 108 109 // A list was passed as a value to a condition whose operator expects a 110 // single value. 111 EXPECTED_SINGLE_VALUE = 42; 112 113 // Missing one or both values with BETWEEN operator. 114 EXPECTED_VALUE_WITH_BETWEEN_OPERATOR = 29; 115 116 // Invalid date format. Expected 'YYYY-MM-DD'. 117 INVALID_DATE_FORMAT = 38; 118 119 // Misaligned date value for the filter. The date should be the start of a 120 // week/month/quarter if the filtered field is 121 // segments.week/segments.month/segments.quarter. 122 MISALIGNED_DATE_FOR_FILTER = 64; 123 124 // Value passed was not a string when it should have been. For example, it 125 // was a number or unquoted literal. 126 INVALID_STRING_VALUE = 57; 127 128 // A String value passed to the BETWEEN operator does not parse as a date. 129 INVALID_VALUE_WITH_BETWEEN_OPERATOR = 26; 130 131 // The value passed to the DURING operator is not a Date range literal 132 INVALID_VALUE_WITH_DURING_OPERATOR = 22; 133 134 // An invalid value was passed to the LIKE operator. 135 INVALID_VALUE_WITH_LIKE_OPERATOR = 56; 136 137 // An operator was provided that is inapplicable to the field being 138 // filtered. 139 OPERATOR_FIELD_MISMATCH = 35; 140 141 // A Condition was found with an empty list. 142 PROHIBITED_EMPTY_LIST_IN_CONDITION = 28; 143 144 // A condition used in the query references an unsupported enum constant. 145 PROHIBITED_ENUM_CONSTANT = 54; 146 147 // Fields that are not allowed to be selected together were included in 148 // the SELECT clause. 149 PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE = 31; 150 151 // A field that is not orderable was included in the ORDER BY clause. 152 PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE = 40; 153 154 // A field that is not selectable was included in the SELECT clause. 155 PROHIBITED_FIELD_IN_SELECT_CLAUSE = 23; 156 157 // A field that is not filterable was included in the WHERE clause. 158 PROHIBITED_FIELD_IN_WHERE_CLAUSE = 24; 159 160 // Resource type specified in the FROM clause is not supported by this 161 // service. 162 PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE = 43; 163 164 // A field that comes from an incompatible resource was included in the 165 // SELECT clause. 166 PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE = 48; 167 168 // A field that comes from an incompatible resource was included in the 169 // WHERE clause. 170 PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE = 58; 171 172 // A metric incompatible with the main resource or other selected 173 // segmenting resources was included in the SELECT or WHERE clause. 174 PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 49; 175 176 // A segment incompatible with the main resource or other selected 177 // segmenting resources was included in the SELECT or WHERE clause. 178 PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE = 51; 179 180 // A segment in the SELECT clause is incompatible with a metric in the 181 // SELECT or WHERE clause. 182 PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 53; 183 184 // The value passed to the limit clause is too low. 185 LIMIT_VALUE_TOO_LOW = 25; 186 187 // Query has a string containing a newline character. 188 PROHIBITED_NEWLINE_IN_STRING = 8; 189 190 // List contains values of different types. 191 PROHIBITED_VALUE_COMBINATION_IN_LIST = 10; 192 193 // The values passed to the BETWEEN operator are not of the same type. 194 PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR = 21; 195 196 // Query contains unterminated string. 197 STRING_NOT_TERMINATED = 6; 198 199 // Too many segments are specified in SELECT clause. 200 TOO_MANY_SEGMENTS = 34; 201 202 // Query is incomplete and cannot be parsed. 203 UNEXPECTED_END_OF_QUERY = 9; 204 205 // FROM clause cannot be specified in this query. 206 UNEXPECTED_FROM_CLAUSE = 47; 207 208 // Query contains one or more unrecognized fields. 209 UNRECOGNIZED_FIELD = 32; 210 211 // Query has an unexpected extra part. 212 UNEXPECTED_INPUT = 11; 213 214 // Metrics cannot be requested for a manager account. To retrieve metrics, 215 // issue separate requests against each client account under the manager 216 // account. 217 REQUESTED_METRICS_FOR_MANAGER = 59; 218 219 // The number of values (right-hand-side operands) in a filter exceeds the 220 // limit. 221 FILTER_HAS_TOO_MANY_VALUES = 63; 222 } 223} 224