// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/photos/library/v1/photos_library.proto

package com.google.photos.library.v1.proto;

/**
 *
 *
 * <pre>
 * A new enrichment item to be added to an album, used by the
 * `albums.addEnrichment` call.
 * </pre>
 *
 * Protobuf type {@code google.photos.library.v1.NewEnrichmentItem}
 */
public final class NewEnrichmentItem extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.photos.library.v1.NewEnrichmentItem)
    NewEnrichmentItemOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use NewEnrichmentItem.newBuilder() to construct.
  private NewEnrichmentItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private NewEnrichmentItem() {}

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

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.photos.library.v1.proto.LibraryServiceProto
        .internal_static_google_photos_library_v1_NewEnrichmentItem_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.photos.library.v1.proto.LibraryServiceProto
        .internal_static_google_photos_library_v1_NewEnrichmentItem_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.photos.library.v1.proto.NewEnrichmentItem.class,
            com.google.photos.library.v1.proto.NewEnrichmentItem.Builder.class);
  }

  private int enrichmentCase_ = 0;
  private java.lang.Object enrichment_;

  public enum EnrichmentCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    TEXT_ENRICHMENT(1),
    LOCATION_ENRICHMENT(2),
    MAP_ENRICHMENT(3),
    ENRICHMENT_NOT_SET(0);
    private final int value;

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

    public static EnrichmentCase forNumber(int value) {
      switch (value) {
        case 1:
          return TEXT_ENRICHMENT;
        case 2:
          return LOCATION_ENRICHMENT;
        case 3:
          return MAP_ENRICHMENT;
        case 0:
          return ENRICHMENT_NOT_SET;
        default:
          return null;
      }
    }

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

  public EnrichmentCase getEnrichmentCase() {
    return EnrichmentCase.forNumber(enrichmentCase_);
  }

  public static final int TEXT_ENRICHMENT_FIELD_NUMBER = 1;
  /**
   *
   *
   * <pre>
   * Text to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
   *
   * @return Whether the textEnrichment field is set.
   */
  @java.lang.Override
  public boolean hasTextEnrichment() {
    return enrichmentCase_ == 1;
  }
  /**
   *
   *
   * <pre>
   * Text to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
   *
   * @return The textEnrichment.
   */
  @java.lang.Override
  public com.google.photos.library.v1.proto.TextEnrichment getTextEnrichment() {
    if (enrichmentCase_ == 1) {
      return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
    }
    return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Text to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
   */
  @java.lang.Override
  public com.google.photos.library.v1.proto.TextEnrichmentOrBuilder getTextEnrichmentOrBuilder() {
    if (enrichmentCase_ == 1) {
      return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
    }
    return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
  }

  public static final int LOCATION_ENRICHMENT_FIELD_NUMBER = 2;
  /**
   *
   *
   * <pre>
   * Location to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
   *
   * @return Whether the locationEnrichment field is set.
   */
  @java.lang.Override
  public boolean hasLocationEnrichment() {
    return enrichmentCase_ == 2;
  }
  /**
   *
   *
   * <pre>
   * Location to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
   *
   * @return The locationEnrichment.
   */
  @java.lang.Override
  public com.google.photos.library.v1.proto.LocationEnrichment getLocationEnrichment() {
    if (enrichmentCase_ == 2) {
      return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
    }
    return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Location to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
   */
  @java.lang.Override
  public com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder
      getLocationEnrichmentOrBuilder() {
    if (enrichmentCase_ == 2) {
      return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
    }
    return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
  }

  public static final int MAP_ENRICHMENT_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * Map to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
   *
   * @return Whether the mapEnrichment field is set.
   */
  @java.lang.Override
  public boolean hasMapEnrichment() {
    return enrichmentCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * Map to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
   *
   * @return The mapEnrichment.
   */
  @java.lang.Override
  public com.google.photos.library.v1.proto.MapEnrichment getMapEnrichment() {
    if (enrichmentCase_ == 3) {
      return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
    }
    return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Map to be added to the album.
   * </pre>
   *
   * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
   */
  @java.lang.Override
  public com.google.photos.library.v1.proto.MapEnrichmentOrBuilder getMapEnrichmentOrBuilder() {
    if (enrichmentCase_ == 3) {
      return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
    }
    return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (enrichmentCase_ == 1) {
      output.writeMessage(1, (com.google.photos.library.v1.proto.TextEnrichment) enrichment_);
    }
    if (enrichmentCase_ == 2) {
      output.writeMessage(2, (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_);
    }
    if (enrichmentCase_ == 3) {
      output.writeMessage(3, (com.google.photos.library.v1.proto.MapEnrichment) enrichment_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (enrichmentCase_ == 1) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              1, (com.google.photos.library.v1.proto.TextEnrichment) enrichment_);
    }
    if (enrichmentCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_);
    }
    if (enrichmentCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.photos.library.v1.proto.MapEnrichment) enrichment_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.photos.library.v1.proto.NewEnrichmentItem)) {
      return super.equals(obj);
    }
    com.google.photos.library.v1.proto.NewEnrichmentItem other =
        (com.google.photos.library.v1.proto.NewEnrichmentItem) obj;

    if (!getEnrichmentCase().equals(other.getEnrichmentCase())) return false;
    switch (enrichmentCase_) {
      case 1:
        if (!getTextEnrichment().equals(other.getTextEnrichment())) return false;
        break;
      case 2:
        if (!getLocationEnrichment().equals(other.getLocationEnrichment())) return false;
        break;
      case 3:
        if (!getMapEnrichment().equals(other.getMapEnrichment())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (enrichmentCase_) {
      case 1:
        hash = (37 * hash) + TEXT_ENRICHMENT_FIELD_NUMBER;
        hash = (53 * hash) + getTextEnrichment().hashCode();
        break;
      case 2:
        hash = (37 * hash) + LOCATION_ENRICHMENT_FIELD_NUMBER;
        hash = (53 * hash) + getLocationEnrichment().hashCode();
        break;
      case 3:
        hash = (37 * hash) + MAP_ENRICHMENT_FIELD_NUMBER;
        hash = (53 * hash) + getMapEnrichment().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.photos.library.v1.proto.NewEnrichmentItem parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.photos.library.v1.proto.NewEnrichmentItem parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.photos.library.v1.proto.NewEnrichmentItem parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

  public static com.google.photos.library.v1.proto.NewEnrichmentItem 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.photos.library.v1.proto.NewEnrichmentItem 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>
   * A new enrichment item to be added to an album, used by the
   * `albums.addEnrichment` call.
   * </pre>
   *
   * Protobuf type {@code google.photos.library.v1.NewEnrichmentItem}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.photos.library.v1.NewEnrichmentItem)
      com.google.photos.library.v1.proto.NewEnrichmentItemOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.photos.library.v1.proto.LibraryServiceProto
          .internal_static_google_photos_library_v1_NewEnrichmentItem_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.photos.library.v1.proto.LibraryServiceProto
          .internal_static_google_photos_library_v1_NewEnrichmentItem_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.photos.library.v1.proto.NewEnrichmentItem.class,
              com.google.photos.library.v1.proto.NewEnrichmentItem.Builder.class);
    }

    // Construct using com.google.photos.library.v1.proto.NewEnrichmentItem.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (textEnrichmentBuilder_ != null) {
        textEnrichmentBuilder_.clear();
      }
      if (locationEnrichmentBuilder_ != null) {
        locationEnrichmentBuilder_.clear();
      }
      if (mapEnrichmentBuilder_ != null) {
        mapEnrichmentBuilder_.clear();
      }
      enrichmentCase_ = 0;
      enrichment_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.photos.library.v1.proto.LibraryServiceProto
          .internal_static_google_photos_library_v1_NewEnrichmentItem_descriptor;
    }

    @java.lang.Override
    public com.google.photos.library.v1.proto.NewEnrichmentItem getDefaultInstanceForType() {
      return com.google.photos.library.v1.proto.NewEnrichmentItem.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.photos.library.v1.proto.NewEnrichmentItem buildPartial() {
      com.google.photos.library.v1.proto.NewEnrichmentItem result =
          new com.google.photos.library.v1.proto.NewEnrichmentItem(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.photos.library.v1.proto.NewEnrichmentItem result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(com.google.photos.library.v1.proto.NewEnrichmentItem result) {
      result.enrichmentCase_ = enrichmentCase_;
      result.enrichment_ = this.enrichment_;
      if (enrichmentCase_ == 1 && textEnrichmentBuilder_ != null) {
        result.enrichment_ = textEnrichmentBuilder_.build();
      }
      if (enrichmentCase_ == 2 && locationEnrichmentBuilder_ != null) {
        result.enrichment_ = locationEnrichmentBuilder_.build();
      }
      if (enrichmentCase_ == 3 && mapEnrichmentBuilder_ != null) {
        result.enrichment_ = mapEnrichmentBuilder_.build();
      }
    }

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

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

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

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

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

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

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

    public Builder mergeFrom(com.google.photos.library.v1.proto.NewEnrichmentItem other) {
      if (other == com.google.photos.library.v1.proto.NewEnrichmentItem.getDefaultInstance())
        return this;
      switch (other.getEnrichmentCase()) {
        case TEXT_ENRICHMENT:
          {
            mergeTextEnrichment(other.getTextEnrichment());
            break;
          }
        case LOCATION_ENRICHMENT:
          {
            mergeLocationEnrichment(other.getLocationEnrichment());
            break;
          }
        case MAP_ENRICHMENT:
          {
            mergeMapEnrichment(other.getMapEnrichment());
            break;
          }
        case ENRICHMENT_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                input.readMessage(getTextEnrichmentFieldBuilder().getBuilder(), extensionRegistry);
                enrichmentCase_ = 1;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(
                    getLocationEnrichmentFieldBuilder().getBuilder(), extensionRegistry);
                enrichmentCase_ = 2;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getMapEnrichmentFieldBuilder().getBuilder(), extensionRegistry);
                enrichmentCase_ = 3;
                break;
              } // case 26
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int enrichmentCase_ = 0;
    private java.lang.Object enrichment_;

    public EnrichmentCase getEnrichmentCase() {
      return EnrichmentCase.forNumber(enrichmentCase_);
    }

    public Builder clearEnrichment() {
      enrichmentCase_ = 0;
      enrichment_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.photos.library.v1.proto.TextEnrichment,
            com.google.photos.library.v1.proto.TextEnrichment.Builder,
            com.google.photos.library.v1.proto.TextEnrichmentOrBuilder>
        textEnrichmentBuilder_;
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     *
     * @return Whether the textEnrichment field is set.
     */
    @java.lang.Override
    public boolean hasTextEnrichment() {
      return enrichmentCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     *
     * @return The textEnrichment.
     */
    @java.lang.Override
    public com.google.photos.library.v1.proto.TextEnrichment getTextEnrichment() {
      if (textEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 1) {
          return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
        }
        return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
      } else {
        if (enrichmentCase_ == 1) {
          return textEnrichmentBuilder_.getMessage();
        }
        return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    public Builder setTextEnrichment(com.google.photos.library.v1.proto.TextEnrichment value) {
      if (textEnrichmentBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        enrichment_ = value;
        onChanged();
      } else {
        textEnrichmentBuilder_.setMessage(value);
      }
      enrichmentCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    public Builder setTextEnrichment(
        com.google.photos.library.v1.proto.TextEnrichment.Builder builderForValue) {
      if (textEnrichmentBuilder_ == null) {
        enrichment_ = builderForValue.build();
        onChanged();
      } else {
        textEnrichmentBuilder_.setMessage(builderForValue.build());
      }
      enrichmentCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    public Builder mergeTextEnrichment(com.google.photos.library.v1.proto.TextEnrichment value) {
      if (textEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 1
            && enrichment_
                != com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance()) {
          enrichment_ =
              com.google.photos.library.v1.proto.TextEnrichment.newBuilder(
                      (com.google.photos.library.v1.proto.TextEnrichment) enrichment_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          enrichment_ = value;
        }
        onChanged();
      } else {
        if (enrichmentCase_ == 1) {
          textEnrichmentBuilder_.mergeFrom(value);
        } else {
          textEnrichmentBuilder_.setMessage(value);
        }
      }
      enrichmentCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    public Builder clearTextEnrichment() {
      if (textEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 1) {
          enrichmentCase_ = 0;
          enrichment_ = null;
          onChanged();
        }
      } else {
        if (enrichmentCase_ == 1) {
          enrichmentCase_ = 0;
          enrichment_ = null;
        }
        textEnrichmentBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    public com.google.photos.library.v1.proto.TextEnrichment.Builder getTextEnrichmentBuilder() {
      return getTextEnrichmentFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    @java.lang.Override
    public com.google.photos.library.v1.proto.TextEnrichmentOrBuilder getTextEnrichmentOrBuilder() {
      if ((enrichmentCase_ == 1) && (textEnrichmentBuilder_ != null)) {
        return textEnrichmentBuilder_.getMessageOrBuilder();
      } else {
        if (enrichmentCase_ == 1) {
          return (com.google.photos.library.v1.proto.TextEnrichment) enrichment_;
        }
        return com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Text to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.TextEnrichment text_enrichment = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.photos.library.v1.proto.TextEnrichment,
            com.google.photos.library.v1.proto.TextEnrichment.Builder,
            com.google.photos.library.v1.proto.TextEnrichmentOrBuilder>
        getTextEnrichmentFieldBuilder() {
      if (textEnrichmentBuilder_ == null) {
        if (!(enrichmentCase_ == 1)) {
          enrichment_ = com.google.photos.library.v1.proto.TextEnrichment.getDefaultInstance();
        }
        textEnrichmentBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.photos.library.v1.proto.TextEnrichment,
                com.google.photos.library.v1.proto.TextEnrichment.Builder,
                com.google.photos.library.v1.proto.TextEnrichmentOrBuilder>(
                (com.google.photos.library.v1.proto.TextEnrichment) enrichment_,
                getParentForChildren(),
                isClean());
        enrichment_ = null;
      }
      enrichmentCase_ = 1;
      onChanged();
      return textEnrichmentBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.photos.library.v1.proto.LocationEnrichment,
            com.google.photos.library.v1.proto.LocationEnrichment.Builder,
            com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder>
        locationEnrichmentBuilder_;
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     *
     * @return Whether the locationEnrichment field is set.
     */
    @java.lang.Override
    public boolean hasLocationEnrichment() {
      return enrichmentCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     *
     * @return The locationEnrichment.
     */
    @java.lang.Override
    public com.google.photos.library.v1.proto.LocationEnrichment getLocationEnrichment() {
      if (locationEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 2) {
          return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
        }
        return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
      } else {
        if (enrichmentCase_ == 2) {
          return locationEnrichmentBuilder_.getMessage();
        }
        return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    public Builder setLocationEnrichment(
        com.google.photos.library.v1.proto.LocationEnrichment value) {
      if (locationEnrichmentBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        enrichment_ = value;
        onChanged();
      } else {
        locationEnrichmentBuilder_.setMessage(value);
      }
      enrichmentCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    public Builder setLocationEnrichment(
        com.google.photos.library.v1.proto.LocationEnrichment.Builder builderForValue) {
      if (locationEnrichmentBuilder_ == null) {
        enrichment_ = builderForValue.build();
        onChanged();
      } else {
        locationEnrichmentBuilder_.setMessage(builderForValue.build());
      }
      enrichmentCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    public Builder mergeLocationEnrichment(
        com.google.photos.library.v1.proto.LocationEnrichment value) {
      if (locationEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 2
            && enrichment_
                != com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance()) {
          enrichment_ =
              com.google.photos.library.v1.proto.LocationEnrichment.newBuilder(
                      (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          enrichment_ = value;
        }
        onChanged();
      } else {
        if (enrichmentCase_ == 2) {
          locationEnrichmentBuilder_.mergeFrom(value);
        } else {
          locationEnrichmentBuilder_.setMessage(value);
        }
      }
      enrichmentCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    public Builder clearLocationEnrichment() {
      if (locationEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 2) {
          enrichmentCase_ = 0;
          enrichment_ = null;
          onChanged();
        }
      } else {
        if (enrichmentCase_ == 2) {
          enrichmentCase_ = 0;
          enrichment_ = null;
        }
        locationEnrichmentBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    public com.google.photos.library.v1.proto.LocationEnrichment.Builder
        getLocationEnrichmentBuilder() {
      return getLocationEnrichmentFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    @java.lang.Override
    public com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder
        getLocationEnrichmentOrBuilder() {
      if ((enrichmentCase_ == 2) && (locationEnrichmentBuilder_ != null)) {
        return locationEnrichmentBuilder_.getMessageOrBuilder();
      } else {
        if (enrichmentCase_ == 2) {
          return (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_;
        }
        return com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Location to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.LocationEnrichment location_enrichment = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.photos.library.v1.proto.LocationEnrichment,
            com.google.photos.library.v1.proto.LocationEnrichment.Builder,
            com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder>
        getLocationEnrichmentFieldBuilder() {
      if (locationEnrichmentBuilder_ == null) {
        if (!(enrichmentCase_ == 2)) {
          enrichment_ = com.google.photos.library.v1.proto.LocationEnrichment.getDefaultInstance();
        }
        locationEnrichmentBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.photos.library.v1.proto.LocationEnrichment,
                com.google.photos.library.v1.proto.LocationEnrichment.Builder,
                com.google.photos.library.v1.proto.LocationEnrichmentOrBuilder>(
                (com.google.photos.library.v1.proto.LocationEnrichment) enrichment_,
                getParentForChildren(),
                isClean());
        enrichment_ = null;
      }
      enrichmentCase_ = 2;
      onChanged();
      return locationEnrichmentBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.photos.library.v1.proto.MapEnrichment,
            com.google.photos.library.v1.proto.MapEnrichment.Builder,
            com.google.photos.library.v1.proto.MapEnrichmentOrBuilder>
        mapEnrichmentBuilder_;
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     *
     * @return Whether the mapEnrichment field is set.
     */
    @java.lang.Override
    public boolean hasMapEnrichment() {
      return enrichmentCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     *
     * @return The mapEnrichment.
     */
    @java.lang.Override
    public com.google.photos.library.v1.proto.MapEnrichment getMapEnrichment() {
      if (mapEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 3) {
          return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
        }
        return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
      } else {
        if (enrichmentCase_ == 3) {
          return mapEnrichmentBuilder_.getMessage();
        }
        return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    public Builder setMapEnrichment(com.google.photos.library.v1.proto.MapEnrichment value) {
      if (mapEnrichmentBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        enrichment_ = value;
        onChanged();
      } else {
        mapEnrichmentBuilder_.setMessage(value);
      }
      enrichmentCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    public Builder setMapEnrichment(
        com.google.photos.library.v1.proto.MapEnrichment.Builder builderForValue) {
      if (mapEnrichmentBuilder_ == null) {
        enrichment_ = builderForValue.build();
        onChanged();
      } else {
        mapEnrichmentBuilder_.setMessage(builderForValue.build());
      }
      enrichmentCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    public Builder mergeMapEnrichment(com.google.photos.library.v1.proto.MapEnrichment value) {
      if (mapEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 3
            && enrichment_
                != com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance()) {
          enrichment_ =
              com.google.photos.library.v1.proto.MapEnrichment.newBuilder(
                      (com.google.photos.library.v1.proto.MapEnrichment) enrichment_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          enrichment_ = value;
        }
        onChanged();
      } else {
        if (enrichmentCase_ == 3) {
          mapEnrichmentBuilder_.mergeFrom(value);
        } else {
          mapEnrichmentBuilder_.setMessage(value);
        }
      }
      enrichmentCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    public Builder clearMapEnrichment() {
      if (mapEnrichmentBuilder_ == null) {
        if (enrichmentCase_ == 3) {
          enrichmentCase_ = 0;
          enrichment_ = null;
          onChanged();
        }
      } else {
        if (enrichmentCase_ == 3) {
          enrichmentCase_ = 0;
          enrichment_ = null;
        }
        mapEnrichmentBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    public com.google.photos.library.v1.proto.MapEnrichment.Builder getMapEnrichmentBuilder() {
      return getMapEnrichmentFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    @java.lang.Override
    public com.google.photos.library.v1.proto.MapEnrichmentOrBuilder getMapEnrichmentOrBuilder() {
      if ((enrichmentCase_ == 3) && (mapEnrichmentBuilder_ != null)) {
        return mapEnrichmentBuilder_.getMessageOrBuilder();
      } else {
        if (enrichmentCase_ == 3) {
          return (com.google.photos.library.v1.proto.MapEnrichment) enrichment_;
        }
        return com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Map to be added to the album.
     * </pre>
     *
     * <code>.google.photos.library.v1.MapEnrichment map_enrichment = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.photos.library.v1.proto.MapEnrichment,
            com.google.photos.library.v1.proto.MapEnrichment.Builder,
            com.google.photos.library.v1.proto.MapEnrichmentOrBuilder>
        getMapEnrichmentFieldBuilder() {
      if (mapEnrichmentBuilder_ == null) {
        if (!(enrichmentCase_ == 3)) {
          enrichment_ = com.google.photos.library.v1.proto.MapEnrichment.getDefaultInstance();
        }
        mapEnrichmentBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.photos.library.v1.proto.MapEnrichment,
                com.google.photos.library.v1.proto.MapEnrichment.Builder,
                com.google.photos.library.v1.proto.MapEnrichmentOrBuilder>(
                (com.google.photos.library.v1.proto.MapEnrichment) enrichment_,
                getParentForChildren(),
                isClean());
        enrichment_ = null;
      }
      enrichmentCase_ = 3;
      onChanged();
      return mapEnrichmentBuilder_;
    }

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

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

    // @@protoc_insertion_point(builder_scope:google.photos.library.v1.NewEnrichmentItem)
  }

  // @@protoc_insertion_point(class_scope:google.photos.library.v1.NewEnrichmentItem)
  private static final com.google.photos.library.v1.proto.NewEnrichmentItem DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.photos.library.v1.proto.NewEnrichmentItem();
  }

  public static com.google.photos.library.v1.proto.NewEnrichmentItem getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<NewEnrichmentItem> PARSER =
      new com.google.protobuf.AbstractParser<NewEnrichmentItem>() {
        @java.lang.Override
        public NewEnrichmentItem parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

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

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

  @java.lang.Override
  public com.google.photos.library.v1.proto.NewEnrichmentItem getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
