/*
 * 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/webrisk/v1/webrisk.proto

package com.google.webrisk.v1;

/**
 *
 *
 * <pre>
 * Context about the submission including the type of abuse found on the URI and
 * supporting details.
 * option (google.api.message_visibility).restriction = "TRUSTED_TESTER";
 * </pre>
 *
 * Protobuf type {@code google.cloud.webrisk.v1.ThreatInfo}
 */
public final class ThreatInfo extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1.ThreatInfo)
    ThreatInfoOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ThreatInfo.newBuilder() to construct.
  private ThreatInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ThreatInfo() {
    abuseType_ = 0;
  }

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

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

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

  /**
   *
   *
   * <pre>
   * The abuse type found on the URI.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.webrisk.v1.ThreatInfo.AbuseType}
   */
  public enum AbuseType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Default.
     * </pre>
     *
     * <code>ABUSE_TYPE_UNSPECIFIED = 0;</code>
     */
    ABUSE_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The URI contains malware.
     * </pre>
     *
     * <code>MALWARE = 1;</code>
     */
    MALWARE(1),
    /**
     *
     *
     * <pre>
     * The URI contains social engineering.
     * </pre>
     *
     * <code>SOCIAL_ENGINEERING = 2;</code>
     */
    SOCIAL_ENGINEERING(2),
    /**
     *
     *
     * <pre>
     * The URI contains unwanted software.
     * </pre>
     *
     * <code>UNWANTED_SOFTWARE = 3;</code>
     */
    UNWANTED_SOFTWARE(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Default.
     * </pre>
     *
     * <code>ABUSE_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int ABUSE_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The URI contains malware.
     * </pre>
     *
     * <code>MALWARE = 1;</code>
     */
    public static final int MALWARE_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The URI contains social engineering.
     * </pre>
     *
     * <code>SOCIAL_ENGINEERING = 2;</code>
     */
    public static final int SOCIAL_ENGINEERING_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The URI contains unwanted software.
     * </pre>
     *
     * <code>UNWANTED_SOFTWARE = 3;</code>
     */
    public static final int UNWANTED_SOFTWARE_VALUE = 3;

    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 AbuseType 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 AbuseType forNumber(int value) {
      switch (value) {
        case 0:
          return ABUSE_TYPE_UNSPECIFIED;
        case 1:
          return MALWARE;
        case 2:
          return SOCIAL_ENGINEERING;
        case 3:
          return UNWANTED_SOFTWARE;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<AbuseType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<AbuseType>() {
          public AbuseType findValueByNumber(int number) {
            return AbuseType.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.webrisk.v1.ThreatInfo.getDescriptor().getEnumTypes().get(0);
    }

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

    public static AbuseType 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 AbuseType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.webrisk.v1.ThreatInfo.AbuseType)
  }

  public interface ConfidenceOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1.ThreatInfo.Confidence)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * A decimal representation of confidence in the range of 0
     * to 1 where 0 indicates no confidence and 1 indicates
     * complete confidence.
     * </pre>
     *
     * <code>float score = 1;</code>
     *
     * @return Whether the score field is set.
     */
    boolean hasScore();
    /**
     *
     *
     * <pre>
     * A decimal representation of confidence in the range of 0
     * to 1 where 0 indicates no confidence and 1 indicates
     * complete confidence.
     * </pre>
     *
     * <code>float score = 1;</code>
     *
     * @return The score.
     */
    float getScore();

    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
     *
     * @return Whether the level field is set.
     */
    boolean hasLevel();
    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
     *
     * @return The enum numeric value on the wire for level.
     */
    int getLevelValue();
    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
     *
     * @return The level.
     */
    com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel getLevel();

    com.google.webrisk.v1.ThreatInfo.Confidence.ValueCase getValueCase();
  }
  /**
   *
   *
   * <pre>
   * Confidence that a URI is unsafe.
   * </pre>
   *
   * Protobuf type {@code google.cloud.webrisk.v1.ThreatInfo.Confidence}
   */
  public static final class Confidence extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1.ThreatInfo.Confidence)
      ConfidenceOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Confidence.newBuilder() to construct.
    private Confidence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Confidence() {}

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

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.webrisk.v1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1_ThreatInfo_Confidence_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.webrisk.v1.ThreatInfo.Confidence.class,
              com.google.webrisk.v1.ThreatInfo.Confidence.Builder.class);
    }

    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * Protobuf enum {@code google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel}
     */
    public enum ConfidenceLevel implements com.google.protobuf.ProtocolMessageEnum {
      /**
       *
       *
       * <pre>
       * Default.
       * </pre>
       *
       * <code>CONFIDENCE_LEVEL_UNSPECIFIED = 0;</code>
       */
      CONFIDENCE_LEVEL_UNSPECIFIED(0),
      /**
       *
       *
       * <pre>
       * Less than 60% confidence that the URI is unsafe.
       * </pre>
       *
       * <code>LOW = 1;</code>
       */
      LOW(1),
      /**
       *
       *
       * <pre>
       * Between 60% and 80% confidence that the URI is unsafe.
       * </pre>
       *
       * <code>MEDIUM = 2;</code>
       */
      MEDIUM(2),
      /**
       *
       *
       * <pre>
       * Greater than 80% confidence that the URI is unsafe.
       * </pre>
       *
       * <code>HIGH = 3;</code>
       */
      HIGH(3),
      UNRECOGNIZED(-1),
      ;

      /**
       *
       *
       * <pre>
       * Default.
       * </pre>
       *
       * <code>CONFIDENCE_LEVEL_UNSPECIFIED = 0;</code>
       */
      public static final int CONFIDENCE_LEVEL_UNSPECIFIED_VALUE = 0;
      /**
       *
       *
       * <pre>
       * Less than 60% confidence that the URI is unsafe.
       * </pre>
       *
       * <code>LOW = 1;</code>
       */
      public static final int LOW_VALUE = 1;
      /**
       *
       *
       * <pre>
       * Between 60% and 80% confidence that the URI is unsafe.
       * </pre>
       *
       * <code>MEDIUM = 2;</code>
       */
      public static final int MEDIUM_VALUE = 2;
      /**
       *
       *
       * <pre>
       * Greater than 80% confidence that the URI is unsafe.
       * </pre>
       *
       * <code>HIGH = 3;</code>
       */
      public static final int HIGH_VALUE = 3;

      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 ConfidenceLevel 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 ConfidenceLevel forNumber(int value) {
        switch (value) {
          case 0:
            return CONFIDENCE_LEVEL_UNSPECIFIED;
          case 1:
            return LOW;
          case 2:
            return MEDIUM;
          case 3:
            return HIGH;
          default:
            return null;
        }
      }

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

      private static final com.google.protobuf.Internal.EnumLiteMap<ConfidenceLevel>
          internalValueMap =
              new com.google.protobuf.Internal.EnumLiteMap<ConfidenceLevel>() {
                public ConfidenceLevel findValueByNumber(int number) {
                  return ConfidenceLevel.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.webrisk.v1.ThreatInfo.Confidence.getDescriptor().getEnumTypes().get(0);
      }

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

      public static ConfidenceLevel 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 ConfidenceLevel(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel)
    }

    private int valueCase_ = 0;

    @SuppressWarnings("serial")
    private java.lang.Object value_;

    public enum ValueCase
        implements
            com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      SCORE(1),
      LEVEL(2),
      VALUE_NOT_SET(0);
      private final int value;

      private ValueCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static ValueCase valueOf(int value) {
        return forNumber(value);
      }

      public static ValueCase forNumber(int value) {
        switch (value) {
          case 1:
            return SCORE;
          case 2:
            return LEVEL;
          case 0:
            return VALUE_NOT_SET;
          default:
            return null;
        }
      }

      public int getNumber() {
        return this.value;
      }
    };

    public ValueCase getValueCase() {
      return ValueCase.forNumber(valueCase_);
    }

    public static final int SCORE_FIELD_NUMBER = 1;
    /**
     *
     *
     * <pre>
     * A decimal representation of confidence in the range of 0
     * to 1 where 0 indicates no confidence and 1 indicates
     * complete confidence.
     * </pre>
     *
     * <code>float score = 1;</code>
     *
     * @return Whether the score field is set.
     */
    @java.lang.Override
    public boolean hasScore() {
      return valueCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * A decimal representation of confidence in the range of 0
     * to 1 where 0 indicates no confidence and 1 indicates
     * complete confidence.
     * </pre>
     *
     * <code>float score = 1;</code>
     *
     * @return The score.
     */
    @java.lang.Override
    public float getScore() {
      if (valueCase_ == 1) {
        return (java.lang.Float) value_;
      }
      return 0F;
    }

    public static final int LEVEL_FIELD_NUMBER = 2;
    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
     *
     * @return Whether the level field is set.
     */
    public boolean hasLevel() {
      return valueCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
     *
     * @return The enum numeric value on the wire for level.
     */
    public int getLevelValue() {
      if (valueCase_ == 2) {
        return (java.lang.Integer) value_;
      }
      return 0;
    }
    /**
     *
     *
     * <pre>
     * Enum representation of confidence.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
     *
     * @return The level.
     */
    public com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel getLevel() {
      if (valueCase_ == 2) {
        com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel result =
            com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel.forNumber(
                (java.lang.Integer) value_);
        return result == null
            ? com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel.UNRECOGNIZED
            : result;
      }
      return com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel
          .CONFIDENCE_LEVEL_UNSPECIFIED;
    }

    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 (valueCase_ == 1) {
        output.writeFloat(1, (float) ((java.lang.Float) value_));
      }
      if (valueCase_ == 2) {
        output.writeEnum(2, ((java.lang.Integer) value_));
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (valueCase_ == 1) {
        size +=
            com.google.protobuf.CodedOutputStream.computeFloatSize(
                1, (float) ((java.lang.Float) value_));
      }
      if (valueCase_ == 2) {
        size +=
            com.google.protobuf.CodedOutputStream.computeEnumSize(2, ((java.lang.Integer) value_));
      }
      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.webrisk.v1.ThreatInfo.Confidence)) {
        return super.equals(obj);
      }
      com.google.webrisk.v1.ThreatInfo.Confidence other =
          (com.google.webrisk.v1.ThreatInfo.Confidence) obj;

      if (!getValueCase().equals(other.getValueCase())) return false;
      switch (valueCase_) {
        case 1:
          if (java.lang.Float.floatToIntBits(getScore())
              != java.lang.Float.floatToIntBits(other.getScore())) return false;
          break;
        case 2:
          if (getLevelValue() != other.getLevelValue()) return false;
          break;
        case 0:
        default:
      }
      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();
      switch (valueCase_) {
        case 1:
          hash = (37 * hash) + SCORE_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore());
          break;
        case 2:
          hash = (37 * hash) + LEVEL_FIELD_NUMBER;
          hash = (53 * hash) + getLevelValue();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.webrisk.v1.ThreatInfo.Confidence 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.v1.ThreatInfo.Confidence parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

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

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

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

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

    public static com.google.webrisk.v1.ThreatInfo.Confidence 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.v1.ThreatInfo.Confidence 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>
     * Confidence that a URI is unsafe.
     * </pre>
     *
     * Protobuf type {@code google.cloud.webrisk.v1.ThreatInfo.Confidence}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1.ThreatInfo.Confidence)
        com.google.webrisk.v1.ThreatInfo.ConfidenceOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.webrisk.v1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1_ThreatInfo_Confidence_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.webrisk.v1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1_ThreatInfo_Confidence_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.webrisk.v1.ThreatInfo.Confidence.class,
                com.google.webrisk.v1.ThreatInfo.Confidence.Builder.class);
      }

      // Construct using com.google.webrisk.v1.ThreatInfo.Confidence.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        valueCase_ = 0;
        value_ = null;
        return this;
      }

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

      @java.lang.Override
      public com.google.webrisk.v1.ThreatInfo.Confidence getDefaultInstanceForType() {
        return com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance();
      }

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

      @java.lang.Override
      public com.google.webrisk.v1.ThreatInfo.Confidence buildPartial() {
        com.google.webrisk.v1.ThreatInfo.Confidence result =
            new com.google.webrisk.v1.ThreatInfo.Confidence(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        buildPartialOneofs(result);
        onBuilt();
        return result;
      }

      private void buildPartial0(com.google.webrisk.v1.ThreatInfo.Confidence result) {
        int from_bitField0_ = bitField0_;
      }

      private void buildPartialOneofs(com.google.webrisk.v1.ThreatInfo.Confidence result) {
        result.valueCase_ = valueCase_;
        result.value_ = this.value_;
      }

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

      public Builder mergeFrom(com.google.webrisk.v1.ThreatInfo.Confidence other) {
        if (other == com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance()) return this;
        switch (other.getValueCase()) {
          case SCORE:
            {
              setScore(other.getScore());
              break;
            }
          case LEVEL:
            {
              setLevelValue(other.getLevelValue());
              break;
            }
          case VALUE_NOT_SET:
            {
              break;
            }
        }
        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 13:
                {
                  value_ = input.readFloat();
                  valueCase_ = 1;
                  break;
                } // case 13
              case 16:
                {
                  int rawValue = input.readEnum();
                  valueCase_ = 2;
                  value_ = rawValue;
                  break;
                } // case 16
              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 valueCase_ = 0;
      private java.lang.Object value_;

      public ValueCase getValueCase() {
        return ValueCase.forNumber(valueCase_);
      }

      public Builder clearValue() {
        valueCase_ = 0;
        value_ = null;
        onChanged();
        return this;
      }

      private int bitField0_;

      /**
       *
       *
       * <pre>
       * A decimal representation of confidence in the range of 0
       * to 1 where 0 indicates no confidence and 1 indicates
       * complete confidence.
       * </pre>
       *
       * <code>float score = 1;</code>
       *
       * @return Whether the score field is set.
       */
      public boolean hasScore() {
        return valueCase_ == 1;
      }
      /**
       *
       *
       * <pre>
       * A decimal representation of confidence in the range of 0
       * to 1 where 0 indicates no confidence and 1 indicates
       * complete confidence.
       * </pre>
       *
       * <code>float score = 1;</code>
       *
       * @return The score.
       */
      public float getScore() {
        if (valueCase_ == 1) {
          return (java.lang.Float) value_;
        }
        return 0F;
      }
      /**
       *
       *
       * <pre>
       * A decimal representation of confidence in the range of 0
       * to 1 where 0 indicates no confidence and 1 indicates
       * complete confidence.
       * </pre>
       *
       * <code>float score = 1;</code>
       *
       * @param value The score to set.
       * @return This builder for chaining.
       */
      public Builder setScore(float value) {

        valueCase_ = 1;
        value_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * A decimal representation of confidence in the range of 0
       * to 1 where 0 indicates no confidence and 1 indicates
       * complete confidence.
       * </pre>
       *
       * <code>float score = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearScore() {
        if (valueCase_ == 1) {
          valueCase_ = 0;
          value_ = null;
          onChanged();
        }
        return this;
      }

      /**
       *
       *
       * <pre>
       * Enum representation of confidence.
       * </pre>
       *
       * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
       *
       * @return Whether the level field is set.
       */
      @java.lang.Override
      public boolean hasLevel() {
        return valueCase_ == 2;
      }
      /**
       *
       *
       * <pre>
       * Enum representation of confidence.
       * </pre>
       *
       * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
       *
       * @return The enum numeric value on the wire for level.
       */
      @java.lang.Override
      public int getLevelValue() {
        if (valueCase_ == 2) {
          return ((java.lang.Integer) value_).intValue();
        }
        return 0;
      }
      /**
       *
       *
       * <pre>
       * Enum representation of confidence.
       * </pre>
       *
       * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
       *
       * @param value The enum numeric value on the wire for level to set.
       * @return This builder for chaining.
       */
      public Builder setLevelValue(int value) {
        valueCase_ = 2;
        value_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Enum representation of confidence.
       * </pre>
       *
       * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
       *
       * @return The level.
       */
      @java.lang.Override
      public com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel getLevel() {
        if (valueCase_ == 2) {
          com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel result =
              com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel.forNumber(
                  (java.lang.Integer) value_);
          return result == null
              ? com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel.UNRECOGNIZED
              : result;
        }
        return com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel
            .CONFIDENCE_LEVEL_UNSPECIFIED;
      }
      /**
       *
       *
       * <pre>
       * Enum representation of confidence.
       * </pre>
       *
       * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
       *
       * @param value The level to set.
       * @return This builder for chaining.
       */
      public Builder setLevel(com.google.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel value) {
        if (value == null) {
          throw new NullPointerException();
        }
        valueCase_ = 2;
        value_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Enum representation of confidence.
       * </pre>
       *
       * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel level = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearLevel() {
        if (valueCase_ == 2) {
          valueCase_ = 0;
          value_ = null;
          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.v1.ThreatInfo.Confidence)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1.ThreatInfo.Confidence)
    private static final com.google.webrisk.v1.ThreatInfo.Confidence DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.webrisk.v1.ThreatInfo.Confidence();
    }

    public static com.google.webrisk.v1.ThreatInfo.Confidence getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.webrisk.v1.ThreatInfo.Confidence getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface ThreatJustificationOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1.ThreatInfo.ThreatJustification)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @return A list containing the labels.
     */
    java.util.List<com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>
        getLabelsList();
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @return The count of labels.
     */
    int getLabelsCount();
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @param index The index of the element to return.
     * @return The labels at the given index.
     */
    com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel getLabels(int index);
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @return A list containing the enum numeric values on the wire for labels.
     */
    java.util.List<java.lang.Integer> getLabelsValueList();
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @param index The index of the value to return.
     * @return The enum numeric value on the wire of labels at the given index.
     */
    int getLabelsValue(int index);

    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @return A list containing the comments.
     */
    java.util.List<java.lang.String> getCommentsList();
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @return The count of comments.
     */
    int getCommentsCount();
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @param index The index of the element to return.
     * @return The comments at the given index.
     */
    java.lang.String getComments(int index);
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the comments at the given index.
     */
    com.google.protobuf.ByteString getCommentsBytes(int index);
  }
  /**
   *
   *
   * <pre>
   * Context about why the URI is unsafe.
   * </pre>
   *
   * Protobuf type {@code google.cloud.webrisk.v1.ThreatInfo.ThreatJustification}
   */
  public static final class ThreatJustification extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1.ThreatInfo.ThreatJustification)
      ThreatJustificationOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use ThreatJustification.newBuilder() to construct.
    private ThreatJustification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private ThreatJustification() {
      labels_ = java.util.Collections.emptyList();
      comments_ = com.google.protobuf.LazyStringArrayList.emptyList();
    }

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

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.webrisk.v1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1_ThreatInfo_ThreatJustification_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.webrisk.v1.ThreatInfo.ThreatJustification.class,
              com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder.class);
    }

    /**
     *
     *
     * <pre>
     * Labels that explain how the URI was classified.
     * </pre>
     *
     * Protobuf enum {@code
     * google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel}
     */
    public enum JustificationLabel implements com.google.protobuf.ProtocolMessageEnum {
      /**
       *
       *
       * <pre>
       * Default.
       * </pre>
       *
       * <code>JUSTIFICATION_LABEL_UNSPECIFIED = 0;</code>
       */
      JUSTIFICATION_LABEL_UNSPECIFIED(0),
      /**
       *
       *
       * <pre>
       * The submitter manually verified that the submission is unsafe.
       * </pre>
       *
       * <code>MANUAL_VERIFICATION = 1;</code>
       */
      MANUAL_VERIFICATION(1),
      /**
       *
       *
       * <pre>
       * The submitter received the submission from an end user.
       * </pre>
       *
       * <code>USER_REPORT = 2;</code>
       */
      USER_REPORT(2),
      /**
       *
       *
       * <pre>
       * The submitter received the submission from an automated system.
       * </pre>
       *
       * <code>AUTOMATED_REPORT = 3;</code>
       */
      AUTOMATED_REPORT(3),
      UNRECOGNIZED(-1),
      ;

      /**
       *
       *
       * <pre>
       * Default.
       * </pre>
       *
       * <code>JUSTIFICATION_LABEL_UNSPECIFIED = 0;</code>
       */
      public static final int JUSTIFICATION_LABEL_UNSPECIFIED_VALUE = 0;
      /**
       *
       *
       * <pre>
       * The submitter manually verified that the submission is unsafe.
       * </pre>
       *
       * <code>MANUAL_VERIFICATION = 1;</code>
       */
      public static final int MANUAL_VERIFICATION_VALUE = 1;
      /**
       *
       *
       * <pre>
       * The submitter received the submission from an end user.
       * </pre>
       *
       * <code>USER_REPORT = 2;</code>
       */
      public static final int USER_REPORT_VALUE = 2;
      /**
       *
       *
       * <pre>
       * The submitter received the submission from an automated system.
       * </pre>
       *
       * <code>AUTOMATED_REPORT = 3;</code>
       */
      public static final int AUTOMATED_REPORT_VALUE = 3;

      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 JustificationLabel 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 JustificationLabel forNumber(int value) {
        switch (value) {
          case 0:
            return JUSTIFICATION_LABEL_UNSPECIFIED;
          case 1:
            return MANUAL_VERIFICATION;
          case 2:
            return USER_REPORT;
          case 3:
            return AUTOMATED_REPORT;
          default:
            return null;
        }
      }

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

      private static final com.google.protobuf.Internal.EnumLiteMap<JustificationLabel>
          internalValueMap =
              new com.google.protobuf.Internal.EnumLiteMap<JustificationLabel>() {
                public JustificationLabel findValueByNumber(int number) {
                  return JustificationLabel.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.webrisk.v1.ThreatInfo.ThreatJustification.getDescriptor()
            .getEnumTypes()
            .get(0);
      }

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

      public static JustificationLabel 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 JustificationLabel(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel)
    }

    public static final int LABELS_FIELD_NUMBER = 1;

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

    private static final com.google.protobuf.Internal.ListAdapter.Converter<
            java.lang.Integer,
            com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>
        labels_converter_ =
            new com.google.protobuf.Internal.ListAdapter.Converter<
                java.lang.Integer,
                com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>() {
              public com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel
                  convert(java.lang.Integer from) {
                com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel result =
                    com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel
                        .forNumber(from);
                return result == null
                    ? com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel
                        .UNRECOGNIZED
                    : result;
              }
            };
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @return A list containing the labels.
     */
    @java.lang.Override
    public java.util.List<com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>
        getLabelsList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer,
          com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>(
          labels_, labels_converter_);
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @return The count of labels.
     */
    @java.lang.Override
    public int getLabelsCount() {
      return labels_.size();
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @param index The index of the element to return.
     * @return The labels at the given index.
     */
    @java.lang.Override
    public com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel getLabels(
        int index) {
      return labels_converter_.convert(labels_.get(index));
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @return A list containing the enum numeric values on the wire for labels.
     */
    @java.lang.Override
    public java.util.List<java.lang.Integer> getLabelsValueList() {
      return labels_;
    }
    /**
     *
     *
     * <pre>
     * Labels associated with this URI that explain how it was classified.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
     * </code>
     *
     * @param index The index of the value to return.
     * @return The enum numeric value on the wire of labels at the given index.
     */
    @java.lang.Override
    public int getLabelsValue(int index) {
      return labels_.get(index);
    }

    private int labelsMemoizedSerializedSize;

    public static final int COMMENTS_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringArrayList comments_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @return A list containing the comments.
     */
    public com.google.protobuf.ProtocolStringList getCommentsList() {
      return comments_;
    }
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @return The count of comments.
     */
    public int getCommentsCount() {
      return comments_.size();
    }
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @param index The index of the element to return.
     * @return The comments at the given index.
     */
    public java.lang.String getComments(int index) {
      return comments_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Free-form context on why this URI is unsafe.
     * </pre>
     *
     * <code>repeated string comments = 2;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the comments at the given index.
     */
    public com.google.protobuf.ByteString getCommentsBytes(int index) {
      return comments_.getByteString(index);
    }

    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 (getLabelsList().size() > 0) {
        output.writeUInt32NoTag(10);
        output.writeUInt32NoTag(labelsMemoizedSerializedSize);
      }
      for (int i = 0; i < labels_.size(); i++) {
        output.writeEnumNoTag(labels_.get(i));
      }
      for (int i = 0; i < comments_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comments_.getRaw(i));
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < labels_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(labels_.get(i));
        }
        size += dataSize;
        if (!getLabelsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
        }
        labelsMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < comments_.size(); i++) {
          dataSize += computeStringSizeNoTag(comments_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getCommentsList().size();
      }
      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.webrisk.v1.ThreatInfo.ThreatJustification)) {
        return super.equals(obj);
      }
      com.google.webrisk.v1.ThreatInfo.ThreatJustification other =
          (com.google.webrisk.v1.ThreatInfo.ThreatJustification) obj;

      if (!labels_.equals(other.labels_)) return false;
      if (!getCommentsList().equals(other.getCommentsList())) 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();
      if (getLabelsCount() > 0) {
        hash = (37 * hash) + LABELS_FIELD_NUMBER;
        hash = (53 * hash) + labels_.hashCode();
      }
      if (getCommentsCount() > 0) {
        hash = (37 * hash) + COMMENTS_FIELD_NUMBER;
        hash = (53 * hash) + getCommentsList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

    public static com.google.webrisk.v1.ThreatInfo.ThreatJustification 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.v1.ThreatInfo.ThreatJustification parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

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

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

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

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

    public static com.google.webrisk.v1.ThreatInfo.ThreatJustification 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.v1.ThreatInfo.ThreatJustification 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>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * Protobuf type {@code google.cloud.webrisk.v1.ThreatInfo.ThreatJustification}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1.ThreatInfo.ThreatJustification)
        com.google.webrisk.v1.ThreatInfo.ThreatJustificationOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.webrisk.v1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1_ThreatInfo_ThreatJustification_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.webrisk.v1.WebRiskProto
            .internal_static_google_cloud_webrisk_v1_ThreatInfo_ThreatJustification_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.webrisk.v1.ThreatInfo.ThreatJustification.class,
                com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder.class);
      }

      // Construct using com.google.webrisk.v1.ThreatInfo.ThreatJustification.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        labels_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        comments_ = com.google.protobuf.LazyStringArrayList.emptyList();
        return this;
      }

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

      @java.lang.Override
      public com.google.webrisk.v1.ThreatInfo.ThreatJustification getDefaultInstanceForType() {
        return com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance();
      }

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

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

      private void buildPartialRepeatedFields(
          com.google.webrisk.v1.ThreatInfo.ThreatJustification result) {
        if (((bitField0_ & 0x00000001) != 0)) {
          labels_ = java.util.Collections.unmodifiableList(labels_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.labels_ = labels_;
      }

      private void buildPartial0(com.google.webrisk.v1.ThreatInfo.ThreatJustification result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000002) != 0)) {
          comments_.makeImmutable();
          result.comments_ = comments_;
        }
      }

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

      public Builder mergeFrom(com.google.webrisk.v1.ThreatInfo.ThreatJustification other) {
        if (other == com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance())
          return this;
        if (!other.labels_.isEmpty()) {
          if (labels_.isEmpty()) {
            labels_ = other.labels_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureLabelsIsMutable();
            labels_.addAll(other.labels_);
          }
          onChanged();
        }
        if (!other.comments_.isEmpty()) {
          if (comments_.isEmpty()) {
            comments_ = other.comments_;
            bitField0_ |= 0x00000002;
          } else {
            ensureCommentsIsMutable();
            comments_.addAll(other.comments_);
          }
          onChanged();
        }
        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:
                {
                  int tmpRaw = input.readEnum();
                  ensureLabelsIsMutable();
                  labels_.add(tmpRaw);
                  break;
                } // case 8
              case 10:
                {
                  int length = input.readRawVarint32();
                  int oldLimit = input.pushLimit(length);
                  while (input.getBytesUntilLimit() > 0) {
                    int tmpRaw = input.readEnum();
                    ensureLabelsIsMutable();
                    labels_.add(tmpRaw);
                  }
                  input.popLimit(oldLimit);
                  break;
                } // case 10
              case 18:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  ensureCommentsIsMutable();
                  comments_.add(s);
                  break;
                } // case 18
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

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

      private void ensureLabelsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          labels_ = new java.util.ArrayList<java.lang.Integer>(labels_);
          bitField0_ |= 0x00000001;
        }
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @return A list containing the labels.
       */
      public java.util.List<com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>
          getLabelsList() {
        return new com.google.protobuf.Internal.ListAdapter<
            java.lang.Integer,
            com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>(
            labels_, labels_converter_);
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @return The count of labels.
       */
      public int getLabelsCount() {
        return labels_.size();
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param index The index of the element to return.
       * @return The labels at the given index.
       */
      public com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel getLabels(
          int index) {
        return labels_converter_.convert(labels_.get(index));
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param index The index to set the value at.
       * @param value The labels to set.
       * @return This builder for chaining.
       */
      public Builder setLabels(
          int index,
          com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLabelsIsMutable();
        labels_.set(index, value.getNumber());
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param value The labels to add.
       * @return This builder for chaining.
       */
      public Builder addLabels(
          com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLabelsIsMutable();
        labels_.add(value.getNumber());
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param values The labels to add.
       * @return This builder for chaining.
       */
      public Builder addAllLabels(
          java.lang.Iterable<
                  ? extends com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel>
              values) {
        ensureLabelsIsMutable();
        for (com.google.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel value :
            values) {
          labels_.add(value.getNumber());
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @return This builder for chaining.
       */
      public Builder clearLabels() {
        labels_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @return A list containing the enum numeric values on the wire for labels.
       */
      public java.util.List<java.lang.Integer> getLabelsValueList() {
        return java.util.Collections.unmodifiableList(labels_);
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param index The index of the value to return.
       * @return The enum numeric value on the wire of labels at the given index.
       */
      public int getLabelsValue(int index) {
        return labels_.get(index);
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param index The index to set the value at.
       * @param value The enum numeric value on the wire for labels to set.
       * @return This builder for chaining.
       */
      public Builder setLabelsValue(int index, int value) {
        ensureLabelsIsMutable();
        labels_.set(index, value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param value The enum numeric value on the wire for labels to add.
       * @return This builder for chaining.
       */
      public Builder addLabelsValue(int value) {
        ensureLabelsIsMutable();
        labels_.add(value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Labels associated with this URI that explain how it was classified.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel labels = 1;
       * </code>
       *
       * @param values The enum numeric values on the wire for labels to add.
       * @return This builder for chaining.
       */
      public Builder addAllLabelsValue(java.lang.Iterable<java.lang.Integer> values) {
        ensureLabelsIsMutable();
        for (int value : values) {
          labels_.add(value);
        }
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringArrayList comments_ =
          com.google.protobuf.LazyStringArrayList.emptyList();

      private void ensureCommentsIsMutable() {
        if (!comments_.isModifiable()) {
          comments_ = new com.google.protobuf.LazyStringArrayList(comments_);
        }
        bitField0_ |= 0x00000002;
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @return A list containing the comments.
       */
      public com.google.protobuf.ProtocolStringList getCommentsList() {
        comments_.makeImmutable();
        return comments_;
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @return The count of comments.
       */
      public int getCommentsCount() {
        return comments_.size();
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @param index The index of the element to return.
       * @return The comments at the given index.
       */
      public java.lang.String getComments(int index) {
        return comments_.get(index);
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @param index The index of the value to return.
       * @return The bytes of the comments at the given index.
       */
      public com.google.protobuf.ByteString getCommentsBytes(int index) {
        return comments_.getByteString(index);
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @param index The index to set the value at.
       * @param value The comments to set.
       * @return This builder for chaining.
       */
      public Builder setComments(int index, java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCommentsIsMutable();
        comments_.set(index, value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @param value The comments to add.
       * @return This builder for chaining.
       */
      public Builder addComments(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCommentsIsMutable();
        comments_.add(value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @param values The comments to add.
       * @return This builder for chaining.
       */
      public Builder addAllComments(java.lang.Iterable<java.lang.String> values) {
        ensureCommentsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, comments_);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearComments() {
        comments_ = com.google.protobuf.LazyStringArrayList.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        ;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Free-form context on why this URI is unsafe.
       * </pre>
       *
       * <code>repeated string comments = 2;</code>
       *
       * @param value The bytes of the comments to add.
       * @return This builder for chaining.
       */
      public Builder addCommentsBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ensureCommentsIsMutable();
        comments_.add(value);
        bitField0_ |= 0x00000002;
        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.v1.ThreatInfo.ThreatJustification)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1.ThreatInfo.ThreatJustification)
    private static final com.google.webrisk.v1.ThreatInfo.ThreatJustification DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.webrisk.v1.ThreatInfo.ThreatJustification();
    }

    public static com.google.webrisk.v1.ThreatInfo.ThreatJustification getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.webrisk.v1.ThreatInfo.ThreatJustification getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int ABUSE_TYPE_FIELD_NUMBER = 1;
  private int abuseType_ = 0;
  /**
   *
   *
   * <pre>
   * The type of abuse.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
   *
   * @return The enum numeric value on the wire for abuseType.
   */
  @java.lang.Override
  public int getAbuseTypeValue() {
    return abuseType_;
  }
  /**
   *
   *
   * <pre>
   * The type of abuse.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
   *
   * @return The abuseType.
   */
  @java.lang.Override
  public com.google.webrisk.v1.ThreatInfo.AbuseType getAbuseType() {
    com.google.webrisk.v1.ThreatInfo.AbuseType result =
        com.google.webrisk.v1.ThreatInfo.AbuseType.forNumber(abuseType_);
    return result == null ? com.google.webrisk.v1.ThreatInfo.AbuseType.UNRECOGNIZED : result;
  }

  public static final int THREAT_CONFIDENCE_FIELD_NUMBER = 2;
  private com.google.webrisk.v1.ThreatInfo.Confidence threatConfidence_;
  /**
   *
   *
   * <pre>
   * Confidence that the URI is unsafe.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
   *
   * @return Whether the threatConfidence field is set.
   */
  @java.lang.Override
  public boolean hasThreatConfidence() {
    return threatConfidence_ != null;
  }
  /**
   *
   *
   * <pre>
   * Confidence that the URI is unsafe.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
   *
   * @return The threatConfidence.
   */
  @java.lang.Override
  public com.google.webrisk.v1.ThreatInfo.Confidence getThreatConfidence() {
    return threatConfidence_ == null
        ? com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance()
        : threatConfidence_;
  }
  /**
   *
   *
   * <pre>
   * Confidence that the URI is unsafe.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
   */
  @java.lang.Override
  public com.google.webrisk.v1.ThreatInfo.ConfidenceOrBuilder getThreatConfidenceOrBuilder() {
    return threatConfidence_ == null
        ? com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance()
        : threatConfidence_;
  }

  public static final int THREAT_JUSTIFICATION_FIELD_NUMBER = 3;
  private com.google.webrisk.v1.ThreatInfo.ThreatJustification threatJustification_;
  /**
   *
   *
   * <pre>
   * Context about why the URI is unsafe.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;</code>
   *
   * @return Whether the threatJustification field is set.
   */
  @java.lang.Override
  public boolean hasThreatJustification() {
    return threatJustification_ != null;
  }
  /**
   *
   *
   * <pre>
   * Context about why the URI is unsafe.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;</code>
   *
   * @return The threatJustification.
   */
  @java.lang.Override
  public com.google.webrisk.v1.ThreatInfo.ThreatJustification getThreatJustification() {
    return threatJustification_ == null
        ? com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance()
        : threatJustification_;
  }
  /**
   *
   *
   * <pre>
   * Context about why the URI is unsafe.
   * </pre>
   *
   * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;</code>
   */
  @java.lang.Override
  public com.google.webrisk.v1.ThreatInfo.ThreatJustificationOrBuilder
      getThreatJustificationOrBuilder() {
    return threatJustification_ == null
        ? com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance()
        : threatJustification_;
  }

  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 (abuseType_
        != com.google.webrisk.v1.ThreatInfo.AbuseType.ABUSE_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(1, abuseType_);
    }
    if (threatConfidence_ != null) {
      output.writeMessage(2, getThreatConfidence());
    }
    if (threatJustification_ != null) {
      output.writeMessage(3, getThreatJustification());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (abuseType_
        != com.google.webrisk.v1.ThreatInfo.AbuseType.ABUSE_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, abuseType_);
    }
    if (threatConfidence_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getThreatConfidence());
    }
    if (threatJustification_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getThreatJustification());
    }
    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.webrisk.v1.ThreatInfo)) {
      return super.equals(obj);
    }
    com.google.webrisk.v1.ThreatInfo other = (com.google.webrisk.v1.ThreatInfo) obj;

    if (abuseType_ != other.abuseType_) return false;
    if (hasThreatConfidence() != other.hasThreatConfidence()) return false;
    if (hasThreatConfidence()) {
      if (!getThreatConfidence().equals(other.getThreatConfidence())) return false;
    }
    if (hasThreatJustification() != other.hasThreatJustification()) return false;
    if (hasThreatJustification()) {
      if (!getThreatJustification().equals(other.getThreatJustification())) 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) + ABUSE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + abuseType_;
    if (hasThreatConfidence()) {
      hash = (37 * hash) + THREAT_CONFIDENCE_FIELD_NUMBER;
      hash = (53 * hash) + getThreatConfidence().hashCode();
    }
    if (hasThreatJustification()) {
      hash = (37 * hash) + THREAT_JUSTIFICATION_FIELD_NUMBER;
      hash = (53 * hash) + getThreatJustification().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.webrisk.v1.ThreatInfo 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.v1.ThreatInfo parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

  public static com.google.webrisk.v1.ThreatInfo 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.v1.ThreatInfo 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>
   * Context about the submission including the type of abuse found on the URI and
   * supporting details.
   * option (google.api.message_visibility).restriction = "TRUSTED_TESTER";
   * </pre>
   *
   * Protobuf type {@code google.cloud.webrisk.v1.ThreatInfo}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1.ThreatInfo)
      com.google.webrisk.v1.ThreatInfoOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.webrisk.v1.WebRiskProto
          .internal_static_google_cloud_webrisk_v1_ThreatInfo_descriptor;
    }

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

    // Construct using com.google.webrisk.v1.ThreatInfo.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      abuseType_ = 0;
      threatConfidence_ = null;
      if (threatConfidenceBuilder_ != null) {
        threatConfidenceBuilder_.dispose();
        threatConfidenceBuilder_ = null;
      }
      threatJustification_ = null;
      if (threatJustificationBuilder_ != null) {
        threatJustificationBuilder_.dispose();
        threatJustificationBuilder_ = null;
      }
      return this;
    }

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

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

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

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

    private void buildPartial0(com.google.webrisk.v1.ThreatInfo result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.abuseType_ = abuseType_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.threatConfidence_ =
            threatConfidenceBuilder_ == null ? threatConfidence_ : threatConfidenceBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.threatJustification_ =
            threatJustificationBuilder_ == null
                ? threatJustification_
                : threatJustificationBuilder_.build();
      }
    }

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

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

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

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

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

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

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

    public Builder mergeFrom(com.google.webrisk.v1.ThreatInfo other) {
      if (other == com.google.webrisk.v1.ThreatInfo.getDefaultInstance()) return this;
      if (other.abuseType_ != 0) {
        setAbuseTypeValue(other.getAbuseTypeValue());
      }
      if (other.hasThreatConfidence()) {
        mergeThreatConfidence(other.getThreatConfidence());
      }
      if (other.hasThreatJustification()) {
        mergeThreatJustification(other.getThreatJustification());
      }
      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:
              {
                abuseType_ = input.readEnum();
                bitField0_ |= 0x00000001;
                break;
              } // case 8
            case 18:
              {
                input.readMessage(
                    getThreatConfidenceFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(
                    getThreatJustificationFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            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 abuseType_ = 0;
    /**
     *
     *
     * <pre>
     * The type of abuse.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
     *
     * @return The enum numeric value on the wire for abuseType.
     */
    @java.lang.Override
    public int getAbuseTypeValue() {
      return abuseType_;
    }
    /**
     *
     *
     * <pre>
     * The type of abuse.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
     *
     * @param value The enum numeric value on the wire for abuseType to set.
     * @return This builder for chaining.
     */
    public Builder setAbuseTypeValue(int value) {
      abuseType_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of abuse.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
     *
     * @return The abuseType.
     */
    @java.lang.Override
    public com.google.webrisk.v1.ThreatInfo.AbuseType getAbuseType() {
      com.google.webrisk.v1.ThreatInfo.AbuseType result =
          com.google.webrisk.v1.ThreatInfo.AbuseType.forNumber(abuseType_);
      return result == null ? com.google.webrisk.v1.ThreatInfo.AbuseType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * The type of abuse.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
     *
     * @param value The abuseType to set.
     * @return This builder for chaining.
     */
    public Builder setAbuseType(com.google.webrisk.v1.ThreatInfo.AbuseType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      abuseType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of abuse.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.AbuseType abuse_type = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAbuseType() {
      bitField0_ = (bitField0_ & ~0x00000001);
      abuseType_ = 0;
      onChanged();
      return this;
    }

    private com.google.webrisk.v1.ThreatInfo.Confidence threatConfidence_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.webrisk.v1.ThreatInfo.Confidence,
            com.google.webrisk.v1.ThreatInfo.Confidence.Builder,
            com.google.webrisk.v1.ThreatInfo.ConfidenceOrBuilder>
        threatConfidenceBuilder_;
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     *
     * @return Whether the threatConfidence field is set.
     */
    public boolean hasThreatConfidence() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     *
     * @return The threatConfidence.
     */
    public com.google.webrisk.v1.ThreatInfo.Confidence getThreatConfidence() {
      if (threatConfidenceBuilder_ == null) {
        return threatConfidence_ == null
            ? com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance()
            : threatConfidence_;
      } else {
        return threatConfidenceBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    public Builder setThreatConfidence(com.google.webrisk.v1.ThreatInfo.Confidence value) {
      if (threatConfidenceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        threatConfidence_ = value;
      } else {
        threatConfidenceBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    public Builder setThreatConfidence(
        com.google.webrisk.v1.ThreatInfo.Confidence.Builder builderForValue) {
      if (threatConfidenceBuilder_ == null) {
        threatConfidence_ = builderForValue.build();
      } else {
        threatConfidenceBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    public Builder mergeThreatConfidence(com.google.webrisk.v1.ThreatInfo.Confidence value) {
      if (threatConfidenceBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && threatConfidence_ != null
            && threatConfidence_
                != com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance()) {
          getThreatConfidenceBuilder().mergeFrom(value);
        } else {
          threatConfidence_ = value;
        }
      } else {
        threatConfidenceBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    public Builder clearThreatConfidence() {
      bitField0_ = (bitField0_ & ~0x00000002);
      threatConfidence_ = null;
      if (threatConfidenceBuilder_ != null) {
        threatConfidenceBuilder_.dispose();
        threatConfidenceBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    public com.google.webrisk.v1.ThreatInfo.Confidence.Builder getThreatConfidenceBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getThreatConfidenceFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    public com.google.webrisk.v1.ThreatInfo.ConfidenceOrBuilder getThreatConfidenceOrBuilder() {
      if (threatConfidenceBuilder_ != null) {
        return threatConfidenceBuilder_.getMessageOrBuilder();
      } else {
        return threatConfidence_ == null
            ? com.google.webrisk.v1.ThreatInfo.Confidence.getDefaultInstance()
            : threatConfidence_;
      }
    }
    /**
     *
     *
     * <pre>
     * Confidence that the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.Confidence threat_confidence = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.webrisk.v1.ThreatInfo.Confidence,
            com.google.webrisk.v1.ThreatInfo.Confidence.Builder,
            com.google.webrisk.v1.ThreatInfo.ConfidenceOrBuilder>
        getThreatConfidenceFieldBuilder() {
      if (threatConfidenceBuilder_ == null) {
        threatConfidenceBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.webrisk.v1.ThreatInfo.Confidence,
                com.google.webrisk.v1.ThreatInfo.Confidence.Builder,
                com.google.webrisk.v1.ThreatInfo.ConfidenceOrBuilder>(
                getThreatConfidence(), getParentForChildren(), isClean());
        threatConfidence_ = null;
      }
      return threatConfidenceBuilder_;
    }

    private com.google.webrisk.v1.ThreatInfo.ThreatJustification threatJustification_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.webrisk.v1.ThreatInfo.ThreatJustification,
            com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder,
            com.google.webrisk.v1.ThreatInfo.ThreatJustificationOrBuilder>
        threatJustificationBuilder_;
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     *
     * @return Whether the threatJustification field is set.
     */
    public boolean hasThreatJustification() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     *
     * @return The threatJustification.
     */
    public com.google.webrisk.v1.ThreatInfo.ThreatJustification getThreatJustification() {
      if (threatJustificationBuilder_ == null) {
        return threatJustification_ == null
            ? com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance()
            : threatJustification_;
      } else {
        return threatJustificationBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    public Builder setThreatJustification(
        com.google.webrisk.v1.ThreatInfo.ThreatJustification value) {
      if (threatJustificationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        threatJustification_ = value;
      } else {
        threatJustificationBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    public Builder setThreatJustification(
        com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder builderForValue) {
      if (threatJustificationBuilder_ == null) {
        threatJustification_ = builderForValue.build();
      } else {
        threatJustificationBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    public Builder mergeThreatJustification(
        com.google.webrisk.v1.ThreatInfo.ThreatJustification value) {
      if (threatJustificationBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && threatJustification_ != null
            && threatJustification_
                != com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance()) {
          getThreatJustificationBuilder().mergeFrom(value);
        } else {
          threatJustification_ = value;
        }
      } else {
        threatJustificationBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    public Builder clearThreatJustification() {
      bitField0_ = (bitField0_ & ~0x00000004);
      threatJustification_ = null;
      if (threatJustificationBuilder_ != null) {
        threatJustificationBuilder_.dispose();
        threatJustificationBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    public com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder
        getThreatJustificationBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getThreatJustificationFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    public com.google.webrisk.v1.ThreatInfo.ThreatJustificationOrBuilder
        getThreatJustificationOrBuilder() {
      if (threatJustificationBuilder_ != null) {
        return threatJustificationBuilder_.getMessageOrBuilder();
      } else {
        return threatJustification_ == null
            ? com.google.webrisk.v1.ThreatInfo.ThreatJustification.getDefaultInstance()
            : threatJustification_;
      }
    }
    /**
     *
     *
     * <pre>
     * Context about why the URI is unsafe.
     * </pre>
     *
     * <code>.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification threat_justification = 3;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.webrisk.v1.ThreatInfo.ThreatJustification,
            com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder,
            com.google.webrisk.v1.ThreatInfo.ThreatJustificationOrBuilder>
        getThreatJustificationFieldBuilder() {
      if (threatJustificationBuilder_ == null) {
        threatJustificationBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.webrisk.v1.ThreatInfo.ThreatJustification,
                com.google.webrisk.v1.ThreatInfo.ThreatJustification.Builder,
                com.google.webrisk.v1.ThreatInfo.ThreatJustificationOrBuilder>(
                getThreatJustification(), getParentForChildren(), isClean());
        threatJustification_ = null;
      }
      return threatJustificationBuilder_;
    }

    @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.v1.ThreatInfo)
  }

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

  static {
    DEFAULT_INSTANCE = new com.google.webrisk.v1.ThreatInfo();
  }

  public static com.google.webrisk.v1.ThreatInfo getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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