1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/contentwarehouse/v1/document_service_request.proto 18 19 package com.google.cloud.contentwarehouse.v1; 20 21 public interface SearchDocumentsRequestOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.contentwarehouse.v1.SearchDocumentsRequest) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Required. The parent, which owns this collection of documents. 31 * Format: projects/{project_number}/locations/{location}. 32 * </pre> 33 * 34 * <code> 35 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 36 * </code> 37 * 38 * @return The parent. 39 */ getParent()40 java.lang.String getParent(); 41 /** 42 * 43 * 44 * <pre> 45 * Required. The parent, which owns this collection of documents. 46 * Format: projects/{project_number}/locations/{location}. 47 * </pre> 48 * 49 * <code> 50 * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } 51 * </code> 52 * 53 * @return The bytes for parent. 54 */ getParentBytes()55 com.google.protobuf.ByteString getParentBytes(); 56 57 /** 58 * 59 * 60 * <pre> 61 * The meta information collected about the end user, used to enforce access 62 * control and improve the search quality of the service. 63 * </pre> 64 * 65 * <code>.google.cloud.contentwarehouse.v1.RequestMetadata request_metadata = 3;</code> 66 * 67 * @return Whether the requestMetadata field is set. 68 */ hasRequestMetadata()69 boolean hasRequestMetadata(); 70 /** 71 * 72 * 73 * <pre> 74 * The meta information collected about the end user, used to enforce access 75 * control and improve the search quality of the service. 76 * </pre> 77 * 78 * <code>.google.cloud.contentwarehouse.v1.RequestMetadata request_metadata = 3;</code> 79 * 80 * @return The requestMetadata. 81 */ getRequestMetadata()82 com.google.cloud.contentwarehouse.v1.RequestMetadata getRequestMetadata(); 83 /** 84 * 85 * 86 * <pre> 87 * The meta information collected about the end user, used to enforce access 88 * control and improve the search quality of the service. 89 * </pre> 90 * 91 * <code>.google.cloud.contentwarehouse.v1.RequestMetadata request_metadata = 3;</code> 92 */ getRequestMetadataOrBuilder()93 com.google.cloud.contentwarehouse.v1.RequestMetadataOrBuilder getRequestMetadataOrBuilder(); 94 95 /** 96 * 97 * 98 * <pre> 99 * Query used to search against documents (keyword, filters, etc.). 100 * </pre> 101 * 102 * <code>.google.cloud.contentwarehouse.v1.DocumentQuery document_query = 4;</code> 103 * 104 * @return Whether the documentQuery field is set. 105 */ hasDocumentQuery()106 boolean hasDocumentQuery(); 107 /** 108 * 109 * 110 * <pre> 111 * Query used to search against documents (keyword, filters, etc.). 112 * </pre> 113 * 114 * <code>.google.cloud.contentwarehouse.v1.DocumentQuery document_query = 4;</code> 115 * 116 * @return The documentQuery. 117 */ getDocumentQuery()118 com.google.cloud.contentwarehouse.v1.DocumentQuery getDocumentQuery(); 119 /** 120 * 121 * 122 * <pre> 123 * Query used to search against documents (keyword, filters, etc.). 124 * </pre> 125 * 126 * <code>.google.cloud.contentwarehouse.v1.DocumentQuery document_query = 4;</code> 127 */ getDocumentQueryOrBuilder()128 com.google.cloud.contentwarehouse.v1.DocumentQueryOrBuilder getDocumentQueryOrBuilder(); 129 130 /** 131 * 132 * 133 * <pre> 134 * An integer that specifies the current offset (that is, starting result 135 * location, amongst the documents deemed by the API as relevant) in search 136 * results. This field is only considered if 137 * [page_token][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.page_token] 138 * is unset. 139 * The maximum allowed value is 5000. Otherwise an error is thrown. 140 * For example, 0 means to return results starting from the first matching 141 * document, and 10 means to return from the 11th document. This can be used 142 * for pagination, (for example, pageSize = 10 and offset = 10 means to return 143 * from the second page). 144 * </pre> 145 * 146 * <code>int32 offset = 5;</code> 147 * 148 * @return The offset. 149 */ getOffset()150 int getOffset(); 151 152 /** 153 * 154 * 155 * <pre> 156 * A limit on the number of documents returned in the search results. 157 * Increasing this value above the default value of 10 can increase search 158 * response time. The value can be between 1 and 100. 159 * </pre> 160 * 161 * <code>int32 page_size = 6;</code> 162 * 163 * @return The pageSize. 164 */ getPageSize()165 int getPageSize(); 166 167 /** 168 * 169 * 170 * <pre> 171 * The token specifying the current offset within search results. 172 * See 173 * [SearchDocumentsResponse.next_page_token][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.next_page_token] 174 * for an explanation of how to obtain the next set of query results. 175 * </pre> 176 * 177 * <code>string page_token = 7;</code> 178 * 179 * @return The pageToken. 180 */ getPageToken()181 java.lang.String getPageToken(); 182 /** 183 * 184 * 185 * <pre> 186 * The token specifying the current offset within search results. 187 * See 188 * [SearchDocumentsResponse.next_page_token][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.next_page_token] 189 * for an explanation of how to obtain the next set of query results. 190 * </pre> 191 * 192 * <code>string page_token = 7;</code> 193 * 194 * @return The bytes for pageToken. 195 */ getPageTokenBytes()196 com.google.protobuf.ByteString getPageTokenBytes(); 197 198 /** 199 * 200 * 201 * <pre> 202 * The criteria determining how search results are sorted. For non-empty 203 * query, default is `"relevance desc"`. For empty query, default is 204 * `"upload_date desc"`. 205 * Supported options are: 206 * * `"relevance desc"`: By relevance descending, as determined by the API 207 * algorithms. 208 * * `"upload_date desc"`: By upload date descending. 209 * * `"upload_date"`: By upload date ascending. 210 * * `"update_date desc"`: By last updated date descending. 211 * * `"update_date"`: By last updated date ascending. 212 * * `"retrieval_importance desc"`: By retrieval importance of properties 213 * descending. This feature is still under development, please do not use 214 * unless otherwise instructed to do so. 215 * </pre> 216 * 217 * <code>string order_by = 8;</code> 218 * 219 * @return The orderBy. 220 */ getOrderBy()221 java.lang.String getOrderBy(); 222 /** 223 * 224 * 225 * <pre> 226 * The criteria determining how search results are sorted. For non-empty 227 * query, default is `"relevance desc"`. For empty query, default is 228 * `"upload_date desc"`. 229 * Supported options are: 230 * * `"relevance desc"`: By relevance descending, as determined by the API 231 * algorithms. 232 * * `"upload_date desc"`: By upload date descending. 233 * * `"upload_date"`: By upload date ascending. 234 * * `"update_date desc"`: By last updated date descending. 235 * * `"update_date"`: By last updated date ascending. 236 * * `"retrieval_importance desc"`: By retrieval importance of properties 237 * descending. This feature is still under development, please do not use 238 * unless otherwise instructed to do so. 239 * </pre> 240 * 241 * <code>string order_by = 8;</code> 242 * 243 * @return The bytes for orderBy. 244 */ getOrderByBytes()245 com.google.protobuf.ByteString getOrderByBytes(); 246 247 /** 248 * 249 * 250 * <pre> 251 * An expression specifying a histogram request against matching 252 * documents. Expression syntax is an aggregation function call with 253 * histogram facets and other options. 254 * The following aggregation functions are supported: 255 * * `count(string_histogram_facet)`: Count the number of matching entities 256 * for each distinct attribute value. 257 * Data types: 258 * * Histogram facet (aka filterable properties): Facet names with format 259 * &lt;schema id&gt;.&lt;facet&gt;. Facets will have the 260 * format of: `[a-zA-Z][a-zA-Z0-9_:/-.]`. If the facet is a child 261 * facet, then the parent hierarchy needs to be specified separated by 262 * dots in the prefix after the schema id. Thus, the format for a multi- 263 * level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;. 264 * &lt;child facet name&gt;. Example: 265 * schema123.root_parent_facet.middle_facet.child_facet 266 * * DocumentSchemaId: (with no schema id prefix) to get 267 * histograms for each document type (returns the schema id path, e.g. 268 * projects/12345/locations/us-west/documentSchemas/abc123). 269 * Example expression: 270 * * Document type counts: 271 * count('DocumentSchemaId') 272 * * For schema id, abc123, get the counts for MORTGAGE_TYPE: 273 * count('abc123.MORTGAGE_TYPE') 274 * </pre> 275 * 276 * <code>repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;</code> 277 */ getHistogramQueriesList()278 java.util.List<com.google.cloud.contentwarehouse.v1.HistogramQuery> getHistogramQueriesList(); 279 /** 280 * 281 * 282 * <pre> 283 * An expression specifying a histogram request against matching 284 * documents. Expression syntax is an aggregation function call with 285 * histogram facets and other options. 286 * The following aggregation functions are supported: 287 * * `count(string_histogram_facet)`: Count the number of matching entities 288 * for each distinct attribute value. 289 * Data types: 290 * * Histogram facet (aka filterable properties): Facet names with format 291 * &lt;schema id&gt;.&lt;facet&gt;. Facets will have the 292 * format of: `[a-zA-Z][a-zA-Z0-9_:/-.]`. If the facet is a child 293 * facet, then the parent hierarchy needs to be specified separated by 294 * dots in the prefix after the schema id. Thus, the format for a multi- 295 * level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;. 296 * &lt;child facet name&gt;. Example: 297 * schema123.root_parent_facet.middle_facet.child_facet 298 * * DocumentSchemaId: (with no schema id prefix) to get 299 * histograms for each document type (returns the schema id path, e.g. 300 * projects/12345/locations/us-west/documentSchemas/abc123). 301 * Example expression: 302 * * Document type counts: 303 * count('DocumentSchemaId') 304 * * For schema id, abc123, get the counts for MORTGAGE_TYPE: 305 * count('abc123.MORTGAGE_TYPE') 306 * </pre> 307 * 308 * <code>repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;</code> 309 */ getHistogramQueries(int index)310 com.google.cloud.contentwarehouse.v1.HistogramQuery getHistogramQueries(int index); 311 /** 312 * 313 * 314 * <pre> 315 * An expression specifying a histogram request against matching 316 * documents. Expression syntax is an aggregation function call with 317 * histogram facets and other options. 318 * The following aggregation functions are supported: 319 * * `count(string_histogram_facet)`: Count the number of matching entities 320 * for each distinct attribute value. 321 * Data types: 322 * * Histogram facet (aka filterable properties): Facet names with format 323 * &lt;schema id&gt;.&lt;facet&gt;. Facets will have the 324 * format of: `[a-zA-Z][a-zA-Z0-9_:/-.]`. If the facet is a child 325 * facet, then the parent hierarchy needs to be specified separated by 326 * dots in the prefix after the schema id. Thus, the format for a multi- 327 * level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;. 328 * &lt;child facet name&gt;. Example: 329 * schema123.root_parent_facet.middle_facet.child_facet 330 * * DocumentSchemaId: (with no schema id prefix) to get 331 * histograms for each document type (returns the schema id path, e.g. 332 * projects/12345/locations/us-west/documentSchemas/abc123). 333 * Example expression: 334 * * Document type counts: 335 * count('DocumentSchemaId') 336 * * For schema id, abc123, get the counts for MORTGAGE_TYPE: 337 * count('abc123.MORTGAGE_TYPE') 338 * </pre> 339 * 340 * <code>repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;</code> 341 */ getHistogramQueriesCount()342 int getHistogramQueriesCount(); 343 /** 344 * 345 * 346 * <pre> 347 * An expression specifying a histogram request against matching 348 * documents. Expression syntax is an aggregation function call with 349 * histogram facets and other options. 350 * The following aggregation functions are supported: 351 * * `count(string_histogram_facet)`: Count the number of matching entities 352 * for each distinct attribute value. 353 * Data types: 354 * * Histogram facet (aka filterable properties): Facet names with format 355 * &lt;schema id&gt;.&lt;facet&gt;. Facets will have the 356 * format of: `[a-zA-Z][a-zA-Z0-9_:/-.]`. If the facet is a child 357 * facet, then the parent hierarchy needs to be specified separated by 358 * dots in the prefix after the schema id. Thus, the format for a multi- 359 * level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;. 360 * &lt;child facet name&gt;. Example: 361 * schema123.root_parent_facet.middle_facet.child_facet 362 * * DocumentSchemaId: (with no schema id prefix) to get 363 * histograms for each document type (returns the schema id path, e.g. 364 * projects/12345/locations/us-west/documentSchemas/abc123). 365 * Example expression: 366 * * Document type counts: 367 * count('DocumentSchemaId') 368 * * For schema id, abc123, get the counts for MORTGAGE_TYPE: 369 * count('abc123.MORTGAGE_TYPE') 370 * </pre> 371 * 372 * <code>repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;</code> 373 */ 374 java.util.List<? extends com.google.cloud.contentwarehouse.v1.HistogramQueryOrBuilder> getHistogramQueriesOrBuilderList()375 getHistogramQueriesOrBuilderList(); 376 /** 377 * 378 * 379 * <pre> 380 * An expression specifying a histogram request against matching 381 * documents. Expression syntax is an aggregation function call with 382 * histogram facets and other options. 383 * The following aggregation functions are supported: 384 * * `count(string_histogram_facet)`: Count the number of matching entities 385 * for each distinct attribute value. 386 * Data types: 387 * * Histogram facet (aka filterable properties): Facet names with format 388 * &lt;schema id&gt;.&lt;facet&gt;. Facets will have the 389 * format of: `[a-zA-Z][a-zA-Z0-9_:/-.]`. If the facet is a child 390 * facet, then the parent hierarchy needs to be specified separated by 391 * dots in the prefix after the schema id. Thus, the format for a multi- 392 * level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;. 393 * &lt;child facet name&gt;. Example: 394 * schema123.root_parent_facet.middle_facet.child_facet 395 * * DocumentSchemaId: (with no schema id prefix) to get 396 * histograms for each document type (returns the schema id path, e.g. 397 * projects/12345/locations/us-west/documentSchemas/abc123). 398 * Example expression: 399 * * Document type counts: 400 * count('DocumentSchemaId') 401 * * For schema id, abc123, get the counts for MORTGAGE_TYPE: 402 * count('abc123.MORTGAGE_TYPE') 403 * </pre> 404 * 405 * <code>repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;</code> 406 */ getHistogramQueriesOrBuilder( int index)407 com.google.cloud.contentwarehouse.v1.HistogramQueryOrBuilder getHistogramQueriesOrBuilder( 408 int index); 409 410 /** 411 * 412 * 413 * <pre> 414 * Controls if the search document request requires the return of a total size 415 * of matched documents. See 416 * [SearchDocumentsResponse.total_size][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.total_size]. 417 * Enabling this flag may adversely impact performance. Hint: If this is 418 * used with pagination, set this flag on the initial query but set this 419 * to false on subsequent page calls (keep the total count locally). 420 * Defaults to false. 421 * </pre> 422 * 423 * <code>bool require_total_size = 10;</code> 424 * 425 * @return The requireTotalSize. 426 */ getRequireTotalSize()427 boolean getRequireTotalSize(); 428 429 /** 430 * 431 * 432 * <pre> 433 * Controls if the search document request requires the return of a total size 434 * of matched documents. See 435 * [SearchDocumentsResponse.total_size][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.total_size]. 436 * </pre> 437 * 438 * <code> 439 * .google.cloud.contentwarehouse.v1.SearchDocumentsRequest.TotalResultSize total_result_size = 12; 440 * </code> 441 * 442 * @return The enum numeric value on the wire for totalResultSize. 443 */ getTotalResultSizeValue()444 int getTotalResultSizeValue(); 445 /** 446 * 447 * 448 * <pre> 449 * Controls if the search document request requires the return of a total size 450 * of matched documents. See 451 * [SearchDocumentsResponse.total_size][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.total_size]. 452 * </pre> 453 * 454 * <code> 455 * .google.cloud.contentwarehouse.v1.SearchDocumentsRequest.TotalResultSize total_result_size = 12; 456 * </code> 457 * 458 * @return The totalResultSize. 459 */ getTotalResultSize()460 com.google.cloud.contentwarehouse.v1.SearchDocumentsRequest.TotalResultSize getTotalResultSize(); 461 462 /** 463 * 464 * 465 * <pre> 466 * Experimental, do not use. 467 * The limit on the number of documents returned for the question-answering 468 * feature. To enable the question-answering feature, set 469 * [DocumentQuery].[is_nl_query][] to true. 470 * </pre> 471 * 472 * <code>int32 qa_size_limit = 11;</code> 473 * 474 * @return The qaSizeLimit. 475 */ getQaSizeLimit()476 int getQaSizeLimit(); 477 } 478