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

package com.google.privacy.dlp.v2beta1;

/**
 * <pre>
 * Specifies the location of a finding within its source item.
 * </pre>
 *
 * Protobuf type {@code google.privacy.dlp.v2beta1.Location}
 */
public  final class Location extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2beta1.Location)
    LocationOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Location.newBuilder() to construct.
  private Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Location() {
    imageBoxes_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Location(
      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;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            com.google.privacy.dlp.v2beta1.Range.Builder subBuilder = null;
            if (byteRange_ != null) {
              subBuilder = byteRange_.toBuilder();
            }
            byteRange_ = input.readMessage(com.google.privacy.dlp.v2beta1.Range.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(byteRange_);
              byteRange_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            com.google.privacy.dlp.v2beta1.Range.Builder subBuilder = null;
            if (codepointRange_ != null) {
              subBuilder = codepointRange_.toBuilder();
            }
            codepointRange_ = input.readMessage(com.google.privacy.dlp.v2beta1.Range.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(codepointRange_);
              codepointRange_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              imageBoxes_ = new java.util.ArrayList<com.google.privacy.dlp.v2beta1.ImageLocation>();
              mutable_bitField0_ |= 0x00000004;
            }
            imageBoxes_.add(
                input.readMessage(com.google.privacy.dlp.v2beta1.ImageLocation.parser(), extensionRegistry));
            break;
          }
          case 34: {
            com.google.privacy.dlp.v2beta1.RecordKey.Builder subBuilder = null;
            if (recordKey_ != null) {
              subBuilder = recordKey_.toBuilder();
            }
            recordKey_ = input.readMessage(com.google.privacy.dlp.v2beta1.RecordKey.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(recordKey_);
              recordKey_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            com.google.privacy.dlp.v2beta1.FieldId.Builder subBuilder = null;
            if (fieldId_ != null) {
              subBuilder = fieldId_.toBuilder();
            }
            fieldId_ = input.readMessage(com.google.privacy.dlp.v2beta1.FieldId.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(fieldId_);
              fieldId_ = subBuilder.buildPartial();
            }

            break;
          }
          case 50: {
            com.google.privacy.dlp.v2beta1.TableLocation.Builder subBuilder = null;
            if (tableLocation_ != null) {
              subBuilder = tableLocation_.toBuilder();
            }
            tableLocation_ = input.readMessage(com.google.privacy.dlp.v2beta1.TableLocation.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(tableLocation_);
              tableLocation_ = subBuilder.buildPartial();
            }

            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
        imageBoxes_ = java.util.Collections.unmodifiableList(imageBoxes_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.privacy.dlp.v2beta1.DlpProto.internal_static_google_privacy_dlp_v2beta1_Location_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.privacy.dlp.v2beta1.DlpProto.internal_static_google_privacy_dlp_v2beta1_Location_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.privacy.dlp.v2beta1.Location.class, com.google.privacy.dlp.v2beta1.Location.Builder.class);
  }

  private int bitField0_;
  public static final int BYTE_RANGE_FIELD_NUMBER = 1;
  private com.google.privacy.dlp.v2beta1.Range byteRange_;
  /**
   * <pre>
   * Zero-based byte offsets within a content item.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
   */
  public boolean hasByteRange() {
    return byteRange_ != null;
  }
  /**
   * <pre>
   * Zero-based byte offsets within a content item.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
   */
  public com.google.privacy.dlp.v2beta1.Range getByteRange() {
    return byteRange_ == null ? com.google.privacy.dlp.v2beta1.Range.getDefaultInstance() : byteRange_;
  }
  /**
   * <pre>
   * Zero-based byte offsets within a content item.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
   */
  public com.google.privacy.dlp.v2beta1.RangeOrBuilder getByteRangeOrBuilder() {
    return getByteRange();
  }

  public static final int CODEPOINT_RANGE_FIELD_NUMBER = 2;
  private com.google.privacy.dlp.v2beta1.Range codepointRange_;
  /**
   * <pre>
   * Character offsets within a content item, included when content type
   * is a text. Default charset assumed to be UTF-8.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
   */
  public boolean hasCodepointRange() {
    return codepointRange_ != null;
  }
  /**
   * <pre>
   * Character offsets within a content item, included when content type
   * is a text. Default charset assumed to be UTF-8.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
   */
  public com.google.privacy.dlp.v2beta1.Range getCodepointRange() {
    return codepointRange_ == null ? com.google.privacy.dlp.v2beta1.Range.getDefaultInstance() : codepointRange_;
  }
  /**
   * <pre>
   * Character offsets within a content item, included when content type
   * is a text. Default charset assumed to be UTF-8.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
   */
  public com.google.privacy.dlp.v2beta1.RangeOrBuilder getCodepointRangeOrBuilder() {
    return getCodepointRange();
  }

  public static final int IMAGE_BOXES_FIELD_NUMBER = 3;
  private java.util.List<com.google.privacy.dlp.v2beta1.ImageLocation> imageBoxes_;
  /**
   * <pre>
   * Location within an image's pixels.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
   */
  public java.util.List<com.google.privacy.dlp.v2beta1.ImageLocation> getImageBoxesList() {
    return imageBoxes_;
  }
  /**
   * <pre>
   * Location within an image's pixels.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
   */
  public java.util.List<? extends com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder> 
      getImageBoxesOrBuilderList() {
    return imageBoxes_;
  }
  /**
   * <pre>
   * Location within an image's pixels.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
   */
  public int getImageBoxesCount() {
    return imageBoxes_.size();
  }
  /**
   * <pre>
   * Location within an image's pixels.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
   */
  public com.google.privacy.dlp.v2beta1.ImageLocation getImageBoxes(int index) {
    return imageBoxes_.get(index);
  }
  /**
   * <pre>
   * Location within an image's pixels.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
   */
  public com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder getImageBoxesOrBuilder(
      int index) {
    return imageBoxes_.get(index);
  }

  public static final int RECORD_KEY_FIELD_NUMBER = 4;
  private com.google.privacy.dlp.v2beta1.RecordKey recordKey_;
  /**
   * <pre>
   * Key of the finding.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
   */
  public boolean hasRecordKey() {
    return recordKey_ != null;
  }
  /**
   * <pre>
   * Key of the finding.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
   */
  public com.google.privacy.dlp.v2beta1.RecordKey getRecordKey() {
    return recordKey_ == null ? com.google.privacy.dlp.v2beta1.RecordKey.getDefaultInstance() : recordKey_;
  }
  /**
   * <pre>
   * Key of the finding.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
   */
  public com.google.privacy.dlp.v2beta1.RecordKeyOrBuilder getRecordKeyOrBuilder() {
    return getRecordKey();
  }

  public static final int FIELD_ID_FIELD_NUMBER = 5;
  private com.google.privacy.dlp.v2beta1.FieldId fieldId_;
  /**
   * <pre>
   * Field id of the field containing the finding.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
   */
  public boolean hasFieldId() {
    return fieldId_ != null;
  }
  /**
   * <pre>
   * Field id of the field containing the finding.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
   */
  public com.google.privacy.dlp.v2beta1.FieldId getFieldId() {
    return fieldId_ == null ? com.google.privacy.dlp.v2beta1.FieldId.getDefaultInstance() : fieldId_;
  }
  /**
   * <pre>
   * Field id of the field containing the finding.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
   */
  public com.google.privacy.dlp.v2beta1.FieldIdOrBuilder getFieldIdOrBuilder() {
    return getFieldId();
  }

  public static final int TABLE_LOCATION_FIELD_NUMBER = 6;
  private com.google.privacy.dlp.v2beta1.TableLocation tableLocation_;
  /**
   * <pre>
   * Location within a `ContentItem.Table`.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
   */
  public boolean hasTableLocation() {
    return tableLocation_ != null;
  }
  /**
   * <pre>
   * Location within a `ContentItem.Table`.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
   */
  public com.google.privacy.dlp.v2beta1.TableLocation getTableLocation() {
    return tableLocation_ == null ? com.google.privacy.dlp.v2beta1.TableLocation.getDefaultInstance() : tableLocation_;
  }
  /**
   * <pre>
   * Location within a `ContentItem.Table`.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
   */
  public com.google.privacy.dlp.v2beta1.TableLocationOrBuilder getTableLocationOrBuilder() {
    return getTableLocation();
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (byteRange_ != null) {
      output.writeMessage(1, getByteRange());
    }
    if (codepointRange_ != null) {
      output.writeMessage(2, getCodepointRange());
    }
    for (int i = 0; i < imageBoxes_.size(); i++) {
      output.writeMessage(3, imageBoxes_.get(i));
    }
    if (recordKey_ != null) {
      output.writeMessage(4, getRecordKey());
    }
    if (fieldId_ != null) {
      output.writeMessage(5, getFieldId());
    }
    if (tableLocation_ != null) {
      output.writeMessage(6, getTableLocation());
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (byteRange_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getByteRange());
    }
    if (codepointRange_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getCodepointRange());
    }
    for (int i = 0; i < imageBoxes_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, imageBoxes_.get(i));
    }
    if (recordKey_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getRecordKey());
    }
    if (fieldId_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getFieldId());
    }
    if (tableLocation_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getTableLocation());
    }
    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.v2beta1.Location)) {
      return super.equals(obj);
    }
    com.google.privacy.dlp.v2beta1.Location other = (com.google.privacy.dlp.v2beta1.Location) obj;

    boolean result = true;
    result = result && (hasByteRange() == other.hasByteRange());
    if (hasByteRange()) {
      result = result && getByteRange()
          .equals(other.getByteRange());
    }
    result = result && (hasCodepointRange() == other.hasCodepointRange());
    if (hasCodepointRange()) {
      result = result && getCodepointRange()
          .equals(other.getCodepointRange());
    }
    result = result && getImageBoxesList()
        .equals(other.getImageBoxesList());
    result = result && (hasRecordKey() == other.hasRecordKey());
    if (hasRecordKey()) {
      result = result && getRecordKey()
          .equals(other.getRecordKey());
    }
    result = result && (hasFieldId() == other.hasFieldId());
    if (hasFieldId()) {
      result = result && getFieldId()
          .equals(other.getFieldId());
    }
    result = result && (hasTableLocation() == other.hasTableLocation());
    if (hasTableLocation()) {
      result = result && getTableLocation()
          .equals(other.getTableLocation());
    }
    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 (hasByteRange()) {
      hash = (37 * hash) + BYTE_RANGE_FIELD_NUMBER;
      hash = (53 * hash) + getByteRange().hashCode();
    }
    if (hasCodepointRange()) {
      hash = (37 * hash) + CODEPOINT_RANGE_FIELD_NUMBER;
      hash = (53 * hash) + getCodepointRange().hashCode();
    }
    if (getImageBoxesCount() > 0) {
      hash = (37 * hash) + IMAGE_BOXES_FIELD_NUMBER;
      hash = (53 * hash) + getImageBoxesList().hashCode();
    }
    if (hasRecordKey()) {
      hash = (37 * hash) + RECORD_KEY_FIELD_NUMBER;
      hash = (53 * hash) + getRecordKey().hashCode();
    }
    if (hasFieldId()) {
      hash = (37 * hash) + FIELD_ID_FIELD_NUMBER;
      hash = (53 * hash) + getFieldId().hashCode();
    }
    if (hasTableLocation()) {
      hash = (37 * hash) + TABLE_LOCATION_FIELD_NUMBER;
      hash = (53 * hash) + getTableLocation().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.privacy.dlp.v2beta1.Location parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2beta1.Location 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.v2beta1.Location parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2beta1.Location 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.v2beta1.Location parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2beta1.Location parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.privacy.dlp.v2beta1.Location parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2beta1.Location 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.v2beta1.Location parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2beta1.Location 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.v2beta1.Location parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2beta1.Location parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.privacy.dlp.v2beta1.Location prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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>
   * Specifies the location of a finding within its source item.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2beta1.Location}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2beta1.Location)
      com.google.privacy.dlp.v2beta1.LocationOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.privacy.dlp.v2beta1.DlpProto.internal_static_google_privacy_dlp_v2beta1_Location_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2beta1.DlpProto.internal_static_google_privacy_dlp_v2beta1_Location_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2beta1.Location.class, com.google.privacy.dlp.v2beta1.Location.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getImageBoxesFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      if (byteRangeBuilder_ == null) {
        byteRange_ = null;
      } else {
        byteRange_ = null;
        byteRangeBuilder_ = null;
      }
      if (codepointRangeBuilder_ == null) {
        codepointRange_ = null;
      } else {
        codepointRange_ = null;
        codepointRangeBuilder_ = null;
      }
      if (imageBoxesBuilder_ == null) {
        imageBoxes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        imageBoxesBuilder_.clear();
      }
      if (recordKeyBuilder_ == null) {
        recordKey_ = null;
      } else {
        recordKey_ = null;
        recordKeyBuilder_ = null;
      }
      if (fieldIdBuilder_ == null) {
        fieldId_ = null;
      } else {
        fieldId_ = null;
        fieldIdBuilder_ = null;
      }
      if (tableLocationBuilder_ == null) {
        tableLocation_ = null;
      } else {
        tableLocation_ = null;
        tableLocationBuilder_ = null;
      }
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.privacy.dlp.v2beta1.DlpProto.internal_static_google_privacy_dlp_v2beta1_Location_descriptor;
    }

    public com.google.privacy.dlp.v2beta1.Location getDefaultInstanceForType() {
      return com.google.privacy.dlp.v2beta1.Location.getDefaultInstance();
    }

    public com.google.privacy.dlp.v2beta1.Location build() {
      com.google.privacy.dlp.v2beta1.Location result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.privacy.dlp.v2beta1.Location buildPartial() {
      com.google.privacy.dlp.v2beta1.Location result = new com.google.privacy.dlp.v2beta1.Location(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (byteRangeBuilder_ == null) {
        result.byteRange_ = byteRange_;
      } else {
        result.byteRange_ = byteRangeBuilder_.build();
      }
      if (codepointRangeBuilder_ == null) {
        result.codepointRange_ = codepointRange_;
      } else {
        result.codepointRange_ = codepointRangeBuilder_.build();
      }
      if (imageBoxesBuilder_ == null) {
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          imageBoxes_ = java.util.Collections.unmodifiableList(imageBoxes_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.imageBoxes_ = imageBoxes_;
      } else {
        result.imageBoxes_ = imageBoxesBuilder_.build();
      }
      if (recordKeyBuilder_ == null) {
        result.recordKey_ = recordKey_;
      } else {
        result.recordKey_ = recordKeyBuilder_.build();
      }
      if (fieldIdBuilder_ == null) {
        result.fieldId_ = fieldId_;
      } else {
        result.fieldId_ = fieldIdBuilder_.build();
      }
      if (tableLocationBuilder_ == null) {
        result.tableLocation_ = tableLocation_;
      } else {
        result.tableLocation_ = tableLocationBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.privacy.dlp.v2beta1.Location) {
        return mergeFrom((com.google.privacy.dlp.v2beta1.Location)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.privacy.dlp.v2beta1.Location other) {
      if (other == com.google.privacy.dlp.v2beta1.Location.getDefaultInstance()) return this;
      if (other.hasByteRange()) {
        mergeByteRange(other.getByteRange());
      }
      if (other.hasCodepointRange()) {
        mergeCodepointRange(other.getCodepointRange());
      }
      if (imageBoxesBuilder_ == null) {
        if (!other.imageBoxes_.isEmpty()) {
          if (imageBoxes_.isEmpty()) {
            imageBoxes_ = other.imageBoxes_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureImageBoxesIsMutable();
            imageBoxes_.addAll(other.imageBoxes_);
          }
          onChanged();
        }
      } else {
        if (!other.imageBoxes_.isEmpty()) {
          if (imageBoxesBuilder_.isEmpty()) {
            imageBoxesBuilder_.dispose();
            imageBoxesBuilder_ = null;
            imageBoxes_ = other.imageBoxes_;
            bitField0_ = (bitField0_ & ~0x00000004);
            imageBoxesBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getImageBoxesFieldBuilder() : null;
          } else {
            imageBoxesBuilder_.addAllMessages(other.imageBoxes_);
          }
        }
      }
      if (other.hasRecordKey()) {
        mergeRecordKey(other.getRecordKey());
      }
      if (other.hasFieldId()) {
        mergeFieldId(other.getFieldId());
      }
      if (other.hasTableLocation()) {
        mergeTableLocation(other.getTableLocation());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

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

    private com.google.privacy.dlp.v2beta1.Range byteRange_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.Range, com.google.privacy.dlp.v2beta1.Range.Builder, com.google.privacy.dlp.v2beta1.RangeOrBuilder> byteRangeBuilder_;
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public boolean hasByteRange() {
      return byteRangeBuilder_ != null || byteRange_ != null;
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public com.google.privacy.dlp.v2beta1.Range getByteRange() {
      if (byteRangeBuilder_ == null) {
        return byteRange_ == null ? com.google.privacy.dlp.v2beta1.Range.getDefaultInstance() : byteRange_;
      } else {
        return byteRangeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public Builder setByteRange(com.google.privacy.dlp.v2beta1.Range value) {
      if (byteRangeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        byteRange_ = value;
        onChanged();
      } else {
        byteRangeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public Builder setByteRange(
        com.google.privacy.dlp.v2beta1.Range.Builder builderForValue) {
      if (byteRangeBuilder_ == null) {
        byteRange_ = builderForValue.build();
        onChanged();
      } else {
        byteRangeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public Builder mergeByteRange(com.google.privacy.dlp.v2beta1.Range value) {
      if (byteRangeBuilder_ == null) {
        if (byteRange_ != null) {
          byteRange_ =
            com.google.privacy.dlp.v2beta1.Range.newBuilder(byteRange_).mergeFrom(value).buildPartial();
        } else {
          byteRange_ = value;
        }
        onChanged();
      } else {
        byteRangeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public Builder clearByteRange() {
      if (byteRangeBuilder_ == null) {
        byteRange_ = null;
        onChanged();
      } else {
        byteRange_ = null;
        byteRangeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public com.google.privacy.dlp.v2beta1.Range.Builder getByteRangeBuilder() {
      
      onChanged();
      return getByteRangeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    public com.google.privacy.dlp.v2beta1.RangeOrBuilder getByteRangeOrBuilder() {
      if (byteRangeBuilder_ != null) {
        return byteRangeBuilder_.getMessageOrBuilder();
      } else {
        return byteRange_ == null ?
            com.google.privacy.dlp.v2beta1.Range.getDefaultInstance() : byteRange_;
      }
    }
    /**
     * <pre>
     * Zero-based byte offsets within a content item.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range byte_range = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.Range, com.google.privacy.dlp.v2beta1.Range.Builder, com.google.privacy.dlp.v2beta1.RangeOrBuilder> 
        getByteRangeFieldBuilder() {
      if (byteRangeBuilder_ == null) {
        byteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2beta1.Range, com.google.privacy.dlp.v2beta1.Range.Builder, com.google.privacy.dlp.v2beta1.RangeOrBuilder>(
                getByteRange(),
                getParentForChildren(),
                isClean());
        byteRange_ = null;
      }
      return byteRangeBuilder_;
    }

    private com.google.privacy.dlp.v2beta1.Range codepointRange_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.Range, com.google.privacy.dlp.v2beta1.Range.Builder, com.google.privacy.dlp.v2beta1.RangeOrBuilder> codepointRangeBuilder_;
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public boolean hasCodepointRange() {
      return codepointRangeBuilder_ != null || codepointRange_ != null;
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public com.google.privacy.dlp.v2beta1.Range getCodepointRange() {
      if (codepointRangeBuilder_ == null) {
        return codepointRange_ == null ? com.google.privacy.dlp.v2beta1.Range.getDefaultInstance() : codepointRange_;
      } else {
        return codepointRangeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public Builder setCodepointRange(com.google.privacy.dlp.v2beta1.Range value) {
      if (codepointRangeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        codepointRange_ = value;
        onChanged();
      } else {
        codepointRangeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public Builder setCodepointRange(
        com.google.privacy.dlp.v2beta1.Range.Builder builderForValue) {
      if (codepointRangeBuilder_ == null) {
        codepointRange_ = builderForValue.build();
        onChanged();
      } else {
        codepointRangeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public Builder mergeCodepointRange(com.google.privacy.dlp.v2beta1.Range value) {
      if (codepointRangeBuilder_ == null) {
        if (codepointRange_ != null) {
          codepointRange_ =
            com.google.privacy.dlp.v2beta1.Range.newBuilder(codepointRange_).mergeFrom(value).buildPartial();
        } else {
          codepointRange_ = value;
        }
        onChanged();
      } else {
        codepointRangeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public Builder clearCodepointRange() {
      if (codepointRangeBuilder_ == null) {
        codepointRange_ = null;
        onChanged();
      } else {
        codepointRange_ = null;
        codepointRangeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public com.google.privacy.dlp.v2beta1.Range.Builder getCodepointRangeBuilder() {
      
      onChanged();
      return getCodepointRangeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    public com.google.privacy.dlp.v2beta1.RangeOrBuilder getCodepointRangeOrBuilder() {
      if (codepointRangeBuilder_ != null) {
        return codepointRangeBuilder_.getMessageOrBuilder();
      } else {
        return codepointRange_ == null ?
            com.google.privacy.dlp.v2beta1.Range.getDefaultInstance() : codepointRange_;
      }
    }
    /**
     * <pre>
     * Character offsets within a content item, included when content type
     * is a text. Default charset assumed to be UTF-8.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.Range codepoint_range = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.Range, com.google.privacy.dlp.v2beta1.Range.Builder, com.google.privacy.dlp.v2beta1.RangeOrBuilder> 
        getCodepointRangeFieldBuilder() {
      if (codepointRangeBuilder_ == null) {
        codepointRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2beta1.Range, com.google.privacy.dlp.v2beta1.Range.Builder, com.google.privacy.dlp.v2beta1.RangeOrBuilder>(
                getCodepointRange(),
                getParentForChildren(),
                isClean());
        codepointRange_ = null;
      }
      return codepointRangeBuilder_;
    }

    private java.util.List<com.google.privacy.dlp.v2beta1.ImageLocation> imageBoxes_ =
      java.util.Collections.emptyList();
    private void ensureImageBoxesIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        imageBoxes_ = new java.util.ArrayList<com.google.privacy.dlp.v2beta1.ImageLocation>(imageBoxes_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.ImageLocation, com.google.privacy.dlp.v2beta1.ImageLocation.Builder, com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder> imageBoxesBuilder_;

    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public java.util.List<com.google.privacy.dlp.v2beta1.ImageLocation> getImageBoxesList() {
      if (imageBoxesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(imageBoxes_);
      } else {
        return imageBoxesBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public int getImageBoxesCount() {
      if (imageBoxesBuilder_ == null) {
        return imageBoxes_.size();
      } else {
        return imageBoxesBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public com.google.privacy.dlp.v2beta1.ImageLocation getImageBoxes(int index) {
      if (imageBoxesBuilder_ == null) {
        return imageBoxes_.get(index);
      } else {
        return imageBoxesBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder setImageBoxes(
        int index, com.google.privacy.dlp.v2beta1.ImageLocation value) {
      if (imageBoxesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureImageBoxesIsMutable();
        imageBoxes_.set(index, value);
        onChanged();
      } else {
        imageBoxesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder setImageBoxes(
        int index, com.google.privacy.dlp.v2beta1.ImageLocation.Builder builderForValue) {
      if (imageBoxesBuilder_ == null) {
        ensureImageBoxesIsMutable();
        imageBoxes_.set(index, builderForValue.build());
        onChanged();
      } else {
        imageBoxesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder addImageBoxes(com.google.privacy.dlp.v2beta1.ImageLocation value) {
      if (imageBoxesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureImageBoxesIsMutable();
        imageBoxes_.add(value);
        onChanged();
      } else {
        imageBoxesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder addImageBoxes(
        int index, com.google.privacy.dlp.v2beta1.ImageLocation value) {
      if (imageBoxesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureImageBoxesIsMutable();
        imageBoxes_.add(index, value);
        onChanged();
      } else {
        imageBoxesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder addImageBoxes(
        com.google.privacy.dlp.v2beta1.ImageLocation.Builder builderForValue) {
      if (imageBoxesBuilder_ == null) {
        ensureImageBoxesIsMutable();
        imageBoxes_.add(builderForValue.build());
        onChanged();
      } else {
        imageBoxesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder addImageBoxes(
        int index, com.google.privacy.dlp.v2beta1.ImageLocation.Builder builderForValue) {
      if (imageBoxesBuilder_ == null) {
        ensureImageBoxesIsMutable();
        imageBoxes_.add(index, builderForValue.build());
        onChanged();
      } else {
        imageBoxesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder addAllImageBoxes(
        java.lang.Iterable<? extends com.google.privacy.dlp.v2beta1.ImageLocation> values) {
      if (imageBoxesBuilder_ == null) {
        ensureImageBoxesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, imageBoxes_);
        onChanged();
      } else {
        imageBoxesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder clearImageBoxes() {
      if (imageBoxesBuilder_ == null) {
        imageBoxes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        imageBoxesBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public Builder removeImageBoxes(int index) {
      if (imageBoxesBuilder_ == null) {
        ensureImageBoxesIsMutable();
        imageBoxes_.remove(index);
        onChanged();
      } else {
        imageBoxesBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public com.google.privacy.dlp.v2beta1.ImageLocation.Builder getImageBoxesBuilder(
        int index) {
      return getImageBoxesFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder getImageBoxesOrBuilder(
        int index) {
      if (imageBoxesBuilder_ == null) {
        return imageBoxes_.get(index);  } else {
        return imageBoxesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public java.util.List<? extends com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder> 
         getImageBoxesOrBuilderList() {
      if (imageBoxesBuilder_ != null) {
        return imageBoxesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(imageBoxes_);
      }
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public com.google.privacy.dlp.v2beta1.ImageLocation.Builder addImageBoxesBuilder() {
      return getImageBoxesFieldBuilder().addBuilder(
          com.google.privacy.dlp.v2beta1.ImageLocation.getDefaultInstance());
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public com.google.privacy.dlp.v2beta1.ImageLocation.Builder addImageBoxesBuilder(
        int index) {
      return getImageBoxesFieldBuilder().addBuilder(
          index, com.google.privacy.dlp.v2beta1.ImageLocation.getDefaultInstance());
    }
    /**
     * <pre>
     * Location within an image's pixels.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2beta1.ImageLocation image_boxes = 3;</code>
     */
    public java.util.List<com.google.privacy.dlp.v2beta1.ImageLocation.Builder> 
         getImageBoxesBuilderList() {
      return getImageBoxesFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.ImageLocation, com.google.privacy.dlp.v2beta1.ImageLocation.Builder, com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder> 
        getImageBoxesFieldBuilder() {
      if (imageBoxesBuilder_ == null) {
        imageBoxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.privacy.dlp.v2beta1.ImageLocation, com.google.privacy.dlp.v2beta1.ImageLocation.Builder, com.google.privacy.dlp.v2beta1.ImageLocationOrBuilder>(
                imageBoxes_,
                ((bitField0_ & 0x00000004) == 0x00000004),
                getParentForChildren(),
                isClean());
        imageBoxes_ = null;
      }
      return imageBoxesBuilder_;
    }

    private com.google.privacy.dlp.v2beta1.RecordKey recordKey_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.RecordKey, com.google.privacy.dlp.v2beta1.RecordKey.Builder, com.google.privacy.dlp.v2beta1.RecordKeyOrBuilder> recordKeyBuilder_;
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public boolean hasRecordKey() {
      return recordKeyBuilder_ != null || recordKey_ != null;
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public com.google.privacy.dlp.v2beta1.RecordKey getRecordKey() {
      if (recordKeyBuilder_ == null) {
        return recordKey_ == null ? com.google.privacy.dlp.v2beta1.RecordKey.getDefaultInstance() : recordKey_;
      } else {
        return recordKeyBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public Builder setRecordKey(com.google.privacy.dlp.v2beta1.RecordKey value) {
      if (recordKeyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        recordKey_ = value;
        onChanged();
      } else {
        recordKeyBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public Builder setRecordKey(
        com.google.privacy.dlp.v2beta1.RecordKey.Builder builderForValue) {
      if (recordKeyBuilder_ == null) {
        recordKey_ = builderForValue.build();
        onChanged();
      } else {
        recordKeyBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public Builder mergeRecordKey(com.google.privacy.dlp.v2beta1.RecordKey value) {
      if (recordKeyBuilder_ == null) {
        if (recordKey_ != null) {
          recordKey_ =
            com.google.privacy.dlp.v2beta1.RecordKey.newBuilder(recordKey_).mergeFrom(value).buildPartial();
        } else {
          recordKey_ = value;
        }
        onChanged();
      } else {
        recordKeyBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public Builder clearRecordKey() {
      if (recordKeyBuilder_ == null) {
        recordKey_ = null;
        onChanged();
      } else {
        recordKey_ = null;
        recordKeyBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public com.google.privacy.dlp.v2beta1.RecordKey.Builder getRecordKeyBuilder() {
      
      onChanged();
      return getRecordKeyFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    public com.google.privacy.dlp.v2beta1.RecordKeyOrBuilder getRecordKeyOrBuilder() {
      if (recordKeyBuilder_ != null) {
        return recordKeyBuilder_.getMessageOrBuilder();
      } else {
        return recordKey_ == null ?
            com.google.privacy.dlp.v2beta1.RecordKey.getDefaultInstance() : recordKey_;
      }
    }
    /**
     * <pre>
     * Key of the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.RecordKey record_key = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.RecordKey, com.google.privacy.dlp.v2beta1.RecordKey.Builder, com.google.privacy.dlp.v2beta1.RecordKeyOrBuilder> 
        getRecordKeyFieldBuilder() {
      if (recordKeyBuilder_ == null) {
        recordKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2beta1.RecordKey, com.google.privacy.dlp.v2beta1.RecordKey.Builder, com.google.privacy.dlp.v2beta1.RecordKeyOrBuilder>(
                getRecordKey(),
                getParentForChildren(),
                isClean());
        recordKey_ = null;
      }
      return recordKeyBuilder_;
    }

    private com.google.privacy.dlp.v2beta1.FieldId fieldId_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.FieldId, com.google.privacy.dlp.v2beta1.FieldId.Builder, com.google.privacy.dlp.v2beta1.FieldIdOrBuilder> fieldIdBuilder_;
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public boolean hasFieldId() {
      return fieldIdBuilder_ != null || fieldId_ != null;
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public com.google.privacy.dlp.v2beta1.FieldId getFieldId() {
      if (fieldIdBuilder_ == null) {
        return fieldId_ == null ? com.google.privacy.dlp.v2beta1.FieldId.getDefaultInstance() : fieldId_;
      } else {
        return fieldIdBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public Builder setFieldId(com.google.privacy.dlp.v2beta1.FieldId value) {
      if (fieldIdBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        fieldId_ = value;
        onChanged();
      } else {
        fieldIdBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public Builder setFieldId(
        com.google.privacy.dlp.v2beta1.FieldId.Builder builderForValue) {
      if (fieldIdBuilder_ == null) {
        fieldId_ = builderForValue.build();
        onChanged();
      } else {
        fieldIdBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public Builder mergeFieldId(com.google.privacy.dlp.v2beta1.FieldId value) {
      if (fieldIdBuilder_ == null) {
        if (fieldId_ != null) {
          fieldId_ =
            com.google.privacy.dlp.v2beta1.FieldId.newBuilder(fieldId_).mergeFrom(value).buildPartial();
        } else {
          fieldId_ = value;
        }
        onChanged();
      } else {
        fieldIdBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public Builder clearFieldId() {
      if (fieldIdBuilder_ == null) {
        fieldId_ = null;
        onChanged();
      } else {
        fieldId_ = null;
        fieldIdBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public com.google.privacy.dlp.v2beta1.FieldId.Builder getFieldIdBuilder() {
      
      onChanged();
      return getFieldIdFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    public com.google.privacy.dlp.v2beta1.FieldIdOrBuilder getFieldIdOrBuilder() {
      if (fieldIdBuilder_ != null) {
        return fieldIdBuilder_.getMessageOrBuilder();
      } else {
        return fieldId_ == null ?
            com.google.privacy.dlp.v2beta1.FieldId.getDefaultInstance() : fieldId_;
      }
    }
    /**
     * <pre>
     * Field id of the field containing the finding.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.FieldId field_id = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.FieldId, com.google.privacy.dlp.v2beta1.FieldId.Builder, com.google.privacy.dlp.v2beta1.FieldIdOrBuilder> 
        getFieldIdFieldBuilder() {
      if (fieldIdBuilder_ == null) {
        fieldIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2beta1.FieldId, com.google.privacy.dlp.v2beta1.FieldId.Builder, com.google.privacy.dlp.v2beta1.FieldIdOrBuilder>(
                getFieldId(),
                getParentForChildren(),
                isClean());
        fieldId_ = null;
      }
      return fieldIdBuilder_;
    }

    private com.google.privacy.dlp.v2beta1.TableLocation tableLocation_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.TableLocation, com.google.privacy.dlp.v2beta1.TableLocation.Builder, com.google.privacy.dlp.v2beta1.TableLocationOrBuilder> tableLocationBuilder_;
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public boolean hasTableLocation() {
      return tableLocationBuilder_ != null || tableLocation_ != null;
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public com.google.privacy.dlp.v2beta1.TableLocation getTableLocation() {
      if (tableLocationBuilder_ == null) {
        return tableLocation_ == null ? com.google.privacy.dlp.v2beta1.TableLocation.getDefaultInstance() : tableLocation_;
      } else {
        return tableLocationBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public Builder setTableLocation(com.google.privacy.dlp.v2beta1.TableLocation value) {
      if (tableLocationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        tableLocation_ = value;
        onChanged();
      } else {
        tableLocationBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public Builder setTableLocation(
        com.google.privacy.dlp.v2beta1.TableLocation.Builder builderForValue) {
      if (tableLocationBuilder_ == null) {
        tableLocation_ = builderForValue.build();
        onChanged();
      } else {
        tableLocationBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public Builder mergeTableLocation(com.google.privacy.dlp.v2beta1.TableLocation value) {
      if (tableLocationBuilder_ == null) {
        if (tableLocation_ != null) {
          tableLocation_ =
            com.google.privacy.dlp.v2beta1.TableLocation.newBuilder(tableLocation_).mergeFrom(value).buildPartial();
        } else {
          tableLocation_ = value;
        }
        onChanged();
      } else {
        tableLocationBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public Builder clearTableLocation() {
      if (tableLocationBuilder_ == null) {
        tableLocation_ = null;
        onChanged();
      } else {
        tableLocation_ = null;
        tableLocationBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public com.google.privacy.dlp.v2beta1.TableLocation.Builder getTableLocationBuilder() {
      
      onChanged();
      return getTableLocationFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    public com.google.privacy.dlp.v2beta1.TableLocationOrBuilder getTableLocationOrBuilder() {
      if (tableLocationBuilder_ != null) {
        return tableLocationBuilder_.getMessageOrBuilder();
      } else {
        return tableLocation_ == null ?
            com.google.privacy.dlp.v2beta1.TableLocation.getDefaultInstance() : tableLocation_;
      }
    }
    /**
     * <pre>
     * Location within a `ContentItem.Table`.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2beta1.TableLocation table_location = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2beta1.TableLocation, com.google.privacy.dlp.v2beta1.TableLocation.Builder, com.google.privacy.dlp.v2beta1.TableLocationOrBuilder> 
        getTableLocationFieldBuilder() {
      if (tableLocationBuilder_ == null) {
        tableLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2beta1.TableLocation, com.google.privacy.dlp.v2beta1.TableLocation.Builder, com.google.privacy.dlp.v2beta1.TableLocationOrBuilder>(
                getTableLocation(),
                getParentForChildren(),
                isClean());
        tableLocation_ = null;
      }
      return tableLocationBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2beta1.Location)
  }

  // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2beta1.Location)
  private static final com.google.privacy.dlp.v2beta1.Location DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.privacy.dlp.v2beta1.Location();
  }

  public static com.google.privacy.dlp.v2beta1.Location getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.google.privacy.dlp.v2beta1.Location getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

