Class MessageProto.Message

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.bytedesk.core.socket.protobuf.model.MessageProto.Message
All Implemented Interfaces:
MessageProto.MessageOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
MessageProto

public static final class MessageProto.Message extends com.google.protobuf.GeneratedMessageV3 implements MessageProto.MessageOrBuilder
 消息三要素:1. 谁发送的消息? 2. 发送给谁的消息? 3. 发送的消息内容是什么?
 
Protobuf type Message
See Also:
  • Field Details

  • Constructor Details

    • Message

      private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
    • Message

      private Message()
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getUid

      public String getUid()
       唯一mid
       
      string uid = 1;
      Specified by:
      getUid in interface MessageProto.MessageOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       唯一mid
       
      string uid = 1;
      Specified by:
      getUidBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for uid.
    • getType

      public String getType()
       消息类型
       
      string type = 2;
      Specified by:
      getType in interface MessageProto.MessageOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       消息类型
       
      string type = 2;
      Specified by:
      getTypeBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for type.
    • getContent

      public String getContent()
       消息内容,可能是文本,图片,语音,视频,文件等,json
       
      string content = 3;
      Specified by:
      getContent in interface MessageProto.MessageOrBuilder
      Returns:
      The content.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes()
       消息内容,可能是文本,图片,语音,视频,文件等,json
       
      string content = 3;
      Specified by:
      getContentBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for content.
    • getStatus

      public String getStatus()
       消息发送状态
       
      string status = 4;
      Specified by:
      getStatus in interface MessageProto.MessageOrBuilder
      Returns:
      The status.
    • getStatusBytes

      public com.google.protobuf.ByteString getStatusBytes()
       消息发送状态
       
      string status = 4;
      Specified by:
      getStatusBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for status.
    • getCreatedAt

      public String getCreatedAt()
       时间戳
       
      string createdAt = 5;
      Specified by:
      getCreatedAt in interface MessageProto.MessageOrBuilder
      Returns:
      The createdAt.
    • getCreatedAtBytes

      public com.google.protobuf.ByteString getCreatedAtBytes()
       时间戳
       
      string createdAt = 5;
      Specified by:
      getCreatedAtBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for createdAt.
    • getClient

      public String getClient()
       消息来源客户端
       
      string client = 6;
      Specified by:
      getClient in interface MessageProto.MessageOrBuilder
      Returns:
      The client.
    • getClientBytes

      public com.google.protobuf.ByteString getClientBytes()
       消息来源客户端
       
      string client = 6;
      Specified by:
      getClientBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for client.
    • hasThread

      public boolean hasThread()
       会话
       
      .Thread thread = 7;
      Specified by:
      hasThread in interface MessageProto.MessageOrBuilder
      Returns:
      Whether the thread field is set.
    • getThread

      public ThreadProto.Thread getThread()
       会话
       
      .Thread thread = 7;
      Specified by:
      getThread in interface MessageProto.MessageOrBuilder
      Returns:
      The thread.
    • getThreadOrBuilder

      public ThreadProto.ThreadOrBuilder getThreadOrBuilder()
       会话
       
      .Thread thread = 7;
      Specified by:
      getThreadOrBuilder in interface MessageProto.MessageOrBuilder
    • hasUser

      public boolean hasUser()
       发送者
       
      .User user = 8;
      Specified by:
      hasUser in interface MessageProto.MessageOrBuilder
      Returns:
      Whether the user field is set.
    • getUser

      public UserProto.User getUser()
       发送者
       
      .User user = 8;
      Specified by:
      getUser in interface MessageProto.MessageOrBuilder
      Returns:
      The user.
    • getUserOrBuilder

      public UserProto.UserOrBuilder getUserOrBuilder()
       发送者
       
      .User user = 8;
      Specified by:
      getUserOrBuilder in interface MessageProto.MessageOrBuilder
    • getExtra

      public String getExtra()
       自定义扩展/附加信息
       
      string extra = 9;
      Specified by:
      getExtra in interface MessageProto.MessageOrBuilder
      Returns:
      The extra.
    • getExtraBytes

      public com.google.protobuf.ByteString getExtraBytes()
       自定义扩展/附加信息
       
      string extra = 9;
      Specified by:
      getExtraBytes in interface MessageProto.MessageOrBuilder
      Returns:
      The bytes for extra.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static MessageProto.Message parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MessageProto.Message parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MessageProto.Message parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MessageProto.Message parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MessageProto.Message parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MessageProto.Message parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MessageProto.Message parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MessageProto.Message parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MessageProto.Message parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MessageProto.Message parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MessageProto.Message parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MessageProto.Message parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public MessageProto.Message.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static MessageProto.Message.Builder newBuilder()
    • newBuilder

      public static MessageProto.Message.Builder newBuilder(MessageProto.Message prototype)
    • toBuilder

      public MessageProto.Message.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected MessageProto.Message.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static MessageProto.Message getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<MessageProto.Message> parser()
    • getParserForType

      public com.google.protobuf.Parser<MessageProto.Message> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public MessageProto.Message getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder