query_error.proto 7.3 KB

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