Argument

JSON 表示法
{
  "name": string,
  "rawText": string,
  "textValue": string,
  "status": {
    object (Status)
  },

  // Union field value can be only one of the following:
  "intValue": string,
  "floatValue": number,
  "boolValue": boolean,
  "datetimeValue": {
    object (DateTime)
  },
  "placeValue": {
    object (Location)
  },
  "extension": {
    "@type": string,
    field1: ...,
    ...
  },
  "structuredValue": {
    object
  }
  // End of list of possible types for union field value.
}
欄位
name

string

為輸入提供的引數名稱。

rawText

string

為引數提供值的原始文字、輸入或朗讀的文字。

textValue

string

當查詢模式包含 $org.schema.type.Text 類型,或預期的輸入內容含有內建意圖時,可指定此參數:actions.intent.TEXTactions.intent.OPTION。請注意,對於 OPTION 意圖,我們將 textValue 設為選項鍵,上方的 rawText 會在使用者查詢中指出原始時距。

status

object (Status)

指定在計算引數時發生錯誤的時間。例如內建意圖「actions.intent.PLACE」如果使用者拒絕授予裝置位置資訊存取權限,則會傳回錯誤狀態。

聯集欄位 value。指定了下列其中一項:value 只能是下列其中一項:
intValue

string (int64 format)

當查詢模式包含 $org.schema.type.Number 類型,或預期的輸入內容含有內建意圖時,可指定為「assistant.intent.action.NUMBER」。

floatValue

number

為內建意圖指定「actions.intent.NUMBER」

boolValue

boolean

查詢模式包含 $org.schema.type.YesNo 類型,或預期的輸入內容含有內建意圖時指定:actions.intent.CONFIRMATION。注意:如果缺少布林值,則代表 false

datetimeValue

object (DateTime)

為內建意圖指定:actions.intent.DATETIME

placeValue

object (Location)

當查詢模式包含 $org.schema.type.Location 類型,或預期的輸入內容含有內建意圖時,可指定為「actions.intent.PLACE」。

extension

object

類型取決於引數的擴充功能。例如,如果 actions.intent.SIGN_IN 意圖的引數名稱為 SIGN_IN,則這項擴充功能會包含 SignInValue 值。

含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

structuredValue

object (Struct format)

指定在 Google 需要以 JSON 格式傳遞資料值時指定的值。

狀態

Status 類型會定義適用於不同程式設計環境 (包含 REST API 和遠端程序呼叫 (RPC) API) 的邏輯錯誤模型。gRPC 會使用這個模型。每個 Status 訊息包含三部分的資料:錯誤代碼、錯誤訊息和錯誤詳細資料。

如要進一步瞭解這個錯誤模型,以及如何使用這個錯誤模型,請參閱 API 設計指南

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
欄位
code

integer

狀態碼,應為 google.rpc.Code 的列舉值。

message

string

向開發人員顯示的錯誤訊息,應以英文呈現。凡是向使用者顯示的錯誤訊息,都應透過 google.rpc.Status.details 欄位進行本地化並傳送,或由用戶端進行本地化。

details[]

object

附有錯誤詳細資料的訊息清單。這是供 API 使用的一組常用訊息類型。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

DateTime

從使用者輸入內容剖析出的日期和時間引數值。但不含時區資訊。

JSON 表示法
{
  "date": {
    object (Date)
  },
  "time": {
    object (TimeOfDay)
  }
}
欄位
date

object (Date)

日期值

time

object (TimeOfDay)

時間值

日期

表示完整或部分的日曆日期,例如生日。您可以視重要性決定是否要在別處指定時段和時區。日期以西曆為主,可用來表示:

  • 完整日期,具有非零的年、月和日值
  • 月和日值,年值為零。例如:週年紀念日
  • 只有年,月和日值為零
  • 年和月值,日值為零。例如:信用卡到期日

相關類型為 google.type.TimeOfDaygoogle.protobuf.Timestamp

JSON 表示法
{
  "year": integer,
  "month": integer,
  "day": integer
}
欄位
year

integer

日期。必須為 1 到 9999;如要指定不含年份的日期,請輸入 0。

month

integer

月份。必須為 1 到 12;如要指定不含日期的年份,請輸入 0。

day

integer

日期。必須為 1 到 31,並屬於有效的年和月;如果只指定年份,或只指定年份和月份,而不指定當月第幾日的話,請輸入 0。

TimeOfDay

代表一天中的時間。日期和時區並不需要指定,或是在其他位置上指定。API 可選擇允許閏秒。相關類型為 google.type.Dategoogle.protobuf.Timestamp

JSON 表示法
{
  "hours": integer,
  "minutes": integer,
  "seconds": integer,
  "nanos": integer
}
欄位
hours

integer

一天的營業時間,以 24 小時製表示。值應介於 0 到 23 之間。API 可選擇允許使用「24:00:00」這類的值來表示營業打烊時間等情況。

minutes

integer

一天內的分鐘數。值必須介於 0 到 59 之間。

seconds

integer

時間的秒數。正常情況下,值必須介於 0 到 59 之間。如果 API 允許閏秒,則可允許值為 60。

nanos

integer

秒數的小數,以奈秒表示。值必須介於 0 到 999,999,999 之間。