/*
 * Copyright 2023 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/talent/v4beta1/filters.proto

package com.google.cloud.talent.v4beta1;

/**
 *
 *
 * <pre>
 * Filter on job compensation type and amount.
 * </pre>
 *
 * Protobuf type {@code google.cloud.talent.v4beta1.CompensationFilter}
 */
public final class CompensationFilter extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.talent.v4beta1.CompensationFilter)
    CompensationFilterOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use CompensationFilter.newBuilder() to construct.
  private CompensationFilter(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private CompensationFilter() {
    type_ = 0;
    units_ = java.util.Collections.emptyList();
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.talent.v4beta1.FiltersProto
        .internal_static_google_cloud_talent_v4beta1_CompensationFilter_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.talent.v4beta1.FiltersProto
        .internal_static_google_cloud_talent_v4beta1_CompensationFilter_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.talent.v4beta1.CompensationFilter.class,
            com.google.cloud.talent.v4beta1.CompensationFilter.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * Specify the type of filtering.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.talent.v4beta1.CompensationFilter.FilterType}
   */
  public enum FilterType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Filter type unspecified. Position holder, INVALID, should never be used.
     * </pre>
     *
     * <code>FILTER_TYPE_UNSPECIFIED = 0;</code>
     */
    FILTER_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Filter by `base compensation entry's` unit. A job is a match if and
     * only if the job contains a base CompensationEntry and the base
     * CompensationEntry's unit matches provided
     * [units][google.cloud.talent.v4beta1.CompensationFilter.units]. Populate
     * one or more
     * [units][google.cloud.talent.v4beta1.CompensationFilter.units].
     *
     * See
     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry]
     * for definition of base compensation entry.
     * </pre>
     *
     * <code>UNIT_ONLY = 1;</code>
     */
    UNIT_ONLY(1),
    /**
     *
     *
     * <pre>
     * Filter by `base compensation entry's` unit and amount / range. A job
     * is a match if and only if the job contains a base CompensationEntry, and
     * the base entry's unit matches provided
     * [CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit]
     * and amount or range overlaps with provided
     * [CompensationRange][google.cloud.talent.v4beta1.CompensationInfo.CompensationRange].
     *
     * See
     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry]
     * for definition of base compensation entry.
     *
     * Set exactly one
     * [units][google.cloud.talent.v4beta1.CompensationFilter.units] and
     * populate [range][google.cloud.talent.v4beta1.CompensationFilter.range].
     * </pre>
     *
     * <code>UNIT_AND_AMOUNT = 2;</code>
     */
    UNIT_AND_AMOUNT(2),
    /**
     *
     *
     * <pre>
     * Filter by annualized base compensation amount and `base compensation
     * entry's` unit. Populate
     * [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or
     * more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
     * </pre>
     *
     * <code>ANNUALIZED_BASE_AMOUNT = 3;</code>
     */
    ANNUALIZED_BASE_AMOUNT(3),
    /**
     *
     *
     * <pre>
     * Filter by annualized total compensation amount and `base compensation
     * entry's` unit . Populate
     * [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or
     * more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
     * </pre>
     *
     * <code>ANNUALIZED_TOTAL_AMOUNT = 4;</code>
     */
    ANNUALIZED_TOTAL_AMOUNT(4),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Filter type unspecified. Position holder, INVALID, should never be used.
     * </pre>
     *
     * <code>FILTER_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int FILTER_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Filter by `base compensation entry's` unit. A job is a match if and
     * only if the job contains a base CompensationEntry and the base
     * CompensationEntry's unit matches provided
     * [units][google.cloud.talent.v4beta1.CompensationFilter.units]. Populate
     * one or more
     * [units][google.cloud.talent.v4beta1.CompensationFilter.units].
     *
     * See
     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry]
     * for definition of base compensation entry.
     * </pre>
     *
     * <code>UNIT_ONLY = 1;</code>
     */
    public static final int UNIT_ONLY_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Filter by `base compensation entry's` unit and amount / range. A job
     * is a match if and only if the job contains a base CompensationEntry, and
     * the base entry's unit matches provided
     * [CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit]
     * and amount or range overlaps with provided
     * [CompensationRange][google.cloud.talent.v4beta1.CompensationInfo.CompensationRange].
     *
     * See
     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry]
     * for definition of base compensation entry.
     *
     * Set exactly one
     * [units][google.cloud.talent.v4beta1.CompensationFilter.units] and
     * populate [range][google.cloud.talent.v4beta1.CompensationFilter.range].
     * </pre>
     *
     * <code>UNIT_AND_AMOUNT = 2;</code>
     */
    public static final int UNIT_AND_AMOUNT_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Filter by annualized base compensation amount and `base compensation
     * entry's` unit. Populate
     * [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or
     * more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
     * </pre>
     *
     * <code>ANNUALIZED_BASE_AMOUNT = 3;</code>
     */
    public static final int ANNUALIZED_BASE_AMOUNT_VALUE = 3;
    /**
     *
     *
     * <pre>
     * Filter by annualized total compensation amount and `base compensation
     * entry's` unit . Populate
     * [range][google.cloud.talent.v4beta1.CompensationFilter.range] and zero or
     * more [units][google.cloud.talent.v4beta1.CompensationFilter.units].
     * </pre>
     *
     * <code>ANNUALIZED_TOTAL_AMOUNT = 4;</code>
     */
    public static final int ANNUALIZED_TOTAL_AMOUNT_VALUE = 4;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static FilterType valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static FilterType forNumber(int value) {
      switch (value) {
        case 0:
          return FILTER_TYPE_UNSPECIFIED;
        case 1:
          return UNIT_ONLY;
        case 2:
          return UNIT_AND_AMOUNT;
        case 3:
          return ANNUALIZED_BASE_AMOUNT;
        case 4:
          return ANNUALIZED_TOTAL_AMOUNT;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<FilterType> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<FilterType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<FilterType>() {
          public FilterType findValueByNumber(int number) {
            return FilterType.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.talent.v4beta1.CompensationFilter.getDescriptor()
          .getEnumTypes()
          .get(0);
    }

    private static final FilterType[] VALUES = values();

    public static FilterType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private FilterType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4beta1.CompensationFilter.FilterType)
  }

  public static final int TYPE_FIELD_NUMBER = 1;
  private int type_ = 0;
  /**
   *
   *
   * <pre>
   * Required. Type of filter.
   * </pre>
   *
   * <code>
   * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The enum numeric value on the wire for type.
   */
  @java.lang.Override
  public int getTypeValue() {
    return type_;
  }
  /**
   *
   *
   * <pre>
   * Required. Type of filter.
   * </pre>
   *
   * <code>
   * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The type.
   */
  @java.lang.Override
  public com.google.cloud.talent.v4beta1.CompensationFilter.FilterType getType() {
    com.google.cloud.talent.v4beta1.CompensationFilter.FilterType result =
        com.google.cloud.talent.v4beta1.CompensationFilter.FilterType.forNumber(type_);
    return result == null
        ? com.google.cloud.talent.v4beta1.CompensationFilter.FilterType.UNRECOGNIZED
        : result;
  }

  public static final int UNITS_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private java.util.List<java.lang.Integer> units_;

  private static final com.google.protobuf.Internal.ListAdapter.Converter<
          java.lang.Integer, com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>
      units_converter_ =
          new com.google.protobuf.Internal.ListAdapter.Converter<
              java.lang.Integer,
              com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>() {
            public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit convert(
                java.lang.Integer from) {
              com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit result =
                  com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.forNumber(from);
              return result == null
                  ? com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.UNRECOGNIZED
                  : result;
            }
          };
  /**
   *
   *
   * <pre>
   * Required. Specify desired `base compensation entry's`
   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return A list containing the units.
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>
      getUnitsList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>(
        units_, units_converter_);
  }
  /**
   *
   *
   * <pre>
   * Required. Specify desired `base compensation entry's`
   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The count of units.
   */
  @java.lang.Override
  public int getUnitsCount() {
    return units_.size();
  }
  /**
   *
   *
   * <pre>
   * Required. Specify desired `base compensation entry's`
   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @param index The index of the element to return.
   * @return The units at the given index.
   */
  @java.lang.Override
  public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit getUnits(int index) {
    return units_converter_.convert(units_.get(index));
  }
  /**
   *
   *
   * <pre>
   * Required. Specify desired `base compensation entry's`
   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return A list containing the enum numeric values on the wire for units.
   */
  @java.lang.Override
  public java.util.List<java.lang.Integer> getUnitsValueList() {
    return units_;
  }
  /**
   *
   *
   * <pre>
   * Required. Specify desired `base compensation entry's`
   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
   * </pre>
   *
   * <code>
   * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @param index The index of the value to return.
   * @return The enum numeric value on the wire of units at the given index.
   */
  @java.lang.Override
  public int getUnitsValue(int index) {
    return units_.get(index);
  }

  private int unitsMemoizedSerializedSize;

  public static final int RANGE_FIELD_NUMBER = 3;
  private com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range_;
  /**
   *
   *
   * <pre>
   * Compensation range.
   * </pre>
   *
   * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
   *
   * @return Whether the range field is set.
   */
  @java.lang.Override
  public boolean hasRange() {
    return range_ != null;
  }
  /**
   *
   *
   * <pre>
   * Compensation range.
   * </pre>
   *
   * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
   *
   * @return The range.
   */
  @java.lang.Override
  public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange getRange() {
    return range_ == null
        ? com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.getDefaultInstance()
        : range_;
  }
  /**
   *
   *
   * <pre>
   * Compensation range.
   * </pre>
   *
   * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeOrBuilder
      getRangeOrBuilder() {
    return range_ == null
        ? com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.getDefaultInstance()
        : range_;
  }

  public static final int INCLUDE_JOBS_WITH_UNSPECIFIED_COMPENSATION_RANGE_FIELD_NUMBER = 4;
  private boolean includeJobsWithUnspecifiedCompensationRange_ = false;
  /**
   *
   *
   * <pre>
   * If set to true, jobs with unspecified compensation range fields are
   * included.
   * </pre>
   *
   * <code>bool include_jobs_with_unspecified_compensation_range = 4;</code>
   *
   * @return The includeJobsWithUnspecifiedCompensationRange.
   */
  @java.lang.Override
  public boolean getIncludeJobsWithUnspecifiedCompensationRange() {
    return includeJobsWithUnspecifiedCompensationRange_;
  }

  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 {
    getSerializedSize();
    if (type_
        != com.google.cloud.talent.v4beta1.CompensationFilter.FilterType.FILTER_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(1, type_);
    }
    if (getUnitsList().size() > 0) {
      output.writeUInt32NoTag(18);
      output.writeUInt32NoTag(unitsMemoizedSerializedSize);
    }
    for (int i = 0; i < units_.size(); i++) {
      output.writeEnumNoTag(units_.get(i));
    }
    if (range_ != null) {
      output.writeMessage(3, getRange());
    }
    if (includeJobsWithUnspecifiedCompensationRange_ != false) {
      output.writeBool(4, includeJobsWithUnspecifiedCompensationRange_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (type_
        != com.google.cloud.talent.v4beta1.CompensationFilter.FilterType.FILTER_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < units_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(units_.get(i));
      }
      size += dataSize;
      if (!getUnitsList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
      }
      unitsMemoizedSerializedSize = dataSize;
    }
    if (range_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRange());
    }
    if (includeJobsWithUnspecifiedCompensationRange_ != false) {
      size +=
          com.google.protobuf.CodedOutputStream.computeBoolSize(
              4, includeJobsWithUnspecifiedCompensationRange_);
    }
    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.talent.v4beta1.CompensationFilter)) {
      return super.equals(obj);
    }
    com.google.cloud.talent.v4beta1.CompensationFilter other =
        (com.google.cloud.talent.v4beta1.CompensationFilter) obj;

    if (type_ != other.type_) return false;
    if (!units_.equals(other.units_)) return false;
    if (hasRange() != other.hasRange()) return false;
    if (hasRange()) {
      if (!getRange().equals(other.getRange())) return false;
    }
    if (getIncludeJobsWithUnspecifiedCompensationRange()
        != other.getIncludeJobsWithUnspecifiedCompensationRange()) 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) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    if (getUnitsCount() > 0) {
      hash = (37 * hash) + UNITS_FIELD_NUMBER;
      hash = (53 * hash) + units_.hashCode();
    }
    if (hasRange()) {
      hash = (37 * hash) + RANGE_FIELD_NUMBER;
      hash = (53 * hash) + getRange().hashCode();
    }
    hash = (37 * hash) + INCLUDE_JOBS_WITH_UNSPECIFIED_COMPENSATION_RANGE_FIELD_NUMBER;
    hash =
        (53 * hash)
            + com.google.protobuf.Internal.hashBoolean(
                getIncludeJobsWithUnspecifiedCompensationRange());
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.talent.v4beta1.CompensationFilter parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.talent.v4beta1.CompensationFilter 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.talent.v4beta1.CompensationFilter parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.talent.v4beta1.CompensationFilter 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.talent.v4beta1.CompensationFilter parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

  public static com.google.cloud.talent.v4beta1.CompensationFilter 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.talent.v4beta1.CompensationFilter parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.talent.v4beta1.CompensationFilter 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.talent.v4beta1.CompensationFilter parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.talent.v4beta1.CompensationFilter 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.talent.v4beta1.CompensationFilter 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;
  }
  /**
   *
   *
   * <pre>
   * Filter on job compensation type and amount.
   * </pre>
   *
   * Protobuf type {@code google.cloud.talent.v4beta1.CompensationFilter}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4beta1.CompensationFilter)
      com.google.cloud.talent.v4beta1.CompensationFilterOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.talent.v4beta1.FiltersProto
          .internal_static_google_cloud_talent_v4beta1_CompensationFilter_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.talent.v4beta1.FiltersProto
          .internal_static_google_cloud_talent_v4beta1_CompensationFilter_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.talent.v4beta1.CompensationFilter.class,
              com.google.cloud.talent.v4beta1.CompensationFilter.Builder.class);
    }

    // Construct using com.google.cloud.talent.v4beta1.CompensationFilter.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      type_ = 0;
      units_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      range_ = null;
      if (rangeBuilder_ != null) {
        rangeBuilder_.dispose();
        rangeBuilder_ = null;
      }
      includeJobsWithUnspecifiedCompensationRange_ = false;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.talent.v4beta1.FiltersProto
          .internal_static_google_cloud_talent_v4beta1_CompensationFilter_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.talent.v4beta1.CompensationFilter getDefaultInstanceForType() {
      return com.google.cloud.talent.v4beta1.CompensationFilter.getDefaultInstance();
    }

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

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

    private void buildPartialRepeatedFields(
        com.google.cloud.talent.v4beta1.CompensationFilter result) {
      if (((bitField0_ & 0x00000002) != 0)) {
        units_ = java.util.Collections.unmodifiableList(units_);
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.units_ = units_;
    }

    private void buildPartial0(com.google.cloud.talent.v4beta1.CompensationFilter result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.type_ = type_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.range_ = rangeBuilder_ == null ? range_ : rangeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.includeJobsWithUnspecifiedCompensationRange_ =
            includeJobsWithUnspecifiedCompensationRange_;
      }
    }

    @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.talent.v4beta1.CompensationFilter) {
        return mergeFrom((com.google.cloud.talent.v4beta1.CompensationFilter) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.talent.v4beta1.CompensationFilter other) {
      if (other == com.google.cloud.talent.v4beta1.CompensationFilter.getDefaultInstance())
        return this;
      if (other.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      if (!other.units_.isEmpty()) {
        if (units_.isEmpty()) {
          units_ = other.units_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureUnitsIsMutable();
          units_.addAll(other.units_);
        }
        onChanged();
      }
      if (other.hasRange()) {
        mergeRange(other.getRange());
      }
      if (other.getIncludeJobsWithUnspecifiedCompensationRange() != false) {
        setIncludeJobsWithUnspecifiedCompensationRange(
            other.getIncludeJobsWithUnspecifiedCompensationRange());
      }
      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 8:
              {
                type_ = input.readEnum();
                bitField0_ |= 0x00000001;
                break;
              } // case 8
            case 16:
              {
                int tmpRaw = input.readEnum();
                ensureUnitsIsMutable();
                units_.add(tmpRaw);
                break;
              } // case 16
            case 18:
              {
                int length = input.readRawVarint32();
                int oldLimit = input.pushLimit(length);
                while (input.getBytesUntilLimit() > 0) {
                  int tmpRaw = input.readEnum();
                  ensureUnitsIsMutable();
                  units_.add(tmpRaw);
                }
                input.popLimit(oldLimit);
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getRangeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 32:
              {
                includeJobsWithUnspecifiedCompensationRange_ = input.readBool();
                bitField0_ |= 0x00000008;
                break;
              } // case 32
            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 int type_ = 0;
    /**
     *
     *
     * <pre>
     * Required. Type of filter.
     * </pre>
     *
     * <code>
     * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * Required. Type of filter.
     * </pre>
     *
     * <code>
     * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param value The enum numeric value on the wire for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeValue(int value) {
      type_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Type of filter.
     * </pre>
     *
     * <code>
     * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The type.
     */
    @java.lang.Override
    public com.google.cloud.talent.v4beta1.CompensationFilter.FilterType getType() {
      com.google.cloud.talent.v4beta1.CompensationFilter.FilterType result =
          com.google.cloud.talent.v4beta1.CompensationFilter.FilterType.forNumber(type_);
      return result == null
          ? com.google.cloud.talent.v4beta1.CompensationFilter.FilterType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Required. Type of filter.
     * </pre>
     *
     * <code>
     * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(com.google.cloud.talent.v4beta1.CompensationFilter.FilterType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Type of filter.
     * </pre>
     *
     * <code>
     * .google.cloud.talent.v4beta1.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearType() {
      bitField0_ = (bitField0_ & ~0x00000001);
      type_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<java.lang.Integer> units_ = java.util.Collections.emptyList();

    private void ensureUnitsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        units_ = new java.util.ArrayList<java.lang.Integer>(units_);
        bitField0_ |= 0x00000002;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return A list containing the units.
     */
    public java.util.List<com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>
        getUnitsList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>(
          units_, units_converter_);
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The count of units.
     */
    public int getUnitsCount() {
      return units_.size();
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param index The index of the element to return.
     * @return The units at the given index.
     */
    public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit getUnits(int index) {
      return units_converter_.convert(units_.get(index));
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param index The index to set the value at.
     * @param value The units to set.
     * @return This builder for chaining.
     */
    public Builder setUnits(
        int index, com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureUnitsIsMutable();
      units_.set(index, value.getNumber());
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param value The units to add.
     * @return This builder for chaining.
     */
    public Builder addUnits(
        com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureUnitsIsMutable();
      units_.add(value.getNumber());
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param values The units to add.
     * @return This builder for chaining.
     */
    public Builder addAllUnits(
        java.lang.Iterable<
                ? extends com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit>
            values) {
      ensureUnitsIsMutable();
      for (com.google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit value : values) {
        units_.add(value.getNumber());
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUnits() {
      units_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return A list containing the enum numeric values on the wire for units.
     */
    public java.util.List<java.lang.Integer> getUnitsValueList() {
      return java.util.Collections.unmodifiableList(units_);
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param index The index of the value to return.
     * @return The enum numeric value on the wire of units at the given index.
     */
    public int getUnitsValue(int index) {
      return units_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param index The index to set the value at.
     * @param value The enum numeric value on the wire for units to set.
     * @return This builder for chaining.
     */
    public Builder setUnitsValue(int index, int value) {
      ensureUnitsIsMutable();
      units_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param value The enum numeric value on the wire for units to add.
     * @return This builder for chaining.
     */
    public Builder addUnitsValue(int value) {
      ensureUnitsIsMutable();
      units_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Specify desired `base compensation entry's`
     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit].
     * </pre>
     *
     * <code>
     * repeated .google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param values The enum numeric values on the wire for units to add.
     * @return This builder for chaining.
     */
    public Builder addAllUnitsValue(java.lang.Iterable<java.lang.Integer> values) {
      ensureUnitsIsMutable();
      for (int value : values) {
        units_.add(value);
      }
      onChanged();
      return this;
    }

    private com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange,
            com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.Builder,
            com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeOrBuilder>
        rangeBuilder_;
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     *
     * @return Whether the range field is set.
     */
    public boolean hasRange() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     *
     * @return The range.
     */
    public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange getRange() {
      if (rangeBuilder_ == null) {
        return range_ == null
            ? com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange
                .getDefaultInstance()
            : range_;
      } else {
        return rangeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    public Builder setRange(
        com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange value) {
      if (rangeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        range_ = value;
      } else {
        rangeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    public Builder setRange(
        com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.Builder
            builderForValue) {
      if (rangeBuilder_ == null) {
        range_ = builderForValue.build();
      } else {
        rangeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    public Builder mergeRange(
        com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange value) {
      if (rangeBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && range_ != null
            && range_
                != com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange
                    .getDefaultInstance()) {
          getRangeBuilder().mergeFrom(value);
        } else {
          range_ = value;
        }
      } else {
        rangeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    public Builder clearRange() {
      bitField0_ = (bitField0_ & ~0x00000004);
      range_ = null;
      if (rangeBuilder_ != null) {
        rangeBuilder_.dispose();
        rangeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.Builder
        getRangeBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getRangeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    public com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeOrBuilder
        getRangeOrBuilder() {
      if (rangeBuilder_ != null) {
        return rangeBuilder_.getMessageOrBuilder();
      } else {
        return range_ == null
            ? com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange
                .getDefaultInstance()
            : range_;
      }
    }
    /**
     *
     *
     * <pre>
     * Compensation range.
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange range = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange,
            com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.Builder,
            com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeOrBuilder>
        getRangeFieldBuilder() {
      if (rangeBuilder_ == null) {
        rangeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange,
                com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRange.Builder,
                com.google.cloud.talent.v4beta1.CompensationInfo.CompensationRangeOrBuilder>(
                getRange(), getParentForChildren(), isClean());
        range_ = null;
      }
      return rangeBuilder_;
    }

    private boolean includeJobsWithUnspecifiedCompensationRange_;
    /**
     *
     *
     * <pre>
     * If set to true, jobs with unspecified compensation range fields are
     * included.
     * </pre>
     *
     * <code>bool include_jobs_with_unspecified_compensation_range = 4;</code>
     *
     * @return The includeJobsWithUnspecifiedCompensationRange.
     */
    @java.lang.Override
    public boolean getIncludeJobsWithUnspecifiedCompensationRange() {
      return includeJobsWithUnspecifiedCompensationRange_;
    }
    /**
     *
     *
     * <pre>
     * If set to true, jobs with unspecified compensation range fields are
     * included.
     * </pre>
     *
     * <code>bool include_jobs_with_unspecified_compensation_range = 4;</code>
     *
     * @param value The includeJobsWithUnspecifiedCompensationRange to set.
     * @return This builder for chaining.
     */
    public Builder setIncludeJobsWithUnspecifiedCompensationRange(boolean value) {

      includeJobsWithUnspecifiedCompensationRange_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If set to true, jobs with unspecified compensation range fields are
     * included.
     * </pre>
     *
     * <code>bool include_jobs_with_unspecified_compensation_range = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearIncludeJobsWithUnspecifiedCompensationRange() {
      bitField0_ = (bitField0_ & ~0x00000008);
      includeJobsWithUnspecifiedCompensationRange_ = false;
      onChanged();
      return this;
    }

    @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.talent.v4beta1.CompensationFilter)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.talent.v4beta1.CompensationFilter)
  private static final com.google.cloud.talent.v4beta1.CompensationFilter DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.talent.v4beta1.CompensationFilter();
  }

  public static com.google.cloud.talent.v4beta1.CompensationFilter getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<CompensationFilter> PARSER =
      new com.google.protobuf.AbstractParser<CompensationFilter>() {
        @java.lang.Override
        public CompensationFilter 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<CompensationFilter> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.cloud.talent.v4beta1.CompensationFilter getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
