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

package com.google.privacy.dlp.v2;

/**
 * <pre>
 * Request to search for potentially sensitive info in a list of items
 * and replace it with a default or provided content.
 * </pre>
 *
 * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest}
 */
public  final class RedactImageRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest)
    RedactImageRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RedactImageRequest.newBuilder() to construct.
  private RedactImageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private RedactImageRequest() {
    parent_ = "";
    imageRedactionConfigs_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private RedactImageRequest(
      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: {
            java.lang.String s = input.readStringRequireUtf8();

            parent_ = s;
            break;
          }
          case 18: {
            com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null;
            if (inspectConfig_ != null) {
              subBuilder = inspectConfig_.toBuilder();
            }
            inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(inspectConfig_);
              inspectConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              imageRedactionConfigs_ = new java.util.ArrayList<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>();
              mutable_bitField0_ |= 0x00000004;
            }
            imageRedactionConfigs_.add(
                input.readMessage(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.parser(), extensionRegistry));
            break;
          }
          case 58: {
            com.google.privacy.dlp.v2.ByteContentItem.Builder subBuilder = null;
            if (byteItem_ != null) {
              subBuilder = byteItem_.toBuilder();
            }
            byteItem_ = input.readMessage(com.google.privacy.dlp.v2.ByteContentItem.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(byteItem_);
              byteItem_ = 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)) {
        imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.privacy.dlp.v2.RedactImageRequest.class, com.google.privacy.dlp.v2.RedactImageRequest.Builder.class);
  }

  public interface ImageRedactionConfigOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    boolean hasInfoType();
    /**
     * <pre>
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    com.google.privacy.dlp.v2.InfoType getInfoType();
    /**
     * <pre>
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder();

    /**
     * <pre>
     * If true, all text found in the image, regardless whether it matches an
     * info_type, is redacted.
     * </pre>
     *
     * <code>bool redact_all_text = 2;</code>
     */
    boolean getRedactAllText();

    /**
     * <pre>
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
     */
    boolean hasRedactionColor();
    /**
     * <pre>
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
     */
    com.google.privacy.dlp.v2.Color getRedactionColor();
    /**
     * <pre>
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
     */
    com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder();

    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.TargetCase getTargetCase();
  }
  /**
   * <pre>
   * Configuration for determining how redaction of images should occur.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig}
   */
  public  static final class ImageRedactionConfig extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
      ImageRedactionConfigOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ImageRedactionConfig.newBuilder() to construct.
    private ImageRedactionConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ImageRedactionConfig() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ImageRedactionConfig(
        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.v2.InfoType.Builder subBuilder = null;
              if (targetCase_ == 1) {
                subBuilder = ((com.google.privacy.dlp.v2.InfoType) target_).toBuilder();
              }
              target_ =
                  input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) target_);
                target_ = subBuilder.buildPartial();
              }
              targetCase_ = 1;
              break;
            }
            case 16: {
              targetCase_ = 2;
              target_ = input.readBool();
              break;
            }
            case 26: {
              com.google.privacy.dlp.v2.Color.Builder subBuilder = null;
              if (redactionColor_ != null) {
                subBuilder = redactionColor_.toBuilder();
              }
              redactionColor_ = input.readMessage(com.google.privacy.dlp.v2.Color.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(redactionColor_);
                redactionColor_ = 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 {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class);
    }

    private int targetCase_ = 0;
    private java.lang.Object target_;
    public enum TargetCase
        implements com.google.protobuf.Internal.EnumLite {
      INFO_TYPE(1),
      REDACT_ALL_TEXT(2),
      TARGET_NOT_SET(0);
      private final int value;
      private TargetCase(int value) {
        this.value = value;
      }
      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static TargetCase valueOf(int value) {
        return forNumber(value);
      }

      public static TargetCase forNumber(int value) {
        switch (value) {
          case 1: return INFO_TYPE;
          case 2: return REDACT_ALL_TEXT;
          case 0: return TARGET_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public TargetCase
    getTargetCase() {
      return TargetCase.forNumber(
          targetCase_);
    }

    public static final int INFO_TYPE_FIELD_NUMBER = 1;
    /**
     * <pre>
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public boolean hasInfoType() {
      return targetCase_ == 1;
    }
    /**
     * <pre>
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public com.google.privacy.dlp.v2.InfoType getInfoType() {
      if (targetCase_ == 1) {
         return (com.google.privacy.dlp.v2.InfoType) target_;
      }
      return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
    }
    /**
     * <pre>
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
      if (targetCase_ == 1) {
         return (com.google.privacy.dlp.v2.InfoType) target_;
      }
      return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
    }

    public static final int REDACT_ALL_TEXT_FIELD_NUMBER = 2;
    /**
     * <pre>
     * If true, all text found in the image, regardless whether it matches an
     * info_type, is redacted.
     * </pre>
     *
     * <code>bool redact_all_text = 2;</code>
     */
    public boolean getRedactAllText() {
      if (targetCase_ == 2) {
        return (java.lang.Boolean) target_;
      }
      return false;
    }

    public static final int REDACTION_COLOR_FIELD_NUMBER = 3;
    private com.google.privacy.dlp.v2.Color redactionColor_;
    /**
     * <pre>
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
     */
    public boolean hasRedactionColor() {
      return redactionColor_ != null;
    }
    /**
     * <pre>
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
     */
    public com.google.privacy.dlp.v2.Color getRedactionColor() {
      return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_;
    }
    /**
     * <pre>
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
     */
    public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
      return getRedactionColor();
    }

    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 (targetCase_ == 1) {
        output.writeMessage(1, (com.google.privacy.dlp.v2.InfoType) target_);
      }
      if (targetCase_ == 2) {
        output.writeBool(
            2, (boolean)((java.lang.Boolean) target_));
      }
      if (redactionColor_ != null) {
        output.writeMessage(3, getRedactionColor());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (targetCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, (com.google.privacy.dlp.v2.InfoType) target_);
      }
      if (targetCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(
              2, (boolean)((java.lang.Boolean) target_));
      }
      if (redactionColor_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getRedactionColor());
      }
      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.RedactImageRequest.ImageRedactionConfig)) {
        return super.equals(obj);
      }
      com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other = (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) obj;

      boolean result = true;
      result = result && (hasRedactionColor() == other.hasRedactionColor());
      if (hasRedactionColor()) {
        result = result && getRedactionColor()
            .equals(other.getRedactionColor());
      }
      result = result && getTargetCase().equals(
          other.getTargetCase());
      if (!result) return false;
      switch (targetCase_) {
        case 1:
          result = result && getInfoType()
              .equals(other.getInfoType());
          break;
        case 2:
          result = result && (getRedactAllText()
              == other.getRedactAllText());
          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 (hasRedactionColor()) {
        hash = (37 * hash) + REDACTION_COLOR_FIELD_NUMBER;
        hash = (53 * hash) + getRedactionColor().hashCode();
      }
      switch (targetCase_) {
        case 1:
          hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER;
          hash = (53 * hash) + getInfoType().hashCode();
          break;
        case 2:
          hash = (37 * hash) + REDACT_ALL_TEXT_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
              getRedactAllText());
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig 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.RedactImageRequest.ImageRedactionConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig 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.RedactImageRequest.ImageRedactionConfig parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig 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.RedactImageRequest.ImageRedactionConfig parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig 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.RedactImageRequest.ImageRedactionConfig parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig 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.RedactImageRequest.ImageRedactionConfig 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.RedactImageRequest.ImageRedactionConfig 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.v2.RedactImageRequest.ImageRedactionConfig 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>
     * Configuration for determining how redaction of images should occur.
     * </pre>
     *
     * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
        com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class);
      }

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

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        if (redactionColorBuilder_ == null) {
          redactionColor_ = null;
        } else {
          redactionColor_ = null;
          redactionColorBuilder_ = null;
        }
        targetCase_ = 0;
        target_ = null;
        return this;
      }

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

      public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType() {
        return com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance();
      }

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

      public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig buildPartial() {
        com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result = new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(this);
        if (targetCase_ == 1) {
          if (infoTypeBuilder_ == null) {
            result.target_ = target_;
          } else {
            result.target_ = infoTypeBuilder_.build();
          }
        }
        if (targetCase_ == 2) {
          result.target_ = target_;
        }
        if (redactionColorBuilder_ == null) {
          result.redactionColor_ = redactionColor_;
        } else {
          result.redactionColor_ = redactionColorBuilder_.build();
        }
        result.targetCase_ = targetCase_;
        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.v2.RedactImageRequest.ImageRedactionConfig) {
          return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other) {
        if (other == com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()) return this;
        if (other.hasRedactionColor()) {
          mergeRedactionColor(other.getRedactionColor());
        }
        switch (other.getTargetCase()) {
          case INFO_TYPE: {
            mergeInfoType(other.getInfoType());
            break;
          }
          case REDACT_ALL_TEXT: {
            setRedactAllText(other.getRedactAllText());
            break;
          }
          case TARGET_NOT_SET: {
            break;
          }
        }
        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.v2.RedactImageRequest.ImageRedactionConfig parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int targetCase_ = 0;
      private java.lang.Object target_;
      public TargetCase
          getTargetCase() {
        return TargetCase.forNumber(
            targetCase_);
      }

      public Builder clearTarget() {
        targetCase_ = 0;
        target_ = null;
        onChanged();
        return this;
      }


      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>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
       */
      public boolean hasInfoType() {
        return targetCase_ == 1;
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
       */
      public com.google.privacy.dlp.v2.InfoType getInfoType() {
        if (infoTypeBuilder_ == null) {
          if (targetCase_ == 1) {
            return (com.google.privacy.dlp.v2.InfoType) target_;
          }
          return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
        } else {
          if (targetCase_ == 1) {
            return infoTypeBuilder_.getMessage();
          }
          return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
        }
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </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();
          }
          target_ = value;
          onChanged();
        } else {
          infoTypeBuilder_.setMessage(value);
        }
        targetCase_ = 1;
        return this;
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </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) {
          target_ = builderForValue.build();
          onChanged();
        } else {
          infoTypeBuilder_.setMessage(builderForValue.build());
        }
        targetCase_ = 1;
        return this;
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </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 (targetCase_ == 1 &&
              target_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) {
            target_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) target_)
                .mergeFrom(value).buildPartial();
          } else {
            target_ = value;
          }
          onChanged();
        } else {
          if (targetCase_ == 1) {
            infoTypeBuilder_.mergeFrom(value);
          }
          infoTypeBuilder_.setMessage(value);
        }
        targetCase_ = 1;
        return this;
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
       */
      public Builder clearInfoType() {
        if (infoTypeBuilder_ == null) {
          if (targetCase_ == 1) {
            targetCase_ = 0;
            target_ = null;
            onChanged();
          }
        } else {
          if (targetCase_ == 1) {
            targetCase_ = 0;
            target_ = null;
          }
          infoTypeBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
       */
      public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() {
        return getInfoTypeFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
       */
      public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
        if ((targetCase_ == 1) && (infoTypeBuilder_ != null)) {
          return infoTypeBuilder_.getMessageOrBuilder();
        } else {
          if (targetCase_ == 1) {
            return (com.google.privacy.dlp.v2.InfoType) target_;
          }
          return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
        }
      }
      /**
       * <pre>
       * Only one per info_type should be provided per request. If not
       * specified, and redact_all_text is false, the DLP API will redact all
       * text that it matches against all info_types that are found, but not
       * specified in another ImageRedactionConfig.
       * </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) {
          if (!(targetCase_ == 1)) {
            target_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
          }
          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>(
                  (com.google.privacy.dlp.v2.InfoType) target_,
                  getParentForChildren(),
                  isClean());
          target_ = null;
        }
        targetCase_ = 1;
        onChanged();;
        return infoTypeBuilder_;
      }

      /**
       * <pre>
       * If true, all text found in the image, regardless whether it matches an
       * info_type, is redacted.
       * </pre>
       *
       * <code>bool redact_all_text = 2;</code>
       */
      public boolean getRedactAllText() {
        if (targetCase_ == 2) {
          return (java.lang.Boolean) target_;
        }
        return false;
      }
      /**
       * <pre>
       * If true, all text found in the image, regardless whether it matches an
       * info_type, is redacted.
       * </pre>
       *
       * <code>bool redact_all_text = 2;</code>
       */
      public Builder setRedactAllText(boolean value) {
        targetCase_ = 2;
        target_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If true, all text found in the image, regardless whether it matches an
       * info_type, is redacted.
       * </pre>
       *
       * <code>bool redact_all_text = 2;</code>
       */
      public Builder clearRedactAllText() {
        if (targetCase_ == 2) {
          targetCase_ = 0;
          target_ = null;
          onChanged();
        }
        return this;
      }

      private com.google.privacy.dlp.v2.Color redactionColor_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> redactionColorBuilder_;
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public boolean hasRedactionColor() {
        return redactionColorBuilder_ != null || redactionColor_ != null;
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public com.google.privacy.dlp.v2.Color getRedactionColor() {
        if (redactionColorBuilder_ == null) {
          return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_;
        } else {
          return redactionColorBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) {
        if (redactionColorBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          redactionColor_ = value;
          onChanged();
        } else {
          redactionColorBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public Builder setRedactionColor(
          com.google.privacy.dlp.v2.Color.Builder builderForValue) {
        if (redactionColorBuilder_ == null) {
          redactionColor_ = builderForValue.build();
          onChanged();
        } else {
          redactionColorBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) {
        if (redactionColorBuilder_ == null) {
          if (redactionColor_ != null) {
            redactionColor_ =
              com.google.privacy.dlp.v2.Color.newBuilder(redactionColor_).mergeFrom(value).buildPartial();
          } else {
            redactionColor_ = value;
          }
          onChanged();
        } else {
          redactionColorBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public Builder clearRedactionColor() {
        if (redactionColorBuilder_ == null) {
          redactionColor_ = null;
          onChanged();
        } else {
          redactionColor_ = null;
          redactionColorBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public com.google.privacy.dlp.v2.Color.Builder getRedactionColorBuilder() {
        
        onChanged();
        return getRedactionColorFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
        if (redactionColorBuilder_ != null) {
          return redactionColorBuilder_.getMessageOrBuilder();
        } else {
          return redactionColor_ == null ?
              com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_;
        }
      }
      /**
       * <pre>
       * The color to use when redacting content from an image. If not specified,
       * the default is black.
       * </pre>
       *
       * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> 
          getRedactionColorFieldBuilder() {
        if (redactionColorBuilder_ == null) {
          redactionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder>(
                  getRedactionColor(),
                  getParentForChildren(),
                  isClean());
          redactionColor_ = null;
        }
        return redactionColorBuilder_;
      }
      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.v2.RedactImageRequest.ImageRedactionConfig)
    }

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

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

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

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

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

    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int bitField0_;
  public static final int PARENT_FIELD_NUMBER = 1;
  private volatile java.lang.Object parent_;
  /**
   * <pre>
   * The parent resource name, for example projects/my-project-id.
   * </pre>
   *
   * <code>string parent = 1;</code>
   */
  public java.lang.String getParent() {
    java.lang.Object ref = parent_;
    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();
      parent_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The parent resource name, for example projects/my-project-id.
   * </pre>
   *
   * <code>string parent = 1;</code>
   */
  public com.google.protobuf.ByteString
      getParentBytes() {
    java.lang.Object ref = parent_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      parent_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INSPECT_CONFIG_FIELD_NUMBER = 2;
  private com.google.privacy.dlp.v2.InspectConfig inspectConfig_;
  /**
   * <pre>
   * Configuration for the inspector.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
   */
  public boolean hasInspectConfig() {
    return inspectConfig_ != null;
  }
  /**
   * <pre>
   * Configuration for the inspector.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
   */
  public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() {
    return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_;
  }
  /**
   * <pre>
   * Configuration for the inspector.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
   */
  public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() {
    return getInspectConfig();
  }

  public static final int IMAGE_REDACTION_CONFIGS_FIELD_NUMBER = 5;
  private java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig> imageRedactionConfigs_;
  /**
   * <pre>
   * The configuration for specifying what content to redact from images.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
   */
  public java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig> getImageRedactionConfigsList() {
    return imageRedactionConfigs_;
  }
  /**
   * <pre>
   * The configuration for specifying what content to redact from images.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
   */
  public java.util.List<? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> 
      getImageRedactionConfigsOrBuilderList() {
    return imageRedactionConfigs_;
  }
  /**
   * <pre>
   * The configuration for specifying what content to redact from images.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
   */
  public int getImageRedactionConfigsCount() {
    return imageRedactionConfigs_.size();
  }
  /**
   * <pre>
   * The configuration for specifying what content to redact from images.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
   */
  public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index) {
    return imageRedactionConfigs_.get(index);
  }
  /**
   * <pre>
   * The configuration for specifying what content to redact from images.
   * </pre>
   *
   * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
   */
  public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder(
      int index) {
    return imageRedactionConfigs_.get(index);
  }

  public static final int BYTE_ITEM_FIELD_NUMBER = 7;
  private com.google.privacy.dlp.v2.ByteContentItem byteItem_;
  /**
   * <pre>
   * The content must be PNG, JPEG, SVG or BMP.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
   */
  public boolean hasByteItem() {
    return byteItem_ != null;
  }
  /**
   * <pre>
   * The content must be PNG, JPEG, SVG or BMP.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
   */
  public com.google.privacy.dlp.v2.ByteContentItem getByteItem() {
    return byteItem_ == null ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_;
  }
  /**
   * <pre>
   * The content must be PNG, JPEG, SVG or BMP.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
   */
  public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() {
    return getByteItem();
  }

  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 (!getParentBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
    }
    if (inspectConfig_ != null) {
      output.writeMessage(2, getInspectConfig());
    }
    for (int i = 0; i < imageRedactionConfigs_.size(); i++) {
      output.writeMessage(5, imageRedactionConfigs_.get(i));
    }
    if (byteItem_ != null) {
      output.writeMessage(7, getByteItem());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getParentBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
    }
    if (inspectConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getInspectConfig());
    }
    for (int i = 0; i < imageRedactionConfigs_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, imageRedactionConfigs_.get(i));
    }
    if (byteItem_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, getByteItem());
    }
    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.RedactImageRequest)) {
      return super.equals(obj);
    }
    com.google.privacy.dlp.v2.RedactImageRequest other = (com.google.privacy.dlp.v2.RedactImageRequest) obj;

    boolean result = true;
    result = result && getParent()
        .equals(other.getParent());
    result = result && (hasInspectConfig() == other.hasInspectConfig());
    if (hasInspectConfig()) {
      result = result && getInspectConfig()
          .equals(other.getInspectConfig());
    }
    result = result && getImageRedactionConfigsList()
        .equals(other.getImageRedactionConfigsList());
    result = result && (hasByteItem() == other.hasByteItem());
    if (hasByteItem()) {
      result = result && getByteItem()
          .equals(other.getByteItem());
    }
    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) + PARENT_FIELD_NUMBER;
    hash = (53 * hash) + getParent().hashCode();
    if (hasInspectConfig()) {
      hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getInspectConfig().hashCode();
    }
    if (getImageRedactionConfigsCount() > 0) {
      hash = (37 * hash) + IMAGE_REDACTION_CONFIGS_FIELD_NUMBER;
      hash = (53 * hash) + getImageRedactionConfigsList().hashCode();
    }
    if (hasByteItem()) {
      hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER;
      hash = (53 * hash) + getByteItem().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2.RedactImageRequest 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.RedactImageRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2.RedactImageRequest 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.RedactImageRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2.RedactImageRequest 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.RedactImageRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2.RedactImageRequest 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.RedactImageRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2.RedactImageRequest 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.RedactImageRequest 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.RedactImageRequest 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.v2.RedactImageRequest 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>
   * Request to search for potentially sensitive info in a list of items
   * and replace it with a default or provided content.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest)
      com.google.privacy.dlp.v2.RedactImageRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.RedactImageRequest.class, com.google.privacy.dlp.v2.RedactImageRequest.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getImageRedactionConfigsFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      parent_ = "";

      if (inspectConfigBuilder_ == null) {
        inspectConfig_ = null;
      } else {
        inspectConfig_ = null;
        inspectConfigBuilder_ = null;
      }
      if (imageRedactionConfigsBuilder_ == null) {
        imageRedactionConfigs_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        imageRedactionConfigsBuilder_.clear();
      }
      if (byteItemBuilder_ == null) {
        byteItem_ = null;
      } else {
        byteItem_ = null;
        byteItemBuilder_ = null;
      }
      return this;
    }

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

    public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() {
      return com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance();
    }

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

    public com.google.privacy.dlp.v2.RedactImageRequest buildPartial() {
      com.google.privacy.dlp.v2.RedactImageRequest result = new com.google.privacy.dlp.v2.RedactImageRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.parent_ = parent_;
      if (inspectConfigBuilder_ == null) {
        result.inspectConfig_ = inspectConfig_;
      } else {
        result.inspectConfig_ = inspectConfigBuilder_.build();
      }
      if (imageRedactionConfigsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.imageRedactionConfigs_ = imageRedactionConfigs_;
      } else {
        result.imageRedactionConfigs_ = imageRedactionConfigsBuilder_.build();
      }
      if (byteItemBuilder_ == null) {
        result.byteItem_ = byteItem_;
      } else {
        result.byteItem_ = byteItemBuilder_.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.v2.RedactImageRequest) {
        return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest other) {
      if (other == com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance()) return this;
      if (!other.getParent().isEmpty()) {
        parent_ = other.parent_;
        onChanged();
      }
      if (other.hasInspectConfig()) {
        mergeInspectConfig(other.getInspectConfig());
      }
      if (imageRedactionConfigsBuilder_ == null) {
        if (!other.imageRedactionConfigs_.isEmpty()) {
          if (imageRedactionConfigs_.isEmpty()) {
            imageRedactionConfigs_ = other.imageRedactionConfigs_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureImageRedactionConfigsIsMutable();
            imageRedactionConfigs_.addAll(other.imageRedactionConfigs_);
          }
          onChanged();
        }
      } else {
        if (!other.imageRedactionConfigs_.isEmpty()) {
          if (imageRedactionConfigsBuilder_.isEmpty()) {
            imageRedactionConfigsBuilder_.dispose();
            imageRedactionConfigsBuilder_ = null;
            imageRedactionConfigs_ = other.imageRedactionConfigs_;
            bitField0_ = (bitField0_ & ~0x00000004);
            imageRedactionConfigsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getImageRedactionConfigsFieldBuilder() : null;
          } else {
            imageRedactionConfigsBuilder_.addAllMessages(other.imageRedactionConfigs_);
          }
        }
      }
      if (other.hasByteItem()) {
        mergeByteItem(other.getByteItem());
      }
      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.v2.RedactImageRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.privacy.dlp.v2.RedactImageRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object parent_ = "";
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public java.lang.String getParent() {
      java.lang.Object ref = parent_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        parent_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public com.google.protobuf.ByteString
        getParentBytes() {
      java.lang.Object ref = parent_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        parent_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public Builder setParent(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      parent_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public Builder clearParent() {
      
      parent_ = getDefaultInstance().getParent();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public Builder setParentBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      parent_ = value;
      onChanged();
      return this;
    }

    private com.google.privacy.dlp.v2.InspectConfig inspectConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_;
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public boolean hasInspectConfig() {
      return inspectConfigBuilder_ != null || inspectConfig_ != null;
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() {
      if (inspectConfigBuilder_ == null) {
        return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_;
      } else {
        return inspectConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) {
      if (inspectConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        inspectConfig_ = value;
        onChanged();
      } else {
        inspectConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public Builder setInspectConfig(
        com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) {
      if (inspectConfigBuilder_ == null) {
        inspectConfig_ = builderForValue.build();
        onChanged();
      } else {
        inspectConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) {
      if (inspectConfigBuilder_ == null) {
        if (inspectConfig_ != null) {
          inspectConfig_ =
            com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial();
        } else {
          inspectConfig_ = value;
        }
        onChanged();
      } else {
        inspectConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public Builder clearInspectConfig() {
      if (inspectConfigBuilder_ == null) {
        inspectConfig_ = null;
        onChanged();
      } else {
        inspectConfig_ = null;
        inspectConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() {
      
      onChanged();
      return getInspectConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() {
      if (inspectConfigBuilder_ != null) {
        return inspectConfigBuilder_.getMessageOrBuilder();
      } else {
        return inspectConfig_ == null ?
            com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_;
      }
    }
    /**
     * <pre>
     * Configuration for the inspector.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> 
        getInspectConfigFieldBuilder() {
      if (inspectConfigBuilder_ == null) {
        inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>(
                getInspectConfig(),
                getParentForChildren(),
                isClean());
        inspectConfig_ = null;
      }
      return inspectConfigBuilder_;
    }

    private java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig> imageRedactionConfigs_ =
      java.util.Collections.emptyList();
    private void ensureImageRedactionConfigsIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        imageRedactionConfigs_ = new java.util.ArrayList<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>(imageRedactionConfigs_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> imageRedactionConfigsBuilder_;

    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig> getImageRedactionConfigsList() {
      if (imageRedactionConfigsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(imageRedactionConfigs_);
      } else {
        return imageRedactionConfigsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public int getImageRedactionConfigsCount() {
      if (imageRedactionConfigsBuilder_ == null) {
        return imageRedactionConfigs_.size();
      } else {
        return imageRedactionConfigsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index) {
      if (imageRedactionConfigsBuilder_ == null) {
        return imageRedactionConfigs_.get(index);
      } else {
        return imageRedactionConfigsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder setImageRedactionConfigs(
        int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) {
      if (imageRedactionConfigsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.set(index, value);
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder setImageRedactionConfigs(
        int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) {
      if (imageRedactionConfigsBuilder_ == null) {
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.set(index, builderForValue.build());
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder addImageRedactionConfigs(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) {
      if (imageRedactionConfigsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.add(value);
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder addImageRedactionConfigs(
        int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) {
      if (imageRedactionConfigsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.add(index, value);
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder addImageRedactionConfigs(
        com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) {
      if (imageRedactionConfigsBuilder_ == null) {
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.add(builderForValue.build());
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder addImageRedactionConfigs(
        int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) {
      if (imageRedactionConfigsBuilder_ == null) {
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.add(index, builderForValue.build());
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder addAllImageRedactionConfigs(
        java.lang.Iterable<? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig> values) {
      if (imageRedactionConfigsBuilder_ == null) {
        ensureImageRedactionConfigsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, imageRedactionConfigs_);
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder clearImageRedactionConfigs() {
      if (imageRedactionConfigsBuilder_ == null) {
        imageRedactionConfigs_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public Builder removeImageRedactionConfigs(int index) {
      if (imageRedactionConfigsBuilder_ == null) {
        ensureImageRedactionConfigsIsMutable();
        imageRedactionConfigs_.remove(index);
        onChanged();
      } else {
        imageRedactionConfigsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder getImageRedactionConfigsBuilder(
        int index) {
      return getImageRedactionConfigsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder(
        int index) {
      if (imageRedactionConfigsBuilder_ == null) {
        return imageRedactionConfigs_.get(index);  } else {
        return imageRedactionConfigsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public java.util.List<? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> 
         getImageRedactionConfigsOrBuilderList() {
      if (imageRedactionConfigsBuilder_ != null) {
        return imageRedactionConfigsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(imageRedactionConfigs_);
      }
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder addImageRedactionConfigsBuilder() {
      return getImageRedactionConfigsFieldBuilder().addBuilder(
          com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance());
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder addImageRedactionConfigsBuilder(
        int index) {
      return getImageRedactionConfigsFieldBuilder().addBuilder(
          index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance());
    }
    /**
     * <pre>
     * The configuration for specifying what content to redact from images.
     * </pre>
     *
     * <code>repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;</code>
     */
    public java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder> 
         getImageRedactionConfigsBuilderList() {
      return getImageRedactionConfigsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> 
        getImageRedactionConfigsFieldBuilder() {
      if (imageRedactionConfigsBuilder_ == null) {
        imageRedactionConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>(
                imageRedactionConfigs_,
                ((bitField0_ & 0x00000004) == 0x00000004),
                getParentForChildren(),
                isClean());
        imageRedactionConfigs_ = null;
      }
      return imageRedactionConfigsBuilder_;
    }

    private com.google.privacy.dlp.v2.ByteContentItem byteItem_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> byteItemBuilder_;
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public boolean hasByteItem() {
      return byteItemBuilder_ != null || byteItem_ != null;
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public com.google.privacy.dlp.v2.ByteContentItem getByteItem() {
      if (byteItemBuilder_ == null) {
        return byteItem_ == null ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_;
      } else {
        return byteItemBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem value) {
      if (byteItemBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        byteItem_ = value;
        onChanged();
      } else {
        byteItemBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public Builder setByteItem(
        com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue) {
      if (byteItemBuilder_ == null) {
        byteItem_ = builderForValue.build();
        onChanged();
      } else {
        byteItemBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public Builder mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value) {
      if (byteItemBuilder_ == null) {
        if (byteItem_ != null) {
          byteItem_ =
            com.google.privacy.dlp.v2.ByteContentItem.newBuilder(byteItem_).mergeFrom(value).buildPartial();
        } else {
          byteItem_ = value;
        }
        onChanged();
      } else {
        byteItemBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public Builder clearByteItem() {
      if (byteItemBuilder_ == null) {
        byteItem_ = null;
        onChanged();
      } else {
        byteItem_ = null;
        byteItemBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public com.google.privacy.dlp.v2.ByteContentItem.Builder getByteItemBuilder() {
      
      onChanged();
      return getByteItemFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() {
      if (byteItemBuilder_ != null) {
        return byteItemBuilder_.getMessageOrBuilder();
      } else {
        return byteItem_ == null ?
            com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_;
      }
    }
    /**
     * <pre>
     * The content must be PNG, JPEG, SVG or BMP.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> 
        getByteItemFieldBuilder() {
      if (byteItemBuilder_ == null) {
        byteItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder>(
                getByteItem(),
                getParentForChildren(),
                isClean());
        byteItem_ = null;
      }
      return byteItemBuilder_;
    }
    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.v2.RedactImageRequest)
  }

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

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

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

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

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

  public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

