UserMessage

用户向代理发送的消息。

UserMessage 显示在代理从其 Google Pub/Sub 订阅接收的“消息”对象的“数据”字段中。“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

唯一的信息 ID,由发送邮件的用户的 RCS 客户端分配。

sendTime

string (Timestamp format)

消息的发送时间。

采用 RFC 3339 标准,生成的输出将始终在末尾带 Z,并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

agentId

string

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

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

string

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

userFile

object (UserFile)

媒体文件。

location

object (LatLng)

位置信息。请注意,该位置不一定是用户的位置。用户能够将任意位置信息发送给代理。

suggestionResponse

object (SuggestionResponse)

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