@vzn/vx-reapi 0.0.0 → 0.0.485
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +502 -0
- package/index.ts +4 -0
- package/package.json +45 -6
- package/protos/build/bazel/remote/execution/v2/remote_execution.proto +2516 -0
- package/protos/build/bazel/semver/semver.proto +41 -0
- package/protos/google/api/annotations.proto +31 -0
- package/protos/google/api/client.proto +598 -0
- package/protos/google/api/field_behavior.proto +104 -0
- package/protos/google/api/http.proto +370 -0
- package/protos/google/api/launch_stage.proto +72 -0
- package/protos/google/bytestream/bytestream.proto +178 -0
- package/protos/google/longrunning/operations.proto +265 -0
- package/protos/google/rpc/code.proto +186 -0
- package/protos/google/rpc/status.proto +48 -0
- package/src/cache.ts +199 -0
- package/src/executor.ts +1805 -0
- package/src/index.ts +277 -0
- package/src/merkle.ts +867 -0
- package/src/wire.ts +1658 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// Copyright 2025 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.bytestream;
|
|
18
|
+
|
|
19
|
+
option go_package = "google.golang.org/genproto/googleapis/bytestream;bytestream";
|
|
20
|
+
option java_outer_classname = "ByteStreamProto";
|
|
21
|
+
option java_package = "com.google.bytestream";
|
|
22
|
+
|
|
23
|
+
// #### Introduction
|
|
24
|
+
//
|
|
25
|
+
// The Byte Stream API enables a client to read and write a stream of bytes to
|
|
26
|
+
// and from a resource. Resources have names, and these names are supplied in
|
|
27
|
+
// the API calls below to identify the resource that is being read from or
|
|
28
|
+
// written to.
|
|
29
|
+
//
|
|
30
|
+
// All implementations of the Byte Stream API export the interface defined here:
|
|
31
|
+
//
|
|
32
|
+
// * `Read()`: Reads the contents of a resource.
|
|
33
|
+
//
|
|
34
|
+
// * `Write()`: Writes the contents of a resource. The client can call `Write()`
|
|
35
|
+
// multiple times with the same resource and can check the status of the write
|
|
36
|
+
// by calling `QueryWriteStatus()`.
|
|
37
|
+
//
|
|
38
|
+
// #### Service parameters and metadata
|
|
39
|
+
//
|
|
40
|
+
// The ByteStream API provides no direct way to access/modify any metadata
|
|
41
|
+
// associated with the resource.
|
|
42
|
+
//
|
|
43
|
+
// #### Errors
|
|
44
|
+
//
|
|
45
|
+
// The errors returned by the service are in the Google canonical error space.
|
|
46
|
+
service ByteStream {
|
|
47
|
+
// `Read()` is used to retrieve the contents of a resource as a sequence
|
|
48
|
+
// of bytes. The bytes are returned in a sequence of responses, and the
|
|
49
|
+
// responses are delivered as the results of a server-side streaming RPC.
|
|
50
|
+
rpc Read(ReadRequest) returns (stream ReadResponse);
|
|
51
|
+
|
|
52
|
+
// `Write()` is used to send the contents of a resource as a sequence of
|
|
53
|
+
// bytes. The bytes are sent in a sequence of request protos of a client-side
|
|
54
|
+
// streaming RPC.
|
|
55
|
+
//
|
|
56
|
+
// A `Write()` action is resumable. If there is an error or the connection is
|
|
57
|
+
// broken during the `Write()`, the client should check the status of the
|
|
58
|
+
// `Write()` by calling `QueryWriteStatus()` and continue writing from the
|
|
59
|
+
// returned `committed_size`. This may be less than the amount of data the
|
|
60
|
+
// client previously sent.
|
|
61
|
+
//
|
|
62
|
+
// Calling `Write()` on a resource name that was previously written and
|
|
63
|
+
// finalized could cause an error, depending on whether the underlying service
|
|
64
|
+
// allows over-writing of previously written resources.
|
|
65
|
+
//
|
|
66
|
+
// When the client closes the request channel, the service will respond with
|
|
67
|
+
// a `WriteResponse`. The service will not view the resource as `complete`
|
|
68
|
+
// until the client has sent a `WriteRequest` with `finish_write` set to
|
|
69
|
+
// `true`. Sending any requests on a stream after sending a request with
|
|
70
|
+
// `finish_write` set to `true` will cause an error. The client **should**
|
|
71
|
+
// check the `WriteResponse` it receives to determine how much data the
|
|
72
|
+
// service was able to commit and whether the service views the resource as
|
|
73
|
+
// `complete` or not.
|
|
74
|
+
rpc Write(stream WriteRequest) returns (WriteResponse);
|
|
75
|
+
|
|
76
|
+
// `QueryWriteStatus()` is used to find the `committed_size` for a resource
|
|
77
|
+
// that is being written, which can then be used as the `write_offset` for
|
|
78
|
+
// the next `Write()` call.
|
|
79
|
+
//
|
|
80
|
+
// If the resource does not exist (i.e., the resource has been deleted, or the
|
|
81
|
+
// first `Write()` has not yet reached the service), this method returns the
|
|
82
|
+
// error `NOT_FOUND`.
|
|
83
|
+
//
|
|
84
|
+
// The client **may** call `QueryWriteStatus()` at any time to determine how
|
|
85
|
+
// much data has been processed for this resource. This is useful if the
|
|
86
|
+
// client is buffering data and needs to know which data can be safely
|
|
87
|
+
// evicted. For any sequence of `QueryWriteStatus()` calls for a given
|
|
88
|
+
// resource name, the sequence of returned `committed_size` values will be
|
|
89
|
+
// non-decreasing.
|
|
90
|
+
rpc QueryWriteStatus(QueryWriteStatusRequest)
|
|
91
|
+
returns (QueryWriteStatusResponse);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Request object for ByteStream.Read.
|
|
95
|
+
message ReadRequest {
|
|
96
|
+
// The name of the resource to read.
|
|
97
|
+
string resource_name = 1;
|
|
98
|
+
|
|
99
|
+
// The offset for the first byte to return in the read, relative to the start
|
|
100
|
+
// of the resource.
|
|
101
|
+
//
|
|
102
|
+
// A `read_offset` that is negative or greater than the size of the resource
|
|
103
|
+
// will cause an `OUT_OF_RANGE` error.
|
|
104
|
+
int64 read_offset = 2;
|
|
105
|
+
|
|
106
|
+
// The maximum number of `data` bytes the server is allowed to return in the
|
|
107
|
+
// sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
|
|
108
|
+
// there is no limit, and a negative `read_limit` will cause an error.
|
|
109
|
+
//
|
|
110
|
+
// If the stream returns fewer bytes than allowed by the `read_limit` and no
|
|
111
|
+
// error occurred, the stream includes all data from the `read_offset` to the
|
|
112
|
+
// end of the resource.
|
|
113
|
+
int64 read_limit = 3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Response object for ByteStream.Read.
|
|
117
|
+
message ReadResponse {
|
|
118
|
+
// A portion of the data for the resource. The service **may** leave `data`
|
|
119
|
+
// empty for any given `ReadResponse`. This enables the service to inform the
|
|
120
|
+
// client that the request is still live while it is running an operation to
|
|
121
|
+
// generate more data.
|
|
122
|
+
bytes data = 10;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Request object for ByteStream.Write.
|
|
126
|
+
message WriteRequest {
|
|
127
|
+
// The name of the resource to write. This **must** be set on the first
|
|
128
|
+
// `WriteRequest` of each `Write()` action. If it is set on subsequent calls,
|
|
129
|
+
// it **must** match the value of the first request.
|
|
130
|
+
string resource_name = 1;
|
|
131
|
+
|
|
132
|
+
// The offset from the beginning of the resource at which the data should be
|
|
133
|
+
// written. It is required on all `WriteRequest`s.
|
|
134
|
+
//
|
|
135
|
+
// In the first `WriteRequest` of a `Write()` action, it indicates
|
|
136
|
+
// the initial offset for the `Write()` call. The value **must** be equal to
|
|
137
|
+
// the `committed_size` that a call to `QueryWriteStatus()` would return.
|
|
138
|
+
//
|
|
139
|
+
// On subsequent calls, this value **must** be set and **must** be equal to
|
|
140
|
+
// the sum of the first `write_offset` and the sizes of all `data` bundles
|
|
141
|
+
// sent previously on this stream.
|
|
142
|
+
//
|
|
143
|
+
// An incorrect value will cause an error.
|
|
144
|
+
int64 write_offset = 2;
|
|
145
|
+
|
|
146
|
+
// If `true`, this indicates that the write is complete. Sending any
|
|
147
|
+
// `WriteRequest`s subsequent to one in which `finish_write` is `true` will
|
|
148
|
+
// cause an error.
|
|
149
|
+
bool finish_write = 3;
|
|
150
|
+
|
|
151
|
+
// A portion of the data for the resource. The client **may** leave `data`
|
|
152
|
+
// empty for any given `WriteRequest`. This enables the client to inform the
|
|
153
|
+
// service that the request is still live while it is running an operation to
|
|
154
|
+
// generate more data.
|
|
155
|
+
bytes data = 10;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Response object for ByteStream.Write.
|
|
159
|
+
message WriteResponse {
|
|
160
|
+
// The number of bytes that have been processed for the given resource.
|
|
161
|
+
int64 committed_size = 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Request object for ByteStream.QueryWriteStatus.
|
|
165
|
+
message QueryWriteStatusRequest {
|
|
166
|
+
// The name of the resource whose write status is being requested.
|
|
167
|
+
string resource_name = 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Response object for ByteStream.QueryWriteStatus.
|
|
171
|
+
message QueryWriteStatusResponse {
|
|
172
|
+
// The number of bytes that have been processed for the given resource.
|
|
173
|
+
int64 committed_size = 1;
|
|
174
|
+
|
|
175
|
+
// `complete` is `true` only if the client has sent a `WriteRequest` with
|
|
176
|
+
// `finish_write` set to true, and the server has processed that request.
|
|
177
|
+
bool complete = 2;
|
|
178
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Copyright 2025 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.longrunning;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/protobuf/any.proto";
|
|
23
|
+
import "google/protobuf/descriptor.proto";
|
|
24
|
+
import "google/protobuf/duration.proto";
|
|
25
|
+
import "google/protobuf/empty.proto";
|
|
26
|
+
import "google/rpc/status.proto";
|
|
27
|
+
|
|
28
|
+
option csharp_namespace = "Google.LongRunning";
|
|
29
|
+
option go_package = "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb";
|
|
30
|
+
option java_multiple_files = true;
|
|
31
|
+
option java_outer_classname = "OperationsProto";
|
|
32
|
+
option java_package = "com.google.longrunning";
|
|
33
|
+
option objc_class_prefix = "GLRUN";
|
|
34
|
+
option php_namespace = "Google\\LongRunning";
|
|
35
|
+
|
|
36
|
+
extend google.protobuf.MethodOptions {
|
|
37
|
+
// Additional information regarding long-running operations.
|
|
38
|
+
// In particular, this specifies the types that are returned from
|
|
39
|
+
// long-running operations.
|
|
40
|
+
//
|
|
41
|
+
// Required for methods that return `google.longrunning.Operation`; invalid
|
|
42
|
+
// otherwise.
|
|
43
|
+
google.longrunning.OperationInfo operation_info = 1049;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Manages long-running operations with an API service.
|
|
47
|
+
//
|
|
48
|
+
// When an API method normally takes long time to complete, it can be designed
|
|
49
|
+
// to return [Operation][google.longrunning.Operation] to the client, and the
|
|
50
|
+
// client can use this interface to receive the real response asynchronously by
|
|
51
|
+
// polling the operation resource, or pass the operation resource to another API
|
|
52
|
+
// (such as Pub/Sub API) to receive the response. Any API service that returns
|
|
53
|
+
// long-running operations should implement the `Operations` interface so
|
|
54
|
+
// developers can have a consistent client experience.
|
|
55
|
+
service Operations {
|
|
56
|
+
option (google.api.default_host) = "longrunning.googleapis.com";
|
|
57
|
+
|
|
58
|
+
// Lists operations that match the specified filter in the request. If the
|
|
59
|
+
// server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
60
|
+
rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
|
|
61
|
+
option (google.api.http) = {
|
|
62
|
+
get: "/v1/{name=operations}"
|
|
63
|
+
};
|
|
64
|
+
option (google.api.method_signature) = "name,filter";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Gets the latest state of a long-running operation. Clients can use this
|
|
68
|
+
// method to poll the operation result at intervals as recommended by the API
|
|
69
|
+
// service.
|
|
70
|
+
rpc GetOperation(GetOperationRequest) returns (Operation) {
|
|
71
|
+
option (google.api.http) = {
|
|
72
|
+
get: "/v1/{name=operations/**}"
|
|
73
|
+
};
|
|
74
|
+
option (google.api.method_signature) = "name";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Deletes a long-running operation. This method indicates that the client is
|
|
78
|
+
// no longer interested in the operation result. It does not cancel the
|
|
79
|
+
// operation. If the server doesn't support this method, it returns
|
|
80
|
+
// `google.rpc.Code.UNIMPLEMENTED`.
|
|
81
|
+
rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) {
|
|
82
|
+
option (google.api.http) = {
|
|
83
|
+
delete: "/v1/{name=operations/**}"
|
|
84
|
+
};
|
|
85
|
+
option (google.api.method_signature) = "name";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Starts asynchronous cancellation on a long-running operation. The server
|
|
89
|
+
// makes a best effort to cancel the operation, but success is not
|
|
90
|
+
// guaranteed. If the server doesn't support this method, it returns
|
|
91
|
+
// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
|
92
|
+
// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
|
|
93
|
+
// other methods to check whether the cancellation succeeded or whether the
|
|
94
|
+
// operation completed despite cancellation. On successful cancellation,
|
|
95
|
+
// the operation is not deleted; instead, it becomes an operation with
|
|
96
|
+
// an [Operation.error][google.longrunning.Operation.error] value with a
|
|
97
|
+
// [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to
|
|
98
|
+
// `Code.CANCELLED`.
|
|
99
|
+
rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
|
|
100
|
+
option (google.api.http) = {
|
|
101
|
+
post: "/v1/{name=operations/**}:cancel"
|
|
102
|
+
body: "*"
|
|
103
|
+
};
|
|
104
|
+
option (google.api.method_signature) = "name";
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Waits until the specified long-running operation is done or reaches at most
|
|
108
|
+
// a specified timeout, returning the latest state. If the operation is
|
|
109
|
+
// already done, the latest state is immediately returned. If the timeout
|
|
110
|
+
// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
|
111
|
+
// timeout is used. If the server does not support this method, it returns
|
|
112
|
+
// `google.rpc.Code.UNIMPLEMENTED`.
|
|
113
|
+
// Note that this method is on a best-effort basis. It may return the latest
|
|
114
|
+
// state before the specified timeout (including immediately), meaning even an
|
|
115
|
+
// immediate response is no guarantee that the operation is done.
|
|
116
|
+
rpc WaitOperation(WaitOperationRequest) returns (Operation) {}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// This resource represents a long-running operation that is the result of a
|
|
120
|
+
// network API call.
|
|
121
|
+
message Operation {
|
|
122
|
+
// The server-assigned name, which is only unique within the same service that
|
|
123
|
+
// originally returns it. If you use the default HTTP mapping, the
|
|
124
|
+
// `name` should be a resource name ending with `operations/{unique_id}`.
|
|
125
|
+
string name = 1;
|
|
126
|
+
|
|
127
|
+
// Service-specific metadata associated with the operation. It typically
|
|
128
|
+
// contains progress information and common metadata such as create time.
|
|
129
|
+
// Some services might not provide such metadata. Any method that returns a
|
|
130
|
+
// long-running operation should document the metadata type, if any.
|
|
131
|
+
google.protobuf.Any metadata = 2;
|
|
132
|
+
|
|
133
|
+
// If the value is `false`, it means the operation is still in progress.
|
|
134
|
+
// If `true`, the operation is completed, and either `error` or `response` is
|
|
135
|
+
// available.
|
|
136
|
+
bool done = 3;
|
|
137
|
+
|
|
138
|
+
// The operation result, which can be either an `error` or a valid `response`.
|
|
139
|
+
// If `done` == `false`, neither `error` nor `response` is set.
|
|
140
|
+
// If `done` == `true`, exactly one of `error` or `response` can be set.
|
|
141
|
+
// Some services might not provide the result.
|
|
142
|
+
oneof result {
|
|
143
|
+
// The error result of the operation in case of failure or cancellation.
|
|
144
|
+
google.rpc.Status error = 4;
|
|
145
|
+
|
|
146
|
+
// The normal, successful response of the operation. If the original
|
|
147
|
+
// method returns no data on success, such as `Delete`, the response is
|
|
148
|
+
// `google.protobuf.Empty`. If the original method is standard
|
|
149
|
+
// `Get`/`Create`/`Update`, the response should be the resource. For other
|
|
150
|
+
// methods, the response should have the type `XxxResponse`, where `Xxx`
|
|
151
|
+
// is the original method name. For example, if the original method name
|
|
152
|
+
// is `TakeSnapshot()`, the inferred response type is
|
|
153
|
+
// `TakeSnapshotResponse`.
|
|
154
|
+
google.protobuf.Any response = 5;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// The request message for
|
|
159
|
+
// [Operations.GetOperation][google.longrunning.Operations.GetOperation].
|
|
160
|
+
message GetOperationRequest {
|
|
161
|
+
// The name of the operation resource.
|
|
162
|
+
string name = 1;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// The request message for
|
|
166
|
+
// [Operations.ListOperations][google.longrunning.Operations.ListOperations].
|
|
167
|
+
message ListOperationsRequest {
|
|
168
|
+
// The name of the operation's parent resource.
|
|
169
|
+
string name = 4;
|
|
170
|
+
|
|
171
|
+
// The standard list filter.
|
|
172
|
+
string filter = 1;
|
|
173
|
+
|
|
174
|
+
// The standard list page size.
|
|
175
|
+
int32 page_size = 2;
|
|
176
|
+
|
|
177
|
+
// The standard list page token.
|
|
178
|
+
string page_token = 3;
|
|
179
|
+
|
|
180
|
+
// When set to `true`, operations that are reachable are returned as normal,
|
|
181
|
+
// and those that are unreachable are returned in the
|
|
182
|
+
// [ListOperationsResponse.unreachable] field.
|
|
183
|
+
//
|
|
184
|
+
// This can only be `true` when reading across collections e.g. when `parent`
|
|
185
|
+
// is set to `"projects/example/locations/-"`.
|
|
186
|
+
//
|
|
187
|
+
// This field is not by default supported and will result in an
|
|
188
|
+
// `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
|
|
189
|
+
// service or product specific documentation.
|
|
190
|
+
bool return_partial_success = 5;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// The response message for
|
|
194
|
+
// [Operations.ListOperations][google.longrunning.Operations.ListOperations].
|
|
195
|
+
message ListOperationsResponse {
|
|
196
|
+
// A list of operations that matches the specified filter in the request.
|
|
197
|
+
repeated Operation operations = 1;
|
|
198
|
+
|
|
199
|
+
// The standard List next-page token.
|
|
200
|
+
string next_page_token = 2;
|
|
201
|
+
|
|
202
|
+
// Unordered list. Unreachable resources. Populated when the request sets
|
|
203
|
+
// `ListOperationsRequest.return_partial_success` and reads across
|
|
204
|
+
// collections e.g. when attempting to list all resources across all supported
|
|
205
|
+
// locations.
|
|
206
|
+
repeated string unreachable = 3
|
|
207
|
+
[(google.api.field_behavior) = UNORDERED_LIST];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// The request message for
|
|
211
|
+
// [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
|
|
212
|
+
message CancelOperationRequest {
|
|
213
|
+
// The name of the operation resource to be cancelled.
|
|
214
|
+
string name = 1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// The request message for
|
|
218
|
+
// [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
|
|
219
|
+
message DeleteOperationRequest {
|
|
220
|
+
// The name of the operation resource to be deleted.
|
|
221
|
+
string name = 1;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// The request message for
|
|
225
|
+
// [Operations.WaitOperation][google.longrunning.Operations.WaitOperation].
|
|
226
|
+
message WaitOperationRequest {
|
|
227
|
+
// The name of the operation resource to wait on.
|
|
228
|
+
string name = 1;
|
|
229
|
+
|
|
230
|
+
// The maximum duration to wait before timing out. If left blank, the wait
|
|
231
|
+
// will be at most the time permitted by the underlying HTTP/RPC protocol.
|
|
232
|
+
// If RPC context deadline is also specified, the shorter one will be used.
|
|
233
|
+
google.protobuf.Duration timeout = 2;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// A message representing the message types used by a long-running operation.
|
|
237
|
+
//
|
|
238
|
+
// Example:
|
|
239
|
+
//
|
|
240
|
+
// rpc Export(ExportRequest) returns (google.longrunning.Operation) {
|
|
241
|
+
// option (google.longrunning.operation_info) = {
|
|
242
|
+
// response_type: "ExportResponse"
|
|
243
|
+
// metadata_type: "ExportMetadata"
|
|
244
|
+
// };
|
|
245
|
+
// }
|
|
246
|
+
message OperationInfo {
|
|
247
|
+
// Required. The message name of the primary return type for this
|
|
248
|
+
// long-running operation.
|
|
249
|
+
// This type will be used to deserialize the LRO's response.
|
|
250
|
+
//
|
|
251
|
+
// If the response is in a different package from the rpc, a fully-qualified
|
|
252
|
+
// message name must be used (e.g. `google.protobuf.Struct`).
|
|
253
|
+
//
|
|
254
|
+
// Note: Altering this value constitutes a breaking change.
|
|
255
|
+
string response_type = 1;
|
|
256
|
+
|
|
257
|
+
// Required. The message name of the metadata type for this long-running
|
|
258
|
+
// operation.
|
|
259
|
+
//
|
|
260
|
+
// If the response is in a different package from the rpc, a fully-qualified
|
|
261
|
+
// message name must be used (e.g. `google.protobuf.Struct`).
|
|
262
|
+
//
|
|
263
|
+
// Note: Altering this value constitutes a breaking change.
|
|
264
|
+
string metadata_type = 2;
|
|
265
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.rpc;
|
|
18
|
+
|
|
19
|
+
option go_package = "google.golang.org/genproto/googleapis/rpc/code;code";
|
|
20
|
+
option java_multiple_files = true;
|
|
21
|
+
option java_outer_classname = "CodeProto";
|
|
22
|
+
option java_package = "com.google.rpc";
|
|
23
|
+
option objc_class_prefix = "RPC";
|
|
24
|
+
|
|
25
|
+
// The canonical error codes for gRPC APIs.
|
|
26
|
+
//
|
|
27
|
+
//
|
|
28
|
+
// Sometimes multiple error codes may apply. Services should return
|
|
29
|
+
// the most specific error code that applies. For example, prefer
|
|
30
|
+
// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
|
|
31
|
+
// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
|
|
32
|
+
enum Code {
|
|
33
|
+
// Not an error; returned on success.
|
|
34
|
+
//
|
|
35
|
+
// HTTP Mapping: 200 OK
|
|
36
|
+
OK = 0;
|
|
37
|
+
|
|
38
|
+
// The operation was cancelled, typically by the caller.
|
|
39
|
+
//
|
|
40
|
+
// HTTP Mapping: 499 Client Closed Request
|
|
41
|
+
CANCELLED = 1;
|
|
42
|
+
|
|
43
|
+
// Unknown error. For example, this error may be returned when
|
|
44
|
+
// a `Status` value received from another address space belongs to
|
|
45
|
+
// an error space that is not known in this address space. Also
|
|
46
|
+
// errors raised by APIs that do not return enough error information
|
|
47
|
+
// may be converted to this error.
|
|
48
|
+
//
|
|
49
|
+
// HTTP Mapping: 500 Internal Server Error
|
|
50
|
+
UNKNOWN = 2;
|
|
51
|
+
|
|
52
|
+
// The client specified an invalid argument. Note that this differs
|
|
53
|
+
// from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
|
|
54
|
+
// that are problematic regardless of the state of the system
|
|
55
|
+
// (e.g., a malformed file name).
|
|
56
|
+
//
|
|
57
|
+
// HTTP Mapping: 400 Bad Request
|
|
58
|
+
INVALID_ARGUMENT = 3;
|
|
59
|
+
|
|
60
|
+
// The deadline expired before the operation could complete. For operations
|
|
61
|
+
// that change the state of the system, this error may be returned
|
|
62
|
+
// even if the operation has completed successfully. For example, a
|
|
63
|
+
// successful response from a server could have been delayed long
|
|
64
|
+
// enough for the deadline to expire.
|
|
65
|
+
//
|
|
66
|
+
// HTTP Mapping: 504 Gateway Timeout
|
|
67
|
+
DEADLINE_EXCEEDED = 4;
|
|
68
|
+
|
|
69
|
+
// Some requested entity (e.g., file or directory) was not found.
|
|
70
|
+
//
|
|
71
|
+
// Note to server developers: if a request is denied for an entire class
|
|
72
|
+
// of users, such as gradual feature rollout or undocumented allowlist,
|
|
73
|
+
// `NOT_FOUND` may be used. If a request is denied for some users within
|
|
74
|
+
// a class of users, such as user-based access control, `PERMISSION_DENIED`
|
|
75
|
+
// must be used.
|
|
76
|
+
//
|
|
77
|
+
// HTTP Mapping: 404 Not Found
|
|
78
|
+
NOT_FOUND = 5;
|
|
79
|
+
|
|
80
|
+
// The entity that a client attempted to create (e.g., file or directory)
|
|
81
|
+
// already exists.
|
|
82
|
+
//
|
|
83
|
+
// HTTP Mapping: 409 Conflict
|
|
84
|
+
ALREADY_EXISTS = 6;
|
|
85
|
+
|
|
86
|
+
// The caller does not have permission to execute the specified
|
|
87
|
+
// operation. `PERMISSION_DENIED` must not be used for rejections
|
|
88
|
+
// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
|
|
89
|
+
// instead for those errors). `PERMISSION_DENIED` must not be
|
|
90
|
+
// used if the caller can not be identified (use `UNAUTHENTICATED`
|
|
91
|
+
// instead for those errors). This error code does not imply the
|
|
92
|
+
// request is valid or the requested entity exists or satisfies
|
|
93
|
+
// other pre-conditions.
|
|
94
|
+
//
|
|
95
|
+
// HTTP Mapping: 403 Forbidden
|
|
96
|
+
PERMISSION_DENIED = 7;
|
|
97
|
+
|
|
98
|
+
// The request does not have valid authentication credentials for the
|
|
99
|
+
// operation.
|
|
100
|
+
//
|
|
101
|
+
// HTTP Mapping: 401 Unauthorized
|
|
102
|
+
UNAUTHENTICATED = 16;
|
|
103
|
+
|
|
104
|
+
// Some resource has been exhausted, perhaps a per-user quota, or
|
|
105
|
+
// perhaps the entire file system is out of space.
|
|
106
|
+
//
|
|
107
|
+
// HTTP Mapping: 429 Too Many Requests
|
|
108
|
+
RESOURCE_EXHAUSTED = 8;
|
|
109
|
+
|
|
110
|
+
// The operation was rejected because the system is not in a state
|
|
111
|
+
// required for the operation's execution. For example, the directory
|
|
112
|
+
// to be deleted is non-empty, an rmdir operation is applied to
|
|
113
|
+
// a non-directory, etc.
|
|
114
|
+
//
|
|
115
|
+
// Service implementors can use the following guidelines to decide
|
|
116
|
+
// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
|
|
117
|
+
// (a) Use `UNAVAILABLE` if the client can retry just the failing call.
|
|
118
|
+
// (b) Use `ABORTED` if the client should retry at a higher level. For
|
|
119
|
+
// example, when a client-specified test-and-set fails, indicating the
|
|
120
|
+
// client should restart a read-modify-write sequence.
|
|
121
|
+
// (c) Use `FAILED_PRECONDITION` if the client should not retry until
|
|
122
|
+
// the system state has been explicitly fixed. For example, if an "rmdir"
|
|
123
|
+
// fails because the directory is non-empty, `FAILED_PRECONDITION`
|
|
124
|
+
// should be returned since the client should not retry unless
|
|
125
|
+
// the files are deleted from the directory.
|
|
126
|
+
//
|
|
127
|
+
// HTTP Mapping: 400 Bad Request
|
|
128
|
+
FAILED_PRECONDITION = 9;
|
|
129
|
+
|
|
130
|
+
// The operation was aborted, typically due to a concurrency issue such as
|
|
131
|
+
// a sequencer check failure or transaction abort.
|
|
132
|
+
//
|
|
133
|
+
// See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
|
134
|
+
// `ABORTED`, and `UNAVAILABLE`.
|
|
135
|
+
//
|
|
136
|
+
// HTTP Mapping: 409 Conflict
|
|
137
|
+
ABORTED = 10;
|
|
138
|
+
|
|
139
|
+
// The operation was attempted past the valid range. E.g., seeking or
|
|
140
|
+
// reading past end-of-file.
|
|
141
|
+
//
|
|
142
|
+
// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
|
|
143
|
+
// be fixed if the system state changes. For example, a 32-bit file
|
|
144
|
+
// system will generate `INVALID_ARGUMENT` if asked to read at an
|
|
145
|
+
// offset that is not in the range [0,2^32-1], but it will generate
|
|
146
|
+
// `OUT_OF_RANGE` if asked to read from an offset past the current
|
|
147
|
+
// file size.
|
|
148
|
+
//
|
|
149
|
+
// There is a fair bit of overlap between `FAILED_PRECONDITION` and
|
|
150
|
+
// `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
|
|
151
|
+
// error) when it applies so that callers who are iterating through
|
|
152
|
+
// a space can easily look for an `OUT_OF_RANGE` error to detect when
|
|
153
|
+
// they are done.
|
|
154
|
+
//
|
|
155
|
+
// HTTP Mapping: 400 Bad Request
|
|
156
|
+
OUT_OF_RANGE = 11;
|
|
157
|
+
|
|
158
|
+
// The operation is not implemented or is not supported/enabled in this
|
|
159
|
+
// service.
|
|
160
|
+
//
|
|
161
|
+
// HTTP Mapping: 501 Not Implemented
|
|
162
|
+
UNIMPLEMENTED = 12;
|
|
163
|
+
|
|
164
|
+
// Internal errors. This means that some invariants expected by the
|
|
165
|
+
// underlying system have been broken. This error code is reserved
|
|
166
|
+
// for serious errors.
|
|
167
|
+
//
|
|
168
|
+
// HTTP Mapping: 500 Internal Server Error
|
|
169
|
+
INTERNAL = 13;
|
|
170
|
+
|
|
171
|
+
// The service is currently unavailable. This is most likely a
|
|
172
|
+
// transient condition, which can be corrected by retrying with
|
|
173
|
+
// a backoff. Note that it is not always safe to retry
|
|
174
|
+
// non-idempotent operations.
|
|
175
|
+
//
|
|
176
|
+
// See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
|
177
|
+
// `ABORTED`, and `UNAVAILABLE`.
|
|
178
|
+
//
|
|
179
|
+
// HTTP Mapping: 503 Service Unavailable
|
|
180
|
+
UNAVAILABLE = 14;
|
|
181
|
+
|
|
182
|
+
// Unrecoverable data loss or corruption.
|
|
183
|
+
//
|
|
184
|
+
// HTTP Mapping: 500 Internal Server Error
|
|
185
|
+
DATA_LOSS = 15;
|
|
186
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.rpc;
|
|
18
|
+
|
|
19
|
+
import "google/protobuf/any.proto";
|
|
20
|
+
|
|
21
|
+
option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
|
|
22
|
+
option java_multiple_files = true;
|
|
23
|
+
option java_outer_classname = "StatusProto";
|
|
24
|
+
option java_package = "com.google.rpc";
|
|
25
|
+
option objc_class_prefix = "RPC";
|
|
26
|
+
|
|
27
|
+
// The `Status` type defines a logical error model that is suitable for
|
|
28
|
+
// different programming environments, including REST APIs and RPC APIs. It is
|
|
29
|
+
// used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
30
|
+
// three pieces of data: error code, error message, and error details.
|
|
31
|
+
//
|
|
32
|
+
// You can find out more about this error model and how to work with it in the
|
|
33
|
+
// [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
34
|
+
message Status {
|
|
35
|
+
// The status code, which should be an enum value of
|
|
36
|
+
// [google.rpc.Code][google.rpc.Code].
|
|
37
|
+
int32 code = 1;
|
|
38
|
+
|
|
39
|
+
// A developer-facing error message, which should be in English. Any
|
|
40
|
+
// user-facing error message should be localized and sent in the
|
|
41
|
+
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
|
|
42
|
+
// by the client.
|
|
43
|
+
string message = 2;
|
|
44
|
+
|
|
45
|
+
// A list of messages that carry the error details. There is a common set of
|
|
46
|
+
// message types for APIs to use.
|
|
47
|
+
repeated google.protobuf.Any details = 3;
|
|
48
|
+
}
|