Response
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
JSON 表示法 |
{
"requestId": string,
"continued": boolean,
"extensions": [
{
"@type": string,
field1: ...,
...
}
],
// Union field result can be only one of the following:
"error": {
object (Status )
},
"response": {
"@type": string,
field1: ...,
...
}
// End of list of possible types for union field result .
} |
欄位 |
requestId |
string
這則訊息所回覆的要求的 requestId。
|
continued |
boolean
如果為 true,則此回應後面會附加與此回應位於相同回應串流的其他回應。
|
extensions[] |
object
應用程式專屬回應中繼資料。 含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" } 。
|
聯集欄位 result 。回應結果,可能是 error 或有效的 response 。result 只能是下列其中一項: |
error |
object (Status )
如果處理要求時發生錯誤,就會傳回錯誤結果。
|
response |
object
如果呼叫成功,則為回應酬載。 含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" } 。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-13 (世界標準時間)。
[null,null,["上次更新時間:2025-03-13 (世界標準時間)。"],[],[],null,["# Response\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nA response to a single Request.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestId\": string, \"continued\": boolean, \"extensions\": [ { \"@type\": string, field1: ..., ... } ], // Union field `result` can be only one of the following: \"error\": { object (/workspace/tasks/reference/rest/v1/Status) }, \"response\": { \"@type\": string, field1: ..., ... } // End of list of possible types for union field `result`. } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestId` | `string` The requestId of the Request this message is in response to. |\n| `continued` | `boolean` If true, this Response is followed by additional responses that are in the same response stream as this Response. |\n| `extensions[]` | `object` Application specific response metadata. An object containing fields of an arbitrary type. An additional field `\"@type\"` contains a URI identifying the type. Example: `{ \"id\": 1234, \"@type\": \"types.example.com/standard/id\" }`. |\n| Union field `result`. The response result, which can be either an `error` or a valid `response`. `result` can be only one of the following: ||\n| `error` | `object (`[Status](/workspace/tasks/reference/rest/v1/Status)`)` The error result if there was an error processing the request. |\n| `response` | `object` The response payload if the call was a success. An object containing fields of an arbitrary type. An additional field `\"@type\"` contains a URI identifying the type. Example: `{ \"id\": 1234, \"@type\": \"types.example.com/standard/id\" }`. |"]]