|
30 | 30 | @SuppressWarnings("javadoc") |
31 | 31 | public final class AnswerQueryRequest extends com.google.api.client.json.GenericJson { |
32 | 32 |
|
| 33 | + /** |
| 34 | + * Optional. Applies a strict filter to the search results used to ground the answer. The |
| 35 | + * expression supports a subset of the syntax described at https://google.aip.dev/160. Supported |
| 36 | + * fields for filtering: * `content_length_bytes` (INTEGER): The length of the `Document.content` |
| 37 | + * field in bytes. * `data_source` (STRING): The source of the document, e.g. |
| 38 | + * `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference |
| 39 | + * for the complete list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp |
| 40 | + * of when the document was last meaningfully updated. A meaningful update is one that changes |
| 41 | + * document's markdown content or metadata. * `uri` (STRING): The document URI, e.g. |
| 42 | + * `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields support `=`, `<`, `<=`, |
| 43 | + * `>`, and `>=` operators. STRING fields support `=` (equals) and `!=` (not equals) operators for |
| 44 | + * **exact match** on the whole string. Partial match, prefix match, and regexp match are not |
| 45 | + * supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. Timestamps must be |
| 46 | + * in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. You can combine expressions using `AND`, |
| 47 | + * `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence than `AND`. Use |
| 48 | + * parentheses for explicit precedence grouping. Examples: * Filter by |
| 49 | + * `Document.content_length_bytes`: `content_length_bytes < 50000` * `data_source = |
| 50 | + * "docs.cloud.google.com" OR data_source = "firebase.google.com"` * `data_source != |
| 51 | + * "firebase.google.com"` * `update_time < "2024-01-01T00:00:00Z"` * `update_time >= |
| 52 | + * "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")` * |
| 53 | + * `uri = "https://docs.cloud.google.com/release-notes"` The `filter` string must not exceed 500 |
| 54 | + * characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error. |
| 55 | + * The value may be {@code null}. |
| 56 | + */ |
| 57 | + @com.google.api.client.util.Key |
| 58 | + private java.lang.String filter; |
| 59 | + |
33 | 60 | /** |
34 | 61 | * Required. The query to answer. |
35 | 62 | * The value may be {@code null}. |
36 | 63 | */ |
37 | 64 | @com.google.api.client.util.Key |
38 | 65 | private java.lang.String query; |
39 | 66 |
|
| 67 | + /** |
| 68 | + * Optional. Applies a strict filter to the search results used to ground the answer. The |
| 69 | + * expression supports a subset of the syntax described at https://google.aip.dev/160. Supported |
| 70 | + * fields for filtering: * `content_length_bytes` (INTEGER): The length of the `Document.content` |
| 71 | + * field in bytes. * `data_source` (STRING): The source of the document, e.g. |
| 72 | + * `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference |
| 73 | + * for the complete list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp |
| 74 | + * of when the document was last meaningfully updated. A meaningful update is one that changes |
| 75 | + * document's markdown content or metadata. * `uri` (STRING): The document URI, e.g. |
| 76 | + * `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields support `=`, `<`, `<=`, |
| 77 | + * `>`, and `>=` operators. STRING fields support `=` (equals) and `!=` (not equals) operators for |
| 78 | + * **exact match** on the whole string. Partial match, prefix match, and regexp match are not |
| 79 | + * supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. Timestamps must be |
| 80 | + * in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. You can combine expressions using `AND`, |
| 81 | + * `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence than `AND`. Use |
| 82 | + * parentheses for explicit precedence grouping. Examples: * Filter by |
| 83 | + * `Document.content_length_bytes`: `content_length_bytes < 50000` * `data_source = |
| 84 | + * "docs.cloud.google.com" OR data_source = "firebase.google.com"` * `data_source != |
| 85 | + * "firebase.google.com"` * `update_time < "2024-01-01T00:00:00Z"` * `update_time >= |
| 86 | + * "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")` * |
| 87 | + * `uri = "https://docs.cloud.google.com/release-notes"` The `filter` string must not exceed 500 |
| 88 | + * characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error. |
| 89 | + * @return value or {@code null} for none |
| 90 | + */ |
| 91 | + public java.lang.String getFilter() { |
| 92 | + return filter; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Optional. Applies a strict filter to the search results used to ground the answer. The |
| 97 | + * expression supports a subset of the syntax described at https://google.aip.dev/160. Supported |
| 98 | + * fields for filtering: * `content_length_bytes` (INTEGER): The length of the `Document.content` |
| 99 | + * field in bytes. * `data_source` (STRING): The source of the document, e.g. |
| 100 | + * `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference |
| 101 | + * for the complete list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp |
| 102 | + * of when the document was last meaningfully updated. A meaningful update is one that changes |
| 103 | + * document's markdown content or metadata. * `uri` (STRING): The document URI, e.g. |
| 104 | + * `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields support `=`, `<`, `<=`, |
| 105 | + * `>`, and `>=` operators. STRING fields support `=` (equals) and `!=` (not equals) operators for |
| 106 | + * **exact match** on the whole string. Partial match, prefix match, and regexp match are not |
| 107 | + * supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators. Timestamps must be |
| 108 | + * in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`. You can combine expressions using `AND`, |
| 109 | + * `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence than `AND`. Use |
| 110 | + * parentheses for explicit precedence grouping. Examples: * Filter by |
| 111 | + * `Document.content_length_bytes`: `content_length_bytes < 50000` * `data_source = |
| 112 | + * "docs.cloud.google.com" OR data_source = "firebase.google.com"` * `data_source != |
| 113 | + * "firebase.google.com"` * `update_time < "2024-01-01T00:00:00Z"` * `update_time >= |
| 114 | + * "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")` * |
| 115 | + * `uri = "https://docs.cloud.google.com/release-notes"` The `filter` string must not exceed 500 |
| 116 | + * characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error. |
| 117 | + * @param filter filter or {@code null} for none |
| 118 | + */ |
| 119 | + public AnswerQueryRequest setFilter(java.lang.String filter) { |
| 120 | + this.filter = filter; |
| 121 | + return this; |
| 122 | + } |
| 123 | + |
40 | 124 | /** |
41 | 125 | * Required. The query to answer. |
42 | 126 | * @return value or {@code null} for none |
|
0 commit comments