UserMessage

用户发送给代理的消息。

UserMessage 显示在代理从其 Google Cloud Pub/Sub 订阅收到的“message”对象的“data”字段中。“data”字段是一个 base64 编码的字符串,代理必须对其进行解码以匹配 UserMessage 结构。

JSON 表示法
{
  "senderPhoneNumber": string,
  "messageId": string,
  "sendTime": string,
  "agentId": string,

  // Union field content can be only one of the following:
  "text": string,
  "userFile": {
    object (UserFile)
  },
  "location": {
    object (LatLng)
  },
  "suggestionResponse": {
    object (SuggestionResponse)
  }
  // End of list of possible types for union field content.
}
字段
senderPhoneNumber

string

发送消息的用户的电话号码(采用 E.164 格式)。

messageId

string

由发送者用户的 RCS 客户端分配的唯一消息 ID。代理应将具有相同(messageId、sendPhoneNumber)对的消息视为意外重复。

sendTime

string (Timestamp format)

邮件发送的时间。

时间戳采用 RFC3339 世界协调时间 (UTC)(即“祖鲁时”)格式,分辨率为纳秒,最多包含九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

agentId

string

代理的唯一标识符。由 RCS Business Messaging 设置。

联合字段 content。消息 content 的内容只能是下列其中一项:
text

string

文字,特别是通过自然用户输入(而非建议的回复)创建的字符串。

userFile

object (UserFile)

媒体文件。

location

object (LatLng)

位置信息。请注意,这不一定是用户所在的位置。用户可以将任意营业地点发送给代理。

suggestionResponse

object (SuggestionResponse)

用户点按建议的回复或操作后生成的响应。