// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/webrisk/v1beta1/webrisk.proto

package com.google.webrisk.v1beta1;

/**
 *
 *
 * <pre>
 * Describes an API diff request.
 * </pre>
 *
 * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest}
 */
public final class ComputeThreatListDiffRequest extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest)
    ComputeThreatListDiffRequestOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ComputeThreatListDiffRequest.newBuilder() to construct.
  private ComputeThreatListDiffRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ComputeThreatListDiffRequest() {
    threatType_ = 0;
    versionToken_ = com.google.protobuf.ByteString.EMPTY;
  }

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

  private ComputeThreatListDiffRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8:
            {
              int rawValue = input.readEnum();

              threatType_ = rawValue;
              break;
            }
          case 18:
            {
              versionToken_ = input.readBytes();
              break;
            }
          case 26:
            {
              com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder
                  subBuilder = null;
              if (constraints_ != null) {
                subBuilder = constraints_.toBuilder();
              }
              constraints_ =
                  input.readMessage(
                      com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(constraints_);
                constraints_ = subBuilder.buildPartial();
              }

              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.webrisk.v1beta1.WebRiskProto
        .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.webrisk.v1beta1.WebRiskProto
        .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.class,
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Builder.class);
  }

  public interface ConstraintsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The maximum size in number of entries. The diff will not contain more
     * entries than this value.  This should be a power of 2 between 2**10 and
     * 2**20.  If zero, no diff size limit is set.
     * </pre>
     *
     * <code>int32 max_diff_entries = 1;</code>
     */
    int getMaxDiffEntries();

    /**
     *
     *
     * <pre>
     * Sets the maximum number of entries that the client is willing to have
     * in the local database. This should be a power of 2 between 2**10 and
     * 2**20. If zero, no database size limit is set.
     * </pre>
     *
     * <code>int32 max_database_entries = 2;</code>
     */
    int getMaxDatabaseEntries();

    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    java.util.List<com.google.webrisk.v1beta1.CompressionType> getSupportedCompressionsList();
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    int getSupportedCompressionsCount();
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index);
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    java.util.List<java.lang.Integer> getSupportedCompressionsValueList();
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    int getSupportedCompressionsValue(int index);
  }
  /**
   *
   *
   * <pre>
   * The constraints for this diff.
   * </pre>
   *
   * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints}
   */
  public static final class Constraints extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
      ConstraintsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Constraints.newBuilder() to construct.
    private Constraints(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Constraints() {
      supportedCompressions_ = java.util.Collections.emptyList();
    }

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

    private Constraints(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8:
              {
                maxDiffEntries_ = input.readInt32();
                break;
              }
            case 16:
              {
                maxDatabaseEntries_ = input.readInt32();
                break;
              }
            case 24:
              {
                int rawValue = input.readEnum();
                if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                  supportedCompressions_ = new java.util.ArrayList<java.lang.Integer>();
                  mutable_bitField0_ |= 0x00000004;
                }
                supportedCompressions_.add(rawValue);
                break;
              }
            case 26:
              {
                int length = input.readRawVarint32();
                int oldLimit = input.pushLimit(length);
                while (input.getBytesUntilLimit() > 0) {
                  int rawValue = input.readEnum();
                  if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                    supportedCompressions_ = new java.util.ArrayList<java.lang.Integer>();
                    mutable_bitField0_ |= 0x00000004;
                  }
                  supportedCompressions_.add(rawValue);
                }
                input.popLimit(oldLimit);
                break;
              }
            default:
              {
                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000004) != 0)) {
          supportedCompressions_ = java.util.Collections.unmodifiableList(supportedCompressions_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.webrisk.v1beta1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.webrisk.v1beta1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.class,
              com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder.class);
    }

    private int bitField0_;
    public static final int MAX_DIFF_ENTRIES_FIELD_NUMBER = 1;
    private int maxDiffEntries_;
    /**
     *
     *
     * <pre>
     * The maximum size in number of entries. The diff will not contain more
     * entries than this value.  This should be a power of 2 between 2**10 and
     * 2**20.  If zero, no diff size limit is set.
     * </pre>
     *
     * <code>int32 max_diff_entries = 1;</code>
     */
    public int getMaxDiffEntries() {
      return maxDiffEntries_;
    }

    public static final int MAX_DATABASE_ENTRIES_FIELD_NUMBER = 2;
    private int maxDatabaseEntries_;
    /**
     *
     *
     * <pre>
     * Sets the maximum number of entries that the client is willing to have
     * in the local database. This should be a power of 2 between 2**10 and
     * 2**20. If zero, no database size limit is set.
     * </pre>
     *
     * <code>int32 max_database_entries = 2;</code>
     */
    public int getMaxDatabaseEntries() {
      return maxDatabaseEntries_;
    }

    public static final int SUPPORTED_COMPRESSIONS_FIELD_NUMBER = 3;
    private java.util.List<java.lang.Integer> supportedCompressions_;
    private static final com.google.protobuf.Internal.ListAdapter.Converter<
            java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>
        supportedCompressions_converter_ =
            new com.google.protobuf.Internal.ListAdapter.Converter<
                java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>() {
              public com.google.webrisk.v1beta1.CompressionType convert(java.lang.Integer from) {
                @SuppressWarnings("deprecation")
                com.google.webrisk.v1beta1.CompressionType result =
                    com.google.webrisk.v1beta1.CompressionType.valueOf(from);
                return result == null
                    ? com.google.webrisk.v1beta1.CompressionType.UNRECOGNIZED
                    : result;
              }
            };
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    public java.util.List<com.google.webrisk.v1beta1.CompressionType>
        getSupportedCompressionsList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>(
          supportedCompressions_, supportedCompressions_converter_);
    }
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    public int getSupportedCompressionsCount() {
      return supportedCompressions_.size();
    }
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    public com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index) {
      return supportedCompressions_converter_.convert(supportedCompressions_.get(index));
    }
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    public java.util.List<java.lang.Integer> getSupportedCompressionsValueList() {
      return supportedCompressions_;
    }
    /**
     *
     *
     * <pre>
     * The compression types supported by the client.
     * </pre>
     *
     * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
     * </code>
     */
    public int getSupportedCompressionsValue(int index) {
      return supportedCompressions_.get(index);
    }

    private int supportedCompressionsMemoizedSerializedSize;

    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 (maxDiffEntries_ != 0) {
        output.writeInt32(1, maxDiffEntries_);
      }
      if (maxDatabaseEntries_ != 0) {
        output.writeInt32(2, maxDatabaseEntries_);
      }
      if (getSupportedCompressionsList().size() > 0) {
        output.writeUInt32NoTag(26);
        output.writeUInt32NoTag(supportedCompressionsMemoizedSerializedSize);
      }
      for (int i = 0; i < supportedCompressions_.size(); i++) {
        output.writeEnumNoTag(supportedCompressions_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (maxDiffEntries_ != 0) {
        size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxDiffEntries_);
      }
      if (maxDatabaseEntries_ != 0) {
        size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxDatabaseEntries_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < supportedCompressions_.size(); i++) {
          dataSize +=
              com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(
                  supportedCompressions_.get(i));
        }
        size += dataSize;
        if (!getSupportedCompressionsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
        }
        supportedCompressionsMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)) {
        return super.equals(obj);
      }
      com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints other =
          (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) obj;

      if (getMaxDiffEntries() != other.getMaxDiffEntries()) return false;
      if (getMaxDatabaseEntries() != other.getMaxDatabaseEntries()) return false;
      if (!supportedCompressions_.equals(other.supportedCompressions_)) return false;
      if (!unknownFields.equals(other.unknownFields)) 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) + MAX_DIFF_ENTRIES_FIELD_NUMBER;
      hash = (53 * hash) + getMaxDiffEntries();
      hash = (37 * hash) + MAX_DATABASE_ENTRIES_FIELD_NUMBER;
      hash = (53 * hash) + getMaxDatabaseEntries();
      if (getSupportedCompressionsCount() > 0) {
        hash = (37 * hash) + SUPPORTED_COMPRESSIONS_FIELD_NUMBER;
        hash = (53 * hash) + supportedCompressions_.hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
        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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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>
     * The constraints for this diff.
     * </pre>
     *
     * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.webrisk.v1beta1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.webrisk.v1beta1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.class,
                com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder.class);
      }

      // Construct using
      // com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        maxDiffEntries_ = 0;

        maxDatabaseEntries_ = 0;

        supportedCompressions_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.webrisk.v1beta1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_descriptor;
      }

      @java.lang.Override
      public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
          getDefaultInstanceForType() {
        return com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
            .getDefaultInstance();
      }

      @java.lang.Override
      public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints build() {
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints buildPartial() {
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints result =
            new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        result.maxDiffEntries_ = maxDiffEntries_;
        result.maxDatabaseEntries_ = maxDatabaseEntries_;
        if (((bitField0_ & 0x00000004) != 0)) {
          supportedCompressions_ = java.util.Collections.unmodifiableList(supportedCompressions_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.supportedCompressions_ = supportedCompressions_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) {
          return mergeFrom(
              (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints other) {
        if (other
            == com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
                .getDefaultInstance()) return this;
        if (other.getMaxDiffEntries() != 0) {
          setMaxDiffEntries(other.getMaxDiffEntries());
        }
        if (other.getMaxDatabaseEntries() != 0) {
          setMaxDatabaseEntries(other.getMaxDatabaseEntries());
        }
        if (!other.supportedCompressions_.isEmpty()) {
          if (supportedCompressions_.isEmpty()) {
            supportedCompressions_ = other.supportedCompressions_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureSupportedCompressionsIsMutable();
            supportedCompressions_.addAll(other.supportedCompressions_);
          }
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
                  e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int bitField0_;

      private int maxDiffEntries_;
      /**
       *
       *
       * <pre>
       * The maximum size in number of entries. The diff will not contain more
       * entries than this value.  This should be a power of 2 between 2**10 and
       * 2**20.  If zero, no diff size limit is set.
       * </pre>
       *
       * <code>int32 max_diff_entries = 1;</code>
       */
      public int getMaxDiffEntries() {
        return maxDiffEntries_;
      }
      /**
       *
       *
       * <pre>
       * The maximum size in number of entries. The diff will not contain more
       * entries than this value.  This should be a power of 2 between 2**10 and
       * 2**20.  If zero, no diff size limit is set.
       * </pre>
       *
       * <code>int32 max_diff_entries = 1;</code>
       */
      public Builder setMaxDiffEntries(int value) {

        maxDiffEntries_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The maximum size in number of entries. The diff will not contain more
       * entries than this value.  This should be a power of 2 between 2**10 and
       * 2**20.  If zero, no diff size limit is set.
       * </pre>
       *
       * <code>int32 max_diff_entries = 1;</code>
       */
      public Builder clearMaxDiffEntries() {

        maxDiffEntries_ = 0;
        onChanged();
        return this;
      }

      private int maxDatabaseEntries_;
      /**
       *
       *
       * <pre>
       * Sets the maximum number of entries that the client is willing to have
       * in the local database. This should be a power of 2 between 2**10 and
       * 2**20. If zero, no database size limit is set.
       * </pre>
       *
       * <code>int32 max_database_entries = 2;</code>
       */
      public int getMaxDatabaseEntries() {
        return maxDatabaseEntries_;
      }
      /**
       *
       *
       * <pre>
       * Sets the maximum number of entries that the client is willing to have
       * in the local database. This should be a power of 2 between 2**10 and
       * 2**20. If zero, no database size limit is set.
       * </pre>
       *
       * <code>int32 max_database_entries = 2;</code>
       */
      public Builder setMaxDatabaseEntries(int value) {

        maxDatabaseEntries_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Sets the maximum number of entries that the client is willing to have
       * in the local database. This should be a power of 2 between 2**10 and
       * 2**20. If zero, no database size limit is set.
       * </pre>
       *
       * <code>int32 max_database_entries = 2;</code>
       */
      public Builder clearMaxDatabaseEntries() {

        maxDatabaseEntries_ = 0;
        onChanged();
        return this;
      }

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

      private void ensureSupportedCompressionsIsMutable() {
        if (!((bitField0_ & 0x00000004) != 0)) {
          supportedCompressions_ =
              new java.util.ArrayList<java.lang.Integer>(supportedCompressions_);
          bitField0_ |= 0x00000004;
        }
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public java.util.List<com.google.webrisk.v1beta1.CompressionType>
          getSupportedCompressionsList() {
        return new com.google.protobuf.Internal.ListAdapter<
            java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>(
            supportedCompressions_, supportedCompressions_converter_);
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public int getSupportedCompressionsCount() {
        return supportedCompressions_.size();
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index) {
        return supportedCompressions_converter_.convert(supportedCompressions_.get(index));
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder setSupportedCompressions(
          int index, com.google.webrisk.v1beta1.CompressionType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSupportedCompressionsIsMutable();
        supportedCompressions_.set(index, value.getNumber());
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder addSupportedCompressions(com.google.webrisk.v1beta1.CompressionType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSupportedCompressionsIsMutable();
        supportedCompressions_.add(value.getNumber());
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder addAllSupportedCompressions(
          java.lang.Iterable<? extends com.google.webrisk.v1beta1.CompressionType> values) {
        ensureSupportedCompressionsIsMutable();
        for (com.google.webrisk.v1beta1.CompressionType value : values) {
          supportedCompressions_.add(value.getNumber());
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder clearSupportedCompressions() {
        supportedCompressions_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public java.util.List<java.lang.Integer> getSupportedCompressionsValueList() {
        return java.util.Collections.unmodifiableList(supportedCompressions_);
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public int getSupportedCompressionsValue(int index) {
        return supportedCompressions_.get(index);
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder setSupportedCompressionsValue(int index, int value) {
        ensureSupportedCompressionsIsMutable();
        supportedCompressions_.set(index, value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder addSupportedCompressionsValue(int value) {
        ensureSupportedCompressionsIsMutable();
        supportedCompressions_.add(value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The compression types supported by the client.
       * </pre>
       *
       * <code>repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
       * </code>
       */
      public Builder addAllSupportedCompressionsValue(
          java.lang.Iterable<java.lang.Integer> values) {
        ensureSupportedCompressionsIsMutable();
        for (int value : values) {
          supportedCompressions_.add(value);
        }
        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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
    private static final com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints();
    }

    public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Constraints> PARSER =
        new com.google.protobuf.AbstractParser<Constraints>() {
          @java.lang.Override
          public Constraints parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            return new Constraints(input, extensionRegistry);
          }
        };

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

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

    @java.lang.Override
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int THREAT_TYPE_FIELD_NUMBER = 1;
  private int threatType_;
  /**
   *
   *
   * <pre>
   * Required. The ThreatList to update.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
   */
  public int getThreatTypeValue() {
    return threatType_;
  }
  /**
   *
   *
   * <pre>
   * Required. The ThreatList to update.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
   */
  public com.google.webrisk.v1beta1.ThreatType getThreatType() {
    @SuppressWarnings("deprecation")
    com.google.webrisk.v1beta1.ThreatType result =
        com.google.webrisk.v1beta1.ThreatType.valueOf(threatType_);
    return result == null ? com.google.webrisk.v1beta1.ThreatType.UNRECOGNIZED : result;
  }

  public static final int VERSION_TOKEN_FIELD_NUMBER = 2;
  private com.google.protobuf.ByteString versionToken_;
  /**
   *
   *
   * <pre>
   * The current version token of the client for the requested list (the
   * client version that was received from the last successful diff).
   * </pre>
   *
   * <code>bytes version_token = 2;</code>
   */
  public com.google.protobuf.ByteString getVersionToken() {
    return versionToken_;
  }

  public static final int CONSTRAINTS_FIELD_NUMBER = 3;
  private com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints_;
  /**
   *
   *
   * <pre>
   * The constraints associated with this request.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
   * </code>
   */
  public boolean hasConstraints() {
    return constraints_ != null;
  }
  /**
   *
   *
   * <pre>
   * The constraints associated with this request.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
   * </code>
   */
  public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints getConstraints() {
    return constraints_ == null
        ? com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance()
        : constraints_;
  }
  /**
   *
   *
   * <pre>
   * The constraints associated with this request.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
   * </code>
   */
  public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder
      getConstraintsOrBuilder() {
    return getConstraints();
  }

  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 (threatType_ != com.google.webrisk.v1beta1.ThreatType.THREAT_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(1, threatType_);
    }
    if (!versionToken_.isEmpty()) {
      output.writeBytes(2, versionToken_);
    }
    if (constraints_ != null) {
      output.writeMessage(3, getConstraints());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (threatType_ != com.google.webrisk.v1beta1.ThreatType.THREAT_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, threatType_);
    }
    if (!versionToken_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, versionToken_);
    }
    if (constraints_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConstraints());
    }
    size += unknownFields.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.webrisk.v1beta1.ComputeThreatListDiffRequest)) {
      return super.equals(obj);
    }
    com.google.webrisk.v1beta1.ComputeThreatListDiffRequest other =
        (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest) obj;

    if (threatType_ != other.threatType_) return false;
    if (!getVersionToken().equals(other.getVersionToken())) return false;
    if (hasConstraints() != other.hasConstraints()) return false;
    if (hasConstraints()) {
      if (!getConstraints().equals(other.getConstraints())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) 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) + THREAT_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + threatType_;
    hash = (37 * hash) + VERSION_TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getVersionToken().hashCode();
    if (hasConstraints()) {
      hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
      hash = (53 * hash) + getConstraints().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest 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.webrisk.v1beta1.ComputeThreatListDiffRequest 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>
   * Describes an API diff request.
   * </pre>
   *
   * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest)
      com.google.webrisk.v1beta1.ComputeThreatListDiffRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.webrisk.v1beta1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.webrisk.v1beta1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.class,
              com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Builder.class);
    }

    // Construct using com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      threatType_ = 0;

      versionToken_ = com.google.protobuf.ByteString.EMPTY;

      if (constraintsBuilder_ == null) {
        constraints_ = null;
      } else {
        constraints_ = null;
        constraintsBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.webrisk.v1beta1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_descriptor;
    }

    @java.lang.Override
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest getDefaultInstanceForType() {
      return com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest build() {
      com.google.webrisk.v1beta1.ComputeThreatListDiffRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest buildPartial() {
      com.google.webrisk.v1beta1.ComputeThreatListDiffRequest result =
          new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest(this);
      result.threatType_ = threatType_;
      result.versionToken_ = versionToken_;
      if (constraintsBuilder_ == null) {
        result.constraints_ = constraints_;
      } else {
        result.constraints_ = constraintsBuilder_.build();
      }
      onBuilt();
      return result;
    }

    @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.webrisk.v1beta1.ComputeThreatListDiffRequest) {
        return mergeFrom((com.google.webrisk.v1beta1.ComputeThreatListDiffRequest) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.webrisk.v1beta1.ComputeThreatListDiffRequest other) {
      if (other == com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.getDefaultInstance())
        return this;
      if (other.threatType_ != 0) {
        setThreatTypeValue(other.getThreatTypeValue());
      }
      if (other.getVersionToken() != com.google.protobuf.ByteString.EMPTY) {
        setVersionToken(other.getVersionToken());
      }
      if (other.hasConstraints()) {
        mergeConstraints(other.getConstraints());
      }
      this.mergeUnknownFields(other.unknownFields);
      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 {
      com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage =
            (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int threatType_ = 0;
    /**
     *
     *
     * <pre>
     * Required. The ThreatList to update.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
     */
    public int getThreatTypeValue() {
      return threatType_;
    }
    /**
     *
     *
     * <pre>
     * Required. The ThreatList to update.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
     */
    public Builder setThreatTypeValue(int value) {
      threatType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The ThreatList to update.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
     */
    public com.google.webrisk.v1beta1.ThreatType getThreatType() {
      @SuppressWarnings("deprecation")
      com.google.webrisk.v1beta1.ThreatType result =
          com.google.webrisk.v1beta1.ThreatType.valueOf(threatType_);
      return result == null ? com.google.webrisk.v1beta1.ThreatType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Required. The ThreatList to update.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
     */
    public Builder setThreatType(com.google.webrisk.v1beta1.ThreatType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      threatType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The ThreatList to update.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;</code>
     */
    public Builder clearThreatType() {

      threatType_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString versionToken_ = com.google.protobuf.ByteString.EMPTY;
    /**
     *
     *
     * <pre>
     * The current version token of the client for the requested list (the
     * client version that was received from the last successful diff).
     * </pre>
     *
     * <code>bytes version_token = 2;</code>
     */
    public com.google.protobuf.ByteString getVersionToken() {
      return versionToken_;
    }
    /**
     *
     *
     * <pre>
     * The current version token of the client for the requested list (the
     * client version that was received from the last successful diff).
     * </pre>
     *
     * <code>bytes version_token = 2;</code>
     */
    public Builder setVersionToken(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }

      versionToken_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The current version token of the client for the requested list (the
     * client version that was received from the last successful diff).
     * </pre>
     *
     * <code>bytes version_token = 2;</code>
     */
    public Builder clearVersionToken() {

      versionToken_ = getDefaultInstance().getVersionToken();
      onChanged();
      return this;
    }

    private com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints,
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder,
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>
        constraintsBuilder_;
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public boolean hasConstraints() {
      return constraintsBuilder_ != null || constraints_ != null;
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints getConstraints() {
      if (constraintsBuilder_ == null) {
        return constraints_ == null
            ? com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
                .getDefaultInstance()
            : constraints_;
      } else {
        return constraintsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public Builder setConstraints(
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints value) {
      if (constraintsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        constraints_ = value;
        onChanged();
      } else {
        constraintsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public Builder setConstraints(
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder
            builderForValue) {
      if (constraintsBuilder_ == null) {
        constraints_ = builderForValue.build();
        onChanged();
      } else {
        constraintsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public Builder mergeConstraints(
        com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints value) {
      if (constraintsBuilder_ == null) {
        if (constraints_ != null) {
          constraints_ =
              com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.newBuilder(
                      constraints_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          constraints_ = value;
        }
        onChanged();
      } else {
        constraintsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public Builder clearConstraints() {
      if (constraintsBuilder_ == null) {
        constraints_ = null;
        onChanged();
      } else {
        constraints_ = null;
        constraintsBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder
        getConstraintsBuilder() {

      onChanged();
      return getConstraintsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder
        getConstraintsOrBuilder() {
      if (constraintsBuilder_ != null) {
        return constraintsBuilder_.getMessageOrBuilder();
      } else {
        return constraints_ == null
            ? com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
                .getDefaultInstance()
            : constraints_;
      }
    }
    /**
     *
     *
     * <pre>
     * The constraints associated with this request.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints,
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder,
            com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>
        getConstraintsFieldBuilder() {
      if (constraintsBuilder_ == null) {
        constraintsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints,
                com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder,
                com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>(
                getConstraints(), getParentForChildren(), isClean());
        constraints_ = null;
      }
      return constraintsBuilder_;
    }

    @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.webrisk.v1beta1.ComputeThreatListDiffRequest)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest)
  private static final com.google.webrisk.v1beta1.ComputeThreatListDiffRequest DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest();
  }

  public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ComputeThreatListDiffRequest> PARSER =
      new com.google.protobuf.AbstractParser<ComputeThreatListDiffRequest>() {
        @java.lang.Override
        public ComputeThreatListDiffRequest parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new ComputeThreatListDiffRequest(input, extensionRegistry);
        }
      };

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

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

  @java.lang.Override
  public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
