// 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 de-identify a list of items.
 * </pre>
 *
 * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest}
 */
public final class DeidentifyContentRequest extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyContentRequest)
    DeidentifyContentRequestOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DeidentifyContentRequest.newBuilder() to construct.
  private DeidentifyContentRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DeidentifyContentRequest() {
    parent_ = "";
    inspectTemplateName_ = "";
    deidentifyTemplateName_ = "";
  }

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

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

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

              break;
            }
          case 26:
            {
              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 34:
            {
              com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null;
              if (item_ != null) {
                subBuilder = item_.toBuilder();
              }
              item_ =
                  input.readMessage(
                      com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(item_);
                item_ = subBuilder.buildPartial();
              }

              break;
            }
          case 42:
            {
              java.lang.String s = input.readStringRequireUtf8();

              inspectTemplateName_ = s;
              break;
            }
          case 50:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

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

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

  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 DEIDENTIFY_CONFIG_FIELD_NUMBER = 2;
  private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_;
  /**
   *
   *
   * <pre>
   * Configuration for the de-identification of the content item.
   * Items specified here will override the template referenced by the
   * deidentify_template_name argument.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
   */
  public boolean hasDeidentifyConfig() {
    return deidentifyConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Configuration for the de-identification of the content item.
   * Items specified here will override the template referenced by the
   * deidentify_template_name argument.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
   */
  public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() {
    return deidentifyConfig_ == null
        ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance()
        : deidentifyConfig_;
  }
  /**
   *
   *
   * <pre>
   * Configuration for the de-identification of the content item.
   * Items specified here will override the template referenced by the
   * deidentify_template_name argument.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
   */
  public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() {
    return getDeidentifyConfig();
  }

  public static final int INSPECT_CONFIG_FIELD_NUMBER = 3;
  private com.google.privacy.dlp.v2.InspectConfig inspectConfig_;
  /**
   *
   *
   * <pre>
   * Configuration for the inspector.
   * Items specified here will override the template referenced by the
   * inspect_template_name argument.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</code>
   */
  public boolean hasInspectConfig() {
    return inspectConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Configuration for the inspector.
   * Items specified here will override the template referenced by the
   * inspect_template_name argument.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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.
   * Items specified here will override the template referenced by the
   * inspect_template_name argument.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</code>
   */
  public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() {
    return getInspectConfig();
  }

  public static final int ITEM_FIELD_NUMBER = 4;
  private com.google.privacy.dlp.v2.ContentItem item_;
  /**
   *
   *
   * <pre>
   * The item to de-identify. Will be treated as text.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
   */
  public boolean hasItem() {
    return item_ != null;
  }
  /**
   *
   *
   * <pre>
   * The item to de-identify. Will be treated as text.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
   */
  public com.google.privacy.dlp.v2.ContentItem getItem() {
    return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_;
  }
  /**
   *
   *
   * <pre>
   * The item to de-identify. Will be treated as text.
   * </pre>
   *
   * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
   */
  public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() {
    return getItem();
  }

  public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 5;
  private volatile java.lang.Object inspectTemplateName_;
  /**
   *
   *
   * <pre>
   * Optional template to use. Any configuration directly specified in
   * inspect_config will override those set in the template. Singular fields
   * that are set in this request will replace their corresponding fields in the
   * template. Repeated fields are appended. Singular sub-messages and groups
   * are recursively merged.
   * </pre>
   *
   * <code>string inspect_template_name = 5;</code>
   */
  public java.lang.String getInspectTemplateName() {
    java.lang.Object ref = inspectTemplateName_;
    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();
      inspectTemplateName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional template to use. Any configuration directly specified in
   * inspect_config will override those set in the template. Singular fields
   * that are set in this request will replace their corresponding fields in the
   * template. Repeated fields are appended. Singular sub-messages and groups
   * are recursively merged.
   * </pre>
   *
   * <code>string inspect_template_name = 5;</code>
   */
  public com.google.protobuf.ByteString getInspectTemplateNameBytes() {
    java.lang.Object ref = inspectTemplateName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      inspectTemplateName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER = 6;
  private volatile java.lang.Object deidentifyTemplateName_;
  /**
   *
   *
   * <pre>
   * Optional template to use. Any configuration directly specified in
   * deidentify_config will override those set in the template. Singular fields
   * that are set in this request will replace their corresponding fields in the
   * template. Repeated fields are appended. Singular sub-messages and groups
   * are recursively merged.
   * </pre>
   *
   * <code>string deidentify_template_name = 6;</code>
   */
  public java.lang.String getDeidentifyTemplateName() {
    java.lang.Object ref = deidentifyTemplateName_;
    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();
      deidentifyTemplateName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional template to use. Any configuration directly specified in
   * deidentify_config will override those set in the template. Singular fields
   * that are set in this request will replace their corresponding fields in the
   * template. Repeated fields are appended. Singular sub-messages and groups
   * are recursively merged.
   * </pre>
   *
   * <code>string deidentify_template_name = 6;</code>
   */
  public com.google.protobuf.ByteString getDeidentifyTemplateNameBytes() {
    java.lang.Object ref = deidentifyTemplateName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      deidentifyTemplateName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!getParentBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
    }
    if (deidentifyConfig_ != null) {
      output.writeMessage(2, getDeidentifyConfig());
    }
    if (inspectConfig_ != null) {
      output.writeMessage(3, getInspectConfig());
    }
    if (item_ != null) {
      output.writeMessage(4, getItem());
    }
    if (!getInspectTemplateNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inspectTemplateName_);
    }
    if (!getDeidentifyTemplateNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, deidentifyTemplateName_);
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  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 (deidentifyConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeidentifyConfig());
    }
    if (inspectConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInspectConfig());
    }
    if (item_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getItem());
    }
    if (!getInspectTemplateNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inspectTemplateName_);
    }
    if (!getDeidentifyTemplateNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, deidentifyTemplateName_);
    }
    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.DeidentifyContentRequest)) {
      return super.equals(obj);
    }
    com.google.privacy.dlp.v2.DeidentifyContentRequest other =
        (com.google.privacy.dlp.v2.DeidentifyContentRequest) obj;

    boolean result = true;
    result = result && getParent().equals(other.getParent());
    result = result && (hasDeidentifyConfig() == other.hasDeidentifyConfig());
    if (hasDeidentifyConfig()) {
      result = result && getDeidentifyConfig().equals(other.getDeidentifyConfig());
    }
    result = result && (hasInspectConfig() == other.hasInspectConfig());
    if (hasInspectConfig()) {
      result = result && getInspectConfig().equals(other.getInspectConfig());
    }
    result = result && (hasItem() == other.hasItem());
    if (hasItem()) {
      result = result && getItem().equals(other.getItem());
    }
    result = result && getInspectTemplateName().equals(other.getInspectTemplateName());
    result = result && getDeidentifyTemplateName().equals(other.getDeidentifyTemplateName());
    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 (hasDeidentifyConfig()) {
      hash = (37 * hash) + DEIDENTIFY_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getDeidentifyConfig().hashCode();
    }
    if (hasInspectConfig()) {
      hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getInspectConfig().hashCode();
    }
    if (hasItem()) {
      hash = (37 * hash) + ITEM_FIELD_NUMBER;
      hash = (53 * hash) + getItem().hashCode();
    }
    hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getInspectTemplateName().hashCode();
    hash = (37 * hash) + DEIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getDeidentifyTemplateName().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyContentRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

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

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * Request to de-identify a list of items.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyContentRequest)
      com.google.privacy.dlp.v2.DeidentifyContentRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.privacy.dlp.v2.DlpProto
          .internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor;
    }

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

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

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

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

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

      if (deidentifyConfigBuilder_ == null) {
        deidentifyConfig_ = null;
      } else {
        deidentifyConfig_ = null;
        deidentifyConfigBuilder_ = null;
      }
      if (inspectConfigBuilder_ == null) {
        inspectConfig_ = null;
      } else {
        inspectConfig_ = null;
        inspectConfigBuilder_ = null;
      }
      if (itemBuilder_ == null) {
        item_ = null;
      } else {
        item_ = null;
        itemBuilder_ = null;
      }
      inspectTemplateName_ = "";

      deidentifyTemplateName_ = "";

      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.privacy.dlp.v2.DeidentifyContentRequest buildPartial() {
      com.google.privacy.dlp.v2.DeidentifyContentRequest result =
          new com.google.privacy.dlp.v2.DeidentifyContentRequest(this);
      result.parent_ = parent_;
      if (deidentifyConfigBuilder_ == null) {
        result.deidentifyConfig_ = deidentifyConfig_;
      } else {
        result.deidentifyConfig_ = deidentifyConfigBuilder_.build();
      }
      if (inspectConfigBuilder_ == null) {
        result.inspectConfig_ = inspectConfig_;
      } else {
        result.inspectConfig_ = inspectConfigBuilder_.build();
      }
      if (itemBuilder_ == null) {
        result.item_ = item_;
      } else {
        result.item_ = itemBuilder_.build();
      }
      result.inspectTemplateName_ = inspectTemplateName_;
      result.deidentifyTemplateName_ = deidentifyTemplateName_;
      onBuilt();
      return result;
    }

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

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

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

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

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

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

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

    public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyContentRequest other) {
      if (other == com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance())
        return this;
      if (!other.getParent().isEmpty()) {
        parent_ = other.parent_;
        onChanged();
      }
      if (other.hasDeidentifyConfig()) {
        mergeDeidentifyConfig(other.getDeidentifyConfig());
      }
      if (other.hasInspectConfig()) {
        mergeInspectConfig(other.getInspectConfig());
      }
      if (other.hasItem()) {
        mergeItem(other.getItem());
      }
      if (!other.getInspectTemplateName().isEmpty()) {
        inspectTemplateName_ = other.inspectTemplateName_;
        onChanged();
      }
      if (!other.getDeidentifyTemplateName().isEmpty()) {
        deidentifyTemplateName_ = other.deidentifyTemplateName_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    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.DeidentifyConfig deidentifyConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.DeidentifyConfig,
            com.google.privacy.dlp.v2.DeidentifyConfig.Builder,
            com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>
        deidentifyConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public boolean hasDeidentifyConfig() {
      return deidentifyConfigBuilder_ != null || deidentifyConfig_ != null;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() {
      if (deidentifyConfigBuilder_ == null) {
        return deidentifyConfig_ == null
            ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance()
            : deidentifyConfig_;
      } else {
        return deidentifyConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public Builder setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) {
      if (deidentifyConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        deidentifyConfig_ = value;
        onChanged();
      } else {
        deidentifyConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public Builder setDeidentifyConfig(
        com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) {
      if (deidentifyConfigBuilder_ == null) {
        deidentifyConfig_ = builderForValue.build();
        onChanged();
      } else {
        deidentifyConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public Builder mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) {
      if (deidentifyConfigBuilder_ == null) {
        if (deidentifyConfig_ != null) {
          deidentifyConfig_ =
              com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(deidentifyConfig_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          deidentifyConfig_ = value;
        }
        onChanged();
      } else {
        deidentifyConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public Builder clearDeidentifyConfig() {
      if (deidentifyConfigBuilder_ == null) {
        deidentifyConfig_ = null;
        onChanged();
      } else {
        deidentifyConfig_ = null;
        deidentifyConfigBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getDeidentifyConfigBuilder() {

      onChanged();
      return getDeidentifyConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() {
      if (deidentifyConfigBuilder_ != null) {
        return deidentifyConfigBuilder_.getMessageOrBuilder();
      } else {
        return deidentifyConfig_ == null
            ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance()
            : deidentifyConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Configuration for the de-identification of the content item.
     * Items specified here will override the template referenced by the
     * deidentify_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.DeidentifyConfig,
            com.google.privacy.dlp.v2.DeidentifyConfig.Builder,
            com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>
        getDeidentifyConfigFieldBuilder() {
      if (deidentifyConfigBuilder_ == null) {
        deidentifyConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.DeidentifyConfig,
                com.google.privacy.dlp.v2.DeidentifyConfig.Builder,
                com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>(
                getDeidentifyConfig(), getParentForChildren(), isClean());
        deidentifyConfig_ = null;
      }
      return deidentifyConfigBuilder_;
    }

    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.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</code>
     */
    public boolean hasInspectConfig() {
      return inspectConfigBuilder_ != null || inspectConfig_ != null;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the inspector.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</code>
     */
    public Builder clearInspectConfig() {
      if (inspectConfigBuilder_ == null) {
        inspectConfig_ = null;
        onChanged();
      } else {
        inspectConfig_ = null;
        inspectConfigBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for the inspector.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</code>
     */
    public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() {

      onChanged();
      return getInspectConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Configuration for the inspector.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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.
     * Items specified here will override the template referenced by the
     * inspect_template_name argument.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 3;</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 com.google.privacy.dlp.v2.ContentItem item_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.ContentItem,
            com.google.privacy.dlp.v2.ContentItem.Builder,
            com.google.privacy.dlp.v2.ContentItemOrBuilder>
        itemBuilder_;
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public boolean hasItem() {
      return itemBuilder_ != null || item_ != null;
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public com.google.privacy.dlp.v2.ContentItem getItem() {
      if (itemBuilder_ == null) {
        return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_;
      } else {
        return itemBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) {
      if (itemBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        item_ = value;
        onChanged();
      } else {
        itemBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public Builder setItem(com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) {
      if (itemBuilder_ == null) {
        item_ = builderForValue.build();
        onChanged();
      } else {
        itemBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) {
      if (itemBuilder_ == null) {
        if (item_ != null) {
          item_ =
              com.google.privacy.dlp.v2.ContentItem.newBuilder(item_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          item_ = value;
        }
        onChanged();
      } else {
        itemBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public Builder clearItem() {
      if (itemBuilder_ == null) {
        item_ = null;
        onChanged();
      } else {
        item_ = null;
        itemBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() {

      onChanged();
      return getItemFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() {
      if (itemBuilder_ != null) {
        return itemBuilder_.getMessageOrBuilder();
      } else {
        return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_;
      }
    }
    /**
     *
     *
     * <pre>
     * The item to de-identify. Will be treated as text.
     * </pre>
     *
     * <code>.google.privacy.dlp.v2.ContentItem item = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.ContentItem,
            com.google.privacy.dlp.v2.ContentItem.Builder,
            com.google.privacy.dlp.v2.ContentItemOrBuilder>
        getItemFieldBuilder() {
      if (itemBuilder_ == null) {
        itemBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.privacy.dlp.v2.ContentItem,
                com.google.privacy.dlp.v2.ContentItem.Builder,
                com.google.privacy.dlp.v2.ContentItemOrBuilder>(
                getItem(), getParentForChildren(), isClean());
        item_ = null;
      }
      return itemBuilder_;
    }

    private java.lang.Object inspectTemplateName_ = "";
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * inspect_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string inspect_template_name = 5;</code>
     */
    public java.lang.String getInspectTemplateName() {
      java.lang.Object ref = inspectTemplateName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        inspectTemplateName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * inspect_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string inspect_template_name = 5;</code>
     */
    public com.google.protobuf.ByteString getInspectTemplateNameBytes() {
      java.lang.Object ref = inspectTemplateName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        inspectTemplateName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * inspect_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string inspect_template_name = 5;</code>
     */
    public Builder setInspectTemplateName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      inspectTemplateName_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * inspect_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string inspect_template_name = 5;</code>
     */
    public Builder clearInspectTemplateName() {

      inspectTemplateName_ = getDefaultInstance().getInspectTemplateName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * inspect_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string inspect_template_name = 5;</code>
     */
    public Builder setInspectTemplateNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object deidentifyTemplateName_ = "";
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * deidentify_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string deidentify_template_name = 6;</code>
     */
    public java.lang.String getDeidentifyTemplateName() {
      java.lang.Object ref = deidentifyTemplateName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deidentifyTemplateName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * deidentify_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string deidentify_template_name = 6;</code>
     */
    public com.google.protobuf.ByteString getDeidentifyTemplateNameBytes() {
      java.lang.Object ref = deidentifyTemplateName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        deidentifyTemplateName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * deidentify_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string deidentify_template_name = 6;</code>
     */
    public Builder setDeidentifyTemplateName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      deidentifyTemplateName_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * deidentify_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string deidentify_template_name = 6;</code>
     */
    public Builder clearDeidentifyTemplateName() {

      deidentifyTemplateName_ = getDefaultInstance().getDeidentifyTemplateName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional template to use. Any configuration directly specified in
     * deidentify_config will override those set in the template. Singular fields
     * that are set in this request will replace their corresponding fields in the
     * template. Repeated fields are appended. Singular sub-messages and groups
     * are recursively merged.
     * </pre>
     *
     * <code>string deidentify_template_name = 6;</code>
     */
    public Builder setDeidentifyTemplateNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

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

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

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

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

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

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

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

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

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

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