/*
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: schema/google/showcase/v1beta1/messaging.proto

package com.google.showcase.v1beta1;

/**
 *
 *
 * <pre>
 * This protocol buffer message represents a blurb sent to a chat room or
 * posted on a user profile.
 * </pre>
 *
 * Protobuf type {@code google.showcase.v1beta1.Blurb}
 */
public final class Blurb extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.showcase.v1beta1.Blurb)
    BlurbOrBuilder {
  private static final long serialVersionUID = 0L;

  // Use Blurb.newBuilder() to construct.
  private Blurb(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Blurb() {
    name_ = "";
    user_ = "";
  }

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

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

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

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

              user_ = s;
              break;
            }
          case 26:
            {
              java.lang.String s = input.readStringRequireUtf8();
              contentCase_ = 3;
              content_ = s;
              break;
            }
          case 34:
            {
              content_ = input.readBytes();
              contentCase_ = 4;
              break;
            }
          case 42:
            {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (createTime_ != null) {
                subBuilder = createTime_.toBuilder();
              }
              createTime_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(createTime_);
                createTime_ = subBuilder.buildPartial();
              }

              break;
            }
          case 50:
            {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (updateTime_ != null) {
                subBuilder = updateTime_.toBuilder();
              }
              updateTime_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(updateTime_);
                updateTime_ = subBuilder.buildPartial();
              }

              break;
            }
          case 58:
            {
              java.lang.String s = input.readStringRequireUtf8();
              legacyIdCase_ = 7;
              legacyId_ = s;
              break;
            }
          case 66:
            {
              java.lang.String s = input.readStringRequireUtf8();
              legacyIdCase_ = 8;
              legacyId_ = s;
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().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.showcase.v1beta1.MessagingOuterClass
        .internal_static_google_showcase_v1beta1_Blurb_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.showcase.v1beta1.MessagingOuterClass
        .internal_static_google_showcase_v1beta1_Blurb_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.showcase.v1beta1.Blurb.class,
            com.google.showcase.v1beta1.Blurb.Builder.class);
  }

  private int contentCase_ = 0;
  private java.lang.Object content_;

  public enum ContentCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    TEXT(3),
    IMAGE(4),
    CONTENT_NOT_SET(0);
    private final int value;

    private ContentCase(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 ContentCase valueOf(int value) {
      return forNumber(value);
    }

    public static ContentCase forNumber(int value) {
      switch (value) {
        case 3:
          return TEXT;
        case 4:
          return IMAGE;
        case 0:
          return CONTENT_NOT_SET;
        default:
          return null;
      }
    }

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

  public ContentCase getContentCase() {
    return ContentCase.forNumber(contentCase_);
  }

  private int legacyIdCase_ = 0;
  private java.lang.Object legacyId_;

  public enum LegacyIdCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    LEGACY_ROOM_ID(7),
    LEGACY_USER_ID(8),
    LEGACYID_NOT_SET(0);
    private final int value;

    private LegacyIdCase(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 LegacyIdCase valueOf(int value) {
      return forNumber(value);
    }

    public static LegacyIdCase forNumber(int value) {
      switch (value) {
        case 7:
          return LEGACY_ROOM_ID;
        case 8:
          return LEGACY_USER_ID;
        case 0:
          return LEGACYID_NOT_SET;
        default:
          return null;
      }
    }

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

  public LegacyIdCase getLegacyIdCase() {
    return LegacyIdCase.forNumber(legacyIdCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;

  /**
   *
   *
   * <pre>
   * The resource name of the chat room.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The resource name of the chat room.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int USER_FIELD_NUMBER = 2;
  private volatile java.lang.Object user_;

  /**
   *
   *
   * <pre>
   * The resource name of the blurb's author.
   * </pre>
   *
   * <code>
   * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The user.
   */
  @java.lang.Override
  public java.lang.String getUser() {
    java.lang.Object ref = user_;
    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();
      user_ = s;
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The resource name of the blurb's author.
   * </pre>
   *
   * <code>
   * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   * </code>
   *
   * @return The bytes for user.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUserBytes() {
    java.lang.Object ref = user_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      user_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TEXT_FIELD_NUMBER = 3;

  /**
   *
   *
   * <pre>
   * The textual content of this blurb.
   * </pre>
   *
   * <code>string text = 3;</code>
   *
   * @return Whether the text field is set.
   */
  public boolean hasText() {
    return contentCase_ == 3;
  }

  /**
   *
   *
   * <pre>
   * The textual content of this blurb.
   * </pre>
   *
   * <code>string text = 3;</code>
   *
   * @return The text.
   */
  public java.lang.String getText() {
    java.lang.Object ref = "";
    if (contentCase_ == 3) {
      ref = content_;
    }
    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();
      if (contentCase_ == 3) {
        content_ = s;
      }
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The textual content of this blurb.
   * </pre>
   *
   * <code>string text = 3;</code>
   *
   * @return The bytes for text.
   */
  public com.google.protobuf.ByteString getTextBytes() {
    java.lang.Object ref = "";
    if (contentCase_ == 3) {
      ref = content_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (contentCase_ == 3) {
        content_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IMAGE_FIELD_NUMBER = 4;

  /**
   *
   *
   * <pre>
   * The image content of this blurb.
   * </pre>
   *
   * <code>bytes image = 4;</code>
   *
   * @return Whether the image field is set.
   */
  @java.lang.Override
  public boolean hasImage() {
    return contentCase_ == 4;
  }

  /**
   *
   *
   * <pre>
   * The image content of this blurb.
   * </pre>
   *
   * <code>bytes image = 4;</code>
   *
   * @return The image.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getImage() {
    if (contentCase_ == 4) {
      return (com.google.protobuf.ByteString) content_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp createTime_;

  /**
   *
   *
   * <pre>
   * The timestamp at which the blurb was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }

  /**
   *
   *
   * <pre>
   * The timestamp at which the blurb was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }

  /**
   *
   *
   * <pre>
   * The timestamp at which the blurb was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return getCreateTime();
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp updateTime_;

  /**
   *
   *
   * <pre>
   * The latest timestamp at which the blurb was updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }

  /**
   *
   *
   * <pre>
   * The latest timestamp at which the blurb was updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  /**
   *
   *
   * <pre>
   * The latest timestamp at which the blurb was updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return getUpdateTime();
  }

  public static final int LEGACY_ROOM_ID_FIELD_NUMBER = 7;

  /**
   *
   *
   * <pre>
   * The legacy id of the room. This field is used to signal
   * the use of the compound resource pattern
   * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
   * </pre>
   *
   * <code>string legacy_room_id = 7;</code>
   *
   * @return Whether the legacyRoomId field is set.
   */
  public boolean hasLegacyRoomId() {
    return legacyIdCase_ == 7;
  }

  /**
   *
   *
   * <pre>
   * The legacy id of the room. This field is used to signal
   * the use of the compound resource pattern
   * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
   * </pre>
   *
   * <code>string legacy_room_id = 7;</code>
   *
   * @return The legacyRoomId.
   */
  public java.lang.String getLegacyRoomId() {
    java.lang.Object ref = "";
    if (legacyIdCase_ == 7) {
      ref = legacyId_;
    }
    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();
      if (legacyIdCase_ == 7) {
        legacyId_ = s;
      }
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The legacy id of the room. This field is used to signal
   * the use of the compound resource pattern
   * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
   * </pre>
   *
   * <code>string legacy_room_id = 7;</code>
   *
   * @return The bytes for legacyRoomId.
   */
  public com.google.protobuf.ByteString getLegacyRoomIdBytes() {
    java.lang.Object ref = "";
    if (legacyIdCase_ == 7) {
      ref = legacyId_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (legacyIdCase_ == 7) {
        legacyId_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LEGACY_USER_ID_FIELD_NUMBER = 8;

  /**
   *
   *
   * <pre>
   * The legacy id of the user. This field is used to signal
   * the use of the compound resource pattern
   * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
   * </pre>
   *
   * <code>string legacy_user_id = 8;</code>
   *
   * @return Whether the legacyUserId field is set.
   */
  public boolean hasLegacyUserId() {
    return legacyIdCase_ == 8;
  }

  /**
   *
   *
   * <pre>
   * The legacy id of the user. This field is used to signal
   * the use of the compound resource pattern
   * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
   * </pre>
   *
   * <code>string legacy_user_id = 8;</code>
   *
   * @return The legacyUserId.
   */
  public java.lang.String getLegacyUserId() {
    java.lang.Object ref = "";
    if (legacyIdCase_ == 8) {
      ref = legacyId_;
    }
    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();
      if (legacyIdCase_ == 8) {
        legacyId_ = s;
      }
      return s;
    }
  }

  /**
   *
   *
   * <pre>
   * The legacy id of the user. This field is used to signal
   * the use of the compound resource pattern
   * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
   * </pre>
   *
   * <code>string legacy_user_id = 8;</code>
   *
   * @return The bytes for legacyUserId.
   */
  public com.google.protobuf.ByteString getLegacyUserIdBytes() {
    java.lang.Object ref = "";
    if (legacyIdCase_ == 8) {
      ref = legacyId_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (legacyIdCase_ == 8) {
        legacyId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(user_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, user_);
    }
    if (contentCase_ == 3) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_);
    }
    if (contentCase_ == 4) {
      output.writeBytes(4, (com.google.protobuf.ByteString) content_);
    }
    if (createTime_ != null) {
      output.writeMessage(5, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(6, getUpdateTime());
    }
    if (legacyIdCase_ == 7) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, legacyId_);
    }
    if (legacyIdCase_ == 8) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, legacyId_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(user_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, user_);
    }
    if (contentCase_ == 3) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_);
    }
    if (contentCase_ == 4) {
      size +=
          com.google.protobuf.CodedOutputStream.computeBytesSize(
              4, (com.google.protobuf.ByteString) content_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime());
    }
    if (legacyIdCase_ == 7) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, legacyId_);
    }
    if (legacyIdCase_ == 8) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, legacyId_);
    }
    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.showcase.v1beta1.Blurb)) {
      return super.equals(obj);
    }
    com.google.showcase.v1beta1.Blurb other = (com.google.showcase.v1beta1.Blurb) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getUser().equals(other.getUser())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (!getContentCase().equals(other.getContentCase())) return false;
    switch (contentCase_) {
      case 3:
        if (!getText().equals(other.getText())) return false;
        break;
      case 4:
        if (!getImage().equals(other.getImage())) return false;
        break;
      case 0:
      default:
    }
    if (!getLegacyIdCase().equals(other.getLegacyIdCase())) return false;
    switch (legacyIdCase_) {
      case 7:
        if (!getLegacyRoomId().equals(other.getLegacyRoomId())) return false;
        break;
      case 8:
        if (!getLegacyUserId().equals(other.getLegacyUserId())) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + USER_FIELD_NUMBER;
    hash = (53 * hash) + getUser().hashCode();
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    switch (contentCase_) {
      case 3:
        hash = (37 * hash) + TEXT_FIELD_NUMBER;
        hash = (53 * hash) + getText().hashCode();
        break;
      case 4:
        hash = (37 * hash) + IMAGE_FIELD_NUMBER;
        hash = (53 * hash) + getImage().hashCode();
        break;
      case 0:
      default:
    }
    switch (legacyIdCase_) {
      case 7:
        hash = (37 * hash) + LEGACY_ROOM_ID_FIELD_NUMBER;
        hash = (53 * hash) + getLegacyRoomId().hashCode();
        break;
      case 8:
        hash = (37 * hash) + LEGACY_USER_ID_FIELD_NUMBER;
        hash = (53 * hash) + getLegacyUserId().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.showcase.v1beta1.Blurb parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.showcase.v1beta1.Blurb parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.showcase.v1beta1.Blurb parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.showcase.v1beta1.Blurb parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.showcase.v1beta1.Blurb parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.showcase.v1beta1.Blurb 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.showcase.v1beta1.Blurb 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>
   * This protocol buffer message represents a blurb sent to a chat room or
   * posted on a user profile.
   * </pre>
   *
   * Protobuf type {@code google.showcase.v1beta1.Blurb}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.showcase.v1beta1.Blurb)
      com.google.showcase.v1beta1.BlurbOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.showcase.v1beta1.MessagingOuterClass
          .internal_static_google_showcase_v1beta1_Blurb_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.showcase.v1beta1.MessagingOuterClass
          .internal_static_google_showcase_v1beta1_Blurb_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.showcase.v1beta1.Blurb.class,
              com.google.showcase.v1beta1.Blurb.Builder.class);
    }

    // Construct using com.google.showcase.v1beta1.Blurb.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();
      name_ = "";

      user_ = "";

      if (createTimeBuilder_ == null) {
        createTime_ = null;
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }
      contentCase_ = 0;
      content_ = null;
      legacyIdCase_ = 0;
      legacyId_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.showcase.v1beta1.MessagingOuterClass
          .internal_static_google_showcase_v1beta1_Blurb_descriptor;
    }

    @java.lang.Override
    public com.google.showcase.v1beta1.Blurb getDefaultInstanceForType() {
      return com.google.showcase.v1beta1.Blurb.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.showcase.v1beta1.Blurb build() {
      com.google.showcase.v1beta1.Blurb result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.showcase.v1beta1.Blurb buildPartial() {
      com.google.showcase.v1beta1.Blurb result = new com.google.showcase.v1beta1.Blurb(this);
      result.name_ = name_;
      result.user_ = user_;
      if (contentCase_ == 3) {
        result.content_ = content_;
      }
      if (contentCase_ == 4) {
        result.content_ = content_;
      }
      if (createTimeBuilder_ == null) {
        result.createTime_ = createTime_;
      } else {
        result.createTime_ = createTimeBuilder_.build();
      }
      if (updateTimeBuilder_ == null) {
        result.updateTime_ = updateTime_;
      } else {
        result.updateTime_ = updateTimeBuilder_.build();
      }
      if (legacyIdCase_ == 7) {
        result.legacyId_ = legacyId_;
      }
      if (legacyIdCase_ == 8) {
        result.legacyId_ = legacyId_;
      }
      result.contentCase_ = contentCase_;
      result.legacyIdCase_ = legacyIdCase_;
      onBuilt();
      return result;
    }

    @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.showcase.v1beta1.Blurb) {
        return mergeFrom((com.google.showcase.v1beta1.Blurb) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.showcase.v1beta1.Blurb other) {
      if (other == com.google.showcase.v1beta1.Blurb.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getUser().isEmpty()) {
        user_ = other.user_;
        onChanged();
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      switch (other.getContentCase()) {
        case TEXT:
          {
            contentCase_ = 3;
            content_ = other.content_;
            onChanged();
            break;
          }
        case IMAGE:
          {
            setImage(other.getImage());
            break;
          }
        case CONTENT_NOT_SET:
          {
            break;
          }
      }
      switch (other.getLegacyIdCase()) {
        case LEGACY_ROOM_ID:
          {
            legacyIdCase_ = 7;
            legacyId_ = other.legacyId_;
            onChanged();
            break;
          }
        case LEGACY_USER_ID:
          {
            legacyIdCase_ = 8;
            legacyId_ = other.legacyId_;
            onChanged();
            break;
          }
        case LEGACYID_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private int contentCase_ = 0;
    private java.lang.Object content_;

    public ContentCase getContentCase() {
      return ContentCase.forNumber(contentCase_);
    }

    public Builder clearContent() {
      contentCase_ = 0;
      content_ = null;
      onChanged();
      return this;
    }

    private int legacyIdCase_ = 0;
    private java.lang.Object legacyId_;

    public LegacyIdCase getLegacyIdCase() {
      return LegacyIdCase.forNumber(legacyIdCase_);
    }

    public Builder clearLegacyId() {
      legacyIdCase_ = 0;
      legacyId_ = null;
      onChanged();
      return this;
    }

    private java.lang.Object name_ = "";

    /**
     *
     *
     * <pre>
     * The resource name of the chat room.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The resource name of the chat room.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The resource name of the chat room.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

    /**
     *
     *
     * <pre>
     * The resource name of the chat room.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The resource name of the chat room.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object user_ = "";

    /**
     *
     *
     * <pre>
     * The resource name of the blurb's author.
     * </pre>
     *
     * <code>
     * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The user.
     */
    public java.lang.String getUser() {
      java.lang.Object ref = user_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        user_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The resource name of the blurb's author.
     * </pre>
     *
     * <code>
     * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return The bytes for user.
     */
    public com.google.protobuf.ByteString getUserBytes() {
      java.lang.Object ref = user_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        user_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The resource name of the blurb's author.
     * </pre>
     *
     * <code>
     * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The user to set.
     * @return This builder for chaining.
     */
    public Builder setUser(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

    /**
     *
     *
     * <pre>
     * The resource name of the blurb's author.
     * </pre>
     *
     * <code>
     * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUser() {

      user_ = getDefaultInstance().getUser();
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The resource name of the blurb's author.
     * </pre>
     *
     * <code>
     * string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
     * </code>
     *
     * @param value The bytes for user to set.
     * @return This builder for chaining.
     */
    public Builder setUserBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    /**
     *
     *
     * <pre>
     * The textual content of this blurb.
     * </pre>
     *
     * <code>string text = 3;</code>
     *
     * @return Whether the text field is set.
     */
    @java.lang.Override
    public boolean hasText() {
      return contentCase_ == 3;
    }

    /**
     *
     *
     * <pre>
     * The textual content of this blurb.
     * </pre>
     *
     * <code>string text = 3;</code>
     *
     * @return The text.
     */
    @java.lang.Override
    public java.lang.String getText() {
      java.lang.Object ref = "";
      if (contentCase_ == 3) {
        ref = content_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (contentCase_ == 3) {
          content_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The textual content of this blurb.
     * </pre>
     *
     * <code>string text = 3;</code>
     *
     * @return The bytes for text.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTextBytes() {
      java.lang.Object ref = "";
      if (contentCase_ == 3) {
        ref = content_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (contentCase_ == 3) {
          content_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The textual content of this blurb.
     * </pre>
     *
     * <code>string text = 3;</code>
     *
     * @param value The text to set.
     * @return This builder for chaining.
     */
    public Builder setText(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      contentCase_ = 3;
      content_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The textual content of this blurb.
     * </pre>
     *
     * <code>string text = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearText() {
      if (contentCase_ == 3) {
        contentCase_ = 0;
        content_ = null;
        onChanged();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The textual content of this blurb.
     * </pre>
     *
     * <code>string text = 3;</code>
     *
     * @param value The bytes for text to set.
     * @return This builder for chaining.
     */
    public Builder setTextBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      contentCase_ = 3;
      content_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The image content of this blurb.
     * </pre>
     *
     * <code>bytes image = 4;</code>
     *
     * @return Whether the image field is set.
     */
    public boolean hasImage() {
      return contentCase_ == 4;
    }

    /**
     *
     *
     * <pre>
     * The image content of this blurb.
     * </pre>
     *
     * <code>bytes image = 4;</code>
     *
     * @return The image.
     */
    public com.google.protobuf.ByteString getImage() {
      if (contentCase_ == 4) {
        return (com.google.protobuf.ByteString) content_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }

    /**
     *
     *
     * <pre>
     * The image content of this blurb.
     * </pre>
     *
     * <code>bytes image = 4;</code>
     *
     * @param value The image to set.
     * @return This builder for chaining.
     */
    public Builder setImage(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      contentCase_ = 4;
      content_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The image content of this blurb.
     * </pre>
     *
     * <code>bytes image = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearImage() {
      if (contentCase_ == 4) {
        contentCase_ = 0;
        content_ = null;
        onChanged();
      }
      return this;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return createTimeBuilder_ != null || createTime_ != null;
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
        onChanged();
      } else {
        createTimeBuilder_.setMessage(value);
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
        onChanged();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (createTime_ != null) {
          createTime_ =
              com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
        } else {
          createTime_ = value;
        }
        onChanged();
      } else {
        createTimeBuilder_.mergeFrom(value);
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      if (createTimeBuilder_ == null) {
        createTime_ = null;
        onChanged();
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {

      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }

    /**
     *
     *
     * <pre>
     * The timestamp at which the blurb was created.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return updateTimeBuilder_ != null || updateTime_ != null;
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(value);
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (updateTime_ != null) {
          updateTime_ =
              com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
        } else {
          updateTime_ = value;
        }
        onChanged();
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearUpdateTime() {
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
        onChanged();
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }

      return this;
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {

      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }

    /**
     *
     *
     * <pre>
     * The latest timestamp at which the blurb was updated.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the room. This field is used to signal
     * the use of the compound resource pattern
     * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
     * </pre>
     *
     * <code>string legacy_room_id = 7;</code>
     *
     * @return Whether the legacyRoomId field is set.
     */
    @java.lang.Override
    public boolean hasLegacyRoomId() {
      return legacyIdCase_ == 7;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the room. This field is used to signal
     * the use of the compound resource pattern
     * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
     * </pre>
     *
     * <code>string legacy_room_id = 7;</code>
     *
     * @return The legacyRoomId.
     */
    @java.lang.Override
    public java.lang.String getLegacyRoomId() {
      java.lang.Object ref = "";
      if (legacyIdCase_ == 7) {
        ref = legacyId_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (legacyIdCase_ == 7) {
          legacyId_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the room. This field is used to signal
     * the use of the compound resource pattern
     * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
     * </pre>
     *
     * <code>string legacy_room_id = 7;</code>
     *
     * @return The bytes for legacyRoomId.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getLegacyRoomIdBytes() {
      java.lang.Object ref = "";
      if (legacyIdCase_ == 7) {
        ref = legacyId_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (legacyIdCase_ == 7) {
          legacyId_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the room. This field is used to signal
     * the use of the compound resource pattern
     * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
     * </pre>
     *
     * <code>string legacy_room_id = 7;</code>
     *
     * @param value The legacyRoomId to set.
     * @return This builder for chaining.
     */
    public Builder setLegacyRoomId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      legacyIdCase_ = 7;
      legacyId_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the room. This field is used to signal
     * the use of the compound resource pattern
     * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
     * </pre>
     *
     * <code>string legacy_room_id = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLegacyRoomId() {
      if (legacyIdCase_ == 7) {
        legacyIdCase_ = 0;
        legacyId_ = null;
        onChanged();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the room. This field is used to signal
     * the use of the compound resource pattern
     * `rooms/{room}/blurbs/legacy/{legacy_room}.{blurb}`
     * </pre>
     *
     * <code>string legacy_room_id = 7;</code>
     *
     * @param value The bytes for legacyRoomId to set.
     * @return This builder for chaining.
     */
    public Builder setLegacyRoomIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      legacyIdCase_ = 7;
      legacyId_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the user. This field is used to signal
     * the use of the compound resource pattern
     * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
     * </pre>
     *
     * <code>string legacy_user_id = 8;</code>
     *
     * @return Whether the legacyUserId field is set.
     */
    @java.lang.Override
    public boolean hasLegacyUserId() {
      return legacyIdCase_ == 8;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the user. This field is used to signal
     * the use of the compound resource pattern
     * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
     * </pre>
     *
     * <code>string legacy_user_id = 8;</code>
     *
     * @return The legacyUserId.
     */
    @java.lang.Override
    public java.lang.String getLegacyUserId() {
      java.lang.Object ref = "";
      if (legacyIdCase_ == 8) {
        ref = legacyId_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (legacyIdCase_ == 8) {
          legacyId_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the user. This field is used to signal
     * the use of the compound resource pattern
     * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
     * </pre>
     *
     * <code>string legacy_user_id = 8;</code>
     *
     * @return The bytes for legacyUserId.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getLegacyUserIdBytes() {
      java.lang.Object ref = "";
      if (legacyIdCase_ == 8) {
        ref = legacyId_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (legacyIdCase_ == 8) {
          legacyId_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the user. This field is used to signal
     * the use of the compound resource pattern
     * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
     * </pre>
     *
     * <code>string legacy_user_id = 8;</code>
     *
     * @param value The legacyUserId to set.
     * @return This builder for chaining.
     */
    public Builder setLegacyUserId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      legacyIdCase_ = 8;
      legacyId_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the user. This field is used to signal
     * the use of the compound resource pattern
     * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
     * </pre>
     *
     * <code>string legacy_user_id = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLegacyUserId() {
      if (legacyIdCase_ == 8) {
        legacyIdCase_ = 0;
        legacyId_ = null;
        onChanged();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * The legacy id of the user. This field is used to signal
     * the use of the compound resource pattern
     * `users/{user}/profile/blurbs/legacy/{legacy_user}~{blurb}`
     * </pre>
     *
     * <code>string legacy_user_id = 8;</code>
     *
     * @param value The bytes for legacyUserId to set.
     * @return This builder for chaining.
     */
    public Builder setLegacyUserIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      legacyIdCase_ = 8;
      legacyId_ = value;
      onChanged();
      return this;
    }

    @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.showcase.v1beta1.Blurb)
  }

  // @@protoc_insertion_point(class_scope:google.showcase.v1beta1.Blurb)
  private static final com.google.showcase.v1beta1.Blurb DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.showcase.v1beta1.Blurb();
  }

  public static com.google.showcase.v1beta1.Blurb getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.showcase.v1beta1.Blurb getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
