// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: im.proto

package com.ywt.gapi.im;

/**
 * Protobuf type {@code com.ywt.gapi.im.SessionMessage}
 */
public final class SessionMessage extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.im.SessionMessage)
    SessionMessageOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SessionMessage.newBuilder() to construct.
  private SessionMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SessionMessage() {
    content_ = "";
    sessionId_ = "";
    custom_ = "";
    msgId_ = "";
    fromUserName_ = "";
    toUserName_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private SessionMessage(
      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 8: {

            fromUserId_ = input.readInt32();
            break;
          }
          case 16: {

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

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

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

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

            msgId_ = s;
            break;
          }
          case 56: {

            time_ = input.readInt64();
            break;
          }
          case 64: {

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

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

            toUserName_ = s;
            break;
          }
          case 88: {

            fromUserType_ = input.readInt32();
            break;
          }
          case 96: {

            fromTerminal_ = input.readInt32();
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.im.ImProto.internal_static_com_ywt_gapi_im_SessionMessage_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.im.ImProto.internal_static_com_ywt_gapi_im_SessionMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.im.SessionMessage.class, com.ywt.gapi.im.SessionMessage.Builder.class);
  }

  public static final int FROM_USER_ID_FIELD_NUMBER = 1;
  private int fromUserId_;
  /**
   * <code>int32 from_user_id = 1;</code>
   * @return The fromUserId.
   */
  @java.lang.Override
  public int getFromUserId() {
    return fromUserId_;
  }

  public static final int TO_USER_ID_FIELD_NUMBER = 2;
  private int toUserId_;
  /**
   * <code>int32 to_user_id = 2;</code>
   * @return The toUserId.
   */
  @java.lang.Override
  public int getToUserId() {
    return toUserId_;
  }

  public static final int CONTENT_FIELD_NUMBER = 3;
  private volatile java.lang.Object content_;
  /**
   * <code>string content = 3;</code>
   * @return The content.
   */
  @java.lang.Override
  public java.lang.String getContent() {
    java.lang.Object 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();
      content_ = s;
      return s;
    }
  }
  /**
   * <code>string content = 3;</code>
   * @return The bytes for content.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getContentBytes() {
    java.lang.Object ref = content_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      content_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SESSION_ID_FIELD_NUMBER = 4;
  private volatile java.lang.Object sessionId_;
  /**
   * <code>string session_id = 4;</code>
   * @return The sessionId.
   */
  @java.lang.Override
  public java.lang.String getSessionId() {
    java.lang.Object ref = sessionId_;
    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();
      sessionId_ = s;
      return s;
    }
  }
  /**
   * <code>string session_id = 4;</code>
   * @return The bytes for sessionId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSessionIdBytes() {
    java.lang.Object ref = sessionId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      sessionId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CUSTOM_FIELD_NUMBER = 5;
  private volatile java.lang.Object custom_;
  /**
   * <code>string custom = 5;</code>
   * @return The custom.
   */
  @java.lang.Override
  public java.lang.String getCustom() {
    java.lang.Object ref = custom_;
    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();
      custom_ = s;
      return s;
    }
  }
  /**
   * <code>string custom = 5;</code>
   * @return The bytes for custom.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getCustomBytes() {
    java.lang.Object ref = custom_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      custom_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MSG_ID_FIELD_NUMBER = 6;
  private volatile java.lang.Object msgId_;
  /**
   * <code>string msg_id = 6;</code>
   * @return The msgId.
   */
  @java.lang.Override
  public java.lang.String getMsgId() {
    java.lang.Object ref = msgId_;
    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();
      msgId_ = s;
      return s;
    }
  }
  /**
   * <code>string msg_id = 6;</code>
   * @return The bytes for msgId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getMsgIdBytes() {
    java.lang.Object ref = msgId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      msgId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TIME_FIELD_NUMBER = 7;
  private long time_;
  /**
   * <code>int64 time = 7;</code>
   * @return The time.
   */
  @java.lang.Override
  public long getTime() {
    return time_;
  }

  public static final int MESSAGE_TYPE_FIELD_NUMBER = 8;
  private int messageType_;
  /**
   * <pre>
   *消息类型：1 文本消息 2 图片消息 3 病历消息
   * </pre>
   *
   * <code>int32 message_type = 8;</code>
   * @return The messageType.
   */
  @java.lang.Override
  public int getMessageType() {
    return messageType_;
  }

  public static final int FROM_USER_NAME_FIELD_NUMBER = 9;
  private volatile java.lang.Object fromUserName_;
  /**
   * <code>string from_user_name = 9;</code>
   * @return The fromUserName.
   */
  @java.lang.Override
  public java.lang.String getFromUserName() {
    java.lang.Object ref = fromUserName_;
    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();
      fromUserName_ = s;
      return s;
    }
  }
  /**
   * <code>string from_user_name = 9;</code>
   * @return The bytes for fromUserName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getFromUserNameBytes() {
    java.lang.Object ref = fromUserName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      fromUserName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TO_USER_NAME_FIELD_NUMBER = 10;
  private volatile java.lang.Object toUserName_;
  /**
   * <code>string to_user_name = 10;</code>
   * @return The toUserName.
   */
  @java.lang.Override
  public java.lang.String getToUserName() {
    java.lang.Object ref = toUserName_;
    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();
      toUserName_ = s;
      return s;
    }
  }
  /**
   * <code>string to_user_name = 10;</code>
   * @return The bytes for toUserName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getToUserNameBytes() {
    java.lang.Object ref = toUserName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      toUserName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FROM_USER_TYPE_FIELD_NUMBER = 11;
  private int fromUserType_;
  /**
   * <code>int32 from_user_type = 11;</code>
   * @return The fromUserType.
   */
  @java.lang.Override
  public int getFromUserType() {
    return fromUserType_;
  }

  public static final int FROM_TERMINAL_FIELD_NUMBER = 12;
  private int fromTerminal_;
  /**
   * <code>int32 from_terminal = 12;</code>
   * @return The fromTerminal.
   */
  @java.lang.Override
  public int getFromTerminal() {
    return fromTerminal_;
  }

  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 (fromUserId_ != 0) {
      output.writeInt32(1, fromUserId_);
    }
    if (toUserId_ != 0) {
      output.writeInt32(2, toUserId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sessionId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(custom_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, custom_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, msgId_);
    }
    if (time_ != 0L) {
      output.writeInt64(7, time_);
    }
    if (messageType_ != 0) {
      output.writeInt32(8, messageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fromUserName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, fromUserName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(toUserName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, toUserName_);
    }
    if (fromUserType_ != 0) {
      output.writeInt32(11, fromUserType_);
    }
    if (fromTerminal_ != 0) {
      output.writeInt32(12, fromTerminal_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (fromUserId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, fromUserId_);
    }
    if (toUserId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, toUserId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sessionId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(custom_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, custom_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, msgId_);
    }
    if (time_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(7, time_);
    }
    if (messageType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(8, messageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fromUserName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, fromUserName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(toUserName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, toUserName_);
    }
    if (fromUserType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(11, fromUserType_);
    }
    if (fromTerminal_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(12, fromTerminal_);
    }
    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.ywt.gapi.im.SessionMessage)) {
      return super.equals(obj);
    }
    com.ywt.gapi.im.SessionMessage other = (com.ywt.gapi.im.SessionMessage) obj;

    if (getFromUserId()
        != other.getFromUserId()) return false;
    if (getToUserId()
        != other.getToUserId()) return false;
    if (!getContent()
        .equals(other.getContent())) return false;
    if (!getSessionId()
        .equals(other.getSessionId())) return false;
    if (!getCustom()
        .equals(other.getCustom())) return false;
    if (!getMsgId()
        .equals(other.getMsgId())) return false;
    if (getTime()
        != other.getTime()) return false;
    if (getMessageType()
        != other.getMessageType()) return false;
    if (!getFromUserName()
        .equals(other.getFromUserName())) return false;
    if (!getToUserName()
        .equals(other.getToUserName())) return false;
    if (getFromUserType()
        != other.getFromUserType()) return false;
    if (getFromTerminal()
        != other.getFromTerminal()) return false;
    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) + FROM_USER_ID_FIELD_NUMBER;
    hash = (53 * hash) + getFromUserId();
    hash = (37 * hash) + TO_USER_ID_FIELD_NUMBER;
    hash = (53 * hash) + getToUserId();
    hash = (37 * hash) + CONTENT_FIELD_NUMBER;
    hash = (53 * hash) + getContent().hashCode();
    hash = (37 * hash) + SESSION_ID_FIELD_NUMBER;
    hash = (53 * hash) + getSessionId().hashCode();
    hash = (37 * hash) + CUSTOM_FIELD_NUMBER;
    hash = (53 * hash) + getCustom().hashCode();
    hash = (37 * hash) + MSG_ID_FIELD_NUMBER;
    hash = (53 * hash) + getMsgId().hashCode();
    hash = (37 * hash) + TIME_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getTime());
    hash = (37 * hash) + MESSAGE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMessageType();
    hash = (37 * hash) + FROM_USER_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getFromUserName().hashCode();
    hash = (37 * hash) + TO_USER_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getToUserName().hashCode();
    hash = (37 * hash) + FROM_USER_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getFromUserType();
    hash = (37 * hash) + FROM_TERMINAL_FIELD_NUMBER;
    hash = (53 * hash) + getFromTerminal();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.im.SessionMessage parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.im.SessionMessage parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.im.SessionMessage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.im.SessionMessage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.im.SessionMessage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.im.SessionMessage parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.im.SessionMessage parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.im.SessionMessage 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.ywt.gapi.im.SessionMessage parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.im.SessionMessage 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.ywt.gapi.im.SessionMessage parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.im.SessionMessage 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.ywt.gapi.im.SessionMessage 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;
  }
  /**
   * Protobuf type {@code com.ywt.gapi.im.SessionMessage}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.im.SessionMessage)
      com.ywt.gapi.im.SessionMessageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.im.ImProto.internal_static_com_ywt_gapi_im_SessionMessage_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.im.ImProto.internal_static_com_ywt_gapi_im_SessionMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.im.SessionMessage.class, com.ywt.gapi.im.SessionMessage.Builder.class);
    }

    // Construct using com.ywt.gapi.im.SessionMessage.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();
      fromUserId_ = 0;

      toUserId_ = 0;

      content_ = "";

      sessionId_ = "";

      custom_ = "";

      msgId_ = "";

      time_ = 0L;

      messageType_ = 0;

      fromUserName_ = "";

      toUserName_ = "";

      fromUserType_ = 0;

      fromTerminal_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.im.ImProto.internal_static_com_ywt_gapi_im_SessionMessage_descriptor;
    }

    @java.lang.Override
    public com.ywt.gapi.im.SessionMessage getDefaultInstanceForType() {
      return com.ywt.gapi.im.SessionMessage.getDefaultInstance();
    }

    @java.lang.Override
    public com.ywt.gapi.im.SessionMessage build() {
      com.ywt.gapi.im.SessionMessage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.ywt.gapi.im.SessionMessage buildPartial() {
      com.ywt.gapi.im.SessionMessage result = new com.ywt.gapi.im.SessionMessage(this);
      result.fromUserId_ = fromUserId_;
      result.toUserId_ = toUserId_;
      result.content_ = content_;
      result.sessionId_ = sessionId_;
      result.custom_ = custom_;
      result.msgId_ = msgId_;
      result.time_ = time_;
      result.messageType_ = messageType_;
      result.fromUserName_ = fromUserName_;
      result.toUserName_ = toUserName_;
      result.fromUserType_ = fromUserType_;
      result.fromTerminal_ = fromTerminal_;
      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.ywt.gapi.im.SessionMessage) {
        return mergeFrom((com.ywt.gapi.im.SessionMessage)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.im.SessionMessage other) {
      if (other == com.ywt.gapi.im.SessionMessage.getDefaultInstance()) return this;
      if (other.getFromUserId() != 0) {
        setFromUserId(other.getFromUserId());
      }
      if (other.getToUserId() != 0) {
        setToUserId(other.getToUserId());
      }
      if (!other.getContent().isEmpty()) {
        content_ = other.content_;
        onChanged();
      }
      if (!other.getSessionId().isEmpty()) {
        sessionId_ = other.sessionId_;
        onChanged();
      }
      if (!other.getCustom().isEmpty()) {
        custom_ = other.custom_;
        onChanged();
      }
      if (!other.getMsgId().isEmpty()) {
        msgId_ = other.msgId_;
        onChanged();
      }
      if (other.getTime() != 0L) {
        setTime(other.getTime());
      }
      if (other.getMessageType() != 0) {
        setMessageType(other.getMessageType());
      }
      if (!other.getFromUserName().isEmpty()) {
        fromUserName_ = other.fromUserName_;
        onChanged();
      }
      if (!other.getToUserName().isEmpty()) {
        toUserName_ = other.toUserName_;
        onChanged();
      }
      if (other.getFromUserType() != 0) {
        setFromUserType(other.getFromUserType());
      }
      if (other.getFromTerminal() != 0) {
        setFromTerminal(other.getFromTerminal());
      }
      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.ywt.gapi.im.SessionMessage parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.im.SessionMessage) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int fromUserId_ ;
    /**
     * <code>int32 from_user_id = 1;</code>
     * @return The fromUserId.
     */
    @java.lang.Override
    public int getFromUserId() {
      return fromUserId_;
    }
    /**
     * <code>int32 from_user_id = 1;</code>
     * @param value The fromUserId to set.
     * @return This builder for chaining.
     */
    public Builder setFromUserId(int value) {
      
      fromUserId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 from_user_id = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearFromUserId() {
      
      fromUserId_ = 0;
      onChanged();
      return this;
    }

    private int toUserId_ ;
    /**
     * <code>int32 to_user_id = 2;</code>
     * @return The toUserId.
     */
    @java.lang.Override
    public int getToUserId() {
      return toUserId_;
    }
    /**
     * <code>int32 to_user_id = 2;</code>
     * @param value The toUserId to set.
     * @return This builder for chaining.
     */
    public Builder setToUserId(int value) {
      
      toUserId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 to_user_id = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearToUserId() {
      
      toUserId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object content_ = "";
    /**
     * <code>string content = 3;</code>
     * @return The content.
     */
    public java.lang.String getContent() {
      java.lang.Object ref = content_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        content_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string content = 3;</code>
     * @return The bytes for content.
     */
    public com.google.protobuf.ByteString
        getContentBytes() {
      java.lang.Object ref = content_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        content_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string content = 3;</code>
     * @param value The content to set.
     * @return This builder for chaining.
     */
    public Builder setContent(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      content_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string content = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearContent() {
      
      content_ = getDefaultInstance().getContent();
      onChanged();
      return this;
    }
    /**
     * <code>string content = 3;</code>
     * @param value The bytes for content to set.
     * @return This builder for chaining.
     */
    public Builder setContentBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      content_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object sessionId_ = "";
    /**
     * <code>string session_id = 4;</code>
     * @return The sessionId.
     */
    public java.lang.String getSessionId() {
      java.lang.Object ref = sessionId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sessionId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string session_id = 4;</code>
     * @return The bytes for sessionId.
     */
    public com.google.protobuf.ByteString
        getSessionIdBytes() {
      java.lang.Object ref = sessionId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        sessionId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string session_id = 4;</code>
     * @param value The sessionId to set.
     * @return This builder for chaining.
     */
    public Builder setSessionId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      sessionId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string session_id = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearSessionId() {
      
      sessionId_ = getDefaultInstance().getSessionId();
      onChanged();
      return this;
    }
    /**
     * <code>string session_id = 4;</code>
     * @param value The bytes for sessionId to set.
     * @return This builder for chaining.
     */
    public Builder setSessionIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      sessionId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object custom_ = "";
    /**
     * <code>string custom = 5;</code>
     * @return The custom.
     */
    public java.lang.String getCustom() {
      java.lang.Object ref = custom_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        custom_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string custom = 5;</code>
     * @return The bytes for custom.
     */
    public com.google.protobuf.ByteString
        getCustomBytes() {
      java.lang.Object ref = custom_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        custom_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string custom = 5;</code>
     * @param value The custom to set.
     * @return This builder for chaining.
     */
    public Builder setCustom(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      custom_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string custom = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearCustom() {
      
      custom_ = getDefaultInstance().getCustom();
      onChanged();
      return this;
    }
    /**
     * <code>string custom = 5;</code>
     * @param value The bytes for custom to set.
     * @return This builder for chaining.
     */
    public Builder setCustomBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      custom_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object msgId_ = "";
    /**
     * <code>string msg_id = 6;</code>
     * @return The msgId.
     */
    public java.lang.String getMsgId() {
      java.lang.Object ref = msgId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        msgId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string msg_id = 6;</code>
     * @return The bytes for msgId.
     */
    public com.google.protobuf.ByteString
        getMsgIdBytes() {
      java.lang.Object ref = msgId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        msgId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string msg_id = 6;</code>
     * @param value The msgId to set.
     * @return This builder for chaining.
     */
    public Builder setMsgId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      msgId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string msg_id = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearMsgId() {
      
      msgId_ = getDefaultInstance().getMsgId();
      onChanged();
      return this;
    }
    /**
     * <code>string msg_id = 6;</code>
     * @param value The bytes for msgId to set.
     * @return This builder for chaining.
     */
    public Builder setMsgIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      msgId_ = value;
      onChanged();
      return this;
    }

    private long time_ ;
    /**
     * <code>int64 time = 7;</code>
     * @return The time.
     */
    @java.lang.Override
    public long getTime() {
      return time_;
    }
    /**
     * <code>int64 time = 7;</code>
     * @param value The time to set.
     * @return This builder for chaining.
     */
    public Builder setTime(long value) {
      
      time_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int64 time = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearTime() {
      
      time_ = 0L;
      onChanged();
      return this;
    }

    private int messageType_ ;
    /**
     * <pre>
     *消息类型：1 文本消息 2 图片消息 3 病历消息
     * </pre>
     *
     * <code>int32 message_type = 8;</code>
     * @return The messageType.
     */
    @java.lang.Override
    public int getMessageType() {
      return messageType_;
    }
    /**
     * <pre>
     *消息类型：1 文本消息 2 图片消息 3 病历消息
     * </pre>
     *
     * <code>int32 message_type = 8;</code>
     * @param value The messageType to set.
     * @return This builder for chaining.
     */
    public Builder setMessageType(int value) {
      
      messageType_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *消息类型：1 文本消息 2 图片消息 3 病历消息
     * </pre>
     *
     * <code>int32 message_type = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearMessageType() {
      
      messageType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object fromUserName_ = "";
    /**
     * <code>string from_user_name = 9;</code>
     * @return The fromUserName.
     */
    public java.lang.String getFromUserName() {
      java.lang.Object ref = fromUserName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        fromUserName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string from_user_name = 9;</code>
     * @return The bytes for fromUserName.
     */
    public com.google.protobuf.ByteString
        getFromUserNameBytes() {
      java.lang.Object ref = fromUserName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        fromUserName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string from_user_name = 9;</code>
     * @param value The fromUserName to set.
     * @return This builder for chaining.
     */
    public Builder setFromUserName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      fromUserName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string from_user_name = 9;</code>
     * @return This builder for chaining.
     */
    public Builder clearFromUserName() {
      
      fromUserName_ = getDefaultInstance().getFromUserName();
      onChanged();
      return this;
    }
    /**
     * <code>string from_user_name = 9;</code>
     * @param value The bytes for fromUserName to set.
     * @return This builder for chaining.
     */
    public Builder setFromUserNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      fromUserName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object toUserName_ = "";
    /**
     * <code>string to_user_name = 10;</code>
     * @return The toUserName.
     */
    public java.lang.String getToUserName() {
      java.lang.Object ref = toUserName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        toUserName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string to_user_name = 10;</code>
     * @return The bytes for toUserName.
     */
    public com.google.protobuf.ByteString
        getToUserNameBytes() {
      java.lang.Object ref = toUserName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        toUserName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string to_user_name = 10;</code>
     * @param value The toUserName to set.
     * @return This builder for chaining.
     */
    public Builder setToUserName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      toUserName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string to_user_name = 10;</code>
     * @return This builder for chaining.
     */
    public Builder clearToUserName() {
      
      toUserName_ = getDefaultInstance().getToUserName();
      onChanged();
      return this;
    }
    /**
     * <code>string to_user_name = 10;</code>
     * @param value The bytes for toUserName to set.
     * @return This builder for chaining.
     */
    public Builder setToUserNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      toUserName_ = value;
      onChanged();
      return this;
    }

    private int fromUserType_ ;
    /**
     * <code>int32 from_user_type = 11;</code>
     * @return The fromUserType.
     */
    @java.lang.Override
    public int getFromUserType() {
      return fromUserType_;
    }
    /**
     * <code>int32 from_user_type = 11;</code>
     * @param value The fromUserType to set.
     * @return This builder for chaining.
     */
    public Builder setFromUserType(int value) {
      
      fromUserType_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 from_user_type = 11;</code>
     * @return This builder for chaining.
     */
    public Builder clearFromUserType() {
      
      fromUserType_ = 0;
      onChanged();
      return this;
    }

    private int fromTerminal_ ;
    /**
     * <code>int32 from_terminal = 12;</code>
     * @return The fromTerminal.
     */
    @java.lang.Override
    public int getFromTerminal() {
      return fromTerminal_;
    }
    /**
     * <code>int32 from_terminal = 12;</code>
     * @param value The fromTerminal to set.
     * @return This builder for chaining.
     */
    public Builder setFromTerminal(int value) {
      
      fromTerminal_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 from_terminal = 12;</code>
     * @return This builder for chaining.
     */
    public Builder clearFromTerminal() {
      
      fromTerminal_ = 0;
      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:com.ywt.gapi.im.SessionMessage)
  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.im.SessionMessage)
  private static final com.ywt.gapi.im.SessionMessage DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ywt.gapi.im.SessionMessage();
  }

  public static com.ywt.gapi.im.SessionMessage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.ywt.gapi.im.SessionMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

