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