OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 syntax = "proto3"; |
| 6 option optimize_for = LITE_RUNTIME; |
| 7 |
| 8 package offline_pages.proto; |
| 9 ; |
| 10 |
| 11 import "any.proto"; |
| 12 import "status.proto"; |
| 13 |
| 14 // This resource represents a long-running operation that is the result of a |
| 15 // network API call. |
| 16 message Operation { |
| 17 // The server-assigned name, which is only unique within the same service that |
| 18 // originally returns it. |
| 19 string name = 1; |
| 20 |
| 21 // Service-specific metadata associated with the operation. It typically |
| 22 // contains progress information and common metadata such as create time. |
| 23 // Some services might not provide such metadata. Any method that returns a |
| 24 // long-running operation should document the metadata type, if any. |
| 25 Any metadata = 2; |
| 26 |
| 27 // If the value is 'false', it means the operation is still in progress. |
| 28 // If true, the operation is completed, and either 'error' or 'response' is |
| 29 // available. |
| 30 bool done = 3; |
| 31 |
| 32 // The operation result, which can be either an 'error' or a valid 'response'. |
| 33 // If 'done' == 'false', neither 'error' nor 'response' is set. |
| 34 // If 'done' == 'true', exactly one of 'error' or 'response' is set. |
| 35 oneof result { |
| 36 // The error result of the operation in case of failure or cancellation. |
| 37 Status error = 4; |
| 38 |
| 39 // The normal response of the operation in case of success. |
| 40 Any response = 5; |
| 41 } |
| 42 } |
OLD | NEW |