UpdateObjectCustomContext

描述更新物件自訂上下文的選項。

JSON 表示法
{

  // Union field action can be only one of the following:
  "customContextUpdates": {
    object (CustomContextUpdates)
  },
  "clearAll": boolean
  // End of list of possible types for union field action.
}
欄位
聯集欄位 action。其中一項行動必須確定。action 只能是下列其中一個設定:
customContextUpdates

object (CustomContextUpdates)

一系列可應用於特定自訂上下文的更新。使用此功能可透過鍵新增、更新或刪除單一上下文。

clearAll

boolean

如果設置,則必須將其設為 true,並且所有現有的物件自訂上下文都將被刪除。

CustomContextUpdates

描述要套用於由鍵標識的自訂上下文的一系列更新。

JSON 表示法
{
  "updates": {
    string: {
      object (ObjectCustomContextPayload)
    },
    ...
  },
  "keysToClear": [
    string
  ]
}
欄位
updates

map (key: string, value: object (ObjectCustomContextPayload))

選用。插入或更新現有自訂上下文。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

keysToClear[]

string

選用。按鍵清除自訂上下文。一個鍵不能同時存在於 updateskeysToClear 中。

ObjectCustomContextPayload

描述使用者自訂物件上下文的有效負載。

JSON 表示法
{
  "value": string
}
欄位
value

string

物件自訂上下文的值。如果已設定,value就不得為空字串,因為這是自訂內容的必填欄位。如果未設定,系統會忽略 value,且不會變更自訂內容酬載的 value 欄位。