Message class
- Inheritance
-
- Object
- GeneratedMessage
- Message
Constructors
-
Message({Int64? chatId, Int64? msgId, Timestamp? msgTime, Int64? sender, Int64? replyMsgId, MessageOperate? msgOp, int? worker, MessageAutoReplyFlag? autoReplyFlag, MessageFormat? msgFmt, Int64? consultId, Iterable<WithAutoReply>? withAutoReplies, MsgSourceType? msgSourceType, Int64? payloadId, MessageContent? content, MessageImage? image, MessageAudio? audio, MessageVideo? video, MessageGeo? geo, MessageFile? file, WorkerTransfer? workerTrans, BlackListApply? blacklistApply, BlackListConfirm? blacklistConfirm, MessageAutoReply? autoReply, MessageWorkerChanged? workerChanged})
-
factory
-
Message.fromBuffer(List<int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
-
Message.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
-
audio
↔ MessageAudio
-
getter/setter pair
-
autoReply
↔ MessageAutoReply
-
自动回复问题
getter/setter pair
-
autoReplyFlag
↔ MessageAutoReplyFlag
-
自动回复选项, 历史原因保留(没规划好, 应该放到payload中)
getter/setter pair
-
blacklistApply
↔ BlackListApply
-
请求将此会话拉入黑名单
getter/setter pair
-
blacklistConfirm
↔ BlackListConfirm
-
确认拉入黑名单
getter/setter pair
-
chatId
↔ Int64
-
会话id(指此次聊天会话的id, 实际上是 终端用户 的 client id)
此处避免与连接session混淆, 用chat id区分
对于终端用户(h5, web), 无视此字段(服务端填入)
对于客服(pc), 发消息时填对应会话的id
对于持久化, 可作为 分区 id
getter/setter pair
-
consultId
↔ Int64
-
咨询类型
getter/setter pair
-
content
↔ MessageContent
-
getter/setter pair
-
eventPlugin
→ EventPlugin?
-
Subclasses can override this getter to be notified of changes
to protobuf fields.
no setterinherited
-
file
↔ MessageFile
-
getter/setter pair
-
geo
↔ MessageGeo
-
getter/setter pair
-
hashCode
→ int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
-
image
↔ MessageImage
-
getter/setter pair
-
info_
→ BuilderInfo
-
no setteroverride
-
isFrozen
→ bool
-
Returns
true if this message is marked read-only. Otherwise false.
no setterinherited
-
msgFmt
↔ MessageFormat
-
消息类型
getter/setter pair
-
msgId
↔ Int64
-
消息id, 服务端分配
getter/setter pair
-
msgOp
↔ MessageOperate
-
消息操作人
getter/setter pair
-
msgSourceType
↔ MsgSourceType
-
消息来源类型
getter/setter pair
-
msgTime
↔ Timestamp
-
消息发送时间, 服务端分配
getter/setter pair
-
payloadId
↔ Int64
-
客户端ack id
getter/setter pair
-
replyMsgId
↔ Int64
-
回复消息
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sender
↔ Int64
-
发送人, 服务端记录
发送人为0 = 系统消息
getter/setter pair
-
unknownFields
→ UnknownFieldSet
-
no setterinherited
-
video
↔ MessageVideo
-
getter/setter pair
-
withAutoReplies
→ List<WithAutoReply>
-
附加自动回复数据
no setter
-
worker
↔ int
-
分配客服id
getter/setter pair
-
workerChanged
↔ MessageWorkerChanged
-
客服改变
getter/setter pair
-
workerTrans
↔ WorkerTransfer
-
已转接至客服 xxx
getter/setter pair
Methods
-
addExtension(Extension extension, Object? value)
→ void
-
Adds an extension field value to a repeated field.
inherited
-
check()
→ void
-
inherited
-
clear()
→ void
-
Clears all data that was set in this message.
inherited
-
clearAudio()
→ void
-
-
clearAutoReply()
→ void
-
-
clearAutoReplyFlag()
→ void
-
-
clearBlacklistApply()
→ void
-
-
clearBlacklistConfirm()
→ void
-
-
clearChatId()
→ void
-
-
clearConsultId()
→ void
-
-
clearContent()
→ void
-
-
clearExtension(Extension extension)
→ void
-
Clears an extension field and also removes the extension.
inherited
-
clearField(int tagNumber)
→ void
-
Clears the contents of a given field.
inherited
-
clearFile()
→ void
-
-
clearGeo()
→ void
-
-
clearImage()
→ void
-
-
clearMsgFmt()
→ void
-
-
clearMsgId()
→ void
-
-
clearMsgOp()
→ void
-
-
clearMsgSourceType()
→ void
-
-
clearMsgTime()
→ void
-
-
clearPayload()
→ void
-
-
clearPayloadId()
→ void
-
-
clearReplyMsgId()
→ void
-
-
clearSender()
→ void
-
-
clearVideo()
→ void
-
-
clearWorker()
→ void
-
-
clearWorkerChanged()
→ void
-
-
clearWorkerTrans()
→ void
-
-
clone()
→ Message
-
Creates a deep copy of the fields in this message.
(The generated code uses mergeFromMessage.)
override
-
copyWith(void updates(Message))
→ Message
-
Apply
updates to a copy of this message.
override
-
createEmptyInstance()
→ Message
-
Creates an empty instance of the same message type as this.
override
-
createMapField<K, V>(int tagNumber, MapFieldInfo<K, V> fi)
→ Map<K, V>
-
Creates a Map representing a map field.
inherited
-
createRepeatedField<T>(int tagNumber, FieldInfo<T> fi)
→ List<T>
-
Creates List implementing a mutable repeated field.
inherited
-
ensureAudio()
→ MessageAudio
-
-
ensureAutoReply()
→ MessageAutoReply
-
-
ensureAutoReplyFlag()
→ MessageAutoReplyFlag
-
-
ensureBlacklistApply()
→ BlackListApply
-
-
ensureBlacklistConfirm()
→ BlackListConfirm
-
-
ensureContent()
→ MessageContent
-
-
ensureFile()
→ MessageFile
-
-
ensureGeo()
→ MessageGeo
-
-
ensureImage()
→ MessageImage
-
-
ensureMsgTime()
→ Timestamp
-
-
ensureVideo()
→ MessageVideo
-
-
ensureWorkerChanged()
→ MessageWorkerChanged
-
-
ensureWorkerTrans()
→ WorkerTransfer
-
-
extensionsAreInitialized()
→ bool
-
inherited
-
freeze()
→ GeneratedMessage
-
Make this message read-only.
inherited
-
getDefaultForField(int tagNumber)
→ dynamic
-
Returns the default value for the given field.
inherited
-
getExtension(Extension extension)
→ dynamic
-
Returns the value of
extension.
inherited
-
getField(int tagNumber)
→ dynamic
-
Returns the value of the field associated with
tagNumber, or the
default value if it is not set.
inherited
-
getFieldOrNull(int tagNumber)
→ dynamic
-
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(String fieldName)
→ int?
-
inherited
-
hasAudio()
→ bool
-
-
hasAutoReply()
→ bool
-
-
hasAutoReplyFlag()
→ bool
-
-
hasBlacklistApply()
→ bool
-
-
hasBlacklistConfirm()
→ bool
-
-
hasChatId()
→ bool
-
-
hasConsultId()
→ bool
-
-
hasContent()
→ bool
-
-
hasExtension(Extension extension)
→ bool
-
Returns
true if a value of extension is present.
inherited
-
hasField(int tagNumber)
→ bool
-
Whether this message has a field associated with
tagNumber.
inherited
-
hasFile()
→ bool
-
-
hasGeo()
→ bool
-
-
hasImage()
→ bool
-
-
hasMsgFmt()
→ bool
-
-
hasMsgId()
→ bool
-
-
hasMsgOp()
→ bool
-
-
hasMsgSourceType()
→ bool
-
-
hasMsgTime()
→ bool
-
-
hasPayloadId()
→ bool
-
-
hasReplyMsgId()
→ bool
-
-
hasRequiredFields()
→ bool
-
Whether the message has required fields.
inherited
-
hasSender()
→ bool
-
-
hasVideo()
→ bool
-
-
hasWorker()
→ bool
-
-
hasWorkerChanged()
→ bool
-
-
hasWorkerTrans()
→ bool
-
-
isInitialized()
→ bool
-
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(List<int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY])
→ void
-
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY])
→ void
-
inherited
-
mergeFromJson(String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY])
→ void
-
Merges field values from
data, a JSON object, encoded as described by
GeneratedMessage.writeToJson.
inherited
-
mergeFromJsonMap(Map<String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY])
→ void
-
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(GeneratedMessage other)
→ void
-
Merges the contents of the
other into this message.
inherited
-
mergeFromProto3Json(Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false})
→ void
-
Merges field values from
json, a JSON object using proto3 encoding.
inherited
-
mergeUnknownFields(UnknownFieldSet unknownFieldSet)
→ void
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
setExtension(Extension extension, Object value)
→ void
-
Sets the value of a non-repeated extension field to
value.
inherited
-
setField(int tagNumber, Object value)
→ void
-
Sets the value of a field by its
tagNumber.
inherited
-
toBuilder()
→ GeneratedMessage
-
Creates a writable, shallow copy of this message.
inherited
-
toDebugString()
→ String
-
Returns a String representation of this message.
inherited
-
toProto3Json({TypeRegistry typeRegistry = const TypeRegistry.empty()})
→ Object?
-
Returns an Object representing Proto3 JSON serialization of
this.
inherited
-
toString()
→ String
-
Returns a String representation of this message.
inherited
-
whichPayload()
→ Message_Payload
-
-
writeToBuffer()
→ Uint8List
-
inherited
-
writeToCodedBufferWriter(CodedBufferWriter output)
→ void
-
inherited
-
writeToJson()
→ String
-
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap()
→ Map<String, dynamic>
-
Returns the JSON encoding of this message as a Dart Map.
inherited