Operation
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このリソースは、ネットワーク API 呼び出しの結果の長時間実行オペレーションを表します。
JSON 表現 |
{
"name": string,
"metadata": {
"@type": string,
field1: ...,
...
},
"done": boolean,
// 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 .
} |
フィールド |
name |
string
サーバーによって割り当てられる名前。最初にその名前を返すサービスと同じサービス内でのみ一意になります。デフォルトの HTTP マッピングを使用している場合は、name を operations/{unique_id} で終わるリソース名にします。
|
metadata |
object
オペレーションに関連付けられているサービス固有のメタデータ。通常は進捗情報や、作成日時などの共通メタデータが含まれます。一部のサービスでは、このようなメタデータが提供されないこともあります。メタデータがある場合、長時間実行オペレーションを返すメソッドでは、メタデータの型をドキュメント化しておく必要があります。 任意のデータ型のフィールドを含むオブジェクト。タイプを識別する URI を含むフィールド "@type" を追加できます。例: { "id": 1234, "@type": "types.example.com/standard/id" }
|
done |
boolean
値が false の場合は、オペレーションが進行中であることを意味します。true の場合、オペレーションは完了しており、error または response が利用可能です。
|
共用体フィールド result 。オペレーションの結果。error または有効な response になります。done == false の場合、error も response も設定されません。done == true の場合、error または response のいずれかが設定されます。一部のサービスでは結果が表示されない場合があります。result は次のいずれかになります。 |
error |
object (Status )
失敗またはキャンセルされた場合のオペレーションのエラー結果。
|
response |
object
成功した場合はオペレーションの通常のレスポンス。元のメソッドで成功時にデータが返されない場合(Delete など)、レスポンスは google.protobuf.Empty になります。元のメソッドが標準の Get /Create /Update である場合、レスポンスはリソースになります。他のメソッドについては、レスポンスのデータ型が XxxResponse (Xxx は元のメソッド名)になります。たとえば、元のメソッド名が TakeSnapshot() であれば、レスポンスのデータ型は TakeSnapshotResponse になると推測できます。 任意のデータ型のフィールドを含むオブジェクト。タイプを識別する URI を含むフィールド "@type" を追加できます。例: { "id": 1234, "@type": "types.example.com/standard/id" }
|
ステータス
Status
型は、REST API や RPC API など、さまざまなプログラミング環境に適した論理エラーモデルを定義します。gRPC により使用されます。各 Status
メッセージには、エラーコード、エラー メッセージ、エラーの詳細という 3 種類のデータが含まれます。
このエラーモデルと操作方法について詳しくは、API 設計ガイドをご覧ください。
JSON 表現 |
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
フィールド |
code |
integer
ステータス コード。google.rpc.Code の列挙値である必要があります。
|
message |
string
デベロッパー向けのエラー メッセージ。英語で記述します。ユーザー向けのエラー メッセージは、ローカライズして google.rpc.Status.details フィールドで送信するか、クライアントでローカライズする必要があります。
|
details[] |
object
エラーの詳細を保持するメッセージのリスト。API が使用する共通のメッセージ タイプのセットがあります。 任意のデータ型のフィールドを含むオブジェクト。タイプを識別する URI を含むフィールド "@type" を追加できます。例: { "id": 1234, "@type": "types.example.com/standard/id" }
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2022-11-02 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2022-11-02 UTC。"],[[["This resource represents a long-running operation initiated by a network API call."],["The operation's status is tracked using fields like `name`, `metadata`, `done`, and a `result` that can indicate either an `error` or a `response`."],["Errors are represented using a `Status` object, which contains a code, message, and optional details."]]],["This describes a long-running operation's structure and status, represented in JSON. Key information includes: `name` (unique identifier), `metadata` (service-specific details), and `done` (operation status). If `done` is true, `result` will include either an `error` object or a `response` object, otherwise both are empty. The `Status` component details the `error` structure, consisting of an integer `code`, a `message` and an array of `details`.\n"]]