/*
 * Copyright 2020 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/contentwarehouse/v1/filters.proto

package com.google.cloud.contentwarehouse.v1;

public interface DocumentQueryOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.contentwarehouse.v1.DocumentQuery)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   * <pre>
   * The query string that matches against the full text of the document and
   * the searchable properties.
   * The query partially supports [Google AIP style
   * syntax](https://google.aip.dev/160). Specifically, the query supports
   * literals, logical operators, negation operators, comparison operators, and
   * functions.
   * Literals: A bare literal value (examples: "42", "Hugo") is a value to be
   * matched against. It searches over the full text of the document and the
   * searchable properties.
   * Logical operators: "AND", "and", "OR", and "or" are binary logical
   * operators (example: "engineer OR developer").
   * Negation operators: "NOT" and "!" are negation operators (example: "NOT
   * software").
   * Comparison operators: support the binary comparison operators =, !=, &lt;, &gt;,
   * &lt;= and &gt;= for string, numeric, enum, boolean. Also support like operator
   * `~~` for string. It provides semantic search functionality by parsing,
   * stemming and doing synonyms expansion against the input query.
   * To specify a property in the query, the left hand side expression in the
   * comparison must be the property ID including the parent. The right hand
   * side must be literals. For example:
   * "&#92;"projects/123/locations/us&#92;".property_a &lt; 1" matches results whose
   * "property_a" is less than 1 in project 123 and us location.
   * The literals and comparison expression can be connected in a single query
   * (example: "software engineer &#92;"projects/123/locations/us&#92;".salary &gt; 100").
   * Functions: supported functions are `LOWER([property_name])` to perform a
   * case insensitive match and `EMPTY([property_name])` to filter on the
   * existence of a key.
   * Support nested expressions connected using parenthesis and logical
   * operators. The default logical operators is `AND` if there is no operators
   * between expressions.
   * The query can be used with other filters e.g. `time_filters` and
   * `folder_name_filter`. They are connected with `AND` operator under the
   * hood.
   * The maximum number of allowed characters is 255.
   * </pre>
   *
   * <code>string query = 1;</code>
   *
   * @return The query.
   */
  java.lang.String getQuery();
  /**
   *
   *
   * <pre>
   * The query string that matches against the full text of the document and
   * the searchable properties.
   * The query partially supports [Google AIP style
   * syntax](https://google.aip.dev/160). Specifically, the query supports
   * literals, logical operators, negation operators, comparison operators, and
   * functions.
   * Literals: A bare literal value (examples: "42", "Hugo") is a value to be
   * matched against. It searches over the full text of the document and the
   * searchable properties.
   * Logical operators: "AND", "and", "OR", and "or" are binary logical
   * operators (example: "engineer OR developer").
   * Negation operators: "NOT" and "!" are negation operators (example: "NOT
   * software").
   * Comparison operators: support the binary comparison operators =, !=, &lt;, &gt;,
   * &lt;= and &gt;= for string, numeric, enum, boolean. Also support like operator
   * `~~` for string. It provides semantic search functionality by parsing,
   * stemming and doing synonyms expansion against the input query.
   * To specify a property in the query, the left hand side expression in the
   * comparison must be the property ID including the parent. The right hand
   * side must be literals. For example:
   * "&#92;"projects/123/locations/us&#92;".property_a &lt; 1" matches results whose
   * "property_a" is less than 1 in project 123 and us location.
   * The literals and comparison expression can be connected in a single query
   * (example: "software engineer &#92;"projects/123/locations/us&#92;".salary &gt; 100").
   * Functions: supported functions are `LOWER([property_name])` to perform a
   * case insensitive match and `EMPTY([property_name])` to filter on the
   * existence of a key.
   * Support nested expressions connected using parenthesis and logical
   * operators. The default logical operators is `AND` if there is no operators
   * between expressions.
   * The query can be used with other filters e.g. `time_filters` and
   * `folder_name_filter`. They are connected with `AND` operator under the
   * hood.
   * The maximum number of allowed characters is 255.
   * </pre>
   *
   * <code>string query = 1;</code>
   *
   * @return The bytes for query.
   */
  com.google.protobuf.ByteString getQueryBytes();

  /**
   *
   *
   * <pre>
   * Experimental, do not use.
   * If the query is a natural language question. False by default. If true,
   * then the question-answering feature will be used instead of search, and
   * `result_count` in
   * [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest]
   * must be set. In addition, all other input fields related to search
   * (pagination, histograms, etc.) will be ignored.
   * </pre>
   *
   * <code>bool is_nl_query = 12;</code>
   *
   * @return The isNlQuery.
   */
  boolean getIsNlQuery();

  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition].[is_filterable][] marked as `true`. The syntax for
   * this expression is a subset of SQL syntax.
   * Supported operators are: `=`, `!=`, `&lt;`, `&lt;=`, `&gt;`, and `&gt;=` where the left
   * of the operator is a property name and the right of the operator is a
   * number or a quoted string. You must escape backslash (&#92;&#92;) and quote (&#92;")
   * characters. Supported functions are `LOWER([property_name])` to perform a
   * case insensitive match and `EMPTY([property_name])` to filter on the
   * existence of a key.
   * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting
   * (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
   * comparisons or functions are allowed in the expression. The expression must
   * be &lt; 6000 bytes in length.
   * Sample Query:
   * `(LOWER(driving_license)="class &#92;"a&#92;"" OR EMPTY(driving_license)) AND
   * driving_years &gt; 10`
   * </pre>
   *
   * <code>string custom_property_filter = 4 [deprecated = true];</code>
   *
   * @deprecated google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is
   *     deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=104
   * @return The customPropertyFilter.
   */
  @java.lang.Deprecated
  java.lang.String getCustomPropertyFilter();
  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition].[is_filterable][] marked as `true`. The syntax for
   * this expression is a subset of SQL syntax.
   * Supported operators are: `=`, `!=`, `&lt;`, `&lt;=`, `&gt;`, and `&gt;=` where the left
   * of the operator is a property name and the right of the operator is a
   * number or a quoted string. You must escape backslash (&#92;&#92;) and quote (&#92;")
   * characters. Supported functions are `LOWER([property_name])` to perform a
   * case insensitive match and `EMPTY([property_name])` to filter on the
   * existence of a key.
   * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting
   * (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
   * comparisons or functions are allowed in the expression. The expression must
   * be &lt; 6000 bytes in length.
   * Sample Query:
   * `(LOWER(driving_license)="class &#92;"a&#92;"" OR EMPTY(driving_license)) AND
   * driving_years &gt; 10`
   * </pre>
   *
   * <code>string custom_property_filter = 4 [deprecated = true];</code>
   *
   * @deprecated google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is
   *     deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=104
   * @return The bytes for customPropertyFilter.
   */
  @java.lang.Deprecated
  com.google.protobuf.ByteString getCustomPropertyFilterBytes();

  /**
   *
   *
   * <pre>
   * Documents created/updated within a range specified by this filter are
   * searched against.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;</code>
   */
  java.util.List<com.google.cloud.contentwarehouse.v1.TimeFilter> getTimeFiltersList();
  /**
   *
   *
   * <pre>
   * Documents created/updated within a range specified by this filter are
   * searched against.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;</code>
   */
  com.google.cloud.contentwarehouse.v1.TimeFilter getTimeFilters(int index);
  /**
   *
   *
   * <pre>
   * Documents created/updated within a range specified by this filter are
   * searched against.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;</code>
   */
  int getTimeFiltersCount();
  /**
   *
   *
   * <pre>
   * Documents created/updated within a range specified by this filter are
   * searched against.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;</code>
   */
  java.util.List<? extends com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>
      getTimeFiltersOrBuilderList();
  /**
   *
   *
   * <pre>
   * Documents created/updated within a range specified by this filter are
   * searched against.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;</code>
   */
  com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder getTimeFiltersOrBuilder(int index);

  /**
   *
   *
   * <pre>
   * This filter specifies the exact document schema
   * [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]
   * of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any schema. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * schemas.
   * At most 20 document schema names are allowed.
   * </pre>
   *
   * <code>repeated string document_schema_names = 6;</code>
   *
   * @return A list containing the documentSchemaNames.
   */
  java.util.List<java.lang.String> getDocumentSchemaNamesList();
  /**
   *
   *
   * <pre>
   * This filter specifies the exact document schema
   * [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]
   * of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any schema. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * schemas.
   * At most 20 document schema names are allowed.
   * </pre>
   *
   * <code>repeated string document_schema_names = 6;</code>
   *
   * @return The count of documentSchemaNames.
   */
  int getDocumentSchemaNamesCount();
  /**
   *
   *
   * <pre>
   * This filter specifies the exact document schema
   * [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]
   * of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any schema. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * schemas.
   * At most 20 document schema names are allowed.
   * </pre>
   *
   * <code>repeated string document_schema_names = 6;</code>
   *
   * @param index The index of the element to return.
   * @return The documentSchemaNames at the given index.
   */
  java.lang.String getDocumentSchemaNames(int index);
  /**
   *
   *
   * <pre>
   * This filter specifies the exact document schema
   * [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]
   * of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any schema. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * schemas.
   * At most 20 document schema names are allowed.
   * </pre>
   *
   * <code>repeated string document_schema_names = 6;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the documentSchemaNames at the given index.
   */
  com.google.protobuf.ByteString getDocumentSchemaNamesBytes(int index);

  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]
   * marked as `true`. The relationship between the PropertyFilters is OR.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;</code>
   */
  java.util.List<com.google.cloud.contentwarehouse.v1.PropertyFilter> getPropertyFilterList();
  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]
   * marked as `true`. The relationship between the PropertyFilters is OR.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;</code>
   */
  com.google.cloud.contentwarehouse.v1.PropertyFilter getPropertyFilter(int index);
  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]
   * marked as `true`. The relationship between the PropertyFilters is OR.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;</code>
   */
  int getPropertyFilterCount();
  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]
   * marked as `true`. The relationship between the PropertyFilters is OR.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;</code>
   */
  java.util.List<? extends com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>
      getPropertyFilterOrBuilderList();
  /**
   *
   *
   * <pre>
   * This filter specifies a structured syntax to match against the
   * [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]
   * marked as `true`. The relationship between the PropertyFilters is OR.
   * </pre>
   *
   * <code>repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;</code>
   */
  com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder getPropertyFilterOrBuilder(
      int index);

  /**
   *
   *
   * <pre>
   * This filter specifies the types of files to return: ALL, FOLDER, or FILE.
   * If FOLDER or FILE is specified, then only either folders or files will be
   * returned, respectively. If ALL is specified, both folders and files will be
   * returned.
   * If no value is specified, ALL files will be returned.
   * </pre>
   *
   * <code>.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;</code>
   *
   * @return Whether the fileTypeFilter field is set.
   */
  boolean hasFileTypeFilter();
  /**
   *
   *
   * <pre>
   * This filter specifies the types of files to return: ALL, FOLDER, or FILE.
   * If FOLDER or FILE is specified, then only either folders or files will be
   * returned, respectively. If ALL is specified, both folders and files will be
   * returned.
   * If no value is specified, ALL files will be returned.
   * </pre>
   *
   * <code>.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;</code>
   *
   * @return The fileTypeFilter.
   */
  com.google.cloud.contentwarehouse.v1.FileTypeFilter getFileTypeFilter();
  /**
   *
   *
   * <pre>
   * This filter specifies the types of files to return: ALL, FOLDER, or FILE.
   * If FOLDER or FILE is specified, then only either folders or files will be
   * returned, respectively. If ALL is specified, both folders and files will be
   * returned.
   * If no value is specified, ALL files will be returned.
   * </pre>
   *
   * <code>.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;</code>
   */
  com.google.cloud.contentwarehouse.v1.FileTypeFilterOrBuilder getFileTypeFilterOrBuilder();

  /**
   *
   *
   * <pre>
   * Search all the documents under this specified folder.
   * Format:
   * projects/{project_number}/locations/{location}/documents/{document_id}.
   * </pre>
   *
   * <code>string folder_name_filter = 9;</code>
   *
   * @return The folderNameFilter.
   */
  java.lang.String getFolderNameFilter();
  /**
   *
   *
   * <pre>
   * Search all the documents under this specified folder.
   * Format:
   * projects/{project_number}/locations/{location}/documents/{document_id}.
   * </pre>
   *
   * <code>string folder_name_filter = 9;</code>
   *
   * @return The bytes for folderNameFilter.
   */
  com.google.protobuf.ByteString getFolderNameFilterBytes();

  /**
   *
   *
   * <pre>
   * For custom synonyms.
   * Customers provide the synonyms based on context. One customer can provide
   * multiple set of synonyms based on different context. The search query will
   * be expanded based on the custom synonyms of the query context set.
   * By default, no custom synonyms wll be applied if no query context is
   * provided.
   * It is not supported for CMEK compliant deployment.
   * </pre>
   *
   * <code>repeated string query_context = 10;</code>
   *
   * @return A list containing the queryContext.
   */
  java.util.List<java.lang.String> getQueryContextList();
  /**
   *
   *
   * <pre>
   * For custom synonyms.
   * Customers provide the synonyms based on context. One customer can provide
   * multiple set of synonyms based on different context. The search query will
   * be expanded based on the custom synonyms of the query context set.
   * By default, no custom synonyms wll be applied if no query context is
   * provided.
   * It is not supported for CMEK compliant deployment.
   * </pre>
   *
   * <code>repeated string query_context = 10;</code>
   *
   * @return The count of queryContext.
   */
  int getQueryContextCount();
  /**
   *
   *
   * <pre>
   * For custom synonyms.
   * Customers provide the synonyms based on context. One customer can provide
   * multiple set of synonyms based on different context. The search query will
   * be expanded based on the custom synonyms of the query context set.
   * By default, no custom synonyms wll be applied if no query context is
   * provided.
   * It is not supported for CMEK compliant deployment.
   * </pre>
   *
   * <code>repeated string query_context = 10;</code>
   *
   * @param index The index of the element to return.
   * @return The queryContext at the given index.
   */
  java.lang.String getQueryContext(int index);
  /**
   *
   *
   * <pre>
   * For custom synonyms.
   * Customers provide the synonyms based on context. One customer can provide
   * multiple set of synonyms based on different context. The search query will
   * be expanded based on the custom synonyms of the query context set.
   * By default, no custom synonyms wll be applied if no query context is
   * provided.
   * It is not supported for CMEK compliant deployment.
   * </pre>
   *
   * <code>repeated string query_context = 10;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the queryContext at the given index.
   */
  com.google.protobuf.ByteString getQueryContextBytes(int index);

  /**
   *
   *
   * <pre>
   * The exact creator(s) of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any creator. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * creators.
   * </pre>
   *
   * <code>repeated string document_creator_filter = 11;</code>
   *
   * @return A list containing the documentCreatorFilter.
   */
  java.util.List<java.lang.String> getDocumentCreatorFilterList();
  /**
   *
   *
   * <pre>
   * The exact creator(s) of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any creator. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * creators.
   * </pre>
   *
   * <code>repeated string document_creator_filter = 11;</code>
   *
   * @return The count of documentCreatorFilter.
   */
  int getDocumentCreatorFilterCount();
  /**
   *
   *
   * <pre>
   * The exact creator(s) of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any creator. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * creators.
   * </pre>
   *
   * <code>repeated string document_creator_filter = 11;</code>
   *
   * @param index The index of the element to return.
   * @return The documentCreatorFilter at the given index.
   */
  java.lang.String getDocumentCreatorFilter(int index);
  /**
   *
   *
   * <pre>
   * The exact creator(s) of the documents to search against.
   * If a value isn't specified, documents within the search results are
   * associated with any creator. If multiple values are specified, documents
   * within the search results may be associated with any of the specified
   * creators.
   * </pre>
   *
   * <code>repeated string document_creator_filter = 11;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the documentCreatorFilter at the given index.
   */
  com.google.protobuf.ByteString getDocumentCreatorFilterBytes(int index);

  /**
   *
   *
   * <pre>
   * To support the custom weighting across document schemas, customers need to
   * provide the properties to be used to boost the ranking in the search
   * request. For a search query with CustomWeightsMetadata specified, only the
   * RetrievalImportance for the properties in the CustomWeightsMetadata will
   * be honored.
   * </pre>
   *
   * <code>.google.cloud.contentwarehouse.v1.CustomWeightsMetadata custom_weights_metadata = 13;
   * </code>
   *
   * @return Whether the customWeightsMetadata field is set.
   */
  boolean hasCustomWeightsMetadata();
  /**
   *
   *
   * <pre>
   * To support the custom weighting across document schemas, customers need to
   * provide the properties to be used to boost the ranking in the search
   * request. For a search query with CustomWeightsMetadata specified, only the
   * RetrievalImportance for the properties in the CustomWeightsMetadata will
   * be honored.
   * </pre>
   *
   * <code>.google.cloud.contentwarehouse.v1.CustomWeightsMetadata custom_weights_metadata = 13;
   * </code>
   *
   * @return The customWeightsMetadata.
   */
  com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata getCustomWeightsMetadata();
  /**
   *
   *
   * <pre>
   * To support the custom weighting across document schemas, customers need to
   * provide the properties to be used to boost the ranking in the search
   * request. For a search query with CustomWeightsMetadata specified, only the
   * RetrievalImportance for the properties in the CustomWeightsMetadata will
   * be honored.
   * </pre>
   *
   * <code>.google.cloud.contentwarehouse.v1.CustomWeightsMetadata custom_weights_metadata = 13;
   * </code>
   */
  com.google.cloud.contentwarehouse.v1.CustomWeightsMetadataOrBuilder
      getCustomWeightsMetadataOrBuilder();
}
