/*
 * 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;

/** Protobuf type {@code google.cloud.contentwarehouse.v1.DocumentQuery} */
public final class DocumentQuery extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.contentwarehouse.v1.DocumentQuery)
    DocumentQueryOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DocumentQuery.newBuilder() to construct.
  private DocumentQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DocumentQuery() {
    query_ = "";
    customPropertyFilter_ = "";
    timeFilters_ = java.util.Collections.emptyList();
    documentSchemaNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    propertyFilter_ = java.util.Collections.emptyList();
    folderNameFilter_ = "";
    queryContext_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    documentCreatorFilter_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new DocumentQuery();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.contentwarehouse.v1.FiltersProto
        .internal_static_google_cloud_contentwarehouse_v1_DocumentQuery_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.contentwarehouse.v1.FiltersProto
        .internal_static_google_cloud_contentwarehouse_v1_DocumentQuery_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.contentwarehouse.v1.DocumentQuery.class,
            com.google.cloud.contentwarehouse.v1.DocumentQuery.Builder.class);
  }

  public static final int QUERY_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object query_ = "";
  /**
   *
   *
   * <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.Override
  public java.lang.String getQuery() {
    java.lang.Object ref = query_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      query_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getQueryBytes() {
    java.lang.Object ref = query_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      query_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IS_NL_QUERY_FIELD_NUMBER = 12;
  private boolean isNlQuery_ = false;
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public boolean getIsNlQuery() {
    return isNlQuery_;
  }

  public static final int CUSTOM_PROPERTY_FILTER_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object customPropertyFilter_ = "";
  /**
   *
   *
   * <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.Override
  @java.lang.Deprecated
  public java.lang.String getCustomPropertyFilter() {
    java.lang.Object ref = customPropertyFilter_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      customPropertyFilter_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <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.Override
  @java.lang.Deprecated
  public com.google.protobuf.ByteString getCustomPropertyFilterBytes() {
    java.lang.Object ref = customPropertyFilter_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      customPropertyFilter_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TIME_FILTERS_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.contentwarehouse.v1.TimeFilter> timeFilters_;
  /**
   *
   *
   * <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.lang.Override
  public java.util.List<com.google.cloud.contentwarehouse.v1.TimeFilter> getTimeFiltersList() {
    return timeFilters_;
  }
  /**
   *
   *
   * <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.lang.Override
  public java.util.List<? extends com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>
      getTimeFiltersOrBuilderList() {
    return timeFilters_;
  }
  /**
   *
   *
   * <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.lang.Override
  public int getTimeFiltersCount() {
    return timeFilters_.size();
  }
  /**
   *
   *
   * <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.lang.Override
  public com.google.cloud.contentwarehouse.v1.TimeFilter getTimeFilters(int index) {
    return timeFilters_.get(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>
   */
  @java.lang.Override
  public com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder getTimeFiltersOrBuilder(
      int index) {
    return timeFilters_.get(index);
  }

  public static final int DOCUMENT_SCHEMA_NAMES_FIELD_NUMBER = 6;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList documentSchemaNames_;
  /**
   *
   *
   * <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.
   */
  public com.google.protobuf.ProtocolStringList getDocumentSchemaNamesList() {
    return documentSchemaNames_;
  }
  /**
   *
   *
   * <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.
   */
  public int getDocumentSchemaNamesCount() {
    return documentSchemaNames_.size();
  }
  /**
   *
   *
   * <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.
   */
  public java.lang.String getDocumentSchemaNames(int index) {
    return documentSchemaNames_.get(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.
   */
  public com.google.protobuf.ByteString getDocumentSchemaNamesBytes(int index) {
    return documentSchemaNames_.getByteString(index);
  }

  public static final int PROPERTY_FILTER_FIELD_NUMBER = 7;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.contentwarehouse.v1.PropertyFilter> propertyFilter_;
  /**
   *
   *
   * <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.lang.Override
  public java.util.List<com.google.cloud.contentwarehouse.v1.PropertyFilter>
      getPropertyFilterList() {
    return propertyFilter_;
  }
  /**
   *
   *
   * <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.lang.Override
  public java.util.List<? extends com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>
      getPropertyFilterOrBuilderList() {
    return propertyFilter_;
  }
  /**
   *
   *
   * <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.lang.Override
  public int getPropertyFilterCount() {
    return propertyFilter_.size();
  }
  /**
   *
   *
   * <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.lang.Override
  public com.google.cloud.contentwarehouse.v1.PropertyFilter getPropertyFilter(int index) {
    return propertyFilter_.get(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.lang.Override
  public com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder getPropertyFilterOrBuilder(
      int index) {
    return propertyFilter_.get(index);
  }

  public static final int FILE_TYPE_FILTER_FIELD_NUMBER = 8;
  private com.google.cloud.contentwarehouse.v1.FileTypeFilter fileTypeFilter_;
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public boolean hasFileTypeFilter() {
    return fileTypeFilter_ != null;
  }
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public com.google.cloud.contentwarehouse.v1.FileTypeFilter getFileTypeFilter() {
    return fileTypeFilter_ == null
        ? com.google.cloud.contentwarehouse.v1.FileTypeFilter.getDefaultInstance()
        : fileTypeFilter_;
  }
  /**
   *
   *
   * <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>
   */
  @java.lang.Override
  public com.google.cloud.contentwarehouse.v1.FileTypeFilterOrBuilder getFileTypeFilterOrBuilder() {
    return fileTypeFilter_ == null
        ? com.google.cloud.contentwarehouse.v1.FileTypeFilter.getDefaultInstance()
        : fileTypeFilter_;
  }

  public static final int FOLDER_NAME_FILTER_FIELD_NUMBER = 9;

  @SuppressWarnings("serial")
  private volatile java.lang.Object folderNameFilter_ = "";
  /**
   *
   *
   * <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.Override
  public java.lang.String getFolderNameFilter() {
    java.lang.Object ref = folderNameFilter_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      folderNameFilter_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getFolderNameFilterBytes() {
    java.lang.Object ref = folderNameFilter_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      folderNameFilter_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int QUERY_CONTEXT_FIELD_NUMBER = 10;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList queryContext_;
  /**
   *
   *
   * <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.
   */
  public com.google.protobuf.ProtocolStringList getQueryContextList() {
    return queryContext_;
  }
  /**
   *
   *
   * <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.
   */
  public int getQueryContextCount() {
    return queryContext_.size();
  }
  /**
   *
   *
   * <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.
   */
  public java.lang.String getQueryContext(int index) {
    return queryContext_.get(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.
   */
  public com.google.protobuf.ByteString getQueryContextBytes(int index) {
    return queryContext_.getByteString(index);
  }

  public static final int DOCUMENT_CREATOR_FILTER_FIELD_NUMBER = 11;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList documentCreatorFilter_;
  /**
   *
   *
   * <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.
   */
  public com.google.protobuf.ProtocolStringList getDocumentCreatorFilterList() {
    return documentCreatorFilter_;
  }
  /**
   *
   *
   * <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.
   */
  public int getDocumentCreatorFilterCount() {
    return documentCreatorFilter_.size();
  }
  /**
   *
   *
   * <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.
   */
  public java.lang.String getDocumentCreatorFilter(int index) {
    return documentCreatorFilter_.get(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.
   */
  public com.google.protobuf.ByteString getDocumentCreatorFilterBytes(int index) {
    return documentCreatorFilter_.getByteString(index);
  }

  public static final int CUSTOM_WEIGHTS_METADATA_FIELD_NUMBER = 13;
  private com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata customWeightsMetadata_;
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public boolean hasCustomWeightsMetadata() {
    return customWeightsMetadata_ != null;
  }
  /**
   *
   *
   * <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.
   */
  @java.lang.Override
  public com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata getCustomWeightsMetadata() {
    return customWeightsMetadata_ == null
        ? com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.getDefaultInstance()
        : customWeightsMetadata_;
  }
  /**
   *
   *
   * <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>
   */
  @java.lang.Override
  public com.google.cloud.contentwarehouse.v1.CustomWeightsMetadataOrBuilder
      getCustomWeightsMetadataOrBuilder() {
    return customWeightsMetadata_ == null
        ? com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.getDefaultInstance()
        : customWeightsMetadata_;
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customPropertyFilter_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, customPropertyFilter_);
    }
    for (int i = 0; i < timeFilters_.size(); i++) {
      output.writeMessage(5, timeFilters_.get(i));
    }
    for (int i = 0; i < documentSchemaNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, documentSchemaNames_.getRaw(i));
    }
    for (int i = 0; i < propertyFilter_.size(); i++) {
      output.writeMessage(7, propertyFilter_.get(i));
    }
    if (fileTypeFilter_ != null) {
      output.writeMessage(8, getFileTypeFilter());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderNameFilter_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, folderNameFilter_);
    }
    for (int i = 0; i < queryContext_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, queryContext_.getRaw(i));
    }
    for (int i = 0; i < documentCreatorFilter_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(
          output, 11, documentCreatorFilter_.getRaw(i));
    }
    if (isNlQuery_ != false) {
      output.writeBool(12, isNlQuery_);
    }
    if (customWeightsMetadata_ != null) {
      output.writeMessage(13, getCustomWeightsMetadata());
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customPropertyFilter_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, customPropertyFilter_);
    }
    for (int i = 0; i < timeFilters_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, timeFilters_.get(i));
    }
    {
      int dataSize = 0;
      for (int i = 0; i < documentSchemaNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(documentSchemaNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getDocumentSchemaNamesList().size();
    }
    for (int i = 0; i < propertyFilter_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, propertyFilter_.get(i));
    }
    if (fileTypeFilter_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getFileTypeFilter());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderNameFilter_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, folderNameFilter_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < queryContext_.size(); i++) {
        dataSize += computeStringSizeNoTag(queryContext_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getQueryContextList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < documentCreatorFilter_.size(); i++) {
        dataSize += computeStringSizeNoTag(documentCreatorFilter_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getDocumentCreatorFilterList().size();
    }
    if (isNlQuery_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, isNlQuery_);
    }
    if (customWeightsMetadata_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCustomWeightsMetadata());
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.contentwarehouse.v1.DocumentQuery)) {
      return super.equals(obj);
    }
    com.google.cloud.contentwarehouse.v1.DocumentQuery other =
        (com.google.cloud.contentwarehouse.v1.DocumentQuery) obj;

    if (!getQuery().equals(other.getQuery())) return false;
    if (getIsNlQuery() != other.getIsNlQuery()) return false;
    if (!getCustomPropertyFilter().equals(other.getCustomPropertyFilter())) return false;
    if (!getTimeFiltersList().equals(other.getTimeFiltersList())) return false;
    if (!getDocumentSchemaNamesList().equals(other.getDocumentSchemaNamesList())) return false;
    if (!getPropertyFilterList().equals(other.getPropertyFilterList())) return false;
    if (hasFileTypeFilter() != other.hasFileTypeFilter()) return false;
    if (hasFileTypeFilter()) {
      if (!getFileTypeFilter().equals(other.getFileTypeFilter())) return false;
    }
    if (!getFolderNameFilter().equals(other.getFolderNameFilter())) return false;
    if (!getQueryContextList().equals(other.getQueryContextList())) return false;
    if (!getDocumentCreatorFilterList().equals(other.getDocumentCreatorFilterList())) return false;
    if (hasCustomWeightsMetadata() != other.hasCustomWeightsMetadata()) return false;
    if (hasCustomWeightsMetadata()) {
      if (!getCustomWeightsMetadata().equals(other.getCustomWeightsMetadata())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + QUERY_FIELD_NUMBER;
    hash = (53 * hash) + getQuery().hashCode();
    hash = (37 * hash) + IS_NL_QUERY_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsNlQuery());
    hash = (37 * hash) + CUSTOM_PROPERTY_FILTER_FIELD_NUMBER;
    hash = (53 * hash) + getCustomPropertyFilter().hashCode();
    if (getTimeFiltersCount() > 0) {
      hash = (37 * hash) + TIME_FILTERS_FIELD_NUMBER;
      hash = (53 * hash) + getTimeFiltersList().hashCode();
    }
    if (getDocumentSchemaNamesCount() > 0) {
      hash = (37 * hash) + DOCUMENT_SCHEMA_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getDocumentSchemaNamesList().hashCode();
    }
    if (getPropertyFilterCount() > 0) {
      hash = (37 * hash) + PROPERTY_FILTER_FIELD_NUMBER;
      hash = (53 * hash) + getPropertyFilterList().hashCode();
    }
    if (hasFileTypeFilter()) {
      hash = (37 * hash) + FILE_TYPE_FILTER_FIELD_NUMBER;
      hash = (53 * hash) + getFileTypeFilter().hashCode();
    }
    hash = (37 * hash) + FOLDER_NAME_FILTER_FIELD_NUMBER;
    hash = (53 * hash) + getFolderNameFilter().hashCode();
    if (getQueryContextCount() > 0) {
      hash = (37 * hash) + QUERY_CONTEXT_FIELD_NUMBER;
      hash = (53 * hash) + getQueryContextList().hashCode();
    }
    if (getDocumentCreatorFilterCount() > 0) {
      hash = (37 * hash) + DOCUMENT_CREATOR_FILTER_FIELD_NUMBER;
      hash = (53 * hash) + getDocumentCreatorFilterList().hashCode();
    }
    if (hasCustomWeightsMetadata()) {
      hash = (37 * hash) + CUSTOM_WEIGHTS_METADATA_FIELD_NUMBER;
      hash = (53 * hash) + getCustomWeightsMetadata().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.contentwarehouse.v1.DocumentQuery prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /** Protobuf type {@code google.cloud.contentwarehouse.v1.DocumentQuery} */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.contentwarehouse.v1.DocumentQuery)
      com.google.cloud.contentwarehouse.v1.DocumentQueryOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.contentwarehouse.v1.FiltersProto
          .internal_static_google_cloud_contentwarehouse_v1_DocumentQuery_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.contentwarehouse.v1.FiltersProto
          .internal_static_google_cloud_contentwarehouse_v1_DocumentQuery_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.contentwarehouse.v1.DocumentQuery.class,
              com.google.cloud.contentwarehouse.v1.DocumentQuery.Builder.class);
    }

    // Construct using com.google.cloud.contentwarehouse.v1.DocumentQuery.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      query_ = "";
      isNlQuery_ = false;
      customPropertyFilter_ = "";
      if (timeFiltersBuilder_ == null) {
        timeFilters_ = java.util.Collections.emptyList();
      } else {
        timeFilters_ = null;
        timeFiltersBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000008);
      documentSchemaNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      if (propertyFilterBuilder_ == null) {
        propertyFilter_ = java.util.Collections.emptyList();
      } else {
        propertyFilter_ = null;
        propertyFilterBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000020);
      fileTypeFilter_ = null;
      if (fileTypeFilterBuilder_ != null) {
        fileTypeFilterBuilder_.dispose();
        fileTypeFilterBuilder_ = null;
      }
      folderNameFilter_ = "";
      queryContext_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000100);
      documentCreatorFilter_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000200);
      customWeightsMetadata_ = null;
      if (customWeightsMetadataBuilder_ != null) {
        customWeightsMetadataBuilder_.dispose();
        customWeightsMetadataBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.contentwarehouse.v1.FiltersProto
          .internal_static_google_cloud_contentwarehouse_v1_DocumentQuery_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.contentwarehouse.v1.DocumentQuery getDefaultInstanceForType() {
      return com.google.cloud.contentwarehouse.v1.DocumentQuery.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.contentwarehouse.v1.DocumentQuery build() {
      com.google.cloud.contentwarehouse.v1.DocumentQuery result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.contentwarehouse.v1.DocumentQuery buildPartial() {
      com.google.cloud.contentwarehouse.v1.DocumentQuery result =
          new com.google.cloud.contentwarehouse.v1.DocumentQuery(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.cloud.contentwarehouse.v1.DocumentQuery result) {
      if (timeFiltersBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)) {
          timeFilters_ = java.util.Collections.unmodifiableList(timeFilters_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.timeFilters_ = timeFilters_;
      } else {
        result.timeFilters_ = timeFiltersBuilder_.build();
      }
      if (((bitField0_ & 0x00000010) != 0)) {
        documentSchemaNames_ = documentSchemaNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000010);
      }
      result.documentSchemaNames_ = documentSchemaNames_;
      if (propertyFilterBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)) {
          propertyFilter_ = java.util.Collections.unmodifiableList(propertyFilter_);
          bitField0_ = (bitField0_ & ~0x00000020);
        }
        result.propertyFilter_ = propertyFilter_;
      } else {
        result.propertyFilter_ = propertyFilterBuilder_.build();
      }
      if (((bitField0_ & 0x00000100) != 0)) {
        queryContext_ = queryContext_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000100);
      }
      result.queryContext_ = queryContext_;
      if (((bitField0_ & 0x00000200) != 0)) {
        documentCreatorFilter_ = documentCreatorFilter_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000200);
      }
      result.documentCreatorFilter_ = documentCreatorFilter_;
    }

    private void buildPartial0(com.google.cloud.contentwarehouse.v1.DocumentQuery result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.query_ = query_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.isNlQuery_ = isNlQuery_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.customPropertyFilter_ = customPropertyFilter_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.fileTypeFilter_ =
            fileTypeFilterBuilder_ == null ? fileTypeFilter_ : fileTypeFilterBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.folderNameFilter_ = folderNameFilter_;
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.customWeightsMetadata_ =
            customWeightsMetadataBuilder_ == null
                ? customWeightsMetadata_
                : customWeightsMetadataBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.contentwarehouse.v1.DocumentQuery) {
        return mergeFrom((com.google.cloud.contentwarehouse.v1.DocumentQuery) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.contentwarehouse.v1.DocumentQuery other) {
      if (other == com.google.cloud.contentwarehouse.v1.DocumentQuery.getDefaultInstance())
        return this;
      if (!other.getQuery().isEmpty()) {
        query_ = other.query_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.getIsNlQuery() != false) {
        setIsNlQuery(other.getIsNlQuery());
      }
      if (!other.getCustomPropertyFilter().isEmpty()) {
        customPropertyFilter_ = other.customPropertyFilter_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (timeFiltersBuilder_ == null) {
        if (!other.timeFilters_.isEmpty()) {
          if (timeFilters_.isEmpty()) {
            timeFilters_ = other.timeFilters_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureTimeFiltersIsMutable();
            timeFilters_.addAll(other.timeFilters_);
          }
          onChanged();
        }
      } else {
        if (!other.timeFilters_.isEmpty()) {
          if (timeFiltersBuilder_.isEmpty()) {
            timeFiltersBuilder_.dispose();
            timeFiltersBuilder_ = null;
            timeFilters_ = other.timeFilters_;
            bitField0_ = (bitField0_ & ~0x00000008);
            timeFiltersBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getTimeFiltersFieldBuilder()
                    : null;
          } else {
            timeFiltersBuilder_.addAllMessages(other.timeFilters_);
          }
        }
      }
      if (!other.documentSchemaNames_.isEmpty()) {
        if (documentSchemaNames_.isEmpty()) {
          documentSchemaNames_ = other.documentSchemaNames_;
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          ensureDocumentSchemaNamesIsMutable();
          documentSchemaNames_.addAll(other.documentSchemaNames_);
        }
        onChanged();
      }
      if (propertyFilterBuilder_ == null) {
        if (!other.propertyFilter_.isEmpty()) {
          if (propertyFilter_.isEmpty()) {
            propertyFilter_ = other.propertyFilter_;
            bitField0_ = (bitField0_ & ~0x00000020);
          } else {
            ensurePropertyFilterIsMutable();
            propertyFilter_.addAll(other.propertyFilter_);
          }
          onChanged();
        }
      } else {
        if (!other.propertyFilter_.isEmpty()) {
          if (propertyFilterBuilder_.isEmpty()) {
            propertyFilterBuilder_.dispose();
            propertyFilterBuilder_ = null;
            propertyFilter_ = other.propertyFilter_;
            bitField0_ = (bitField0_ & ~0x00000020);
            propertyFilterBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getPropertyFilterFieldBuilder()
                    : null;
          } else {
            propertyFilterBuilder_.addAllMessages(other.propertyFilter_);
          }
        }
      }
      if (other.hasFileTypeFilter()) {
        mergeFileTypeFilter(other.getFileTypeFilter());
      }
      if (!other.getFolderNameFilter().isEmpty()) {
        folderNameFilter_ = other.folderNameFilter_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      if (!other.queryContext_.isEmpty()) {
        if (queryContext_.isEmpty()) {
          queryContext_ = other.queryContext_;
          bitField0_ = (bitField0_ & ~0x00000100);
        } else {
          ensureQueryContextIsMutable();
          queryContext_.addAll(other.queryContext_);
        }
        onChanged();
      }
      if (!other.documentCreatorFilter_.isEmpty()) {
        if (documentCreatorFilter_.isEmpty()) {
          documentCreatorFilter_ = other.documentCreatorFilter_;
          bitField0_ = (bitField0_ & ~0x00000200);
        } else {
          ensureDocumentCreatorFilterIsMutable();
          documentCreatorFilter_.addAll(other.documentCreatorFilter_);
        }
        onChanged();
      }
      if (other.hasCustomWeightsMetadata()) {
        mergeCustomWeightsMetadata(other.getCustomWeightsMetadata());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                query_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 34:
              {
                customPropertyFilter_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 34
            case 42:
              {
                com.google.cloud.contentwarehouse.v1.TimeFilter m =
                    input.readMessage(
                        com.google.cloud.contentwarehouse.v1.TimeFilter.parser(),
                        extensionRegistry);
                if (timeFiltersBuilder_ == null) {
                  ensureTimeFiltersIsMutable();
                  timeFilters_.add(m);
                } else {
                  timeFiltersBuilder_.addMessage(m);
                }
                break;
              } // case 42
            case 50:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureDocumentSchemaNamesIsMutable();
                documentSchemaNames_.add(s);
                break;
              } // case 50
            case 58:
              {
                com.google.cloud.contentwarehouse.v1.PropertyFilter m =
                    input.readMessage(
                        com.google.cloud.contentwarehouse.v1.PropertyFilter.parser(),
                        extensionRegistry);
                if (propertyFilterBuilder_ == null) {
                  ensurePropertyFilterIsMutable();
                  propertyFilter_.add(m);
                } else {
                  propertyFilterBuilder_.addMessage(m);
                }
                break;
              } // case 58
            case 66:
              {
                input.readMessage(getFileTypeFilterFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000040;
                break;
              } // case 66
            case 74:
              {
                folderNameFilter_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000080;
                break;
              } // case 74
            case 82:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureQueryContextIsMutable();
                queryContext_.add(s);
                break;
              } // case 82
            case 90:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureDocumentCreatorFilterIsMutable();
                documentCreatorFilter_.add(s);
                break;
              } // case 90
            case 96:
              {
                isNlQuery_ = input.readBool();
                bitField0_ |= 0x00000002;
                break;
              } // case 96
            case 106:
              {
                input.readMessage(
                    getCustomWeightsMetadataFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000400;
                break;
              } // case 106
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object query_ = "";
    /**
     *
     *
     * <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.
     */
    public java.lang.String getQuery() {
      java.lang.Object ref = query_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        query_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <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.
     */
    public com.google.protobuf.ByteString getQueryBytes() {
      java.lang.Object ref = query_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        query_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <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>
     *
     * @param value The query to set.
     * @return This builder for chaining.
     */
    public Builder setQuery(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      query_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    public Builder clearQuery() {
      query_ = getDefaultInstance().getQuery();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     *
     * @param value The bytes for query to set.
     * @return This builder for chaining.
     */
    public Builder setQueryBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      query_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private boolean isNlQuery_;
    /**
     *
     *
     * <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.
     */
    @java.lang.Override
    public boolean getIsNlQuery() {
      return isNlQuery_;
    }
    /**
     *
     *
     * <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>
     *
     * @param value The isNlQuery to set.
     * @return This builder for chaining.
     */
    public Builder setIsNlQuery(boolean value) {

      isNlQuery_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    public Builder clearIsNlQuery() {
      bitField0_ = (bitField0_ & ~0x00000002);
      isNlQuery_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object customPropertyFilter_ = "";
    /**
     *
     *
     * <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
    public java.lang.String getCustomPropertyFilter() {
      java.lang.Object ref = customPropertyFilter_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        customPropertyFilter_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <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
    public com.google.protobuf.ByteString getCustomPropertyFilterBytes() {
      java.lang.Object ref = customPropertyFilter_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        customPropertyFilter_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <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
     * @param value The customPropertyFilter to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setCustomPropertyFilter(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      customPropertyFilter_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder clearCustomPropertyFilter() {
      customPropertyFilter_ = getDefaultInstance().getCustomPropertyFilter();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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
     * @param value The bytes for customPropertyFilter to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setCustomPropertyFilterBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      customPropertyFilter_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.contentwarehouse.v1.TimeFilter> timeFilters_ =
        java.util.Collections.emptyList();

    private void ensureTimeFiltersIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        timeFilters_ =
            new java.util.ArrayList<com.google.cloud.contentwarehouse.v1.TimeFilter>(timeFilters_);
        bitField0_ |= 0x00000008;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.TimeFilter,
            com.google.cloud.contentwarehouse.v1.TimeFilter.Builder,
            com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>
        timeFiltersBuilder_;

    /**
     *
     *
     * <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>
     */
    public java.util.List<com.google.cloud.contentwarehouse.v1.TimeFilter> getTimeFiltersList() {
      if (timeFiltersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(timeFilters_);
      } else {
        return timeFiltersBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <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>
     */
    public int getTimeFiltersCount() {
      if (timeFiltersBuilder_ == null) {
        return timeFilters_.size();
      } else {
        return timeFiltersBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.TimeFilter getTimeFilters(int index) {
      if (timeFiltersBuilder_ == null) {
        return timeFilters_.get(index);
      } else {
        return timeFiltersBuilder_.getMessage(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>
     */
    public Builder setTimeFilters(
        int index, com.google.cloud.contentwarehouse.v1.TimeFilter value) {
      if (timeFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTimeFiltersIsMutable();
        timeFilters_.set(index, value);
        onChanged();
      } else {
        timeFiltersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder setTimeFilters(
        int index, com.google.cloud.contentwarehouse.v1.TimeFilter.Builder builderForValue) {
      if (timeFiltersBuilder_ == null) {
        ensureTimeFiltersIsMutable();
        timeFilters_.set(index, builderForValue.build());
        onChanged();
      } else {
        timeFiltersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addTimeFilters(com.google.cloud.contentwarehouse.v1.TimeFilter value) {
      if (timeFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTimeFiltersIsMutable();
        timeFilters_.add(value);
        onChanged();
      } else {
        timeFiltersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addTimeFilters(
        int index, com.google.cloud.contentwarehouse.v1.TimeFilter value) {
      if (timeFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTimeFiltersIsMutable();
        timeFilters_.add(index, value);
        onChanged();
      } else {
        timeFiltersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addTimeFilters(
        com.google.cloud.contentwarehouse.v1.TimeFilter.Builder builderForValue) {
      if (timeFiltersBuilder_ == null) {
        ensureTimeFiltersIsMutable();
        timeFilters_.add(builderForValue.build());
        onChanged();
      } else {
        timeFiltersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addTimeFilters(
        int index, com.google.cloud.contentwarehouse.v1.TimeFilter.Builder builderForValue) {
      if (timeFiltersBuilder_ == null) {
        ensureTimeFiltersIsMutable();
        timeFilters_.add(index, builderForValue.build());
        onChanged();
      } else {
        timeFiltersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addAllTimeFilters(
        java.lang.Iterable<? extends com.google.cloud.contentwarehouse.v1.TimeFilter> values) {
      if (timeFiltersBuilder_ == null) {
        ensureTimeFiltersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timeFilters_);
        onChanged();
      } else {
        timeFiltersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder clearTimeFilters() {
      if (timeFiltersBuilder_ == null) {
        timeFilters_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        timeFiltersBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder removeTimeFilters(int index) {
      if (timeFiltersBuilder_ == null) {
        ensureTimeFiltersIsMutable();
        timeFilters_.remove(index);
        onChanged();
      } else {
        timeFiltersBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.TimeFilter.Builder getTimeFiltersBuilder(
        int index) {
      return getTimeFiltersFieldBuilder().getBuilder(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>
     */
    public com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder getTimeFiltersOrBuilder(
        int index) {
      if (timeFiltersBuilder_ == null) {
        return timeFilters_.get(index);
      } else {
        return timeFiltersBuilder_.getMessageOrBuilder(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>
     */
    public java.util.List<? extends com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>
        getTimeFiltersOrBuilderList() {
      if (timeFiltersBuilder_ != null) {
        return timeFiltersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(timeFilters_);
      }
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.TimeFilter.Builder addTimeFiltersBuilder() {
      return getTimeFiltersFieldBuilder()
          .addBuilder(com.google.cloud.contentwarehouse.v1.TimeFilter.getDefaultInstance());
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.TimeFilter.Builder addTimeFiltersBuilder(
        int index) {
      return getTimeFiltersFieldBuilder()
          .addBuilder(index, com.google.cloud.contentwarehouse.v1.TimeFilter.getDefaultInstance());
    }
    /**
     *
     *
     * <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>
     */
    public java.util.List<com.google.cloud.contentwarehouse.v1.TimeFilter.Builder>
        getTimeFiltersBuilderList() {
      return getTimeFiltersFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.TimeFilter,
            com.google.cloud.contentwarehouse.v1.TimeFilter.Builder,
            com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>
        getTimeFiltersFieldBuilder() {
      if (timeFiltersBuilder_ == null) {
        timeFiltersBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.contentwarehouse.v1.TimeFilter,
                com.google.cloud.contentwarehouse.v1.TimeFilter.Builder,
                com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>(
                timeFilters_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
        timeFilters_ = null;
      }
      return timeFiltersBuilder_;
    }

    private com.google.protobuf.LazyStringList documentSchemaNames_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureDocumentSchemaNamesIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        documentSchemaNames_ = new com.google.protobuf.LazyStringArrayList(documentSchemaNames_);
        bitField0_ |= 0x00000010;
      }
    }
    /**
     *
     *
     * <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.
     */
    public com.google.protobuf.ProtocolStringList getDocumentSchemaNamesList() {
      return documentSchemaNames_.getUnmodifiableView();
    }
    /**
     *
     *
     * <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.
     */
    public int getDocumentSchemaNamesCount() {
      return documentSchemaNames_.size();
    }
    /**
     *
     *
     * <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.
     */
    public java.lang.String getDocumentSchemaNames(int index) {
      return documentSchemaNames_.get(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.
     */
    public com.google.protobuf.ByteString getDocumentSchemaNamesBytes(int index) {
      return documentSchemaNames_.getByteString(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 to set the value at.
     * @param value The documentSchemaNames to set.
     * @return This builder for chaining.
     */
    public Builder setDocumentSchemaNames(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDocumentSchemaNamesIsMutable();
      documentSchemaNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 value The documentSchemaNames to add.
     * @return This builder for chaining.
     */
    public Builder addDocumentSchemaNames(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDocumentSchemaNamesIsMutable();
      documentSchemaNames_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 values The documentSchemaNames to add.
     * @return This builder for chaining.
     */
    public Builder addAllDocumentSchemaNames(java.lang.Iterable<java.lang.String> values) {
      ensureDocumentSchemaNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documentSchemaNames_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    public Builder clearDocumentSchemaNames() {
      documentSchemaNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 value The bytes of the documentSchemaNames to add.
     * @return This builder for chaining.
     */
    public Builder addDocumentSchemaNamesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureDocumentSchemaNamesIsMutable();
      documentSchemaNames_.add(value);
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.contentwarehouse.v1.PropertyFilter> propertyFilter_ =
        java.util.Collections.emptyList();

    private void ensurePropertyFilterIsMutable() {
      if (!((bitField0_ & 0x00000020) != 0)) {
        propertyFilter_ =
            new java.util.ArrayList<com.google.cloud.contentwarehouse.v1.PropertyFilter>(
                propertyFilter_);
        bitField0_ |= 0x00000020;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.PropertyFilter,
            com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder,
            com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>
        propertyFilterBuilder_;

    /**
     *
     *
     * <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>
     */
    public java.util.List<com.google.cloud.contentwarehouse.v1.PropertyFilter>
        getPropertyFilterList() {
      if (propertyFilterBuilder_ == null) {
        return java.util.Collections.unmodifiableList(propertyFilter_);
      } else {
        return propertyFilterBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <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>
     */
    public int getPropertyFilterCount() {
      if (propertyFilterBuilder_ == null) {
        return propertyFilter_.size();
      } else {
        return propertyFilterBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.PropertyFilter getPropertyFilter(int index) {
      if (propertyFilterBuilder_ == null) {
        return propertyFilter_.get(index);
      } else {
        return propertyFilterBuilder_.getMessage(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>
     */
    public Builder setPropertyFilter(
        int index, com.google.cloud.contentwarehouse.v1.PropertyFilter value) {
      if (propertyFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePropertyFilterIsMutable();
        propertyFilter_.set(index, value);
        onChanged();
      } else {
        propertyFilterBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder setPropertyFilter(
        int index, com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder builderForValue) {
      if (propertyFilterBuilder_ == null) {
        ensurePropertyFilterIsMutable();
        propertyFilter_.set(index, builderForValue.build());
        onChanged();
      } else {
        propertyFilterBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addPropertyFilter(com.google.cloud.contentwarehouse.v1.PropertyFilter value) {
      if (propertyFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePropertyFilterIsMutable();
        propertyFilter_.add(value);
        onChanged();
      } else {
        propertyFilterBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addPropertyFilter(
        int index, com.google.cloud.contentwarehouse.v1.PropertyFilter value) {
      if (propertyFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePropertyFilterIsMutable();
        propertyFilter_.add(index, value);
        onChanged();
      } else {
        propertyFilterBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addPropertyFilter(
        com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder builderForValue) {
      if (propertyFilterBuilder_ == null) {
        ensurePropertyFilterIsMutable();
        propertyFilter_.add(builderForValue.build());
        onChanged();
      } else {
        propertyFilterBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addPropertyFilter(
        int index, com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder builderForValue) {
      if (propertyFilterBuilder_ == null) {
        ensurePropertyFilterIsMutable();
        propertyFilter_.add(index, builderForValue.build());
        onChanged();
      } else {
        propertyFilterBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder addAllPropertyFilter(
        java.lang.Iterable<? extends com.google.cloud.contentwarehouse.v1.PropertyFilter> values) {
      if (propertyFilterBuilder_ == null) {
        ensurePropertyFilterIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, propertyFilter_);
        onChanged();
      } else {
        propertyFilterBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder clearPropertyFilter() {
      if (propertyFilterBuilder_ == null) {
        propertyFilter_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000020);
        onChanged();
      } else {
        propertyFilterBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder removePropertyFilter(int index) {
      if (propertyFilterBuilder_ == null) {
        ensurePropertyFilterIsMutable();
        propertyFilter_.remove(index);
        onChanged();
      } else {
        propertyFilterBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder getPropertyFilterBuilder(
        int index) {
      return getPropertyFilterFieldBuilder().getBuilder(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>
     */
    public com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder getPropertyFilterOrBuilder(
        int index) {
      if (propertyFilterBuilder_ == null) {
        return propertyFilter_.get(index);
      } else {
        return propertyFilterBuilder_.getMessageOrBuilder(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>
     */
    public java.util.List<? extends com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>
        getPropertyFilterOrBuilderList() {
      if (propertyFilterBuilder_ != null) {
        return propertyFilterBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(propertyFilter_);
      }
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder addPropertyFilterBuilder() {
      return getPropertyFilterFieldBuilder()
          .addBuilder(com.google.cloud.contentwarehouse.v1.PropertyFilter.getDefaultInstance());
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder addPropertyFilterBuilder(
        int index) {
      return getPropertyFilterFieldBuilder()
          .addBuilder(
              index, com.google.cloud.contentwarehouse.v1.PropertyFilter.getDefaultInstance());
    }
    /**
     *
     *
     * <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>
     */
    public java.util.List<com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder>
        getPropertyFilterBuilderList() {
      return getPropertyFilterFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.PropertyFilter,
            com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder,
            com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>
        getPropertyFilterFieldBuilder() {
      if (propertyFilterBuilder_ == null) {
        propertyFilterBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.contentwarehouse.v1.PropertyFilter,
                com.google.cloud.contentwarehouse.v1.PropertyFilter.Builder,
                com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>(
                propertyFilter_,
                ((bitField0_ & 0x00000020) != 0),
                getParentForChildren(),
                isClean());
        propertyFilter_ = null;
      }
      return propertyFilterBuilder_;
    }

    private com.google.cloud.contentwarehouse.v1.FileTypeFilter fileTypeFilter_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.FileTypeFilter,
            com.google.cloud.contentwarehouse.v1.FileTypeFilter.Builder,
            com.google.cloud.contentwarehouse.v1.FileTypeFilterOrBuilder>
        fileTypeFilterBuilder_;
    /**
     *
     *
     * <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.
     */
    public boolean hasFileTypeFilter() {
      return ((bitField0_ & 0x00000040) != 0);
    }
    /**
     *
     *
     * <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.
     */
    public com.google.cloud.contentwarehouse.v1.FileTypeFilter getFileTypeFilter() {
      if (fileTypeFilterBuilder_ == null) {
        return fileTypeFilter_ == null
            ? com.google.cloud.contentwarehouse.v1.FileTypeFilter.getDefaultInstance()
            : fileTypeFilter_;
      } else {
        return fileTypeFilterBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <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>
     */
    public Builder setFileTypeFilter(com.google.cloud.contentwarehouse.v1.FileTypeFilter value) {
      if (fileTypeFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        fileTypeFilter_ = value;
      } else {
        fileTypeFilterBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder setFileTypeFilter(
        com.google.cloud.contentwarehouse.v1.FileTypeFilter.Builder builderForValue) {
      if (fileTypeFilterBuilder_ == null) {
        fileTypeFilter_ = builderForValue.build();
      } else {
        fileTypeFilterBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder mergeFileTypeFilter(com.google.cloud.contentwarehouse.v1.FileTypeFilter value) {
      if (fileTypeFilterBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)
            && fileTypeFilter_ != null
            && fileTypeFilter_
                != com.google.cloud.contentwarehouse.v1.FileTypeFilter.getDefaultInstance()) {
          getFileTypeFilterBuilder().mergeFrom(value);
        } else {
          fileTypeFilter_ = value;
        }
      } else {
        fileTypeFilterBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder clearFileTypeFilter() {
      bitField0_ = (bitField0_ & ~0x00000040);
      fileTypeFilter_ = null;
      if (fileTypeFilterBuilder_ != null) {
        fileTypeFilterBuilder_.dispose();
        fileTypeFilterBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.FileTypeFilter.Builder getFileTypeFilterBuilder() {
      bitField0_ |= 0x00000040;
      onChanged();
      return getFileTypeFilterFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.FileTypeFilterOrBuilder
        getFileTypeFilterOrBuilder() {
      if (fileTypeFilterBuilder_ != null) {
        return fileTypeFilterBuilder_.getMessageOrBuilder();
      } else {
        return fileTypeFilter_ == null
            ? com.google.cloud.contentwarehouse.v1.FileTypeFilter.getDefaultInstance()
            : fileTypeFilter_;
      }
    }
    /**
     *
     *
     * <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>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.FileTypeFilter,
            com.google.cloud.contentwarehouse.v1.FileTypeFilter.Builder,
            com.google.cloud.contentwarehouse.v1.FileTypeFilterOrBuilder>
        getFileTypeFilterFieldBuilder() {
      if (fileTypeFilterBuilder_ == null) {
        fileTypeFilterBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.contentwarehouse.v1.FileTypeFilter,
                com.google.cloud.contentwarehouse.v1.FileTypeFilter.Builder,
                com.google.cloud.contentwarehouse.v1.FileTypeFilterOrBuilder>(
                getFileTypeFilter(), getParentForChildren(), isClean());
        fileTypeFilter_ = null;
      }
      return fileTypeFilterBuilder_;
    }

    private java.lang.Object folderNameFilter_ = "";
    /**
     *
     *
     * <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.
     */
    public java.lang.String getFolderNameFilter() {
      java.lang.Object ref = folderNameFilter_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        folderNameFilter_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <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.
     */
    public com.google.protobuf.ByteString getFolderNameFilterBytes() {
      java.lang.Object ref = folderNameFilter_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        folderNameFilter_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <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>
     *
     * @param value The folderNameFilter to set.
     * @return This builder for chaining.
     */
    public Builder setFolderNameFilter(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      folderNameFilter_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    public Builder clearFolderNameFilter() {
      folderNameFilter_ = getDefaultInstance().getFolderNameFilter();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     *
     * @param value The bytes for folderNameFilter to set.
     * @return This builder for chaining.
     */
    public Builder setFolderNameFilterBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      folderNameFilter_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList queryContext_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureQueryContextIsMutable() {
      if (!((bitField0_ & 0x00000100) != 0)) {
        queryContext_ = new com.google.protobuf.LazyStringArrayList(queryContext_);
        bitField0_ |= 0x00000100;
      }
    }
    /**
     *
     *
     * <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.
     */
    public com.google.protobuf.ProtocolStringList getQueryContextList() {
      return queryContext_.getUnmodifiableView();
    }
    /**
     *
     *
     * <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.
     */
    public int getQueryContextCount() {
      return queryContext_.size();
    }
    /**
     *
     *
     * <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.
     */
    public java.lang.String getQueryContext(int index) {
      return queryContext_.get(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.
     */
    public com.google.protobuf.ByteString getQueryContextBytes(int index) {
      return queryContext_.getByteString(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 to set the value at.
     * @param value The queryContext to set.
     * @return This builder for chaining.
     */
    public Builder setQueryContext(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureQueryContextIsMutable();
      queryContext_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 value The queryContext to add.
     * @return This builder for chaining.
     */
    public Builder addQueryContext(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureQueryContextIsMutable();
      queryContext_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 values The queryContext to add.
     * @return This builder for chaining.
     */
    public Builder addAllQueryContext(java.lang.Iterable<java.lang.String> values) {
      ensureQueryContextIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queryContext_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    public Builder clearQueryContext() {
      queryContext_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000100);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 value The bytes of the queryContext to add.
     * @return This builder for chaining.
     */
    public Builder addQueryContextBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureQueryContextIsMutable();
      queryContext_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList documentCreatorFilter_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureDocumentCreatorFilterIsMutable() {
      if (!((bitField0_ & 0x00000200) != 0)) {
        documentCreatorFilter_ =
            new com.google.protobuf.LazyStringArrayList(documentCreatorFilter_);
        bitField0_ |= 0x00000200;
      }
    }
    /**
     *
     *
     * <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.
     */
    public com.google.protobuf.ProtocolStringList getDocumentCreatorFilterList() {
      return documentCreatorFilter_.getUnmodifiableView();
    }
    /**
     *
     *
     * <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.
     */
    public int getDocumentCreatorFilterCount() {
      return documentCreatorFilter_.size();
    }
    /**
     *
     *
     * <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.
     */
    public java.lang.String getDocumentCreatorFilter(int index) {
      return documentCreatorFilter_.get(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.
     */
    public com.google.protobuf.ByteString getDocumentCreatorFilterBytes(int index) {
      return documentCreatorFilter_.getByteString(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 to set the value at.
     * @param value The documentCreatorFilter to set.
     * @return This builder for chaining.
     */
    public Builder setDocumentCreatorFilter(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDocumentCreatorFilterIsMutable();
      documentCreatorFilter_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 value The documentCreatorFilter to add.
     * @return This builder for chaining.
     */
    public Builder addDocumentCreatorFilter(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDocumentCreatorFilterIsMutable();
      documentCreatorFilter_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 values The documentCreatorFilter to add.
     * @return This builder for chaining.
     */
    public Builder addAllDocumentCreatorFilter(java.lang.Iterable<java.lang.String> values) {
      ensureDocumentCreatorFilterIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documentCreatorFilter_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 This builder for chaining.
     */
    public Builder clearDocumentCreatorFilter() {
      documentCreatorFilter_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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 value The bytes of the documentCreatorFilter to add.
     * @return This builder for chaining.
     */
    public Builder addDocumentCreatorFilterBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureDocumentCreatorFilterIsMutable();
      documentCreatorFilter_.add(value);
      onChanged();
      return this;
    }

    private com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata customWeightsMetadata_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata,
            com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.Builder,
            com.google.cloud.contentwarehouse.v1.CustomWeightsMetadataOrBuilder>
        customWeightsMetadataBuilder_;
    /**
     *
     *
     * <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.
     */
    public boolean hasCustomWeightsMetadata() {
      return ((bitField0_ & 0x00000400) != 0);
    }
    /**
     *
     *
     * <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.
     */
    public com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata getCustomWeightsMetadata() {
      if (customWeightsMetadataBuilder_ == null) {
        return customWeightsMetadata_ == null
            ? com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.getDefaultInstance()
            : customWeightsMetadata_;
      } else {
        return customWeightsMetadataBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <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>
     */
    public Builder setCustomWeightsMetadata(
        com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata value) {
      if (customWeightsMetadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        customWeightsMetadata_ = value;
      } else {
        customWeightsMetadataBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder setCustomWeightsMetadata(
        com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.Builder builderForValue) {
      if (customWeightsMetadataBuilder_ == null) {
        customWeightsMetadata_ = builderForValue.build();
      } else {
        customWeightsMetadataBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder mergeCustomWeightsMetadata(
        com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata value) {
      if (customWeightsMetadataBuilder_ == null) {
        if (((bitField0_ & 0x00000400) != 0)
            && customWeightsMetadata_ != null
            && customWeightsMetadata_
                != com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata
                    .getDefaultInstance()) {
          getCustomWeightsMetadataBuilder().mergeFrom(value);
        } else {
          customWeightsMetadata_ = value;
        }
      } else {
        customWeightsMetadataBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public Builder clearCustomWeightsMetadata() {
      bitField0_ = (bitField0_ & ~0x00000400);
      customWeightsMetadata_ = null;
      if (customWeightsMetadataBuilder_ != null) {
        customWeightsMetadataBuilder_.dispose();
        customWeightsMetadataBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.Builder
        getCustomWeightsMetadataBuilder() {
      bitField0_ |= 0x00000400;
      onChanged();
      return getCustomWeightsMetadataFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <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>
     */
    public com.google.cloud.contentwarehouse.v1.CustomWeightsMetadataOrBuilder
        getCustomWeightsMetadataOrBuilder() {
      if (customWeightsMetadataBuilder_ != null) {
        return customWeightsMetadataBuilder_.getMessageOrBuilder();
      } else {
        return customWeightsMetadata_ == null
            ? com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.getDefaultInstance()
            : customWeightsMetadata_;
      }
    }
    /**
     *
     *
     * <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>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata,
            com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.Builder,
            com.google.cloud.contentwarehouse.v1.CustomWeightsMetadataOrBuilder>
        getCustomWeightsMetadataFieldBuilder() {
      if (customWeightsMetadataBuilder_ == null) {
        customWeightsMetadataBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata,
                com.google.cloud.contentwarehouse.v1.CustomWeightsMetadata.Builder,
                com.google.cloud.contentwarehouse.v1.CustomWeightsMetadataOrBuilder>(
                getCustomWeightsMetadata(), getParentForChildren(), isClean());
        customWeightsMetadata_ = null;
      }
      return customWeightsMetadataBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.contentwarehouse.v1.DocumentQuery)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.contentwarehouse.v1.DocumentQuery)
  private static final com.google.cloud.contentwarehouse.v1.DocumentQuery DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.contentwarehouse.v1.DocumentQuery();
  }

  public static com.google.cloud.contentwarehouse.v1.DocumentQuery getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<DocumentQuery> PARSER =
      new com.google.protobuf.AbstractParser<DocumentQuery>() {
        @java.lang.Override
        public DocumentQuery parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<DocumentQuery> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<DocumentQuery> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.contentwarehouse.v1.DocumentQuery getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
