// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/privacy/dlp/v2/storage.proto

package com.google.privacy.dlp.v2;

/**
 *
 *
 * <pre>
 * Custom information type provided by the user. Used to find domain-specific
 * sensitive information configurable to the data in question.
 * </pre>
 *
 * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType}
 */
public final class CustomInfoType extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType)
    CustomInfoTypeOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use CustomInfoType.newBuilder() to construct.
  private CustomInfoType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private CustomInfoType() {
    likelihood_ = 0;
    detectionRules_ = java.util.Collections.emptyList();
    exclusionType_ = 0;
  }

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

  private CustomInfoType(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10:
            {
              com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null;
              if (infoType_ != null) {
                subBuilder = infoType_.toBuilder();
              }
              infoType_ =
                  input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(infoType_);
                infoType_ = subBuilder.buildPartial();
              }

              break;
            }
          case 18:
            {
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null;
              if (typeCase_ == 2) {
                subBuilder =
                    ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder();
              }
              type_ =
                  input.readMessage(
                      com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_);
                type_ = subBuilder.buildPartial();
              }
              typeCase_ = 2;
              break;
            }
          case 26:
            {
              com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null;
              if (typeCase_ == 3) {
                subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder();
              }
              type_ =
                  input.readMessage(
                      com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_);
                type_ = subBuilder.buildPartial();
              }
              typeCase_ = 3;
              break;
            }
          case 34:
            {
              com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder subBuilder = null;
              if (typeCase_ == 4) {
                subBuilder =
                    ((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_).toBuilder();
              }
              type_ =
                  input.readMessage(
                      com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_);
                type_ = subBuilder.buildPartial();
              }
              typeCase_ = 4;
              break;
            }
          case 42:
            {
              com.google.privacy.dlp.v2.StoredType.Builder subBuilder = null;
              if (typeCase_ == 5) {
                subBuilder = ((com.google.privacy.dlp.v2.StoredType) type_).toBuilder();
              }
              type_ =
                  input.readMessage(
                      com.google.privacy.dlp.v2.StoredType.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.privacy.dlp.v2.StoredType) type_);
                type_ = subBuilder.buildPartial();
              }
              typeCase_ = 5;
              break;
            }
          case 48:
            {
              int rawValue = input.readEnum();

              likelihood_ = rawValue;
              break;
            }
          case 58:
            {
              if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
                detectionRules_ =
                    new java.util.ArrayList<
                        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>();
                mutable_bitField0_ |= 0x00000040;
              }
              detectionRules_.add(
                  input.readMessage(
                      com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.parser(),
                      extensionRegistry));
              break;
            }
          case 64:
            {
              int rawValue = input.readEnum();

              exclusionType_ = rawValue;
              break;
            }
          default:
            {
              if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
        detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.privacy.dlp.v2.DlpStorage
        .internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.privacy.dlp.v2.DlpStorage
        .internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.privacy.dlp.v2.CustomInfoType.class,
            com.google.privacy.dlp.v2.CustomInfoType.Builder.class);
  }

  /** Protobuf enum {@code google.privacy.dlp.v2.CustomInfoType.ExclusionType} */
  public enum ExclusionType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * A finding of this custom info type will not be excluded from results.
     * </pre>
     *
     * <code>EXCLUSION_TYPE_UNSPECIFIED = 0;</code>
     */
    EXCLUSION_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * A finding of this custom info type will be excluded from final results,
     * but can still affect rule execution.
     * </pre>
     *
     * <code>EXCLUSION_TYPE_EXCLUDE = 1;</code>
     */
    EXCLUSION_TYPE_EXCLUDE(1),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * A finding of this custom info type will not be excluded from results.
     * </pre>
     *
     * <code>EXCLUSION_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int EXCLUSION_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * A finding of this custom info type will be excluded from final results,
     * but can still affect rule execution.
     * </pre>
     *
     * <code>EXCLUSION_TYPE_EXCLUDE = 1;</code>
     */
    public static final int EXCLUSION_TYPE_EXCLUDE_VALUE = 1;

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

    /** @deprecated Use {@link #forNumber(int)} instead. */
    @java.lang.Deprecated
    public static ExclusionType valueOf(int value) {
      return forNumber(value);
    }

    public static ExclusionType forNumber(int value) {
      switch (value) {
        case 0:
          return EXCLUSION_TYPE_UNSPECIFIED;
        case 1:
          return EXCLUSION_TYPE_EXCLUDE;
        default:
          return null;
      }
    }

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

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

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      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.privacy.dlp.v2.CustomInfoType.getDescriptor().getEnumTypes().get(0);
    }

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

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

    // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CustomInfoType.ExclusionType)
  }

  public interface DictionaryOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * List of words or phrases to search for.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     */
    boolean hasWordList();
    /**
     *
     *
     * <pre>
     * List of words or phrases to search for.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     */
    com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList();
    /**
     *
     *
     * <pre>
     * List of words or phrases to search for.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     */
    com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder();

    /**
     *
     *
     * <pre>
     * Newline-delimited file of words in Cloud Storage. Only a single file
     * is accepted.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
     */
    boolean hasCloudStoragePath();
    /**
     *
     *
     * <pre>
     * Newline-delimited file of words in Cloud Storage. Only a single file
     * is accepted.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
     */
    com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath();
    /**
     *
     *
     * <pre>
     * Newline-delimited file of words in Cloud Storage. Only a single file
     * is accepted.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
     */
    com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder();

    public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.SourceCase getSourceCase();
  }
  /**
   *
   *
   * <pre>
   * Custom information type based on a dictionary of words or phrases. This can
   * be used to match sensitive information specific to the data, such as a list
   * of employee IDs or job titles.
   * Dictionary words are case-insensitive and all characters other than letters
   * and digits in the unicode [Basic Multilingual
   * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
   * will be replaced with whitespace when scanning for matches, so the
   * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
   * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
   * surrounding any match must be of a different type than the adjacent
   * characters within the word, so letters must be next to non-letters and
   * digits next to non-digits. For example, the dictionary word "jen" will
   * match the first three letters of the text "jen123" but will return no
   * matches for "jennifer".
   * Dictionary words containing a large number of characters that are not
   * letters or digits may result in unexpected findings because such characters
   * are treated as whitespace. The
   * [limits](https://cloud.google.com/dlp/limits) page contains details about
   * the size limits of dictionaries. For dictionaries that do not fit within
   * these constraints, consider using `LargeCustomDictionaryConfig` in the
   * `StoredInfoType` API.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary}
   */
  public static final class Dictionary extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary)
      DictionaryOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Dictionary.newBuilder() to construct.
    private Dictionary(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Dictionary() {}

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

    private Dictionary(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder subBuilder =
                    null;
                if (sourceCase_ == 1) {
                  subBuilder =
                      ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_)
                          .toBuilder();
                }
                source_ =
                    input.readMessage(
                        com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.parser(),
                        extensionRegistry);
                if (subBuilder != null) {
                  subBuilder.mergeFrom(
                      (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_);
                  source_ = subBuilder.buildPartial();
                }
                sourceCase_ = 1;
                break;
              }
            case 26:
              {
                com.google.privacy.dlp.v2.CloudStoragePath.Builder subBuilder = null;
                if (sourceCase_ == 3) {
                  subBuilder = ((com.google.privacy.dlp.v2.CloudStoragePath) source_).toBuilder();
                }
                source_ =
                    input.readMessage(
                        com.google.privacy.dlp.v2.CloudStoragePath.parser(), extensionRegistry);
                if (subBuilder != null) {
                  subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStoragePath) source_);
                  source_ = subBuilder.buildPartial();
                }
                sourceCase_ = 3;
                break;
              }
            default:
              {
                if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class,
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class);
    }

    public interface WordListOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      java.util.List<java.lang.String> getWordsList();
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      int getWordsCount();
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      java.lang.String getWords(int index);
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      com.google.protobuf.ByteString getWordsBytes(int index);
    }
    /**
     *
     *
     * <pre>
     * Message defining a list of words or phrases to search for in the data.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList}
     */
    public static final class WordList extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
        WordListOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use WordList.newBuilder() to construct.
      private WordList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private WordList() {
        words_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      }

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

      private WordList(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                    words_ = new com.google.protobuf.LazyStringArrayList();
                    mutable_bitField0_ |= 0x00000001;
                  }
                  words_.add(s);
                  break;
                }
              default:
                {
                  if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                    done = true;
                  }
                  break;
                }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(this);
        } finally {
          if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
            words_ = words_.getUnmodifiableView();
          }
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class,
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class);
      }

      public static final int WORDS_FIELD_NUMBER = 1;
      private com.google.protobuf.LazyStringList words_;
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      public com.google.protobuf.ProtocolStringList getWordsList() {
        return words_;
      }
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      public int getWordsCount() {
        return words_.size();
      }
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      public java.lang.String getWords(int index) {
        return words_.get(index);
      }
      /**
       *
       *
       * <pre>
       * Words or phrases defining the dictionary. The dictionary must contain
       * at least one phrase and every phrase must contain at least 2 characters
       * that are letters or digits. [required]
       * </pre>
       *
       * <code>repeated string words = 1;</code>
       */
      public com.google.protobuf.ByteString getWordsBytes(int index) {
        return words_.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 {
        for (int i = 0; i < words_.size(); i++) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, words_.getRaw(i));
        }
        unknownFields.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 < words_.size(); i++) {
            dataSize += computeStringSizeNoTag(words_.getRaw(i));
          }
          size += dataSize;
          size += 1 * getWordsList().size();
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
          return true;
        }
        if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)) {
          return super.equals(obj);
        }
        com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other =
            (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) obj;

        boolean result = true;
        result = result && getWordsList().equals(other.getWordsList());
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (getWordsCount() > 0) {
          hash = (37 * hash) + WORDS_FIELD_NUMBER;
          hash = (53 * hash) + getWordsList().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList 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.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList 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.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom(
          java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList 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.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
          com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList 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.privacy.dlp.v2.CustomInfoType.Dictionary.WordList 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>
       * Message defining a list of words or phrases to search for in the data.
       * </pre>
       *
       * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class,
                  com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class);
        }

        // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

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

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

        @java.lang.Override
        public Builder clear() {
          super.clear();
          words_ = com.google.protobuf.LazyStringArrayList.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000001);
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
            getDefaultInstanceForType() {
          return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList build() {
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList buildPartial() {
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result =
              new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(this);
          int from_bitField0_ = bitField0_;
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            words_ = words_.getUnmodifiableView();
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.words_ = words_;
          onBuilt();
          return result;
        }

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

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

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

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

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

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

        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) {
            return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other) {
          if (other
              == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance())
            return this;
          if (!other.words_.isEmpty()) {
            if (words_.isEmpty()) {
              words_ = other.words_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureWordsIsMutable();
              words_.addAll(other.words_);
            }
            onChanged();
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

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

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage =
                (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
                    e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private int bitField0_;

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

        private void ensureWordsIsMutable() {
          if (!((bitField0_ & 0x00000001) == 0x00000001)) {
            words_ = new com.google.protobuf.LazyStringArrayList(words_);
            bitField0_ |= 0x00000001;
          }
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public com.google.protobuf.ProtocolStringList getWordsList() {
          return words_.getUnmodifiableView();
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public int getWordsCount() {
          return words_.size();
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public java.lang.String getWords(int index) {
          return words_.get(index);
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public com.google.protobuf.ByteString getWordsBytes(int index) {
          return words_.getByteString(index);
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public Builder setWords(int index, java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureWordsIsMutable();
          words_.set(index, value);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public Builder addWords(java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureWordsIsMutable();
          words_.add(value);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public Builder addAllWords(java.lang.Iterable<java.lang.String> values) {
          ensureWordsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, words_);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public Builder clearWords() {
          words_ = com.google.protobuf.LazyStringArrayList.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Words or phrases defining the dictionary. The dictionary must contain
         * at least one phrase and every phrase must contain at least 2 characters
         * that are letters or digits. [required]
         * </pre>
         *
         * <code>repeated string words = 1;</code>
         */
        public Builder addWordsBytes(com.google.protobuf.ByteString value) {
          if (value == null) {
            throw new NullPointerException();
          }
          checkByteStringIsUtf8(value);
          ensureWordsIsMutable();
          words_.add(value);
          onChanged();
          return this;
        }

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

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

        // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
      }

      // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
      private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList();
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

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

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    private int sourceCase_ = 0;
    private java.lang.Object source_;

    public enum SourceCase implements com.google.protobuf.Internal.EnumLite {
      WORD_LIST(1),
      CLOUD_STORAGE_PATH(3),
      SOURCE_NOT_SET(0);
      private final int value;

      private SourceCase(int value) {
        this.value = value;
      }
      /** @deprecated Use {@link #forNumber(int)} instead. */
      @java.lang.Deprecated
      public static SourceCase valueOf(int value) {
        return forNumber(value);
      }

      public static SourceCase forNumber(int value) {
        switch (value) {
          case 1:
            return WORD_LIST;
          case 3:
            return CLOUD_STORAGE_PATH;
          case 0:
            return SOURCE_NOT_SET;
          default:
            return null;
        }
      }

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

    public SourceCase getSourceCase() {
      return SourceCase.forNumber(sourceCase_);
    }

    public static final int WORD_LIST_FIELD_NUMBER = 1;
    /**
     *
     *
     * <pre>
     * List of words or phrases to search for.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     */
    public boolean hasWordList() {
      return sourceCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * List of words or phrases to search for.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() {
      if (sourceCase_ == 1) {
        return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
      }
      return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
    }
    /**
     *
     *
     * <pre>
     * List of words or phrases to search for.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder
        getWordListOrBuilder() {
      if (sourceCase_ == 1) {
        return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
      }
      return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
    }

    public static final int CLOUD_STORAGE_PATH_FIELD_NUMBER = 3;
    /**
     *
     *
     * <pre>
     * Newline-delimited file of words in Cloud Storage. Only a single file
     * is accepted.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
     */
    public boolean hasCloudStoragePath() {
      return sourceCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * Newline-delimited file of words in Cloud Storage. Only a single file
     * is accepted.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
     */
    public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() {
      if (sourceCase_ == 3) {
        return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
      }
      return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
    }
    /**
     *
     *
     * <pre>
     * Newline-delimited file of words in Cloud Storage. Only a single file
     * is accepted.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
     */
    public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() {
      if (sourceCase_ == 3) {
        return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
      }
      return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
    }

    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 (sourceCase_ == 1) {
        output.writeMessage(
            1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_);
      }
      if (sourceCase_ == 3) {
        output.writeMessage(3, (com.google.privacy.dlp.v2.CloudStoragePath) source_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (sourceCase_ == 1) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(
                1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_);
      }
      if (sourceCase_ == 3) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(
                3, (com.google.privacy.dlp.v2.CloudStoragePath) source_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary)) {
        return super.equals(obj);
      }
      com.google.privacy.dlp.v2.CustomInfoType.Dictionary other =
          (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) obj;

      boolean result = true;
      result = result && getSourceCase().equals(other.getSourceCase());
      if (!result) return false;
      switch (sourceCase_) {
        case 1:
          result = result && getWordList().equals(other.getWordList());
          break;
        case 3:
          result = result && getCloudStoragePath().equals(other.getCloudStoragePath());
          break;
        case 0:
        default:
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (sourceCase_) {
        case 1:
          hash = (37 * hash) + WORD_LIST_FIELD_NUMBER;
          hash = (53 * hash) + getWordList().hashCode();
          break;
        case 3:
          hash = (37 * hash) + CLOUD_STORAGE_PATH_FIELD_NUMBER;
          hash = (53 * hash) + getCloudStoragePath().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary 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.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary 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.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary 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.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary 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.privacy.dlp.v2.CustomInfoType.Dictionary 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>
     * Custom information type based on a dictionary of words or phrases. This can
     * be used to match sensitive information specific to the data, such as a list
     * of employee IDs or job titles.
     * Dictionary words are case-insensitive and all characters other than letters
     * and digits in the unicode [Basic Multilingual
     * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
     * will be replaced with whitespace when scanning for matches, so the
     * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
     * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
     * surrounding any match must be of a different type than the adjacent
     * characters within the word, so letters must be next to non-letters and
     * digits next to non-digits. For example, the dictionary word "jen" will
     * match the first three letters of the text "jen123" but will return no
     * matches for "jennifer".
     * Dictionary words containing a large number of characters that are not
     * letters or digits may result in unexpected findings because such characters
     * are treated as whitespace. The
     * [limits](https://cloud.google.com/dlp/limits) page contains details about
     * the size limits of dictionaries. For dictionaries that do not fit within
     * these constraints, consider using `LargeCustomDictionaryConfig` in the
     * `StoredInfoType` API.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary)
        com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class,
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class);
      }

      // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        sourceCase_ = 0;
        source_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() {
        return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary build() {
        com.google.privacy.dlp.v2.CustomInfoType.Dictionary result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary buildPartial() {
        com.google.privacy.dlp.v2.CustomInfoType.Dictionary result =
            new com.google.privacy.dlp.v2.CustomInfoType.Dictionary(this);
        if (sourceCase_ == 1) {
          if (wordListBuilder_ == null) {
            result.source_ = source_;
          } else {
            result.source_ = wordListBuilder_.build();
          }
        }
        if (sourceCase_ == 3) {
          if (cloudStoragePathBuilder_ == null) {
            result.source_ = source_;
          } else {
            result.source_ = cloudStoragePathBuilder_.build();
          }
        }
        result.sourceCase_ = sourceCase_;
        onBuilt();
        return result;
      }

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

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

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

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

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

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

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary) {
          return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary other) {
        if (other == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance())
          return this;
        switch (other.getSourceCase()) {
          case WORD_LIST:
            {
              mergeWordList(other.getWordList());
              break;
            }
          case CLOUD_STORAGE_PATH:
            {
              mergeCloudStoragePath(other.getCloudStoragePath());
              break;
            }
          case SOURCE_NOT_SET:
            {
              break;
            }
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.privacy.dlp.v2.CustomInfoType.Dictionary parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int sourceCase_ = 0;
      private java.lang.Object source_;

      public SourceCase getSourceCase() {
        return SourceCase.forNumber(sourceCase_);
      }

      public Builder clearSource() {
        sourceCase_ = 0;
        source_ = null;
        onChanged();
        return this;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList,
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder,
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>
          wordListBuilder_;
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public boolean hasWordList() {
        return sourceCase_ == 1;
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() {
        if (wordListBuilder_ == null) {
          if (sourceCase_ == 1) {
            return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
          }
          return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
        } else {
          if (sourceCase_ == 1) {
            return wordListBuilder_.getMessage();
          }
          return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public Builder setWordList(
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) {
        if (wordListBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          source_ = value;
          onChanged();
        } else {
          wordListBuilder_.setMessage(value);
        }
        sourceCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public Builder setWordList(
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue) {
        if (wordListBuilder_ == null) {
          source_ = builderForValue.build();
          onChanged();
        } else {
          wordListBuilder_.setMessage(builderForValue.build());
        }
        sourceCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public Builder mergeWordList(
          com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) {
        if (wordListBuilder_ == null) {
          if (sourceCase_ == 1
              && source_
                  != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
                      .getDefaultInstance()) {
            source_ =
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder(
                        (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_)
                    .mergeFrom(value)
                    .buildPartial();
          } else {
            source_ = value;
          }
          onChanged();
        } else {
          if (sourceCase_ == 1) {
            wordListBuilder_.mergeFrom(value);
          }
          wordListBuilder_.setMessage(value);
        }
        sourceCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public Builder clearWordList() {
        if (wordListBuilder_ == null) {
          if (sourceCase_ == 1) {
            sourceCase_ = 0;
            source_ = null;
            onChanged();
          }
        } else {
          if (sourceCase_ == 1) {
            sourceCase_ = 0;
            source_ = null;
          }
          wordListBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder
          getWordListBuilder() {
        return getWordListFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder
          getWordListOrBuilder() {
        if ((sourceCase_ == 1) && (wordListBuilder_ != null)) {
          return wordListBuilder_.getMessageOrBuilder();
        } else {
          if (sourceCase_ == 1) {
            return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
          }
          return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * List of words or phrases to search for.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList,
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder,
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>
          getWordListFieldBuilder() {
        if (wordListBuilder_ == null) {
          if (!(sourceCase_ == 1)) {
            source_ =
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
          }
          wordListBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList,
                  com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder,
                  com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>(
                  (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_,
                  getParentForChildren(),
                  isClean());
          source_ = null;
        }
        sourceCase_ = 1;
        onChanged();
        ;
        return wordListBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.CloudStoragePath,
              com.google.privacy.dlp.v2.CloudStoragePath.Builder,
              com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>
          cloudStoragePathBuilder_;
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public boolean hasCloudStoragePath() {
        return sourceCase_ == 3;
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() {
        if (cloudStoragePathBuilder_ == null) {
          if (sourceCase_ == 3) {
            return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
          }
          return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
        } else {
          if (sourceCase_ == 3) {
            return cloudStoragePathBuilder_.getMessage();
          }
          return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public Builder setCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) {
        if (cloudStoragePathBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          source_ = value;
          onChanged();
        } else {
          cloudStoragePathBuilder_.setMessage(value);
        }
        sourceCase_ = 3;
        return this;
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public Builder setCloudStoragePath(
          com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) {
        if (cloudStoragePathBuilder_ == null) {
          source_ = builderForValue.build();
          onChanged();
        } else {
          cloudStoragePathBuilder_.setMessage(builderForValue.build());
        }
        sourceCase_ = 3;
        return this;
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public Builder mergeCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) {
        if (cloudStoragePathBuilder_ == null) {
          if (sourceCase_ == 3
              && source_ != com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) {
            source_ =
                com.google.privacy.dlp.v2.CloudStoragePath.newBuilder(
                        (com.google.privacy.dlp.v2.CloudStoragePath) source_)
                    .mergeFrom(value)
                    .buildPartial();
          } else {
            source_ = value;
          }
          onChanged();
        } else {
          if (sourceCase_ == 3) {
            cloudStoragePathBuilder_.mergeFrom(value);
          }
          cloudStoragePathBuilder_.setMessage(value);
        }
        sourceCase_ = 3;
        return this;
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public Builder clearCloudStoragePath() {
        if (cloudStoragePathBuilder_ == null) {
          if (sourceCase_ == 3) {
            sourceCase_ = 0;
            source_ = null;
            onChanged();
          }
        } else {
          if (sourceCase_ == 3) {
            sourceCase_ = 0;
            source_ = null;
          }
          cloudStoragePathBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public com.google.privacy.dlp.v2.CloudStoragePath.Builder getCloudStoragePathBuilder() {
        return getCloudStoragePathFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() {
        if ((sourceCase_ == 3) && (cloudStoragePathBuilder_ != null)) {
          return cloudStoragePathBuilder_.getMessageOrBuilder();
        } else {
          if (sourceCase_ == 3) {
            return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
          }
          return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * Newline-delimited file of words in Cloud Storage. Only a single file
       * is accepted.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.CloudStoragePath,
              com.google.privacy.dlp.v2.CloudStoragePath.Builder,
              com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>
          getCloudStoragePathFieldBuilder() {
        if (cloudStoragePathBuilder_ == null) {
          if (!(sourceCase_ == 3)) {
            source_ = com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
          }
          cloudStoragePathBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.privacy.dlp.v2.CloudStoragePath,
                  com.google.privacy.dlp.v2.CloudStoragePath.Builder,
                  com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>(
                  (com.google.privacy.dlp.v2.CloudStoragePath) source_,
                  getParentForChildren(),
                  isClean());
          source_ = null;
        }
        sourceCase_ = 3;
        onChanged();
        ;
        return cloudStoragePathBuilder_;
      }

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

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

      // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary)
    }

    // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary)
    private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary();
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface RegexOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Regex)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Pattern defining the regular expression. Its syntax
     * (https://github.com/google/re2/wiki/Syntax) can be found under the
     * google/re2 repository on GitHub.
     * </pre>
     *
     * <code>string pattern = 1;</code>
     */
    java.lang.String getPattern();
    /**
     *
     *
     * <pre>
     * Pattern defining the regular expression. Its syntax
     * (https://github.com/google/re2/wiki/Syntax) can be found under the
     * google/re2 repository on GitHub.
     * </pre>
     *
     * <code>string pattern = 1;</code>
     */
    com.google.protobuf.ByteString getPatternBytes();
  }
  /**
   *
   *
   * <pre>
   * Message defining a custom regular expression.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex}
   */
  public static final class Regex extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Regex)
      RegexOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Regex.newBuilder() to construct.
    private Regex(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Regex() {
      pattern_ = "";
    }

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

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

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.CustomInfoType.Regex.class,
              com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class);
    }

    public static final int PATTERN_FIELD_NUMBER = 1;
    private volatile java.lang.Object pattern_;
    /**
     *
     *
     * <pre>
     * Pattern defining the regular expression. Its syntax
     * (https://github.com/google/re2/wiki/Syntax) can be found under the
     * google/re2 repository on GitHub.
     * </pre>
     *
     * <code>string pattern = 1;</code>
     */
    public java.lang.String getPattern() {
      java.lang.Object ref = pattern_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pattern_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Pattern defining the regular expression. Its syntax
     * (https://github.com/google/re2/wiki/Syntax) can be found under the
     * google/re2 repository on GitHub.
     * </pre>
     *
     * <code>string pattern = 1;</code>
     */
    public com.google.protobuf.ByteString getPatternBytes() {
      java.lang.Object ref = pattern_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        pattern_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    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 (!getPatternBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pattern_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!getPatternBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pattern_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex)) {
        return super.equals(obj);
      }
      com.google.privacy.dlp.v2.CustomInfoType.Regex other =
          (com.google.privacy.dlp.v2.CustomInfoType.Regex) obj;

      boolean result = true;
      result = result && getPattern().equals(other.getPattern());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + PATTERN_FIELD_NUMBER;
      hash = (53 * hash) + getPattern().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex 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.privacy.dlp.v2.CustomInfoType.Regex parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex 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.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex 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.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex 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.privacy.dlp.v2.CustomInfoType.Regex 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>
     * Message defining a custom regular expression.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Regex)
        com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.Regex.class,
                com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class);
      }

      // Construct using com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        pattern_ = "";

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() {
        return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Regex build() {
        com.google.privacy.dlp.v2.CustomInfoType.Regex result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.Regex buildPartial() {
        com.google.privacy.dlp.v2.CustomInfoType.Regex result =
            new com.google.privacy.dlp.v2.CustomInfoType.Regex(this);
        result.pattern_ = pattern_;
        onBuilt();
        return result;
      }

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

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

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

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

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

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

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex) {
          return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Regex other) {
        if (other == com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance())
          return this;
        if (!other.getPattern().isEmpty()) {
          pattern_ = other.pattern_;
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.privacy.dlp.v2.CustomInfoType.Regex parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Regex) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object pattern_ = "";
      /**
       *
       *
       * <pre>
       * Pattern defining the regular expression. Its syntax
       * (https://github.com/google/re2/wiki/Syntax) can be found under the
       * google/re2 repository on GitHub.
       * </pre>
       *
       * <code>string pattern = 1;</code>
       */
      public java.lang.String getPattern() {
        java.lang.Object ref = pattern_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          pattern_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Pattern defining the regular expression. Its syntax
       * (https://github.com/google/re2/wiki/Syntax) can be found under the
       * google/re2 repository on GitHub.
       * </pre>
       *
       * <code>string pattern = 1;</code>
       */
      public com.google.protobuf.ByteString getPatternBytes() {
        java.lang.Object ref = pattern_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          pattern_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Pattern defining the regular expression. Its syntax
       * (https://github.com/google/re2/wiki/Syntax) can be found under the
       * google/re2 repository on GitHub.
       * </pre>
       *
       * <code>string pattern = 1;</code>
       */
      public Builder setPattern(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        pattern_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Pattern defining the regular expression. Its syntax
       * (https://github.com/google/re2/wiki/Syntax) can be found under the
       * google/re2 repository on GitHub.
       * </pre>
       *
       * <code>string pattern = 1;</code>
       */
      public Builder clearPattern() {

        pattern_ = getDefaultInstance().getPattern();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Pattern defining the regular expression. Its syntax
       * (https://github.com/google/re2/wiki/Syntax) can be found under the
       * google/re2 repository on GitHub.
       * </pre>
       *
       * <code>string pattern = 1;</code>
       */
      public Builder setPatternBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        pattern_ = value;
        onChanged();
        return this;
      }

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

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

      // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Regex)
    }

    // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Regex)
    private static final com.google.privacy.dlp.v2.CustomInfoType.Regex DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Regex();
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface SurrogateTypeOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
      com.google.protobuf.MessageOrBuilder {}
  /**
   *
   *
   * <pre>
   * Message for detecting output from deidentification transformations
   * such as
   * [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
   * These types of transformations are
   * those that perform pseudonymization, thereby producing a "surrogate" as
   * output. This should be used in conjunction with a field on the
   * transformation such as `surrogate_info_type`. This CustomInfoType does
   * not support the use of `detection_rules`.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType}
   */
  public static final class SurrogateType extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
      SurrogateTypeOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use SurrogateType.newBuilder() to construct.
    private SurrogateType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private SurrogateType() {}

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

    private SurrogateType(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default:
              {
                if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class,
              com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class);
    }

    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 {
      unknownFields.writeTo(output);
    }

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

      size = 0;
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType)) {
        return super.equals(obj);
      }
      com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other =
          (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) obj;

      boolean result = true;
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType 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.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType 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.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType 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.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType 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.privacy.dlp.v2.CustomInfoType.SurrogateType 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>
     * Message for detecting output from deidentification transformations
     * such as
     * [`CryptoReplaceFfxFpeConfig`](/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
     * These types of transformations are
     * those that perform pseudonymization, thereby producing a "surrogate" as
     * output. This should be used in conjunction with a field on the
     * transformation such as `surrogate_info_type`. This CustomInfoType does
     * not support the use of `detection_rules`.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
        com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class,
                com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class);
      }

      // Construct using com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

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

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

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() {
        return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType build() {
        com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType buildPartial() {
        com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result =
            new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType(this);
        onBuilt();
        return result;
      }

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

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

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

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

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

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

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) {
          return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other) {
        if (other == com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance())
          return this;
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

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

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

      // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
    }

    // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
    private static final com.google.privacy.dlp.v2.CustomInfoType.SurrogateType DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType();
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface DetectionRuleOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Hotword-based detection rule.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
     * </code>
     */
    boolean hasHotwordRule();
    /**
     *
     *
     * <pre>
     * Hotword-based detection rule.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
     * </code>
     */
    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule();
    /**
     *
     *
     * <pre>
     * Hotword-based detection rule.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
     * </code>
     */
    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder
        getHotwordRuleOrBuilder();

    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.TypeCase getTypeCase();
  }
  /**
   *
   *
   * <pre>
   * Rule for modifying a CustomInfoType to alter behavior under certain
   * circumstances, depending on the specific details of the rule. Not supported
   * for the `surrogate_type` custom info type.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule}
   */
  public static final class DetectionRule extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
      DetectionRuleOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use DetectionRule.newBuilder() to construct.
    private DetectionRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private DetectionRule() {}

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

    private DetectionRule(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder
                    subBuilder = null;
                if (typeCase_ == 1) {
                  subBuilder =
                      ((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_)
                          .toBuilder();
                }
                type_ =
                    input.readMessage(
                        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.parser(),
                        extensionRegistry);
                if (subBuilder != null) {
                  subBuilder.mergeFrom(
                      (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_);
                  type_ = subBuilder.buildPartial();
                }
                typeCase_ = 1;
                break;
              }
            default:
              {
                if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class,
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class);
    }

    public interface ProximityOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Number of characters before the finding to consider.
       * </pre>
       *
       * <code>int32 window_before = 1;</code>
       */
      int getWindowBefore();

      /**
       *
       *
       * <pre>
       * Number of characters after the finding to consider.
       * </pre>
       *
       * <code>int32 window_after = 2;</code>
       */
      int getWindowAfter();
    }
    /**
     *
     *
     * <pre>
     * Message for specifying a window around a finding to apply a detection
     * rule.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity}
     */
    public static final class Proximity extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
        ProximityOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use Proximity.newBuilder() to construct.
      private Proximity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private Proximity() {
        windowBefore_ = 0;
        windowAfter_ = 0;
      }

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

      private Proximity(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8:
                {
                  windowBefore_ = input.readInt32();
                  break;
                }
              case 16:
                {
                  windowAfter_ = input.readInt32();
                  break;
                }
              default:
                {
                  if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                    done = true;
                  }
                  break;
                }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class);
      }

      public static final int WINDOW_BEFORE_FIELD_NUMBER = 1;
      private int windowBefore_;
      /**
       *
       *
       * <pre>
       * Number of characters before the finding to consider.
       * </pre>
       *
       * <code>int32 window_before = 1;</code>
       */
      public int getWindowBefore() {
        return windowBefore_;
      }

      public static final int WINDOW_AFTER_FIELD_NUMBER = 2;
      private int windowAfter_;
      /**
       *
       *
       * <pre>
       * Number of characters after the finding to consider.
       * </pre>
       *
       * <code>int32 window_after = 2;</code>
       */
      public int getWindowAfter() {
        return windowAfter_;
      }

      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 (windowBefore_ != 0) {
          output.writeInt32(1, windowBefore_);
        }
        if (windowAfter_ != 0) {
          output.writeInt32(2, windowAfter_);
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        if (windowBefore_ != 0) {
          size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, windowBefore_);
        }
        if (windowAfter_ != 0) {
          size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, windowAfter_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
          return true;
        }
        if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)) {
          return super.equals(obj);
        }
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other =
            (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) obj;

        boolean result = true;
        result = result && (getWindowBefore() == other.getWindowBefore());
        result = result && (getWindowAfter() == other.getWindowAfter());
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + WINDOW_BEFORE_FIELD_NUMBER;
        hash = (53 * hash) + getWindowBefore();
        hash = (37 * hash) + WINDOW_AFTER_FIELD_NUMBER;
        hash = (53 * hash) + getWindowAfter();
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity 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.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity 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.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
          parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
          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.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
          com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity 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.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity 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>
       * Message for specifying a window around a finding to apply a detection
       * rule.
       * </pre>
       *
       * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class,
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class);
        }

        // Construct using
        // com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

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

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

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

          windowAfter_ = 0;

          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
            getDefaultInstanceForType() {
          return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
              .getDefaultInstance();
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity build() {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity buildPartial() {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result =
              new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(this);
          result.windowBefore_ = windowBefore_;
          result.windowAfter_ = windowAfter_;
          onBuilt();
          return result;
        }

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

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

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

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

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

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

        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) {
            return mergeFrom(
                (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other) {
          if (other
              == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
                  .getDefaultInstance()) return this;
          if (other.getWindowBefore() != 0) {
            setWindowBefore(other.getWindowBefore());
          }
          if (other.getWindowAfter() != 0) {
            setWindowAfter(other.getWindowAfter());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

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

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage =
                (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
                    e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private int windowBefore_;
        /**
         *
         *
         * <pre>
         * Number of characters before the finding to consider.
         * </pre>
         *
         * <code>int32 window_before = 1;</code>
         */
        public int getWindowBefore() {
          return windowBefore_;
        }
        /**
         *
         *
         * <pre>
         * Number of characters before the finding to consider.
         * </pre>
         *
         * <code>int32 window_before = 1;</code>
         */
        public Builder setWindowBefore(int value) {

          windowBefore_ = value;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Number of characters before the finding to consider.
         * </pre>
         *
         * <code>int32 window_before = 1;</code>
         */
        public Builder clearWindowBefore() {

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

        private int windowAfter_;
        /**
         *
         *
         * <pre>
         * Number of characters after the finding to consider.
         * </pre>
         *
         * <code>int32 window_after = 2;</code>
         */
        public int getWindowAfter() {
          return windowAfter_;
        }
        /**
         *
         *
         * <pre>
         * Number of characters after the finding to consider.
         * </pre>
         *
         * <code>int32 window_after = 2;</code>
         */
        public Builder setWindowAfter(int value) {

          windowAfter_ = value;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Number of characters after the finding to consider.
         * </pre>
         *
         * <code>int32 window_after = 2;</code>
         */
        public Builder clearWindowAfter() {

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

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

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

        // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
      }

      // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
      private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity();
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

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

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    public interface LikelihoodAdjustmentOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Set the likelihood of a finding to a fixed value.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
       */
      int getFixedLikelihoodValue();
      /**
       *
       *
       * <pre>
       * Set the likelihood of a finding to a fixed value.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
       */
      com.google.privacy.dlp.v2.Likelihood getFixedLikelihood();

      /**
       *
       *
       * <pre>
       * Increase or decrease the likelihood by the specified number of
       * levels. For example, if a finding would be `POSSIBLE` without the
       * detection rule and `relative_likelihood` is 1, then it is upgraded to
       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
       * a final likelihood of `LIKELY`.
       * </pre>
       *
       * <code>int32 relative_likelihood = 2;</code>
       */
      int getRelativeLikelihood();

      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
              .AdjustmentCase
          getAdjustmentCase();
    }
    /**
     *
     *
     * <pre>
     * Message for specifying an adjustment to the likelihood of a finding as
     * part of a detection rule.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment}
     */
    public static final class LikelihoodAdjustment extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
        LikelihoodAdjustmentOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use LikelihoodAdjustment.newBuilder() to construct.
      private LikelihoodAdjustment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private LikelihoodAdjustment() {}

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

      private LikelihoodAdjustment(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8:
                {
                  int rawValue = input.readEnum();
                  adjustmentCase_ = 1;
                  adjustment_ = rawValue;
                  break;
                }
              case 16:
                {
                  adjustmentCase_ = 2;
                  adjustment_ = input.readInt32();
                  break;
                }
              default:
                {
                  if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) {
                    done = true;
                  }
                  break;
                }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder
                    .class);
      }

      private int adjustmentCase_ = 0;
      private java.lang.Object adjustment_;

      public enum AdjustmentCase implements com.google.protobuf.Internal.EnumLite {
        FIXED_LIKELIHOOD(1),
        RELATIVE_LIKELIHOOD(2),
        ADJUSTMENT_NOT_SET(0);
        private final int value;

        private AdjustmentCase(int value) {
          this.value = value;
        }
        /** @deprecated Use {@link #forNumber(int)} instead. */
        @java.lang.Deprecated
        public static AdjustmentCase valueOf(int value) {
          return forNumber(value);
        }

        public static AdjustmentCase forNumber(int value) {
          switch (value) {
            case 1:
              return FIXED_LIKELIHOOD;
            case 2:
              return RELATIVE_LIKELIHOOD;
            case 0:
              return ADJUSTMENT_NOT_SET;
            default:
              return null;
          }
        }

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

      public AdjustmentCase getAdjustmentCase() {
        return AdjustmentCase.forNumber(adjustmentCase_);
      }

      public static final int FIXED_LIKELIHOOD_FIELD_NUMBER = 1;
      /**
       *
       *
       * <pre>
       * Set the likelihood of a finding to a fixed value.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
       */
      public int getFixedLikelihoodValue() {
        if (adjustmentCase_ == 1) {
          return (java.lang.Integer) adjustment_;
        }
        return 0;
      }
      /**
       *
       *
       * <pre>
       * Set the likelihood of a finding to a fixed value.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
       */
      public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() {
        if (adjustmentCase_ == 1) {
          @SuppressWarnings("deprecation")
          com.google.privacy.dlp.v2.Likelihood result =
              com.google.privacy.dlp.v2.Likelihood.valueOf((java.lang.Integer) adjustment_);
          return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
        }
        return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED;
      }

      public static final int RELATIVE_LIKELIHOOD_FIELD_NUMBER = 2;
      /**
       *
       *
       * <pre>
       * Increase or decrease the likelihood by the specified number of
       * levels. For example, if a finding would be `POSSIBLE` without the
       * detection rule and `relative_likelihood` is 1, then it is upgraded to
       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
       * a final likelihood of `LIKELY`.
       * </pre>
       *
       * <code>int32 relative_likelihood = 2;</code>
       */
      public int getRelativeLikelihood() {
        if (adjustmentCase_ == 2) {
          return (java.lang.Integer) adjustment_;
        }
        return 0;
      }

      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 (adjustmentCase_ == 1) {
          output.writeEnum(1, ((java.lang.Integer) adjustment_));
        }
        if (adjustmentCase_ == 2) {
          output.writeInt32(2, (int) ((java.lang.Integer) adjustment_));
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        if (adjustmentCase_ == 1) {
          size +=
              com.google.protobuf.CodedOutputStream.computeEnumSize(
                  1, ((java.lang.Integer) adjustment_));
        }
        if (adjustmentCase_ == 2) {
          size +=
              com.google.protobuf.CodedOutputStream.computeInt32Size(
                  2, (int) ((java.lang.Integer) adjustment_));
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
          return true;
        }
        if (!(obj
            instanceof
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)) {
          return super.equals(obj);
        }
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other =
            (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) obj;

        boolean result = true;
        result = result && getAdjustmentCase().equals(other.getAdjustmentCase());
        if (!result) return false;
        switch (adjustmentCase_) {
          case 1:
            result = result && getFixedLikelihoodValue() == other.getFixedLikelihoodValue();
            break;
          case 2:
            result = result && (getRelativeLikelihood() == other.getRelativeLikelihood());
            break;
          case 0:
          default:
        }
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        switch (adjustmentCase_) {
          case 1:
            hash = (37 * hash) + FIXED_LIKELIHOOD_FIELD_NUMBER;
            hash = (53 * hash) + getFixedLikelihoodValue();
            break;
          case 2:
            hash = (37 * hash) + RELATIVE_LIKELIHOOD_FIELD_NUMBER;
            hash = (53 * hash) + getRelativeLikelihood();
            break;
          case 0:
          default:
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(java.nio.ByteBuffer data)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(
              java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(com.google.protobuf.ByteString data)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          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.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          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.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          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.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          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.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment 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>
       * Message for specifying an adjustment to the likelihood of a finding as
       * part of a detection rule.
       * </pre>
       *
       * Protobuf type {@code
       * google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class,
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                      .Builder.class);
        }

        // Construct using
        // com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

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

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

        @java.lang.Override
        public Builder clear() {
          super.clear();
          adjustmentCase_ = 0;
          adjustment_ = null;
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
            getDefaultInstanceForType() {
          return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
              .getDefaultInstance();
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment build() {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result =
              buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
            buildPartial() {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result =
              new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(this);
          if (adjustmentCase_ == 1) {
            result.adjustment_ = adjustment_;
          }
          if (adjustmentCase_ == 2) {
            result.adjustment_ = adjustment_;
          }
          result.adjustmentCase_ = adjustmentCase_;
          onBuilt();
          return result;
        }

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

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

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

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

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

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

        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other
              instanceof
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) {
            return mergeFrom(
                (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
                    other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other) {
          if (other
              == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                  .getDefaultInstance()) return this;
          switch (other.getAdjustmentCase()) {
            case FIXED_LIKELIHOOD:
              {
                setFixedLikelihoodValue(other.getFixedLikelihoodValue());
                break;
              }
            case RELATIVE_LIKELIHOOD:
              {
                setRelativeLikelihood(other.getRelativeLikelihood());
                break;
              }
            case ADJUSTMENT_NOT_SET:
              {
                break;
              }
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

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

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
              parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage =
                (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
                    e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private int adjustmentCase_ = 0;
        private java.lang.Object adjustment_;

        public AdjustmentCase getAdjustmentCase() {
          return AdjustmentCase.forNumber(adjustmentCase_);
        }

        public Builder clearAdjustment() {
          adjustmentCase_ = 0;
          adjustment_ = null;
          onChanged();
          return this;
        }

        /**
         *
         *
         * <pre>
         * Set the likelihood of a finding to a fixed value.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
         */
        public int getFixedLikelihoodValue() {
          if (adjustmentCase_ == 1) {
            return ((java.lang.Integer) adjustment_).intValue();
          }
          return 0;
        }
        /**
         *
         *
         * <pre>
         * Set the likelihood of a finding to a fixed value.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
         */
        public Builder setFixedLikelihoodValue(int value) {
          adjustmentCase_ = 1;
          adjustment_ = value;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Set the likelihood of a finding to a fixed value.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
         */
        public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() {
          if (adjustmentCase_ == 1) {
            @SuppressWarnings("deprecation")
            com.google.privacy.dlp.v2.Likelihood result =
                com.google.privacy.dlp.v2.Likelihood.valueOf((java.lang.Integer) adjustment_);
            return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
          }
          return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED;
        }
        /**
         *
         *
         * <pre>
         * Set the likelihood of a finding to a fixed value.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
         */
        public Builder setFixedLikelihood(com.google.privacy.dlp.v2.Likelihood value) {
          if (value == null) {
            throw new NullPointerException();
          }
          adjustmentCase_ = 1;
          adjustment_ = value.getNumber();
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Set the likelihood of a finding to a fixed value.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
         */
        public Builder clearFixedLikelihood() {
          if (adjustmentCase_ == 1) {
            adjustmentCase_ = 0;
            adjustment_ = null;
            onChanged();
          }
          return this;
        }

        /**
         *
         *
         * <pre>
         * Increase or decrease the likelihood by the specified number of
         * levels. For example, if a finding would be `POSSIBLE` without the
         * detection rule and `relative_likelihood` is 1, then it is upgraded to
         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
         * a final likelihood of `LIKELY`.
         * </pre>
         *
         * <code>int32 relative_likelihood = 2;</code>
         */
        public int getRelativeLikelihood() {
          if (adjustmentCase_ == 2) {
            return (java.lang.Integer) adjustment_;
          }
          return 0;
        }
        /**
         *
         *
         * <pre>
         * Increase or decrease the likelihood by the specified number of
         * levels. For example, if a finding would be `POSSIBLE` without the
         * detection rule and `relative_likelihood` is 1, then it is upgraded to
         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
         * a final likelihood of `LIKELY`.
         * </pre>
         *
         * <code>int32 relative_likelihood = 2;</code>
         */
        public Builder setRelativeLikelihood(int value) {
          adjustmentCase_ = 2;
          adjustment_ = value;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Increase or decrease the likelihood by the specified number of
         * levels. For example, if a finding would be `POSSIBLE` without the
         * detection rule and `relative_likelihood` is 1, then it is upgraded to
         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
         * a final likelihood of `LIKELY`.
         * </pre>
         *
         * <code>int32 relative_likelihood = 2;</code>
         */
        public Builder clearRelativeLikelihood() {
          if (adjustmentCase_ == 2) {
            adjustmentCase_ = 0;
            adjustment_ = null;
            onChanged();
          }
          return this;
        }

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

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

        // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
      }

      // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
      private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
              .LikelihoodAdjustment
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE =
            new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment();
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

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

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    public interface HotwordRuleOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Regular expression pattern defining what qualifies as a hotword.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
       */
      boolean hasHotwordRegex();
      /**
       *
       *
       * <pre>
       * Regular expression pattern defining what qualifies as a hotword.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
       */
      com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex();
      /**
       *
       *
       * <pre>
       * Regular expression pattern defining what qualifies as a hotword.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
       */
      com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder();

      /**
       *
       *
       * <pre>
       * Proximity of the finding within which the entire hotword must reside.
       * The total length of the window cannot exceed 1000 characters. Note that
       * the finding itself will be included in the window, so that hotwords may
       * be used to match substrings of the finding itself. For example, the
       * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
       * adjusted upwards if the area code is known to be the local area code of
       * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
       * is the area code in question.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
       */
      boolean hasProximity();
      /**
       *
       *
       * <pre>
       * Proximity of the finding within which the entire hotword must reside.
       * The total length of the window cannot exceed 1000 characters. Note that
       * the finding itself will be included in the window, so that hotwords may
       * be used to match substrings of the finding itself. For example, the
       * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
       * adjusted upwards if the area code is known to be the local area code of
       * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
       * is the area code in question.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
       */
      com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity();
      /**
       *
       *
       * <pre>
       * Proximity of the finding within which the entire hotword must reside.
       * The total length of the window cannot exceed 1000 characters. Note that
       * the finding itself will be included in the window, so that hotwords may
       * be used to match substrings of the finding itself. For example, the
       * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
       * adjusted upwards if the area code is known to be the local area code of
       * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
       * is the area code in question.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
       */
      com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder
          getProximityOrBuilder();

      /**
       *
       *
       * <pre>
       * Likelihood adjustment to apply to all matching findings.
       * </pre>
       *
       * <code>
       * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
       * </code>
       */
      boolean hasLikelihoodAdjustment();
      /**
       *
       *
       * <pre>
       * Likelihood adjustment to apply to all matching findings.
       * </pre>
       *
       * <code>
       * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
       * </code>
       */
      com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          getLikelihoodAdjustment();
      /**
       *
       *
       * <pre>
       * Likelihood adjustment to apply to all matching findings.
       * </pre>
       *
       * <code>
       * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
       * </code>
       */
      com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder
          getLikelihoodAdjustmentOrBuilder();
    }
    /**
     *
     *
     * <pre>
     * The rule that adjusts the likelihood of findings within a certain
     * proximity of hotwords.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule}
     */
    public static final class HotwordRule extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
        HotwordRuleOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use HotwordRule.newBuilder() to construct.
      private HotwordRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private HotwordRule() {}

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

      private HotwordRule(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null;
                  if (hotwordRegex_ != null) {
                    subBuilder = hotwordRegex_.toBuilder();
                  }
                  hotwordRegex_ =
                      input.readMessage(
                          com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(),
                          extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(hotwordRegex_);
                    hotwordRegex_ = subBuilder.buildPartial();
                  }

                  break;
                }
              case 18:
                {
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder
                      subBuilder = null;
                  if (proximity_ != null) {
                    subBuilder = proximity_.toBuilder();
                  }
                  proximity_ =
                      input.readMessage(
                          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.parser(),
                          extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(proximity_);
                    proximity_ = subBuilder.buildPartial();
                  }

                  break;
                }
              case 26:
                {
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                          .Builder
                      subBuilder = null;
                  if (likelihoodAdjustment_ != null) {
                    subBuilder = likelihoodAdjustment_.toBuilder();
                  }
                  likelihoodAdjustment_ =
                      input.readMessage(
                          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
                              .LikelihoodAdjustment.parser(),
                          extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(likelihoodAdjustment_);
                    likelihoodAdjustment_ = subBuilder.buildPartial();
                  }

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

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class);
      }

      public static final int HOTWORD_REGEX_FIELD_NUMBER = 1;
      private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_;
      /**
       *
       *
       * <pre>
       * Regular expression pattern defining what qualifies as a hotword.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
       */
      public boolean hasHotwordRegex() {
        return hotwordRegex_ != null;
      }
      /**
       *
       *
       * <pre>
       * Regular expression pattern defining what qualifies as a hotword.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() {
        return hotwordRegex_ == null
            ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
            : hotwordRegex_;
      }
      /**
       *
       *
       * <pre>
       * Regular expression pattern defining what qualifies as a hotword.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() {
        return getHotwordRegex();
      }

      public static final int PROXIMITY_FIELD_NUMBER = 2;
      private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_;
      /**
       *
       *
       * <pre>
       * Proximity of the finding within which the entire hotword must reside.
       * The total length of the window cannot exceed 1000 characters. Note that
       * the finding itself will be included in the window, so that hotwords may
       * be used to match substrings of the finding itself. For example, the
       * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
       * adjusted upwards if the area code is known to be the local area code of
       * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
       * is the area code in question.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
       */
      public boolean hasProximity() {
        return proximity_ != null;
      }
      /**
       *
       *
       * <pre>
       * Proximity of the finding within which the entire hotword must reside.
       * The total length of the window cannot exceed 1000 characters. Note that
       * the finding itself will be included in the window, so that hotwords may
       * be used to match substrings of the finding itself. For example, the
       * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
       * adjusted upwards if the area code is known to be the local area code of
       * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
       * is the area code in question.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() {
        return proximity_ == null
            ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance()
            : proximity_;
      }
      /**
       *
       *
       * <pre>
       * Proximity of the finding within which the entire hotword must reside.
       * The total length of the window cannot exceed 1000 characters. Note that
       * the finding itself will be included in the window, so that hotwords may
       * be used to match substrings of the finding itself. For example, the
       * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
       * adjusted upwards if the area code is known to be the local area code of
       * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
       * is the area code in question.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder
          getProximityOrBuilder() {
        return getProximity();
      }

      public static final int LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER = 3;
      private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          likelihoodAdjustment_;
      /**
       *
       *
       * <pre>
       * Likelihood adjustment to apply to all matching findings.
       * </pre>
       *
       * <code>
       * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
       * </code>
       */
      public boolean hasLikelihoodAdjustment() {
        return likelihoodAdjustment_ != null;
      }
      /**
       *
       *
       * <pre>
       * Likelihood adjustment to apply to all matching findings.
       * </pre>
       *
       * <code>
       * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
       * </code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
          getLikelihoodAdjustment() {
        return likelihoodAdjustment_ == null
            ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                .getDefaultInstance()
            : likelihoodAdjustment_;
      }
      /**
       *
       *
       * <pre>
       * Likelihood adjustment to apply to all matching findings.
       * </pre>
       *
       * <code>
       * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
       * </code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder
          getLikelihoodAdjustmentOrBuilder() {
        return getLikelihoodAdjustment();
      }

      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 (hotwordRegex_ != null) {
          output.writeMessage(1, getHotwordRegex());
        }
        if (proximity_ != null) {
          output.writeMessage(2, getProximity());
        }
        if (likelihoodAdjustment_ != null) {
          output.writeMessage(3, getLikelihoodAdjustment());
        }
        unknownFields.writeTo(output);
      }

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

        size = 0;
        if (hotwordRegex_ != null) {
          size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHotwordRegex());
        }
        if (proximity_ != null) {
          size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProximity());
        }
        if (likelihoodAdjustment_ != null) {
          size +=
              com.google.protobuf.CodedOutputStream.computeMessageSize(
                  3, getLikelihoodAdjustment());
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
          return true;
        }
        if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)) {
          return super.equals(obj);
        }
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other =
            (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) obj;

        boolean result = true;
        result = result && (hasHotwordRegex() == other.hasHotwordRegex());
        if (hasHotwordRegex()) {
          result = result && getHotwordRegex().equals(other.getHotwordRegex());
        }
        result = result && (hasProximity() == other.hasProximity());
        if (hasProximity()) {
          result = result && getProximity().equals(other.getProximity());
        }
        result = result && (hasLikelihoodAdjustment() == other.hasLikelihoodAdjustment());
        if (hasLikelihoodAdjustment()) {
          result = result && getLikelihoodAdjustment().equals(other.getLikelihoodAdjustment());
        }
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasHotwordRegex()) {
          hash = (37 * hash) + HOTWORD_REGEX_FIELD_NUMBER;
          hash = (53 * hash) + getHotwordRegex().hashCode();
        }
        if (hasProximity()) {
          hash = (37 * hash) + PROXIMITY_FIELD_NUMBER;
          hash = (53 * hash) + getProximity().hashCode();
        }
        if (hasLikelihoodAdjustment()) {
          hash = (37 * hash) + LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER;
          hash = (53 * hash) + getLikelihoodAdjustment().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          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.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
          com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }

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

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       *
       *
       * <pre>
       * The rule that adjusts the likelihood of findings within a certain
       * proximity of hotwords.
       * </pre>
       *
       * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class,
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class);
        }

        // Construct using
        // com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

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

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

        @java.lang.Override
        public Builder clear() {
          super.clear();
          if (hotwordRegexBuilder_ == null) {
            hotwordRegex_ = null;
          } else {
            hotwordRegex_ = null;
            hotwordRegexBuilder_ = null;
          }
          if (proximityBuilder_ == null) {
            proximity_ = null;
          } else {
            proximity_ = null;
            proximityBuilder_ = null;
          }
          if (likelihoodAdjustmentBuilder_ == null) {
            likelihoodAdjustment_ = null;
          } else {
            likelihoodAdjustment_ = null;
            likelihoodAdjustmentBuilder_ = null;
          }
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.privacy.dlp.v2.DlpStorage
              .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
            getDefaultInstanceForType() {
          return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
              .getDefaultInstance();
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule build() {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result =
              buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule buildPartial() {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result =
              new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(this);
          if (hotwordRegexBuilder_ == null) {
            result.hotwordRegex_ = hotwordRegex_;
          } else {
            result.hotwordRegex_ = hotwordRegexBuilder_.build();
          }
          if (proximityBuilder_ == null) {
            result.proximity_ = proximity_;
          } else {
            result.proximity_ = proximityBuilder_.build();
          }
          if (likelihoodAdjustmentBuilder_ == null) {
            result.likelihoodAdjustment_ = likelihoodAdjustment_;
          } else {
            result.likelihoodAdjustment_ = likelihoodAdjustmentBuilder_.build();
          }
          onBuilt();
          return result;
        }

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

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

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

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

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

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

        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) {
            return mergeFrom(
                (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other) {
          if (other
              == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
                  .getDefaultInstance()) return this;
          if (other.hasHotwordRegex()) {
            mergeHotwordRegex(other.getHotwordRegex());
          }
          if (other.hasProximity()) {
            mergeProximity(other.getProximity());
          }
          if (other.hasLikelihoodAdjustment()) {
            mergeLikelihoodAdjustment(other.getLikelihoodAdjustment());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

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

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage =
                (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
                    e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_ = null;
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.Regex,
                com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
            hotwordRegexBuilder_;
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public boolean hasHotwordRegex() {
          return hotwordRegexBuilder_ != null || hotwordRegex_ != null;
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() {
          if (hotwordRegexBuilder_ == null) {
            return hotwordRegex_ == null
                ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
                : hotwordRegex_;
          } else {
            return hotwordRegexBuilder_.getMessage();
          }
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public Builder setHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
          if (hotwordRegexBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            hotwordRegex_ = value;
            onChanged();
          } else {
            hotwordRegexBuilder_.setMessage(value);
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public Builder setHotwordRegex(
            com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) {
          if (hotwordRegexBuilder_ == null) {
            hotwordRegex_ = builderForValue.build();
            onChanged();
          } else {
            hotwordRegexBuilder_.setMessage(builderForValue.build());
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public Builder mergeHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
          if (hotwordRegexBuilder_ == null) {
            if (hotwordRegex_ != null) {
              hotwordRegex_ =
                  com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder(hotwordRegex_)
                      .mergeFrom(value)
                      .buildPartial();
            } else {
              hotwordRegex_ = value;
            }
            onChanged();
          } else {
            hotwordRegexBuilder_.mergeFrom(value);
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public Builder clearHotwordRegex() {
          if (hotwordRegexBuilder_ == null) {
            hotwordRegex_ = null;
            onChanged();
          } else {
            hotwordRegex_ = null;
            hotwordRegexBuilder_ = null;
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getHotwordRegexBuilder() {

          onChanged();
          return getHotwordRegexFieldBuilder().getBuilder();
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() {
          if (hotwordRegexBuilder_ != null) {
            return hotwordRegexBuilder_.getMessageOrBuilder();
          } else {
            return hotwordRegex_ == null
                ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
                : hotwordRegex_;
          }
        }
        /**
         *
         *
         * <pre>
         * Regular expression pattern defining what qualifies as a hotword.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.Regex,
                com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
            getHotwordRegexFieldBuilder() {
          if (hotwordRegexBuilder_ == null) {
            hotwordRegexBuilder_ =
                new com.google.protobuf.SingleFieldBuilderV3<
                    com.google.privacy.dlp.v2.CustomInfoType.Regex,
                    com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
                    com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>(
                    getHotwordRegex(), getParentForChildren(), isClean());
            hotwordRegex_ = null;
          }
          return hotwordRegexBuilder_;
        }

        private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_ = null;
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>
            proximityBuilder_;
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public boolean hasProximity() {
          return proximityBuilder_ != null || proximity_ != null;
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() {
          if (proximityBuilder_ == null) {
            return proximity_ == null
                ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
                    .getDefaultInstance()
                : proximity_;
          } else {
            return proximityBuilder_.getMessage();
          }
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public Builder setProximity(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) {
          if (proximityBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            proximity_ = value;
            onChanged();
          } else {
            proximityBuilder_.setMessage(value);
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public Builder setProximity(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder
                builderForValue) {
          if (proximityBuilder_ == null) {
            proximity_ = builderForValue.build();
            onChanged();
          } else {
            proximityBuilder_.setMessage(builderForValue.build());
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public Builder mergeProximity(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) {
          if (proximityBuilder_ == null) {
            if (proximity_ != null) {
              proximity_ =
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder(
                          proximity_)
                      .mergeFrom(value)
                      .buildPartial();
            } else {
              proximity_ = value;
            }
            onChanged();
          } else {
            proximityBuilder_.mergeFrom(value);
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public Builder clearProximity() {
          if (proximityBuilder_ == null) {
            proximity_ = null;
            onChanged();
          } else {
            proximity_ = null;
            proximityBuilder_ = null;
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder
            getProximityBuilder() {

          onChanged();
          return getProximityFieldBuilder().getBuilder();
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder
            getProximityOrBuilder() {
          if (proximityBuilder_ != null) {
            return proximityBuilder_.getMessageOrBuilder();
          } else {
            return proximity_ == null
                ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
                    .getDefaultInstance()
                : proximity_;
          }
        }
        /**
         *
         *
         * <pre>
         * Proximity of the finding within which the entire hotword must reside.
         * The total length of the window cannot exceed 1000 characters. Note that
         * the finding itself will be included in the window, so that hotwords may
         * be used to match substrings of the finding itself. For example, the
         * certainty of a phone number regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" could be
         * adjusted upwards if the area code is known to be the local area code of
         * a company office using the hotword regex "&#92;(xxx&#92;)", where "xxx"
         * is the area code in question.
         * </pre>
         *
         * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>
            getProximityFieldBuilder() {
          if (proximityBuilder_ == null) {
            proximityBuilder_ =
                new com.google.protobuf.SingleFieldBuilderV3<
                    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity,
                    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder,
                    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>(
                    getProximity(), getParentForChildren(), isClean());
            proximity_ = null;
          }
          return proximityBuilder_;
        }

        private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
            likelihoodAdjustment_ = null;
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
                    .LikelihoodAdjustmentOrBuilder>
            likelihoodAdjustmentBuilder_;
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public boolean hasLikelihoodAdjustment() {
          return likelihoodAdjustmentBuilder_ != null || likelihoodAdjustment_ != null;
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
            getLikelihoodAdjustment() {
          if (likelihoodAdjustmentBuilder_ == null) {
            return likelihoodAdjustment_ == null
                ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                    .getDefaultInstance()
                : likelihoodAdjustment_;
          } else {
            return likelihoodAdjustmentBuilder_.getMessage();
          }
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public Builder setLikelihoodAdjustment(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) {
          if (likelihoodAdjustmentBuilder_ == null) {
            if (value == null) {
              throw new NullPointerException();
            }
            likelihoodAdjustment_ = value;
            onChanged();
          } else {
            likelihoodAdjustmentBuilder_.setMessage(value);
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public Builder setLikelihoodAdjustment(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder
                builderForValue) {
          if (likelihoodAdjustmentBuilder_ == null) {
            likelihoodAdjustment_ = builderForValue.build();
            onChanged();
          } else {
            likelihoodAdjustmentBuilder_.setMessage(builderForValue.build());
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public Builder mergeLikelihoodAdjustment(
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) {
          if (likelihoodAdjustmentBuilder_ == null) {
            if (likelihoodAdjustment_ != null) {
              likelihoodAdjustment_ =
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                      .newBuilder(likelihoodAdjustment_)
                      .mergeFrom(value)
                      .buildPartial();
            } else {
              likelihoodAdjustment_ = value;
            }
            onChanged();
          } else {
            likelihoodAdjustmentBuilder_.mergeFrom(value);
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public Builder clearLikelihoodAdjustment() {
          if (likelihoodAdjustmentBuilder_ == null) {
            likelihoodAdjustment_ = null;
            onChanged();
          } else {
            likelihoodAdjustment_ = null;
            likelihoodAdjustmentBuilder_ = null;
          }

          return this;
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder
            getLikelihoodAdjustmentBuilder() {

          onChanged();
          return getLikelihoodAdjustmentFieldBuilder().getBuilder();
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder
            getLikelihoodAdjustmentOrBuilder() {
          if (likelihoodAdjustmentBuilder_ != null) {
            return likelihoodAdjustmentBuilder_.getMessageOrBuilder();
          } else {
            return likelihoodAdjustment_ == null
                ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                    .getDefaultInstance()
                : likelihoodAdjustment_;
          }
        }
        /**
         *
         *
         * <pre>
         * Likelihood adjustment to apply to all matching findings.
         * </pre>
         *
         * <code>
         * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
         * </code>
         */
        private com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
                    .LikelihoodAdjustmentOrBuilder>
            getLikelihoodAdjustmentFieldBuilder() {
          if (likelihoodAdjustmentBuilder_ == null) {
            likelihoodAdjustmentBuilder_ =
                new com.google.protobuf.SingleFieldBuilderV3<
                    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment,
                    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
                        .Builder,
                    com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
                        .LikelihoodAdjustmentOrBuilder>(
                    getLikelihoodAdjustment(), getParentForChildren(), isClean());
            likelihoodAdjustment_ = null;
          }
          return likelihoodAdjustmentBuilder_;
        }

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

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

        // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
      }

      // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
      private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule();
      }

      public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

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

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    private int typeCase_ = 0;
    private java.lang.Object type_;

    public enum TypeCase implements com.google.protobuf.Internal.EnumLite {
      HOTWORD_RULE(1),
      TYPE_NOT_SET(0);
      private final int value;

      private TypeCase(int value) {
        this.value = value;
      }
      /** @deprecated Use {@link #forNumber(int)} instead. */
      @java.lang.Deprecated
      public static TypeCase valueOf(int value) {
        return forNumber(value);
      }

      public static TypeCase forNumber(int value) {
        switch (value) {
          case 1:
            return HOTWORD_RULE;
          case 0:
            return TYPE_NOT_SET;
          default:
            return null;
        }
      }

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

    public TypeCase getTypeCase() {
      return TypeCase.forNumber(typeCase_);
    }

    public static final int HOTWORD_RULE_FIELD_NUMBER = 1;
    /**
     *
     *
     * <pre>
     * Hotword-based detection rule.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
     * </code>
     */
    public boolean hasHotwordRule() {
      return typeCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * Hotword-based detection rule.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() {
      if (typeCase_ == 1) {
        return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
      }
      return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          .getDefaultInstance();
    }
    /**
     *
     *
     * <pre>
     * Hotword-based detection rule.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder
        getHotwordRuleOrBuilder() {
      if (typeCase_ == 1) {
        return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
      }
      return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
          .getDefaultInstance();
    }

    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 (typeCase_ == 1) {
        output.writeMessage(
            1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (typeCase_ == 1) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(
                1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule)) {
        return super.equals(obj);
      }
      com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other =
          (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) obj;

      boolean result = true;
      result = result && getTypeCase().equals(other.getTypeCase());
      if (!result) return false;
      switch (typeCase_) {
        case 1:
          result = result && getHotwordRule().equals(other.getHotwordRule());
          break;
        case 0:
        default:
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (typeCase_) {
        case 1:
          hash = (37 * hash) + HOTWORD_RULE_FIELD_NUMBER;
          hash = (53 * hash) + getHotwordRule().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule 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.privacy.dlp.v2.CustomInfoType.DetectionRule 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>
     * Rule for modifying a CustomInfoType to alter behavior under certain
     * circumstances, depending on the specific details of the rule. Not supported
     * for the `surrogate_type` custom info type.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class);
      }

      // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        typeCase_ = 0;
        type_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.privacy.dlp.v2.DlpStorage
            .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() {
        return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule build() {
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule buildPartial() {
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result =
            new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule(this);
        if (typeCase_ == 1) {
          if (hotwordRuleBuilder_ == null) {
            result.type_ = type_;
          } else {
            result.type_ = hotwordRuleBuilder_.build();
          }
        }
        result.typeCase_ = typeCase_;
        onBuilt();
        return result;
      }

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

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

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

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

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

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

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) {
          return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other) {
        if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance())
          return this;
        switch (other.getTypeCase()) {
          case HOTWORD_RULE:
            {
              mergeHotwordRule(other.getHotwordRule());
              break;
            }
          case TYPE_NOT_SET:
            {
              break;
            }
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int typeCase_ = 0;
      private java.lang.Object type_;

      public TypeCase getTypeCase() {
        return TypeCase.forNumber(typeCase_);
      }

      public Builder clearType() {
        typeCase_ = 0;
        type_ = null;
        onChanged();
        return this;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule,
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder,
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>
          hotwordRuleBuilder_;
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public boolean hasHotwordRule() {
        return typeCase_ == 1;
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() {
        if (hotwordRuleBuilder_ == null) {
          if (typeCase_ == 1) {
            return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
          }
          return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
              .getDefaultInstance();
        } else {
          if (typeCase_ == 1) {
            return hotwordRuleBuilder_.getMessage();
          }
          return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
              .getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public Builder setHotwordRule(
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) {
        if (hotwordRuleBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          type_ = value;
          onChanged();
        } else {
          hotwordRuleBuilder_.setMessage(value);
        }
        typeCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public Builder setHotwordRule(
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder
              builderForValue) {
        if (hotwordRuleBuilder_ == null) {
          type_ = builderForValue.build();
          onChanged();
        } else {
          hotwordRuleBuilder_.setMessage(builderForValue.build());
        }
        typeCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public Builder mergeHotwordRule(
          com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) {
        if (hotwordRuleBuilder_ == null) {
          if (typeCase_ == 1
              && type_
                  != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
                      .getDefaultInstance()) {
            type_ =
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder(
                        (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_)
                    .mergeFrom(value)
                    .buildPartial();
          } else {
            type_ = value;
          }
          onChanged();
        } else {
          if (typeCase_ == 1) {
            hotwordRuleBuilder_.mergeFrom(value);
          }
          hotwordRuleBuilder_.setMessage(value);
        }
        typeCase_ = 1;
        return this;
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public Builder clearHotwordRule() {
        if (hotwordRuleBuilder_ == null) {
          if (typeCase_ == 1) {
            typeCase_ = 0;
            type_ = null;
            onChanged();
          }
        } else {
          if (typeCase_ == 1) {
            typeCase_ = 0;
            type_ = null;
          }
          hotwordRuleBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder
          getHotwordRuleBuilder() {
        return getHotwordRuleFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder
          getHotwordRuleOrBuilder() {
        if ((typeCase_ == 1) && (hotwordRuleBuilder_ != null)) {
          return hotwordRuleBuilder_.getMessageOrBuilder();
        } else {
          if (typeCase_ == 1) {
            return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
          }
          return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
              .getDefaultInstance();
        }
      }
      /**
       *
       *
       * <pre>
       * Hotword-based detection rule.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
       * </code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule,
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder,
              com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>
          getHotwordRuleFieldBuilder() {
        if (hotwordRuleBuilder_ == null) {
          if (!(typeCase_ == 1)) {
            type_ =
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
                    .getDefaultInstance();
          }
          hotwordRuleBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule,
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder,
                  com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>(
                  (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_,
                  getParentForChildren(),
                  isClean());
          type_ = null;
        }
        typeCase_ = 1;
        onChanged();
        ;
        return hotwordRuleBuilder_;
      }

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

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

      // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
    }

    // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
    private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule();
    }

    public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int bitField0_;
  private int typeCase_ = 0;
  private java.lang.Object type_;

  public enum TypeCase implements com.google.protobuf.Internal.EnumLite {
    DICTIONARY(2),
    REGEX(3),
    SURROGATE_TYPE(4),
    STORED_TYPE(5),
    TYPE_NOT_SET(0);
    private final int value;

    private TypeCase(int value) {
      this.value = value;
    }
    /** @deprecated Use {@link #forNumber(int)} instead. */
    @java.lang.Deprecated
    public static TypeCase valueOf(int value) {
      return forNumber(value);
    }

    public static TypeCase forNumber(int value) {
      switch (value) {
        case 2:
          return DICTIONARY;
        case 3:
          return REGEX;
        case 4:
          return SURROGATE_TYPE;
        case 5:
          return STORED_TYPE;
        case 0:
          return TYPE_NOT_SET;
        default:
          return null;
      }
    }

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

  public TypeCase getTypeCase() {
    return TypeCase.forNumber(typeCase_);
  }

  public static final int INFO_TYPE_FIELD_NUMBER = 1;
  private com.google.privacy.dlp.v2.InfoType infoType_;
  /**
   *
   *
   * <pre>
   * CustomInfoType can either be a new infoType, or an extension of built-in
   * infoType, when the name matches one of existing infoTypes and that infoType
   * is specified in `InspectContent.info_types` field. Specifying the latter
   * adds findings to the one detected by the system. If built-in info type is
   * not specified in `InspectContent.info_types` list then the name is treated
   * as a custom info type.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
   */
  public boolean hasInfoType() {
    return infoType_ != null;
  }
  /**
   *
   *
   * <pre>
   * CustomInfoType can either be a new infoType, or an extension of built-in
   * infoType, when the name matches one of existing infoTypes and that infoType
   * is specified in `InspectContent.info_types` field. Specifying the latter
   * adds findings to the one detected by the system. If built-in info type is
   * not specified in `InspectContent.info_types` list then the name is treated
   * as a custom info type.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
   */
  public com.google.privacy.dlp.v2.InfoType getInfoType() {
    return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_;
  }
  /**
   *
   *
   * <pre>
   * CustomInfoType can either be a new infoType, or an extension of built-in
   * infoType, when the name matches one of existing infoTypes and that infoType
   * is specified in `InspectContent.info_types` field. Specifying the latter
   * adds findings to the one detected by the system. If built-in info type is
   * not specified in `InspectContent.info_types` list then the name is treated
   * as a custom info type.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
   */
  public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
    return getInfoType();
  }

  public static final int LIKELIHOOD_FIELD_NUMBER = 6;
  private int likelihood_;
  /**
   *
   *
   * <pre>
   * Likelihood to return for this CustomInfoType. This base value can be
   * altered by a detection rule if the finding meets the criteria specified by
   * the rule. Defaults to `VERY_LIKELY` if not specified.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
   */
  public int getLikelihoodValue() {
    return likelihood_;
  }
  /**
   *
   *
   * <pre>
   * Likelihood to return for this CustomInfoType. This base value can be
   * altered by a detection rule if the finding meets the criteria specified by
   * the rule. Defaults to `VERY_LIKELY` if not specified.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
   */
  public com.google.privacy.dlp.v2.Likelihood getLikelihood() {
    @SuppressWarnings("deprecation")
    com.google.privacy.dlp.v2.Likelihood result =
        com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_);
    return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
  }

  public static final int DICTIONARY_FIELD_NUMBER = 2;
  /**
   *
   *
   * <pre>
   * A list of phrases to detect as a CustomInfoType.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
   */
  public boolean hasDictionary() {
    return typeCase_ == 2;
  }
  /**
   *
   *
   * <pre>
   * A list of phrases to detect as a CustomInfoType.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() {
    if (typeCase_ == 2) {
      return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
    }
    return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * A list of phrases to detect as a CustomInfoType.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() {
    if (typeCase_ == 2) {
      return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
    }
    return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
  }

  public static final int REGEX_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * Regular expression based CustomInfoType.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
   */
  public boolean hasRegex() {
    return typeCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * Regular expression based CustomInfoType.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() {
    if (typeCase_ == 3) {
      return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
    }
    return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Regular expression based CustomInfoType.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() {
    if (typeCase_ == 3) {
      return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
    }
    return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
  }

  public static final int SURROGATE_TYPE_FIELD_NUMBER = 4;
  /**
   *
   *
   * <pre>
   * Message for detecting output from deidentification transformations that
   * support reversing.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
   */
  public boolean hasSurrogateType() {
    return typeCase_ == 4;
  }
  /**
   *
   *
   * <pre>
   * Message for detecting output from deidentification transformations that
   * support reversing.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() {
    if (typeCase_ == 4) {
      return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
    }
    return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Message for detecting output from deidentification transformations that
   * support reversing.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder
      getSurrogateTypeOrBuilder() {
    if (typeCase_ == 4) {
      return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
    }
    return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
  }

  public static final int STORED_TYPE_FIELD_NUMBER = 5;
  /**
   *
   *
   * <pre>
   * Load an existing `StoredInfoType` resource for use in
   * `InspectDataSource`. Not currently supported in `InspectContent`.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
   */
  public boolean hasStoredType() {
    return typeCase_ == 5;
  }
  /**
   *
   *
   * <pre>
   * Load an existing `StoredInfoType` resource for use in
   * `InspectDataSource`. Not currently supported in `InspectContent`.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
   */
  public com.google.privacy.dlp.v2.StoredType getStoredType() {
    if (typeCase_ == 5) {
      return (com.google.privacy.dlp.v2.StoredType) type_;
    }
    return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Load an existing `StoredInfoType` resource for use in
   * `InspectDataSource`. Not currently supported in `InspectContent`.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
   */
  public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() {
    if (typeCase_ == 5) {
      return (com.google.privacy.dlp.v2.StoredType) type_;
    }
    return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
  }

  public static final int DETECTION_RULES_FIELD_NUMBER = 7;
  private java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule> detectionRules_;
  /**
   *
   *
   * <pre>
   * Set of detection rules to apply to all findings of this CustomInfoType.
   * Rules are applied in order that they are specified. Not supported for the
   * `surrogate_type` CustomInfoType.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
   */
  public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>
      getDetectionRulesList() {
    return detectionRules_;
  }
  /**
   *
   *
   * <pre>
   * Set of detection rules to apply to all findings of this CustomInfoType.
   * Rules are applied in order that they are specified. Not supported for the
   * `surrogate_type` CustomInfoType.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
   */
  public java.util.List<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
      getDetectionRulesOrBuilderList() {
    return detectionRules_;
  }
  /**
   *
   *
   * <pre>
   * Set of detection rules to apply to all findings of this CustomInfoType.
   * Rules are applied in order that they are specified. Not supported for the
   * `surrogate_type` CustomInfoType.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
   */
  public int getDetectionRulesCount() {
    return detectionRules_.size();
  }
  /**
   *
   *
   * <pre>
   * Set of detection rules to apply to all findings of this CustomInfoType.
   * Rules are applied in order that they are specified. Not supported for the
   * `surrogate_type` CustomInfoType.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) {
    return detectionRules_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Set of detection rules to apply to all findings of this CustomInfoType.
   * Rules are applied in order that they are specified. Not supported for the
   * `surrogate_type` CustomInfoType.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder(
      int index) {
    return detectionRules_.get(index);
  }

  public static final int EXCLUSION_TYPE_FIELD_NUMBER = 8;
  private int exclusionType_;
  /**
   *
   *
   * <pre>
   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
   * to be returned. It still can be used for rules matching.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
   */
  public int getExclusionTypeValue() {
    return exclusionType_;
  }
  /**
   *
   *
   * <pre>
   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
   * to be returned. It still can be used for rules matching.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
   */
  public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() {
    @SuppressWarnings("deprecation")
    com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result =
        com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.valueOf(exclusionType_);
    return result == null
        ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED
        : result;
  }

  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 (infoType_ != null) {
      output.writeMessage(1, getInfoType());
    }
    if (typeCase_ == 2) {
      output.writeMessage(2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_);
    }
    if (typeCase_ == 3) {
      output.writeMessage(3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_);
    }
    if (typeCase_ == 4) {
      output.writeMessage(4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_);
    }
    if (typeCase_ == 5) {
      output.writeMessage(5, (com.google.privacy.dlp.v2.StoredType) type_);
    }
    if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) {
      output.writeEnum(6, likelihood_);
    }
    for (int i = 0; i < detectionRules_.size(); i++) {
      output.writeMessage(7, detectionRules_.get(i));
    }
    if (exclusionType_
        != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(8, exclusionType_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (infoType_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfoType());
    }
    if (typeCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_);
    }
    if (typeCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_);
    }
    if (typeCase_ == 4) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_);
    }
    if (typeCase_ == 5) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              5, (com.google.privacy.dlp.v2.StoredType) type_);
    }
    if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, likelihood_);
    }
    for (int i = 0; i < detectionRules_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, detectionRules_.get(i));
    }
    if (exclusionType_
        != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, exclusionType_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType)) {
      return super.equals(obj);
    }
    com.google.privacy.dlp.v2.CustomInfoType other = (com.google.privacy.dlp.v2.CustomInfoType) obj;

    boolean result = true;
    result = result && (hasInfoType() == other.hasInfoType());
    if (hasInfoType()) {
      result = result && getInfoType().equals(other.getInfoType());
    }
    result = result && likelihood_ == other.likelihood_;
    result = result && getDetectionRulesList().equals(other.getDetectionRulesList());
    result = result && exclusionType_ == other.exclusionType_;
    result = result && getTypeCase().equals(other.getTypeCase());
    if (!result) return false;
    switch (typeCase_) {
      case 2:
        result = result && getDictionary().equals(other.getDictionary());
        break;
      case 3:
        result = result && getRegex().equals(other.getRegex());
        break;
      case 4:
        result = result && getSurrogateType().equals(other.getSurrogateType());
        break;
      case 5:
        result = result && getStoredType().equals(other.getStoredType());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasInfoType()) {
      hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER;
      hash = (53 * hash) + getInfoType().hashCode();
    }
    hash = (37 * hash) + LIKELIHOOD_FIELD_NUMBER;
    hash = (53 * hash) + likelihood_;
    if (getDetectionRulesCount() > 0) {
      hash = (37 * hash) + DETECTION_RULES_FIELD_NUMBER;
      hash = (53 * hash) + getDetectionRulesList().hashCode();
    }
    hash = (37 * hash) + EXCLUSION_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + exclusionType_;
    switch (typeCase_) {
      case 2:
        hash = (37 * hash) + DICTIONARY_FIELD_NUMBER;
        hash = (53 * hash) + getDictionary().hashCode();
        break;
      case 3:
        hash = (37 * hash) + REGEX_FIELD_NUMBER;
        hash = (53 * hash) + getRegex().hashCode();
        break;
      case 4:
        hash = (37 * hash) + SURROGATE_TYPE_FIELD_NUMBER;
        hash = (53 * hash) + getSurrogateType().hashCode();
        break;
      case 5:
        hash = (37 * hash) + STORED_TYPE_FIELD_NUMBER;
        hash = (53 * hash) + getStoredType().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.privacy.dlp.v2.CustomInfoType 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.privacy.dlp.v2.CustomInfoType 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>
   * Custom information type provided by the user. Used to find domain-specific
   * sensitive information configurable to the data in question.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType)
      com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.CustomInfoType.class,
              com.google.privacy.dlp.v2.CustomInfoType.Builder.class);
    }

    // Construct using com.google.privacy.dlp.v2.CustomInfoType.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (infoTypeBuilder_ == null) {
        infoType_ = null;
      } else {
        infoType_ = null;
        infoTypeBuilder_ = null;
      }
      likelihood_ = 0;

      if (detectionRulesBuilder_ == null) {
        detectionRules_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
      } else {
        detectionRulesBuilder_.clear();
      }
      exclusionType_ = 0;

      typeCase_ = 0;
      type_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.privacy.dlp.v2.DlpStorage
          .internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor;
    }

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() {
      return com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType build() {
      com.google.privacy.dlp.v2.CustomInfoType result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.privacy.dlp.v2.CustomInfoType buildPartial() {
      com.google.privacy.dlp.v2.CustomInfoType result =
          new com.google.privacy.dlp.v2.CustomInfoType(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (infoTypeBuilder_ == null) {
        result.infoType_ = infoType_;
      } else {
        result.infoType_ = infoTypeBuilder_.build();
      }
      result.likelihood_ = likelihood_;
      if (typeCase_ == 2) {
        if (dictionaryBuilder_ == null) {
          result.type_ = type_;
        } else {
          result.type_ = dictionaryBuilder_.build();
        }
      }
      if (typeCase_ == 3) {
        if (regexBuilder_ == null) {
          result.type_ = type_;
        } else {
          result.type_ = regexBuilder_.build();
        }
      }
      if (typeCase_ == 4) {
        if (surrogateTypeBuilder_ == null) {
          result.type_ = type_;
        } else {
          result.type_ = surrogateTypeBuilder_.build();
        }
      }
      if (typeCase_ == 5) {
        if (storedTypeBuilder_ == null) {
          result.type_ = type_;
        } else {
          result.type_ = storedTypeBuilder_.build();
        }
      }
      if (detectionRulesBuilder_ == null) {
        if (((bitField0_ & 0x00000040) == 0x00000040)) {
          detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_);
          bitField0_ = (bitField0_ & ~0x00000040);
        }
        result.detectionRules_ = detectionRules_;
      } else {
        result.detectionRules_ = detectionRulesBuilder_.build();
      }
      result.exclusionType_ = exclusionType_;
      result.bitField0_ = to_bitField0_;
      result.typeCase_ = typeCase_;
      onBuilt();
      return result;
    }

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

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

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

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

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

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

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.privacy.dlp.v2.CustomInfoType) {
        return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType other) {
      if (other == com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()) return this;
      if (other.hasInfoType()) {
        mergeInfoType(other.getInfoType());
      }
      if (other.likelihood_ != 0) {
        setLikelihoodValue(other.getLikelihoodValue());
      }
      if (detectionRulesBuilder_ == null) {
        if (!other.detectionRules_.isEmpty()) {
          if (detectionRules_.isEmpty()) {
            detectionRules_ = other.detectionRules_;
            bitField0_ = (bitField0_ & ~0x00000040);
          } else {
            ensureDetectionRulesIsMutable();
            detectionRules_.addAll(other.detectionRules_);
          }
          onChanged();
        }
      } else {
        if (!other.detectionRules_.isEmpty()) {
          if (detectionRulesBuilder_.isEmpty()) {
            detectionRulesBuilder_.dispose();
            detectionRulesBuilder_ = null;
            detectionRules_ = other.detectionRules_;
            bitField0_ = (bitField0_ & ~0x00000040);
            detectionRulesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getDetectionRulesFieldBuilder()
                    : null;
          } else {
            detectionRulesBuilder_.addAllMessages(other.detectionRules_);
          }
        }
      }
      if (other.exclusionType_ != 0) {
        setExclusionTypeValue(other.getExclusionTypeValue());
      }
      switch (other.getTypeCase()) {
        case DICTIONARY:
          {
            mergeDictionary(other.getDictionary());
            break;
          }
        case REGEX:
          {
            mergeRegex(other.getRegex());
            break;
          }
        case SURROGATE_TYPE:
          {
            mergeSurrogateType(other.getSurrogateType());
            break;
          }
        case STORED_TYPE:
          {
            mergeStoredType(other.getStoredType());
            break;
          }
        case TYPE_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.privacy.dlp.v2.CustomInfoType parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int typeCase_ = 0;
    private java.lang.Object type_;

    public TypeCase getTypeCase() {
      return TypeCase.forNumber(typeCase_);
    }

    public Builder clearType() {
      typeCase_ = 0;
      type_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.privacy.dlp.v2.InfoType infoType_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.InfoType,
            com.google.privacy.dlp.v2.InfoType.Builder,
            com.google.privacy.dlp.v2.InfoTypeOrBuilder>
        infoTypeBuilder_;
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public boolean hasInfoType() {
      return infoTypeBuilder_ != null || infoType_ != null;
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public com.google.privacy.dlp.v2.InfoType getInfoType() {
      if (infoTypeBuilder_ == null) {
        return infoType_ == null
            ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance()
            : infoType_;
      } else {
        return infoTypeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) {
      if (infoTypeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        infoType_ = value;
        onChanged();
      } else {
        infoTypeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public Builder setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) {
      if (infoTypeBuilder_ == null) {
        infoType_ = builderForValue.build();
        onChanged();
      } else {
        infoTypeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) {
      if (infoTypeBuilder_ == null) {
        if (infoType_ != null) {
          infoType_ =
              com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          infoType_ = value;
        }
        onChanged();
      } else {
        infoTypeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public Builder clearInfoType() {
      if (infoTypeBuilder_ == null) {
        infoType_ = null;
        onChanged();
      } else {
        infoType_ = null;
        infoTypeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() {

      onChanged();
      return getInfoTypeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
      if (infoTypeBuilder_ != null) {
        return infoTypeBuilder_.getMessageOrBuilder();
      } else {
        return infoType_ == null
            ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance()
            : infoType_;
      }
    }
    /**
     *
     *
     * <pre>
     * CustomInfoType can either be a new infoType, or an extension of built-in
     * infoType, when the name matches one of existing infoTypes and that infoType
     * is specified in `InspectContent.info_types` field. Specifying the latter
     * adds findings to the one detected by the system. If built-in info type is
     * not specified in `InspectContent.info_types` list then the name is treated
     * as a custom info type.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.InfoType,
            com.google.privacy.dlp.v2.InfoType.Builder,
            com.google.privacy.dlp.v2.InfoTypeOrBuilder>
        getInfoTypeFieldBuilder() {
      if (infoTypeBuilder_ == null) {
        infoTypeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.InfoType,
                com.google.privacy.dlp.v2.InfoType.Builder,
                com.google.privacy.dlp.v2.InfoTypeOrBuilder>(
                getInfoType(), getParentForChildren(), isClean());
        infoType_ = null;
      }
      return infoTypeBuilder_;
    }

    private int likelihood_ = 0;
    /**
     *
     *
     * <pre>
     * Likelihood to return for this CustomInfoType. This base value can be
     * altered by a detection rule if the finding meets the criteria specified by
     * the rule. Defaults to `VERY_LIKELY` if not specified.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
     */
    public int getLikelihoodValue() {
      return likelihood_;
    }
    /**
     *
     *
     * <pre>
     * Likelihood to return for this CustomInfoType. This base value can be
     * altered by a detection rule if the finding meets the criteria specified by
     * the rule. Defaults to `VERY_LIKELY` if not specified.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
     */
    public Builder setLikelihoodValue(int value) {
      likelihood_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Likelihood to return for this CustomInfoType. This base value can be
     * altered by a detection rule if the finding meets the criteria specified by
     * the rule. Defaults to `VERY_LIKELY` if not specified.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
     */
    public com.google.privacy.dlp.v2.Likelihood getLikelihood() {
      @SuppressWarnings("deprecation")
      com.google.privacy.dlp.v2.Likelihood result =
          com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_);
      return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Likelihood to return for this CustomInfoType. This base value can be
     * altered by a detection rule if the finding meets the criteria specified by
     * the rule. Defaults to `VERY_LIKELY` if not specified.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
     */
    public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) {
      if (value == null) {
        throw new NullPointerException();
      }

      likelihood_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Likelihood to return for this CustomInfoType. This base value can be
     * altered by a detection rule if the finding meets the criteria specified by
     * the rule. Defaults to `VERY_LIKELY` if not specified.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
     */
    public Builder clearLikelihood() {

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

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.Dictionary,
            com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>
        dictionaryBuilder_;
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public boolean hasDictionary() {
      return typeCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() {
      if (dictionaryBuilder_ == null) {
        if (typeCase_ == 2) {
          return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
        }
        return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
      } else {
        if (typeCase_ == 2) {
          return dictionaryBuilder_.getMessage();
        }
        return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) {
      if (dictionaryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        dictionaryBuilder_.setMessage(value);
      }
      typeCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public Builder setDictionary(
        com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) {
      if (dictionaryBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        dictionaryBuilder_.setMessage(builderForValue.build());
      }
      typeCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) {
      if (dictionaryBuilder_ == null) {
        if (typeCase_ == 2
            && type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) {
          type_ =
              com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder(
                      (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        if (typeCase_ == 2) {
          dictionaryBuilder_.mergeFrom(value);
        }
        dictionaryBuilder_.setMessage(value);
      }
      typeCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public Builder clearDictionary() {
      if (dictionaryBuilder_ == null) {
        if (typeCase_ == 2) {
          typeCase_ = 0;
          type_ = null;
          onChanged();
        }
      } else {
        if (typeCase_ == 2) {
          typeCase_ = 0;
          type_ = null;
        }
        dictionaryBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() {
      return getDictionaryFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() {
      if ((typeCase_ == 2) && (dictionaryBuilder_ != null)) {
        return dictionaryBuilder_.getMessageOrBuilder();
      } else {
        if (typeCase_ == 2) {
          return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
        }
        return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * A list of phrases to detect as a CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.Dictionary,
            com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>
        getDictionaryFieldBuilder() {
      if (dictionaryBuilder_ == null) {
        if (!(typeCase_ == 2)) {
          type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
        }
        dictionaryBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary,
                com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>(
                (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_,
                getParentForChildren(),
                isClean());
        type_ = null;
      }
      typeCase_ = 2;
      onChanged();
      ;
      return dictionaryBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.Regex,
            com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
        regexBuilder_;
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public boolean hasRegex() {
      return typeCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() {
      if (regexBuilder_ == null) {
        if (typeCase_ == 3) {
          return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
        }
        return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
      } else {
        if (typeCase_ == 3) {
          return regexBuilder_.getMessage();
        }
        return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
      if (regexBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        regexBuilder_.setMessage(value);
      }
      typeCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public Builder setRegex(
        com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) {
      if (regexBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        regexBuilder_.setMessage(builderForValue.build());
      }
      typeCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
      if (regexBuilder_ == null) {
        if (typeCase_ == 3
            && type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) {
          type_ =
              com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder(
                      (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        if (typeCase_ == 3) {
          regexBuilder_.mergeFrom(value);
        }
        regexBuilder_.setMessage(value);
      }
      typeCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public Builder clearRegex() {
      if (regexBuilder_ == null) {
        if (typeCase_ == 3) {
          typeCase_ = 0;
          type_ = null;
          onChanged();
        }
      } else {
        if (typeCase_ == 3) {
          typeCase_ = 0;
          type_ = null;
        }
        regexBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() {
      return getRegexFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() {
      if ((typeCase_ == 3) && (regexBuilder_ != null)) {
        return regexBuilder_.getMessageOrBuilder();
      } else {
        if (typeCase_ == 3) {
          return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
        }
        return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Regular expression based CustomInfoType.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.Regex,
            com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
        getRegexFieldBuilder() {
      if (regexBuilder_ == null) {
        if (!(typeCase_ == 3)) {
          type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
        }
        regexBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.Regex,
                com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>(
                (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_,
                getParentForChildren(),
                isClean());
        type_ = null;
      }
      typeCase_ = 3;
      onChanged();
      ;
      return regexBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.SurrogateType,
            com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>
        surrogateTypeBuilder_;
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public boolean hasSurrogateType() {
      return typeCase_ == 4;
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() {
      if (surrogateTypeBuilder_ == null) {
        if (typeCase_ == 4) {
          return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
        }
        return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
      } else {
        if (typeCase_ == 4) {
          return surrogateTypeBuilder_.getMessage();
        }
        return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public Builder setSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) {
      if (surrogateTypeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        surrogateTypeBuilder_.setMessage(value);
      }
      typeCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public Builder setSurrogateType(
        com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder builderForValue) {
      if (surrogateTypeBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        surrogateTypeBuilder_.setMessage(builderForValue.build());
      }
      typeCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public Builder mergeSurrogateType(
        com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) {
      if (surrogateTypeBuilder_ == null) {
        if (typeCase_ == 4
            && type_
                != com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance()) {
          type_ =
              com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder(
                      (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        if (typeCase_ == 4) {
          surrogateTypeBuilder_.mergeFrom(value);
        }
        surrogateTypeBuilder_.setMessage(value);
      }
      typeCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public Builder clearSurrogateType() {
      if (surrogateTypeBuilder_ == null) {
        if (typeCase_ == 4) {
          typeCase_ = 0;
          type_ = null;
          onChanged();
        }
      } else {
        if (typeCase_ == 4) {
          typeCase_ = 0;
          type_ = null;
        }
        surrogateTypeBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder
        getSurrogateTypeBuilder() {
      return getSurrogateTypeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder
        getSurrogateTypeOrBuilder() {
      if ((typeCase_ == 4) && (surrogateTypeBuilder_ != null)) {
        return surrogateTypeBuilder_.getMessageOrBuilder();
      } else {
        if (typeCase_ == 4) {
          return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
        }
        return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Message for detecting output from deidentification transformations that
     * support reversing.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.SurrogateType,
            com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>
        getSurrogateTypeFieldBuilder() {
      if (surrogateTypeBuilder_ == null) {
        if (!(typeCase_ == 4)) {
          type_ = com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
        }
        surrogateTypeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.SurrogateType,
                com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>(
                (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_,
                getParentForChildren(),
                isClean());
        type_ = null;
      }
      typeCase_ = 4;
      onChanged();
      ;
      return surrogateTypeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.StoredType,
            com.google.privacy.dlp.v2.StoredType.Builder,
            com.google.privacy.dlp.v2.StoredTypeOrBuilder>
        storedTypeBuilder_;
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public boolean hasStoredType() {
      return typeCase_ == 5;
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public com.google.privacy.dlp.v2.StoredType getStoredType() {
      if (storedTypeBuilder_ == null) {
        if (typeCase_ == 5) {
          return (com.google.privacy.dlp.v2.StoredType) type_;
        }
        return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
      } else {
        if (typeCase_ == 5) {
          return storedTypeBuilder_.getMessage();
        }
        return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public Builder setStoredType(com.google.privacy.dlp.v2.StoredType value) {
      if (storedTypeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        onChanged();
      } else {
        storedTypeBuilder_.setMessage(value);
      }
      typeCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public Builder setStoredType(com.google.privacy.dlp.v2.StoredType.Builder builderForValue) {
      if (storedTypeBuilder_ == null) {
        type_ = builderForValue.build();
        onChanged();
      } else {
        storedTypeBuilder_.setMessage(builderForValue.build());
      }
      typeCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public Builder mergeStoredType(com.google.privacy.dlp.v2.StoredType value) {
      if (storedTypeBuilder_ == null) {
        if (typeCase_ == 5 && type_ != com.google.privacy.dlp.v2.StoredType.getDefaultInstance()) {
          type_ =
              com.google.privacy.dlp.v2.StoredType.newBuilder(
                      (com.google.privacy.dlp.v2.StoredType) type_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          type_ = value;
        }
        onChanged();
      } else {
        if (typeCase_ == 5) {
          storedTypeBuilder_.mergeFrom(value);
        }
        storedTypeBuilder_.setMessage(value);
      }
      typeCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public Builder clearStoredType() {
      if (storedTypeBuilder_ == null) {
        if (typeCase_ == 5) {
          typeCase_ = 0;
          type_ = null;
          onChanged();
        }
      } else {
        if (typeCase_ == 5) {
          typeCase_ = 0;
          type_ = null;
        }
        storedTypeBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public com.google.privacy.dlp.v2.StoredType.Builder getStoredTypeBuilder() {
      return getStoredTypeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() {
      if ((typeCase_ == 5) && (storedTypeBuilder_ != null)) {
        return storedTypeBuilder_.getMessageOrBuilder();
      } else {
        if (typeCase_ == 5) {
          return (com.google.privacy.dlp.v2.StoredType) type_;
        }
        return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Load an existing `StoredInfoType` resource for use in
     * `InspectDataSource`. Not currently supported in `InspectContent`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.StoredType,
            com.google.privacy.dlp.v2.StoredType.Builder,
            com.google.privacy.dlp.v2.StoredTypeOrBuilder>
        getStoredTypeFieldBuilder() {
      if (storedTypeBuilder_ == null) {
        if (!(typeCase_ == 5)) {
          type_ = com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
        }
        storedTypeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.StoredType,
                com.google.privacy.dlp.v2.StoredType.Builder,
                com.google.privacy.dlp.v2.StoredTypeOrBuilder>(
                (com.google.privacy.dlp.v2.StoredType) type_, getParentForChildren(), isClean());
        type_ = null;
      }
      typeCase_ = 5;
      onChanged();
      ;
      return storedTypeBuilder_;
    }

    private java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule> detectionRules_ =
        java.util.Collections.emptyList();

    private void ensureDetectionRulesIsMutable() {
      if (!((bitField0_ & 0x00000040) == 0x00000040)) {
        detectionRules_ =
            new java.util.ArrayList<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>(
                detectionRules_);
        bitField0_ |= 0x00000040;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule,
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
        detectionRulesBuilder_;

    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>
        getDetectionRulesList() {
      if (detectionRulesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(detectionRules_);
      } else {
        return detectionRulesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public int getDetectionRulesCount() {
      if (detectionRulesBuilder_ == null) {
        return detectionRules_.size();
      } else {
        return detectionRulesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) {
      if (detectionRulesBuilder_ == null) {
        return detectionRules_.get(index);
      } else {
        return detectionRulesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder setDetectionRules(
        int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) {
      if (detectionRulesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDetectionRulesIsMutable();
        detectionRules_.set(index, value);
        onChanged();
      } else {
        detectionRulesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder setDetectionRules(
        int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) {
      if (detectionRulesBuilder_ == null) {
        ensureDetectionRulesIsMutable();
        detectionRules_.set(index, builderForValue.build());
        onChanged();
      } else {
        detectionRulesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder addDetectionRules(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) {
      if (detectionRulesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDetectionRulesIsMutable();
        detectionRules_.add(value);
        onChanged();
      } else {
        detectionRulesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder addDetectionRules(
        int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) {
      if (detectionRulesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDetectionRulesIsMutable();
        detectionRules_.add(index, value);
        onChanged();
      } else {
        detectionRulesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder addDetectionRules(
        com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) {
      if (detectionRulesBuilder_ == null) {
        ensureDetectionRulesIsMutable();
        detectionRules_.add(builderForValue.build());
        onChanged();
      } else {
        detectionRulesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder addDetectionRules(
        int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) {
      if (detectionRulesBuilder_ == null) {
        ensureDetectionRulesIsMutable();
        detectionRules_.add(index, builderForValue.build());
        onChanged();
      } else {
        detectionRulesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder addAllDetectionRules(
        java.lang.Iterable<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>
            values) {
      if (detectionRulesBuilder_ == null) {
        ensureDetectionRulesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectionRules_);
        onChanged();
      } else {
        detectionRulesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder clearDetectionRules() {
      if (detectionRulesBuilder_ == null) {
        detectionRules_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
        onChanged();
      } else {
        detectionRulesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public Builder removeDetectionRules(int index) {
      if (detectionRulesBuilder_ == null) {
        ensureDetectionRulesIsMutable();
        detectionRules_.remove(index);
        onChanged();
      } else {
        detectionRulesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder getDetectionRulesBuilder(
        int index) {
      return getDetectionRulesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder
        getDetectionRulesOrBuilder(int index) {
      if (detectionRulesBuilder_ == null) {
        return detectionRules_.get(index);
      } else {
        return detectionRulesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public java.util.List<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
        getDetectionRulesOrBuilderList() {
      if (detectionRulesBuilder_ != null) {
        return detectionRulesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(detectionRules_);
      }
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder
        addDetectionRulesBuilder() {
      return getDetectionRulesFieldBuilder()
          .addBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetectionRulesBuilder(
        int index) {
      return getDetectionRulesFieldBuilder()
          .addBuilder(
              index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Set of detection rules to apply to all findings of this CustomInfoType.
     * Rules are applied in order that they are specified. Not supported for the
     * `surrogate_type` CustomInfoType.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
     * </code>
     */
    public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder>
        getDetectionRulesBuilderList() {
      return getDetectionRulesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule,
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder,
            com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
        getDetectionRulesFieldBuilder() {
      if (detectionRulesBuilder_ == null) {
        detectionRulesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder,
                com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>(
                detectionRules_,
                ((bitField0_ & 0x00000040) == 0x00000040),
                getParentForChildren(),
                isClean());
        detectionRules_ = null;
      }
      return detectionRulesBuilder_;
    }

    private int exclusionType_ = 0;
    /**
     *
     *
     * <pre>
     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
     * to be returned. It still can be used for rules matching.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
     */
    public int getExclusionTypeValue() {
      return exclusionType_;
    }
    /**
     *
     *
     * <pre>
     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
     * to be returned. It still can be used for rules matching.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
     */
    public Builder setExclusionTypeValue(int value) {
      exclusionType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
     * to be returned. It still can be used for rules matching.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
     */
    public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() {
      @SuppressWarnings("deprecation")
      com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result =
          com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.valueOf(exclusionType_);
      return result == null
          ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
     * to be returned. It still can be used for rules matching.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
     */
    public Builder setExclusionType(com.google.privacy.dlp.v2.CustomInfoType.ExclusionType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      exclusionType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
     * to be returned. It still can be used for rules matching.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
     */
    public Builder clearExclusionType() {

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

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

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

    // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType)
  }

  // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType)
  private static final com.google.privacy.dlp.v2.CustomInfoType DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType();
  }

  public static com.google.privacy.dlp.v2.CustomInfoType getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
