-
Notifications
You must be signed in to change notification settings - Fork 617
/
Operations.ts
241 lines (227 loc) · 19.3 KB
/
Operations.ts
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
// Original file: deps/googleapis/google/longrunning/operations.proto
import type * as grpc from '@grpc/grpc-js'
import type { MethodDefinition } from '@grpc/proto-loader'
import type { ICancelOperationRequest as I_google_longrunning_CancelOperationRequest, OCancelOperationRequest as O_google_longrunning_CancelOperationRequest } from '../../google/longrunning/CancelOperationRequest.ts';
import type { IDeleteOperationRequest as I_google_longrunning_DeleteOperationRequest, ODeleteOperationRequest as O_google_longrunning_DeleteOperationRequest } from '../../google/longrunning/DeleteOperationRequest.ts';
import type { IEmpty as I_google_protobuf_Empty, OEmpty as O_google_protobuf_Empty } from '../../google/protobuf/Empty.ts';
import type { IGetOperationRequest as I_google_longrunning_GetOperationRequest, OGetOperationRequest as O_google_longrunning_GetOperationRequest } from '../../google/longrunning/GetOperationRequest.ts';
import type { IListOperationsRequest as I_google_longrunning_ListOperationsRequest, OListOperationsRequest as O_google_longrunning_ListOperationsRequest } from '../../google/longrunning/ListOperationsRequest.ts';
import type { IListOperationsResponse as I_google_longrunning_ListOperationsResponse, OListOperationsResponse as O_google_longrunning_ListOperationsResponse } from '../../google/longrunning/ListOperationsResponse.ts';
import type { IOperation as I_google_longrunning_Operation, OOperation as O_google_longrunning_Operation } from '../../google/longrunning/Operation.ts';
import type { IWaitOperationRequest as I_google_longrunning_WaitOperationRequest, OWaitOperationRequest as O_google_longrunning_WaitOperationRequest } from '../../google/longrunning/WaitOperationRequest.ts';
/**
* Manages long-running operations with an API service.
*
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*/
export interface OperationsClient extends grpc.Client {
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*/
CancelOperation(argument: I_google_longrunning_CancelOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
CancelOperation(argument: I_google_longrunning_CancelOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
CancelOperation(argument: I_google_longrunning_CancelOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
CancelOperation(argument: I_google_longrunning_CancelOperationRequest, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*/
cancelOperation(argument: I_google_longrunning_CancelOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
cancelOperation(argument: I_google_longrunning_CancelOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
cancelOperation(argument: I_google_longrunning_CancelOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
cancelOperation(argument: I_google_longrunning_CancelOperationRequest, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*/
DeleteOperation(argument: I_google_longrunning_DeleteOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
DeleteOperation(argument: I_google_longrunning_DeleteOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
DeleteOperation(argument: I_google_longrunning_DeleteOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
DeleteOperation(argument: I_google_longrunning_DeleteOperationRequest, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*/
deleteOperation(argument: I_google_longrunning_DeleteOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
deleteOperation(argument: I_google_longrunning_DeleteOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
deleteOperation(argument: I_google_longrunning_DeleteOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
deleteOperation(argument: I_google_longrunning_DeleteOperationRequest, callback: grpc.requestCallback<O_google_protobuf_Empty>): grpc.ClientUnaryCall;
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*/
GetOperation(argument: I_google_longrunning_GetOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
GetOperation(argument: I_google_longrunning_GetOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
GetOperation(argument: I_google_longrunning_GetOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
GetOperation(argument: I_google_longrunning_GetOperationRequest, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*/
getOperation(argument: I_google_longrunning_GetOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
getOperation(argument: I_google_longrunning_GetOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
getOperation(argument: I_google_longrunning_GetOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
getOperation(argument: I_google_longrunning_GetOperationRequest, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
*
* NOTE: the `name` binding allows API services to override the binding
* to use different resource name schemes, such as `users/* /operations`. To
* override the binding, API services can add a binding such as
* `"/v1/{name=users/*}/operations"` to their service configuration.
* For backwards compatibility, the default name includes the operations
* collection id, however overriding users must ensure the name binding
* is the parent resource, without the operations collection id.
*/
ListOperations(argument: I_google_longrunning_ListOperationsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
ListOperations(argument: I_google_longrunning_ListOperationsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
ListOperations(argument: I_google_longrunning_ListOperationsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
ListOperations(argument: I_google_longrunning_ListOperationsRequest, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
*
* NOTE: the `name` binding allows API services to override the binding
* to use different resource name schemes, such as `users/* /operations`. To
* override the binding, API services can add a binding such as
* `"/v1/{name=users/*}/operations"` to their service configuration.
* For backwards compatibility, the default name includes the operations
* collection id, however overriding users must ensure the name binding
* is the parent resource, without the operations collection id.
*/
listOperations(argument: I_google_longrunning_ListOperationsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
listOperations(argument: I_google_longrunning_ListOperationsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
listOperations(argument: I_google_longrunning_ListOperationsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
listOperations(argument: I_google_longrunning_ListOperationsRequest, callback: grpc.requestCallback<O_google_longrunning_ListOperationsResponse>): grpc.ClientUnaryCall;
/**
* Waits for the specified long-running operation until it is done or reaches
* at most a specified timeout, returning the latest state. If the operation
* is already done, the latest state is immediately returned. If the timeout
* specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
* timeout is used. If the server does not support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
* Note that this method is on a best-effort basis. It may return the latest
* state before the specified timeout (including immediately), meaning even an
* immediate response is no guarantee that the operation is done.
*/
WaitOperation(argument: I_google_longrunning_WaitOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
WaitOperation(argument: I_google_longrunning_WaitOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
WaitOperation(argument: I_google_longrunning_WaitOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
WaitOperation(argument: I_google_longrunning_WaitOperationRequest, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
/**
* Waits for the specified long-running operation until it is done or reaches
* at most a specified timeout, returning the latest state. If the operation
* is already done, the latest state is immediately returned. If the timeout
* specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
* timeout is used. If the server does not support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
* Note that this method is on a best-effort basis. It may return the latest
* state before the specified timeout (including immediately), meaning even an
* immediate response is no guarantee that the operation is done.
*/
waitOperation(argument: I_google_longrunning_WaitOperationRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
waitOperation(argument: I_google_longrunning_WaitOperationRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
waitOperation(argument: I_google_longrunning_WaitOperationRequest, options: grpc.CallOptions, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
waitOperation(argument: I_google_longrunning_WaitOperationRequest, callback: grpc.requestCallback<O_google_longrunning_Operation>): grpc.ClientUnaryCall;
}
/**
* Manages long-running operations with an API service.
*
* When an API method normally takes long time to complete, it can be designed
* to return [Operation][google.longrunning.Operation] to the client, and the client can use this
* interface to receive the real response asynchronously by polling the
* operation resource, or pass the operation resource to another API (such as
* Google Cloud Pub/Sub API) to receive the response. Any API service that
* returns long-running operations should implement the `Operations` interface
* so developers can have a consistent client experience.
*/
export interface OperationsHandlers extends grpc.UntypedServiceImplementation {
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
* corresponding to `Code.CANCELLED`.
*/
CancelOperation: grpc.handleUnaryCall<O_google_longrunning_CancelOperationRequest, I_google_protobuf_Empty>;
/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*/
DeleteOperation: grpc.handleUnaryCall<O_google_longrunning_DeleteOperationRequest, I_google_protobuf_Empty>;
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*/
GetOperation: grpc.handleUnaryCall<O_google_longrunning_GetOperationRequest, I_google_longrunning_Operation>;
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
*
* NOTE: the `name` binding allows API services to override the binding
* to use different resource name schemes, such as `users/* /operations`. To
* override the binding, API services can add a binding such as
* `"/v1/{name=users/*}/operations"` to their service configuration.
* For backwards compatibility, the default name includes the operations
* collection id, however overriding users must ensure the name binding
* is the parent resource, without the operations collection id.
*/
ListOperations: grpc.handleUnaryCall<O_google_longrunning_ListOperationsRequest, I_google_longrunning_ListOperationsResponse>;
/**
* Waits for the specified long-running operation until it is done or reaches
* at most a specified timeout, returning the latest state. If the operation
* is already done, the latest state is immediately returned. If the timeout
* specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
* timeout is used. If the server does not support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
* Note that this method is on a best-effort basis. It may return the latest
* state before the specified timeout (including immediately), meaning even an
* immediate response is no guarantee that the operation is done.
*/
WaitOperation: grpc.handleUnaryCall<O_google_longrunning_WaitOperationRequest, I_google_longrunning_Operation>;
}
export interface OperationsDefinition extends grpc.ServiceDefinition {
CancelOperation: MethodDefinition<I_google_longrunning_CancelOperationRequest, I_google_protobuf_Empty, O_google_longrunning_CancelOperationRequest, O_google_protobuf_Empty>
DeleteOperation: MethodDefinition<I_google_longrunning_DeleteOperationRequest, I_google_protobuf_Empty, O_google_longrunning_DeleteOperationRequest, O_google_protobuf_Empty>
GetOperation: MethodDefinition<I_google_longrunning_GetOperationRequest, I_google_longrunning_Operation, O_google_longrunning_GetOperationRequest, O_google_longrunning_Operation>
ListOperations: MethodDefinition<I_google_longrunning_ListOperationsRequest, I_google_longrunning_ListOperationsResponse, O_google_longrunning_ListOperationsRequest, O_google_longrunning_ListOperationsResponse>
WaitOperation: MethodDefinition<I_google_longrunning_WaitOperationRequest, I_google_longrunning_Operation, O_google_longrunning_WaitOperationRequest, O_google_longrunning_Operation>
}