UserMessage

使用者傳送給代理程式的訊息。

UserMessage 會出現在代理程式的 Google Cloud Pub/Sub 訂閱項目「訊息」物件的「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、publisherPhoneNumber) 的組合視為非預期重複的訊息。

sendTime

string (Timestamp format)

傳送郵件的時間。

RFC3339 UTC 的「Zulu」格式的時間戳記,單位為奈秒解析度,最多可達 9 個小數位數。範例:"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)

使用者輕觸建議的回覆或動作後產生的回應。