@useairfoil/flight 0.1.0
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/README.md +1 -0
- package/dist/proto/Flight.proto +524 -0
- package/dist/proto/FlightSql.proto +1925 -0
- package/dist/proto/any.proto +162 -0
- package/dist/src/index.d.ts +749 -0
- package/dist/src/index.js +4133 -0
- package/dist/src/index.js.map +1 -0
- package/dist/test/index.d.ts +29 -0
- package/dist/test/index.js +79 -0
- package/dist/test/index.js.map +1 -0
- package/package.json +58 -0
- package/src/arrow-flight-sql.ts +121 -0
- package/src/arrow-flight.ts +149 -0
- package/src/arrow-utils.ts +30 -0
- package/src/flight-data-encoder.ts +108 -0
- package/src/index.ts +16 -0
- package/src/proto/Flight.ts +2627 -0
- package/src/proto/FlightSql.ts +6592 -0
- package/src/proto/any.ts +269 -0
- package/src/proto/google/protobuf/descriptor.ts +7101 -0
- package/src/proto/google/protobuf/timestamp.ts +231 -0
- package/src/proto/typeRegistry.ts +29 -0
- package/src/proto-utils.ts +39 -0
- package/src/record-batch-decoder.ts +401 -0
|
@@ -0,0 +1,2627 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: Flight.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import { type CallContext, type CallOptions } from "nice-grpc-common";
|
|
10
|
+
import { Timestamp } from "./google/protobuf/timestamp.js";
|
|
11
|
+
import { messageTypeRegistry } from "./typeRegistry.js";
|
|
12
|
+
|
|
13
|
+
export const protobufPackage = "arrow.flight.protocol";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The result of a cancel operation.
|
|
17
|
+
*
|
|
18
|
+
* This is used by CancelFlightInfoResult.status.
|
|
19
|
+
*/
|
|
20
|
+
export enum CancelStatus {
|
|
21
|
+
/**
|
|
22
|
+
* UNSPECIFIED - The cancellation status is unknown. Servers should avoid using
|
|
23
|
+
* this value (send a NOT_FOUND error if the requested query is
|
|
24
|
+
* not known). Clients can retry the request.
|
|
25
|
+
*/
|
|
26
|
+
UNSPECIFIED = 0,
|
|
27
|
+
/**
|
|
28
|
+
* CANCELLED - The cancellation request is complete. Subsequent requests with
|
|
29
|
+
* the same payload may return CANCELLED or a NOT_FOUND error.
|
|
30
|
+
*/
|
|
31
|
+
CANCELLED = 1,
|
|
32
|
+
/**
|
|
33
|
+
* CANCELLING - The cancellation request is in progress. The client may retry
|
|
34
|
+
* the cancellation request.
|
|
35
|
+
*/
|
|
36
|
+
CANCELLING = 2,
|
|
37
|
+
/**
|
|
38
|
+
* NOT_CANCELLABLE - The query is not cancellable. The client should not retry the
|
|
39
|
+
* cancellation request.
|
|
40
|
+
*/
|
|
41
|
+
NOT_CANCELLABLE = 3,
|
|
42
|
+
UNRECOGNIZED = -1,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function cancelStatusFromJSON(object: any): CancelStatus {
|
|
46
|
+
switch (object) {
|
|
47
|
+
case 0:
|
|
48
|
+
case "CANCEL_STATUS_UNSPECIFIED":
|
|
49
|
+
return CancelStatus.UNSPECIFIED;
|
|
50
|
+
case 1:
|
|
51
|
+
case "CANCEL_STATUS_CANCELLED":
|
|
52
|
+
return CancelStatus.CANCELLED;
|
|
53
|
+
case 2:
|
|
54
|
+
case "CANCEL_STATUS_CANCELLING":
|
|
55
|
+
return CancelStatus.CANCELLING;
|
|
56
|
+
case 3:
|
|
57
|
+
case "CANCEL_STATUS_NOT_CANCELLABLE":
|
|
58
|
+
return CancelStatus.NOT_CANCELLABLE;
|
|
59
|
+
case -1:
|
|
60
|
+
case "UNRECOGNIZED":
|
|
61
|
+
default:
|
|
62
|
+
return CancelStatus.UNRECOGNIZED;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function cancelStatusToJSON(object: CancelStatus): string {
|
|
67
|
+
switch (object) {
|
|
68
|
+
case CancelStatus.UNSPECIFIED:
|
|
69
|
+
return "CANCEL_STATUS_UNSPECIFIED";
|
|
70
|
+
case CancelStatus.CANCELLED:
|
|
71
|
+
return "CANCEL_STATUS_CANCELLED";
|
|
72
|
+
case CancelStatus.CANCELLING:
|
|
73
|
+
return "CANCEL_STATUS_CANCELLING";
|
|
74
|
+
case CancelStatus.NOT_CANCELLABLE:
|
|
75
|
+
return "CANCEL_STATUS_NOT_CANCELLABLE";
|
|
76
|
+
case CancelStatus.UNRECOGNIZED:
|
|
77
|
+
default:
|
|
78
|
+
return "UNRECOGNIZED";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** The request that a client provides to a server on handshake. */
|
|
83
|
+
export interface HandshakeRequest {
|
|
84
|
+
$type: "arrow.flight.protocol.HandshakeRequest";
|
|
85
|
+
/** A defined protocol version */
|
|
86
|
+
readonly protocolVersion: bigint;
|
|
87
|
+
/** Arbitrary auth/handshake info. */
|
|
88
|
+
readonly payload: Uint8Array;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface HandshakeResponse {
|
|
92
|
+
$type: "arrow.flight.protocol.HandshakeResponse";
|
|
93
|
+
/** A defined protocol version */
|
|
94
|
+
readonly protocolVersion: bigint;
|
|
95
|
+
/** Arbitrary auth/handshake info. */
|
|
96
|
+
readonly payload: Uint8Array;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** A message for doing simple auth. */
|
|
100
|
+
export interface BasicAuth {
|
|
101
|
+
$type: "arrow.flight.protocol.BasicAuth";
|
|
102
|
+
readonly username: string;
|
|
103
|
+
readonly password: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface Empty {
|
|
107
|
+
$type: "arrow.flight.protocol.Empty";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Describes an available action, including both the name used for execution
|
|
112
|
+
* along with a short description of the purpose of the action.
|
|
113
|
+
*/
|
|
114
|
+
export interface ActionType {
|
|
115
|
+
$type: "arrow.flight.protocol.ActionType";
|
|
116
|
+
readonly type: string;
|
|
117
|
+
readonly description: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* A service specific expression that can be used to return a limited set
|
|
122
|
+
* of available Arrow Flight streams.
|
|
123
|
+
*/
|
|
124
|
+
export interface Criteria {
|
|
125
|
+
$type: "arrow.flight.protocol.Criteria";
|
|
126
|
+
readonly expression: Uint8Array;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** An opaque action specific for the service. */
|
|
130
|
+
export interface Action {
|
|
131
|
+
$type: "arrow.flight.protocol.Action";
|
|
132
|
+
readonly type: string;
|
|
133
|
+
readonly body: Uint8Array;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The request of the CancelFlightInfo action.
|
|
138
|
+
*
|
|
139
|
+
* The request should be stored in Action.body.
|
|
140
|
+
*/
|
|
141
|
+
export interface CancelFlightInfoRequest {
|
|
142
|
+
$type: "arrow.flight.protocol.CancelFlightInfoRequest";
|
|
143
|
+
readonly info: FlightInfo | undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The request of the RenewFlightEndpoint action.
|
|
148
|
+
*
|
|
149
|
+
* The request should be stored in Action.body.
|
|
150
|
+
*/
|
|
151
|
+
export interface RenewFlightEndpointRequest {
|
|
152
|
+
$type: "arrow.flight.protocol.RenewFlightEndpointRequest";
|
|
153
|
+
readonly endpoint: FlightEndpoint | undefined;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** An opaque result returned after executing an action. */
|
|
157
|
+
export interface Result {
|
|
158
|
+
$type: "arrow.flight.protocol.Result";
|
|
159
|
+
readonly body: Uint8Array;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The result of the CancelFlightInfo action.
|
|
164
|
+
*
|
|
165
|
+
* The result should be stored in Result.body.
|
|
166
|
+
*/
|
|
167
|
+
export interface CancelFlightInfoResult {
|
|
168
|
+
$type: "arrow.flight.protocol.CancelFlightInfoResult";
|
|
169
|
+
readonly status: CancelStatus;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** Wrap the result of a getSchema call */
|
|
173
|
+
export interface SchemaResult {
|
|
174
|
+
$type: "arrow.flight.protocol.SchemaResult";
|
|
175
|
+
/**
|
|
176
|
+
* The schema of the dataset in its IPC form:
|
|
177
|
+
* 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix
|
|
178
|
+
* 4 bytes - the byte length of the payload
|
|
179
|
+
* a flatbuffer Message whose header is the Schema
|
|
180
|
+
*/
|
|
181
|
+
readonly schema: Uint8Array;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The name or tag for a Flight. May be used as a way to retrieve or generate
|
|
186
|
+
* a flight or be used to expose a set of previously defined flights.
|
|
187
|
+
*/
|
|
188
|
+
export interface FlightDescriptor {
|
|
189
|
+
$type: "arrow.flight.protocol.FlightDescriptor";
|
|
190
|
+
readonly type: FlightDescriptor_DescriptorType;
|
|
191
|
+
/**
|
|
192
|
+
* Opaque value used to express a command. Should only be defined when
|
|
193
|
+
* type = CMD.
|
|
194
|
+
*/
|
|
195
|
+
readonly cmd: Uint8Array;
|
|
196
|
+
/**
|
|
197
|
+
* List of strings identifying a particular dataset. Should only be defined
|
|
198
|
+
* when type = PATH.
|
|
199
|
+
*/
|
|
200
|
+
readonly path: readonly string[];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Describes what type of descriptor is defined. */
|
|
204
|
+
export enum FlightDescriptor_DescriptorType {
|
|
205
|
+
/** UNKNOWN - Protobuf pattern, not used. */
|
|
206
|
+
UNKNOWN = 0,
|
|
207
|
+
/**
|
|
208
|
+
* PATH - A named path that identifies a dataset. A path is composed of a string
|
|
209
|
+
* or list of strings describing a particular dataset. This is conceptually
|
|
210
|
+
* similar to a path inside a filesystem.
|
|
211
|
+
*/
|
|
212
|
+
PATH = 1,
|
|
213
|
+
/** CMD - An opaque command to generate a dataset. */
|
|
214
|
+
CMD = 2,
|
|
215
|
+
UNRECOGNIZED = -1,
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function flightDescriptor_DescriptorTypeFromJSON(object: any): FlightDescriptor_DescriptorType {
|
|
219
|
+
switch (object) {
|
|
220
|
+
case 0:
|
|
221
|
+
case "UNKNOWN":
|
|
222
|
+
return FlightDescriptor_DescriptorType.UNKNOWN;
|
|
223
|
+
case 1:
|
|
224
|
+
case "PATH":
|
|
225
|
+
return FlightDescriptor_DescriptorType.PATH;
|
|
226
|
+
case 2:
|
|
227
|
+
case "CMD":
|
|
228
|
+
return FlightDescriptor_DescriptorType.CMD;
|
|
229
|
+
case -1:
|
|
230
|
+
case "UNRECOGNIZED":
|
|
231
|
+
default:
|
|
232
|
+
return FlightDescriptor_DescriptorType.UNRECOGNIZED;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function flightDescriptor_DescriptorTypeToJSON(object: FlightDescriptor_DescriptorType): string {
|
|
237
|
+
switch (object) {
|
|
238
|
+
case FlightDescriptor_DescriptorType.UNKNOWN:
|
|
239
|
+
return "UNKNOWN";
|
|
240
|
+
case FlightDescriptor_DescriptorType.PATH:
|
|
241
|
+
return "PATH";
|
|
242
|
+
case FlightDescriptor_DescriptorType.CMD:
|
|
243
|
+
return "CMD";
|
|
244
|
+
case FlightDescriptor_DescriptorType.UNRECOGNIZED:
|
|
245
|
+
default:
|
|
246
|
+
return "UNRECOGNIZED";
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The access coordinates for retrieval of a dataset. With a FlightInfo, a
|
|
252
|
+
* consumer is able to determine how to retrieve a dataset.
|
|
253
|
+
*/
|
|
254
|
+
export interface FlightInfo {
|
|
255
|
+
$type: "arrow.flight.protocol.FlightInfo";
|
|
256
|
+
/**
|
|
257
|
+
* The schema of the dataset in its IPC form:
|
|
258
|
+
* 4 bytes - an optional IPC_CONTINUATION_TOKEN prefix
|
|
259
|
+
* 4 bytes - the byte length of the payload
|
|
260
|
+
* a flatbuffer Message whose header is the Schema
|
|
261
|
+
*/
|
|
262
|
+
readonly schema: Uint8Array;
|
|
263
|
+
/** The descriptor associated with this info. */
|
|
264
|
+
readonly flightDescriptor:
|
|
265
|
+
| FlightDescriptor
|
|
266
|
+
| undefined;
|
|
267
|
+
/**
|
|
268
|
+
* A list of endpoints associated with the flight. To consume the
|
|
269
|
+
* whole flight, all endpoints (and hence all Tickets) must be
|
|
270
|
+
* consumed. Endpoints can be consumed in any order.
|
|
271
|
+
*
|
|
272
|
+
* In other words, an application can use multiple endpoints to
|
|
273
|
+
* represent partitioned data.
|
|
274
|
+
*
|
|
275
|
+
* If the returned data has an ordering, an application can use
|
|
276
|
+
* "FlightInfo.ordered = true" or should return the all data in a
|
|
277
|
+
* single endpoint. Otherwise, there is no ordering defined on
|
|
278
|
+
* endpoints or the data within.
|
|
279
|
+
*
|
|
280
|
+
* A client can read ordered data by reading data from returned
|
|
281
|
+
* endpoints, in order, from front to back.
|
|
282
|
+
*
|
|
283
|
+
* Note that a client may ignore "FlightInfo.ordered = true". If an
|
|
284
|
+
* ordering is important for an application, an application must
|
|
285
|
+
* choose one of them:
|
|
286
|
+
*
|
|
287
|
+
* * An application requires that all clients must read data in
|
|
288
|
+
* returned endpoints order.
|
|
289
|
+
* * An application must return the all data in a single endpoint.
|
|
290
|
+
*/
|
|
291
|
+
readonly endpoint: readonly FlightEndpoint[];
|
|
292
|
+
/** Set these to -1 if unknown. */
|
|
293
|
+
readonly totalRecords: bigint;
|
|
294
|
+
readonly totalBytes: bigint;
|
|
295
|
+
/** FlightEndpoints are in the same order as the data. */
|
|
296
|
+
readonly ordered: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Application-defined metadata.
|
|
299
|
+
*
|
|
300
|
+
* There is no inherent or required relationship between this
|
|
301
|
+
* and the app_metadata fields in the FlightEndpoints or resulting
|
|
302
|
+
* FlightData messages. Since this metadata is application-defined,
|
|
303
|
+
* a given application could define there to be a relationship,
|
|
304
|
+
* but there is none required by the spec.
|
|
305
|
+
*/
|
|
306
|
+
readonly appMetadata: Uint8Array;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** The information to process a long-running query. */
|
|
310
|
+
export interface PollInfo {
|
|
311
|
+
$type: "arrow.flight.protocol.PollInfo";
|
|
312
|
+
/**
|
|
313
|
+
* The currently available results.
|
|
314
|
+
*
|
|
315
|
+
* If "flight_descriptor" is not specified, the query is complete
|
|
316
|
+
* and "info" specifies all results. Otherwise, "info" contains
|
|
317
|
+
* partial query results.
|
|
318
|
+
*
|
|
319
|
+
* Note that each PollInfo response contains a complete
|
|
320
|
+
* FlightInfo (not just the delta between the previous and current
|
|
321
|
+
* FlightInfo).
|
|
322
|
+
*
|
|
323
|
+
* Subsequent PollInfo responses may only append new endpoints to
|
|
324
|
+
* info.
|
|
325
|
+
*
|
|
326
|
+
* Clients can begin fetching results via DoGet(Ticket) with the
|
|
327
|
+
* ticket in the info before the query is
|
|
328
|
+
* completed. FlightInfo.ordered is also valid.
|
|
329
|
+
*/
|
|
330
|
+
readonly info:
|
|
331
|
+
| FlightInfo
|
|
332
|
+
| undefined;
|
|
333
|
+
/**
|
|
334
|
+
* The descriptor the client should use on the next try.
|
|
335
|
+
* If unset, the query is complete.
|
|
336
|
+
*/
|
|
337
|
+
readonly flightDescriptor:
|
|
338
|
+
| FlightDescriptor
|
|
339
|
+
| undefined;
|
|
340
|
+
/**
|
|
341
|
+
* Query progress. If known, must be in [0.0, 1.0] but need not be
|
|
342
|
+
* monotonic or nondecreasing. If unknown, do not set.
|
|
343
|
+
*/
|
|
344
|
+
readonly progress?:
|
|
345
|
+
| number
|
|
346
|
+
| undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Expiration time for this request. After this passes, the server
|
|
349
|
+
* might not accept the retry descriptor anymore (and the query may
|
|
350
|
+
* be cancelled). This may be updated on a call to PollFlightInfo.
|
|
351
|
+
*/
|
|
352
|
+
readonly expirationTime: Date | undefined;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/** A particular stream or split associated with a flight. */
|
|
356
|
+
export interface FlightEndpoint {
|
|
357
|
+
$type: "arrow.flight.protocol.FlightEndpoint";
|
|
358
|
+
/** Token used to retrieve this stream. */
|
|
359
|
+
readonly ticket:
|
|
360
|
+
| Ticket
|
|
361
|
+
| undefined;
|
|
362
|
+
/**
|
|
363
|
+
* A list of URIs where this ticket can be redeemed via DoGet().
|
|
364
|
+
*
|
|
365
|
+
* If the list is empty, the expectation is that the ticket can only
|
|
366
|
+
* be redeemed on the current service where the ticket was
|
|
367
|
+
* generated.
|
|
368
|
+
*
|
|
369
|
+
* If the list is not empty, the expectation is that the ticket can
|
|
370
|
+
* be redeemed at any of the locations, and that the data returned
|
|
371
|
+
* will be equivalent. In this case, the ticket may only be redeemed
|
|
372
|
+
* at one of the given locations, and not (necessarily) on the
|
|
373
|
+
* current service.
|
|
374
|
+
*
|
|
375
|
+
* In other words, an application can use multiple locations to
|
|
376
|
+
* represent redundant and/or load balanced services.
|
|
377
|
+
*/
|
|
378
|
+
readonly location: readonly Location[];
|
|
379
|
+
/**
|
|
380
|
+
* Expiration time of this stream. If present, clients may assume
|
|
381
|
+
* they can retry DoGet requests. Otherwise, it is
|
|
382
|
+
* application-defined whether DoGet requests may be retried.
|
|
383
|
+
*/
|
|
384
|
+
readonly expirationTime:
|
|
385
|
+
| Date
|
|
386
|
+
| undefined;
|
|
387
|
+
/**
|
|
388
|
+
* Application-defined metadata.
|
|
389
|
+
*
|
|
390
|
+
* There is no inherent or required relationship between this
|
|
391
|
+
* and the app_metadata fields in the FlightInfo or resulting
|
|
392
|
+
* FlightData messages. Since this metadata is application-defined,
|
|
393
|
+
* a given application could define there to be a relationship,
|
|
394
|
+
* but there is none required by the spec.
|
|
395
|
+
*/
|
|
396
|
+
readonly appMetadata: Uint8Array;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* A location where a Flight service will accept retrieval of a particular
|
|
401
|
+
* stream given a ticket.
|
|
402
|
+
*/
|
|
403
|
+
export interface Location {
|
|
404
|
+
$type: "arrow.flight.protocol.Location";
|
|
405
|
+
readonly uri: string;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* An opaque identifier that the service can use to retrieve a particular
|
|
410
|
+
* portion of a stream.
|
|
411
|
+
*
|
|
412
|
+
* Tickets are meant to be single use. It is an error/application-defined
|
|
413
|
+
* behavior to reuse a ticket.
|
|
414
|
+
*/
|
|
415
|
+
export interface Ticket {
|
|
416
|
+
$type: "arrow.flight.protocol.Ticket";
|
|
417
|
+
readonly ticket: Uint8Array;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/** A batch of Arrow data as part of a stream of batches. */
|
|
421
|
+
export interface FlightData {
|
|
422
|
+
$type: "arrow.flight.protocol.FlightData";
|
|
423
|
+
/**
|
|
424
|
+
* The descriptor of the data. This is only relevant when a client is
|
|
425
|
+
* starting a new DoPut stream.
|
|
426
|
+
*/
|
|
427
|
+
readonly flightDescriptor:
|
|
428
|
+
| FlightDescriptor
|
|
429
|
+
| undefined;
|
|
430
|
+
/** Header for message data as described in Message.fbs::Message. */
|
|
431
|
+
readonly dataHeader: Uint8Array;
|
|
432
|
+
/** Application-defined metadata. */
|
|
433
|
+
readonly appMetadata: Uint8Array;
|
|
434
|
+
/**
|
|
435
|
+
* The actual batch of Arrow data. Preferably handled with minimal-copies
|
|
436
|
+
* coming last in the definition to help with sidecar patterns (it is
|
|
437
|
+
* expected that some implementations will fetch this field off the wire
|
|
438
|
+
* with specialized code to avoid extra memory copies).
|
|
439
|
+
*/
|
|
440
|
+
readonly dataBody: Uint8Array;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/** The response message associated with the submission of a DoPut. */
|
|
444
|
+
export interface PutResult {
|
|
445
|
+
$type: "arrow.flight.protocol.PutResult";
|
|
446
|
+
readonly appMetadata: Uint8Array;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
function createBaseHandshakeRequest(): HandshakeRequest {
|
|
450
|
+
return { $type: "arrow.flight.protocol.HandshakeRequest", protocolVersion: 0n, payload: new Uint8Array(0) };
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export const HandshakeRequest: MessageFns<HandshakeRequest, "arrow.flight.protocol.HandshakeRequest"> = {
|
|
454
|
+
$type: "arrow.flight.protocol.HandshakeRequest" as const,
|
|
455
|
+
|
|
456
|
+
encode(message: HandshakeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
457
|
+
if (message.protocolVersion !== 0n) {
|
|
458
|
+
if (BigInt.asUintN(64, message.protocolVersion) !== message.protocolVersion) {
|
|
459
|
+
throw new globalThis.Error("value provided for field message.protocolVersion of type uint64 too large");
|
|
460
|
+
}
|
|
461
|
+
writer.uint32(8).uint64(message.protocolVersion);
|
|
462
|
+
}
|
|
463
|
+
if (message.payload.length !== 0) {
|
|
464
|
+
writer.uint32(18).bytes(message.payload);
|
|
465
|
+
}
|
|
466
|
+
return writer;
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
decode(input: BinaryReader | Uint8Array, length?: number): HandshakeRequest {
|
|
470
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
471
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
472
|
+
const message = createBaseHandshakeRequest() as any;
|
|
473
|
+
while (reader.pos < end) {
|
|
474
|
+
const tag = reader.uint32();
|
|
475
|
+
switch (tag >>> 3) {
|
|
476
|
+
case 1: {
|
|
477
|
+
if (tag !== 8) {
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
message.protocolVersion = reader.uint64() as bigint;
|
|
482
|
+
continue;
|
|
483
|
+
}
|
|
484
|
+
case 2: {
|
|
485
|
+
if (tag !== 18) {
|
|
486
|
+
break;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
message.payload = reader.bytes();
|
|
490
|
+
continue;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
reader.skip(tag & 7);
|
|
497
|
+
}
|
|
498
|
+
return message;
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
fromJSON(object: any): HandshakeRequest {
|
|
502
|
+
return {
|
|
503
|
+
$type: HandshakeRequest.$type,
|
|
504
|
+
protocolVersion: isSet(object.protocolVersion) ? BigInt(object.protocolVersion) : 0n,
|
|
505
|
+
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0),
|
|
506
|
+
};
|
|
507
|
+
},
|
|
508
|
+
|
|
509
|
+
toJSON(message: HandshakeRequest): unknown {
|
|
510
|
+
const obj: any = {};
|
|
511
|
+
if (message.protocolVersion !== 0n) {
|
|
512
|
+
obj.protocolVersion = message.protocolVersion.toString();
|
|
513
|
+
}
|
|
514
|
+
if (message.payload.length !== 0) {
|
|
515
|
+
obj.payload = base64FromBytes(message.payload);
|
|
516
|
+
}
|
|
517
|
+
return obj;
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
create<I extends Exact<DeepPartial<HandshakeRequest>, I>>(base?: I): HandshakeRequest {
|
|
521
|
+
return HandshakeRequest.fromPartial(base ?? ({} as any));
|
|
522
|
+
},
|
|
523
|
+
fromPartial<I extends Exact<DeepPartial<HandshakeRequest>, I>>(object: I): HandshakeRequest {
|
|
524
|
+
const message = createBaseHandshakeRequest() as any;
|
|
525
|
+
message.protocolVersion = object.protocolVersion ?? 0n;
|
|
526
|
+
message.payload = object.payload ?? new Uint8Array(0);
|
|
527
|
+
return message;
|
|
528
|
+
},
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
messageTypeRegistry.set(HandshakeRequest.$type, HandshakeRequest);
|
|
532
|
+
|
|
533
|
+
function createBaseHandshakeResponse(): HandshakeResponse {
|
|
534
|
+
return { $type: "arrow.flight.protocol.HandshakeResponse", protocolVersion: 0n, payload: new Uint8Array(0) };
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export const HandshakeResponse: MessageFns<HandshakeResponse, "arrow.flight.protocol.HandshakeResponse"> = {
|
|
538
|
+
$type: "arrow.flight.protocol.HandshakeResponse" as const,
|
|
539
|
+
|
|
540
|
+
encode(message: HandshakeResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
541
|
+
if (message.protocolVersion !== 0n) {
|
|
542
|
+
if (BigInt.asUintN(64, message.protocolVersion) !== message.protocolVersion) {
|
|
543
|
+
throw new globalThis.Error("value provided for field message.protocolVersion of type uint64 too large");
|
|
544
|
+
}
|
|
545
|
+
writer.uint32(8).uint64(message.protocolVersion);
|
|
546
|
+
}
|
|
547
|
+
if (message.payload.length !== 0) {
|
|
548
|
+
writer.uint32(18).bytes(message.payload);
|
|
549
|
+
}
|
|
550
|
+
return writer;
|
|
551
|
+
},
|
|
552
|
+
|
|
553
|
+
decode(input: BinaryReader | Uint8Array, length?: number): HandshakeResponse {
|
|
554
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
555
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
556
|
+
const message = createBaseHandshakeResponse() as any;
|
|
557
|
+
while (reader.pos < end) {
|
|
558
|
+
const tag = reader.uint32();
|
|
559
|
+
switch (tag >>> 3) {
|
|
560
|
+
case 1: {
|
|
561
|
+
if (tag !== 8) {
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
message.protocolVersion = reader.uint64() as bigint;
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
568
|
+
case 2: {
|
|
569
|
+
if (tag !== 18) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
message.payload = reader.bytes();
|
|
574
|
+
continue;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
578
|
+
break;
|
|
579
|
+
}
|
|
580
|
+
reader.skip(tag & 7);
|
|
581
|
+
}
|
|
582
|
+
return message;
|
|
583
|
+
},
|
|
584
|
+
|
|
585
|
+
fromJSON(object: any): HandshakeResponse {
|
|
586
|
+
return {
|
|
587
|
+
$type: HandshakeResponse.$type,
|
|
588
|
+
protocolVersion: isSet(object.protocolVersion) ? BigInt(object.protocolVersion) : 0n,
|
|
589
|
+
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0),
|
|
590
|
+
};
|
|
591
|
+
},
|
|
592
|
+
|
|
593
|
+
toJSON(message: HandshakeResponse): unknown {
|
|
594
|
+
const obj: any = {};
|
|
595
|
+
if (message.protocolVersion !== 0n) {
|
|
596
|
+
obj.protocolVersion = message.protocolVersion.toString();
|
|
597
|
+
}
|
|
598
|
+
if (message.payload.length !== 0) {
|
|
599
|
+
obj.payload = base64FromBytes(message.payload);
|
|
600
|
+
}
|
|
601
|
+
return obj;
|
|
602
|
+
},
|
|
603
|
+
|
|
604
|
+
create<I extends Exact<DeepPartial<HandshakeResponse>, I>>(base?: I): HandshakeResponse {
|
|
605
|
+
return HandshakeResponse.fromPartial(base ?? ({} as any));
|
|
606
|
+
},
|
|
607
|
+
fromPartial<I extends Exact<DeepPartial<HandshakeResponse>, I>>(object: I): HandshakeResponse {
|
|
608
|
+
const message = createBaseHandshakeResponse() as any;
|
|
609
|
+
message.protocolVersion = object.protocolVersion ?? 0n;
|
|
610
|
+
message.payload = object.payload ?? new Uint8Array(0);
|
|
611
|
+
return message;
|
|
612
|
+
},
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
messageTypeRegistry.set(HandshakeResponse.$type, HandshakeResponse);
|
|
616
|
+
|
|
617
|
+
function createBaseBasicAuth(): BasicAuth {
|
|
618
|
+
return { $type: "arrow.flight.protocol.BasicAuth", username: "", password: "" };
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export const BasicAuth: MessageFns<BasicAuth, "arrow.flight.protocol.BasicAuth"> = {
|
|
622
|
+
$type: "arrow.flight.protocol.BasicAuth" as const,
|
|
623
|
+
|
|
624
|
+
encode(message: BasicAuth, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
625
|
+
if (message.username !== "") {
|
|
626
|
+
writer.uint32(18).string(message.username);
|
|
627
|
+
}
|
|
628
|
+
if (message.password !== "") {
|
|
629
|
+
writer.uint32(26).string(message.password);
|
|
630
|
+
}
|
|
631
|
+
return writer;
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
decode(input: BinaryReader | Uint8Array, length?: number): BasicAuth {
|
|
635
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
636
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
637
|
+
const message = createBaseBasicAuth() as any;
|
|
638
|
+
while (reader.pos < end) {
|
|
639
|
+
const tag = reader.uint32();
|
|
640
|
+
switch (tag >>> 3) {
|
|
641
|
+
case 2: {
|
|
642
|
+
if (tag !== 18) {
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
message.username = reader.string();
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
case 3: {
|
|
650
|
+
if (tag !== 26) {
|
|
651
|
+
break;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
message.password = reader.string();
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
reader.skip(tag & 7);
|
|
662
|
+
}
|
|
663
|
+
return message;
|
|
664
|
+
},
|
|
665
|
+
|
|
666
|
+
fromJSON(object: any): BasicAuth {
|
|
667
|
+
return {
|
|
668
|
+
$type: BasicAuth.$type,
|
|
669
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
670
|
+
password: isSet(object.password) ? globalThis.String(object.password) : "",
|
|
671
|
+
};
|
|
672
|
+
},
|
|
673
|
+
|
|
674
|
+
toJSON(message: BasicAuth): unknown {
|
|
675
|
+
const obj: any = {};
|
|
676
|
+
if (message.username !== "") {
|
|
677
|
+
obj.username = message.username;
|
|
678
|
+
}
|
|
679
|
+
if (message.password !== "") {
|
|
680
|
+
obj.password = message.password;
|
|
681
|
+
}
|
|
682
|
+
return obj;
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
create<I extends Exact<DeepPartial<BasicAuth>, I>>(base?: I): BasicAuth {
|
|
686
|
+
return BasicAuth.fromPartial(base ?? ({} as any));
|
|
687
|
+
},
|
|
688
|
+
fromPartial<I extends Exact<DeepPartial<BasicAuth>, I>>(object: I): BasicAuth {
|
|
689
|
+
const message = createBaseBasicAuth() as any;
|
|
690
|
+
message.username = object.username ?? "";
|
|
691
|
+
message.password = object.password ?? "";
|
|
692
|
+
return message;
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
messageTypeRegistry.set(BasicAuth.$type, BasicAuth);
|
|
697
|
+
|
|
698
|
+
function createBaseEmpty(): Empty {
|
|
699
|
+
return { $type: "arrow.flight.protocol.Empty" };
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
export const Empty: MessageFns<Empty, "arrow.flight.protocol.Empty"> = {
|
|
703
|
+
$type: "arrow.flight.protocol.Empty" as const,
|
|
704
|
+
|
|
705
|
+
encode(_: Empty, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
706
|
+
return writer;
|
|
707
|
+
},
|
|
708
|
+
|
|
709
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Empty {
|
|
710
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
711
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
712
|
+
const message = createBaseEmpty() as any;
|
|
713
|
+
while (reader.pos < end) {
|
|
714
|
+
const tag = reader.uint32();
|
|
715
|
+
switch (tag >>> 3) {
|
|
716
|
+
}
|
|
717
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
reader.skip(tag & 7);
|
|
721
|
+
}
|
|
722
|
+
return message;
|
|
723
|
+
},
|
|
724
|
+
|
|
725
|
+
fromJSON(_: any): Empty {
|
|
726
|
+
return { $type: Empty.$type };
|
|
727
|
+
},
|
|
728
|
+
|
|
729
|
+
toJSON(_: Empty): unknown {
|
|
730
|
+
const obj: any = {};
|
|
731
|
+
return obj;
|
|
732
|
+
},
|
|
733
|
+
|
|
734
|
+
create<I extends Exact<DeepPartial<Empty>, I>>(base?: I): Empty {
|
|
735
|
+
return Empty.fromPartial(base ?? ({} as any));
|
|
736
|
+
},
|
|
737
|
+
fromPartial<I extends Exact<DeepPartial<Empty>, I>>(_: I): Empty {
|
|
738
|
+
const message = createBaseEmpty() as any;
|
|
739
|
+
return message;
|
|
740
|
+
},
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
messageTypeRegistry.set(Empty.$type, Empty);
|
|
744
|
+
|
|
745
|
+
function createBaseActionType(): ActionType {
|
|
746
|
+
return { $type: "arrow.flight.protocol.ActionType", type: "", description: "" };
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export const ActionType: MessageFns<ActionType, "arrow.flight.protocol.ActionType"> = {
|
|
750
|
+
$type: "arrow.flight.protocol.ActionType" as const,
|
|
751
|
+
|
|
752
|
+
encode(message: ActionType, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
753
|
+
if (message.type !== "") {
|
|
754
|
+
writer.uint32(10).string(message.type);
|
|
755
|
+
}
|
|
756
|
+
if (message.description !== "") {
|
|
757
|
+
writer.uint32(18).string(message.description);
|
|
758
|
+
}
|
|
759
|
+
return writer;
|
|
760
|
+
},
|
|
761
|
+
|
|
762
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ActionType {
|
|
763
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
764
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
765
|
+
const message = createBaseActionType() as any;
|
|
766
|
+
while (reader.pos < end) {
|
|
767
|
+
const tag = reader.uint32();
|
|
768
|
+
switch (tag >>> 3) {
|
|
769
|
+
case 1: {
|
|
770
|
+
if (tag !== 10) {
|
|
771
|
+
break;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
message.type = reader.string();
|
|
775
|
+
continue;
|
|
776
|
+
}
|
|
777
|
+
case 2: {
|
|
778
|
+
if (tag !== 18) {
|
|
779
|
+
break;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
message.description = reader.string();
|
|
783
|
+
continue;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
reader.skip(tag & 7);
|
|
790
|
+
}
|
|
791
|
+
return message;
|
|
792
|
+
},
|
|
793
|
+
|
|
794
|
+
fromJSON(object: any): ActionType {
|
|
795
|
+
return {
|
|
796
|
+
$type: ActionType.$type,
|
|
797
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
798
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
799
|
+
};
|
|
800
|
+
},
|
|
801
|
+
|
|
802
|
+
toJSON(message: ActionType): unknown {
|
|
803
|
+
const obj: any = {};
|
|
804
|
+
if (message.type !== "") {
|
|
805
|
+
obj.type = message.type;
|
|
806
|
+
}
|
|
807
|
+
if (message.description !== "") {
|
|
808
|
+
obj.description = message.description;
|
|
809
|
+
}
|
|
810
|
+
return obj;
|
|
811
|
+
},
|
|
812
|
+
|
|
813
|
+
create<I extends Exact<DeepPartial<ActionType>, I>>(base?: I): ActionType {
|
|
814
|
+
return ActionType.fromPartial(base ?? ({} as any));
|
|
815
|
+
},
|
|
816
|
+
fromPartial<I extends Exact<DeepPartial<ActionType>, I>>(object: I): ActionType {
|
|
817
|
+
const message = createBaseActionType() as any;
|
|
818
|
+
message.type = object.type ?? "";
|
|
819
|
+
message.description = object.description ?? "";
|
|
820
|
+
return message;
|
|
821
|
+
},
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
messageTypeRegistry.set(ActionType.$type, ActionType);
|
|
825
|
+
|
|
826
|
+
function createBaseCriteria(): Criteria {
|
|
827
|
+
return { $type: "arrow.flight.protocol.Criteria", expression: new Uint8Array(0) };
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export const Criteria: MessageFns<Criteria, "arrow.flight.protocol.Criteria"> = {
|
|
831
|
+
$type: "arrow.flight.protocol.Criteria" as const,
|
|
832
|
+
|
|
833
|
+
encode(message: Criteria, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
834
|
+
if (message.expression.length !== 0) {
|
|
835
|
+
writer.uint32(10).bytes(message.expression);
|
|
836
|
+
}
|
|
837
|
+
return writer;
|
|
838
|
+
},
|
|
839
|
+
|
|
840
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Criteria {
|
|
841
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
842
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
843
|
+
const message = createBaseCriteria() as any;
|
|
844
|
+
while (reader.pos < end) {
|
|
845
|
+
const tag = reader.uint32();
|
|
846
|
+
switch (tag >>> 3) {
|
|
847
|
+
case 1: {
|
|
848
|
+
if (tag !== 10) {
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
message.expression = reader.bytes();
|
|
853
|
+
continue;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
reader.skip(tag & 7);
|
|
860
|
+
}
|
|
861
|
+
return message;
|
|
862
|
+
},
|
|
863
|
+
|
|
864
|
+
fromJSON(object: any): Criteria {
|
|
865
|
+
return {
|
|
866
|
+
$type: Criteria.$type,
|
|
867
|
+
expression: isSet(object.expression) ? bytesFromBase64(object.expression) : new Uint8Array(0),
|
|
868
|
+
};
|
|
869
|
+
},
|
|
870
|
+
|
|
871
|
+
toJSON(message: Criteria): unknown {
|
|
872
|
+
const obj: any = {};
|
|
873
|
+
if (message.expression.length !== 0) {
|
|
874
|
+
obj.expression = base64FromBytes(message.expression);
|
|
875
|
+
}
|
|
876
|
+
return obj;
|
|
877
|
+
},
|
|
878
|
+
|
|
879
|
+
create<I extends Exact<DeepPartial<Criteria>, I>>(base?: I): Criteria {
|
|
880
|
+
return Criteria.fromPartial(base ?? ({} as any));
|
|
881
|
+
},
|
|
882
|
+
fromPartial<I extends Exact<DeepPartial<Criteria>, I>>(object: I): Criteria {
|
|
883
|
+
const message = createBaseCriteria() as any;
|
|
884
|
+
message.expression = object.expression ?? new Uint8Array(0);
|
|
885
|
+
return message;
|
|
886
|
+
},
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
messageTypeRegistry.set(Criteria.$type, Criteria);
|
|
890
|
+
|
|
891
|
+
function createBaseAction(): Action {
|
|
892
|
+
return { $type: "arrow.flight.protocol.Action", type: "", body: new Uint8Array(0) };
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export const Action: MessageFns<Action, "arrow.flight.protocol.Action"> = {
|
|
896
|
+
$type: "arrow.flight.protocol.Action" as const,
|
|
897
|
+
|
|
898
|
+
encode(message: Action, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
899
|
+
if (message.type !== "") {
|
|
900
|
+
writer.uint32(10).string(message.type);
|
|
901
|
+
}
|
|
902
|
+
if (message.body.length !== 0) {
|
|
903
|
+
writer.uint32(18).bytes(message.body);
|
|
904
|
+
}
|
|
905
|
+
return writer;
|
|
906
|
+
},
|
|
907
|
+
|
|
908
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Action {
|
|
909
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
910
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
911
|
+
const message = createBaseAction() as any;
|
|
912
|
+
while (reader.pos < end) {
|
|
913
|
+
const tag = reader.uint32();
|
|
914
|
+
switch (tag >>> 3) {
|
|
915
|
+
case 1: {
|
|
916
|
+
if (tag !== 10) {
|
|
917
|
+
break;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
message.type = reader.string();
|
|
921
|
+
continue;
|
|
922
|
+
}
|
|
923
|
+
case 2: {
|
|
924
|
+
if (tag !== 18) {
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
message.body = reader.bytes();
|
|
929
|
+
continue;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
reader.skip(tag & 7);
|
|
936
|
+
}
|
|
937
|
+
return message;
|
|
938
|
+
},
|
|
939
|
+
|
|
940
|
+
fromJSON(object: any): Action {
|
|
941
|
+
return {
|
|
942
|
+
$type: Action.$type,
|
|
943
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
944
|
+
body: isSet(object.body) ? bytesFromBase64(object.body) : new Uint8Array(0),
|
|
945
|
+
};
|
|
946
|
+
},
|
|
947
|
+
|
|
948
|
+
toJSON(message: Action): unknown {
|
|
949
|
+
const obj: any = {};
|
|
950
|
+
if (message.type !== "") {
|
|
951
|
+
obj.type = message.type;
|
|
952
|
+
}
|
|
953
|
+
if (message.body.length !== 0) {
|
|
954
|
+
obj.body = base64FromBytes(message.body);
|
|
955
|
+
}
|
|
956
|
+
return obj;
|
|
957
|
+
},
|
|
958
|
+
|
|
959
|
+
create<I extends Exact<DeepPartial<Action>, I>>(base?: I): Action {
|
|
960
|
+
return Action.fromPartial(base ?? ({} as any));
|
|
961
|
+
},
|
|
962
|
+
fromPartial<I extends Exact<DeepPartial<Action>, I>>(object: I): Action {
|
|
963
|
+
const message = createBaseAction() as any;
|
|
964
|
+
message.type = object.type ?? "";
|
|
965
|
+
message.body = object.body ?? new Uint8Array(0);
|
|
966
|
+
return message;
|
|
967
|
+
},
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
messageTypeRegistry.set(Action.$type, Action);
|
|
971
|
+
|
|
972
|
+
function createBaseCancelFlightInfoRequest(): CancelFlightInfoRequest {
|
|
973
|
+
return { $type: "arrow.flight.protocol.CancelFlightInfoRequest", info: undefined };
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export const CancelFlightInfoRequest: MessageFns<
|
|
977
|
+
CancelFlightInfoRequest,
|
|
978
|
+
"arrow.flight.protocol.CancelFlightInfoRequest"
|
|
979
|
+
> = {
|
|
980
|
+
$type: "arrow.flight.protocol.CancelFlightInfoRequest" as const,
|
|
981
|
+
|
|
982
|
+
encode(message: CancelFlightInfoRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
983
|
+
if (message.info !== undefined) {
|
|
984
|
+
FlightInfo.encode(message.info, writer.uint32(10).fork()).join();
|
|
985
|
+
}
|
|
986
|
+
return writer;
|
|
987
|
+
},
|
|
988
|
+
|
|
989
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CancelFlightInfoRequest {
|
|
990
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
991
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
992
|
+
const message = createBaseCancelFlightInfoRequest() as any;
|
|
993
|
+
while (reader.pos < end) {
|
|
994
|
+
const tag = reader.uint32();
|
|
995
|
+
switch (tag >>> 3) {
|
|
996
|
+
case 1: {
|
|
997
|
+
if (tag !== 10) {
|
|
998
|
+
break;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
message.info = FlightInfo.decode(reader, reader.uint32());
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
reader.skip(tag & 7);
|
|
1009
|
+
}
|
|
1010
|
+
return message;
|
|
1011
|
+
},
|
|
1012
|
+
|
|
1013
|
+
fromJSON(object: any): CancelFlightInfoRequest {
|
|
1014
|
+
return {
|
|
1015
|
+
$type: CancelFlightInfoRequest.$type,
|
|
1016
|
+
info: isSet(object.info) ? FlightInfo.fromJSON(object.info) : undefined,
|
|
1017
|
+
};
|
|
1018
|
+
},
|
|
1019
|
+
|
|
1020
|
+
toJSON(message: CancelFlightInfoRequest): unknown {
|
|
1021
|
+
const obj: any = {};
|
|
1022
|
+
if (message.info !== undefined) {
|
|
1023
|
+
obj.info = FlightInfo.toJSON(message.info);
|
|
1024
|
+
}
|
|
1025
|
+
return obj;
|
|
1026
|
+
},
|
|
1027
|
+
|
|
1028
|
+
create<I extends Exact<DeepPartial<CancelFlightInfoRequest>, I>>(base?: I): CancelFlightInfoRequest {
|
|
1029
|
+
return CancelFlightInfoRequest.fromPartial(base ?? ({} as any));
|
|
1030
|
+
},
|
|
1031
|
+
fromPartial<I extends Exact<DeepPartial<CancelFlightInfoRequest>, I>>(object: I): CancelFlightInfoRequest {
|
|
1032
|
+
const message = createBaseCancelFlightInfoRequest() as any;
|
|
1033
|
+
message.info = (object.info !== undefined && object.info !== null)
|
|
1034
|
+
? FlightInfo.fromPartial(object.info)
|
|
1035
|
+
: undefined;
|
|
1036
|
+
return message;
|
|
1037
|
+
},
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
messageTypeRegistry.set(CancelFlightInfoRequest.$type, CancelFlightInfoRequest);
|
|
1041
|
+
|
|
1042
|
+
function createBaseRenewFlightEndpointRequest(): RenewFlightEndpointRequest {
|
|
1043
|
+
return { $type: "arrow.flight.protocol.RenewFlightEndpointRequest", endpoint: undefined };
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
export const RenewFlightEndpointRequest: MessageFns<
|
|
1047
|
+
RenewFlightEndpointRequest,
|
|
1048
|
+
"arrow.flight.protocol.RenewFlightEndpointRequest"
|
|
1049
|
+
> = {
|
|
1050
|
+
$type: "arrow.flight.protocol.RenewFlightEndpointRequest" as const,
|
|
1051
|
+
|
|
1052
|
+
encode(message: RenewFlightEndpointRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1053
|
+
if (message.endpoint !== undefined) {
|
|
1054
|
+
FlightEndpoint.encode(message.endpoint, writer.uint32(10).fork()).join();
|
|
1055
|
+
}
|
|
1056
|
+
return writer;
|
|
1057
|
+
},
|
|
1058
|
+
|
|
1059
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RenewFlightEndpointRequest {
|
|
1060
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1061
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1062
|
+
const message = createBaseRenewFlightEndpointRequest() as any;
|
|
1063
|
+
while (reader.pos < end) {
|
|
1064
|
+
const tag = reader.uint32();
|
|
1065
|
+
switch (tag >>> 3) {
|
|
1066
|
+
case 1: {
|
|
1067
|
+
if (tag !== 10) {
|
|
1068
|
+
break;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
message.endpoint = FlightEndpoint.decode(reader, reader.uint32());
|
|
1072
|
+
continue;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1076
|
+
break;
|
|
1077
|
+
}
|
|
1078
|
+
reader.skip(tag & 7);
|
|
1079
|
+
}
|
|
1080
|
+
return message;
|
|
1081
|
+
},
|
|
1082
|
+
|
|
1083
|
+
fromJSON(object: any): RenewFlightEndpointRequest {
|
|
1084
|
+
return {
|
|
1085
|
+
$type: RenewFlightEndpointRequest.$type,
|
|
1086
|
+
endpoint: isSet(object.endpoint) ? FlightEndpoint.fromJSON(object.endpoint) : undefined,
|
|
1087
|
+
};
|
|
1088
|
+
},
|
|
1089
|
+
|
|
1090
|
+
toJSON(message: RenewFlightEndpointRequest): unknown {
|
|
1091
|
+
const obj: any = {};
|
|
1092
|
+
if (message.endpoint !== undefined) {
|
|
1093
|
+
obj.endpoint = FlightEndpoint.toJSON(message.endpoint);
|
|
1094
|
+
}
|
|
1095
|
+
return obj;
|
|
1096
|
+
},
|
|
1097
|
+
|
|
1098
|
+
create<I extends Exact<DeepPartial<RenewFlightEndpointRequest>, I>>(base?: I): RenewFlightEndpointRequest {
|
|
1099
|
+
return RenewFlightEndpointRequest.fromPartial(base ?? ({} as any));
|
|
1100
|
+
},
|
|
1101
|
+
fromPartial<I extends Exact<DeepPartial<RenewFlightEndpointRequest>, I>>(object: I): RenewFlightEndpointRequest {
|
|
1102
|
+
const message = createBaseRenewFlightEndpointRequest() as any;
|
|
1103
|
+
message.endpoint = (object.endpoint !== undefined && object.endpoint !== null)
|
|
1104
|
+
? FlightEndpoint.fromPartial(object.endpoint)
|
|
1105
|
+
: undefined;
|
|
1106
|
+
return message;
|
|
1107
|
+
},
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
messageTypeRegistry.set(RenewFlightEndpointRequest.$type, RenewFlightEndpointRequest);
|
|
1111
|
+
|
|
1112
|
+
function createBaseResult(): Result {
|
|
1113
|
+
return { $type: "arrow.flight.protocol.Result", body: new Uint8Array(0) };
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
export const Result: MessageFns<Result, "arrow.flight.protocol.Result"> = {
|
|
1117
|
+
$type: "arrow.flight.protocol.Result" as const,
|
|
1118
|
+
|
|
1119
|
+
encode(message: Result, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1120
|
+
if (message.body.length !== 0) {
|
|
1121
|
+
writer.uint32(10).bytes(message.body);
|
|
1122
|
+
}
|
|
1123
|
+
return writer;
|
|
1124
|
+
},
|
|
1125
|
+
|
|
1126
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Result {
|
|
1127
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1128
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1129
|
+
const message = createBaseResult() as any;
|
|
1130
|
+
while (reader.pos < end) {
|
|
1131
|
+
const tag = reader.uint32();
|
|
1132
|
+
switch (tag >>> 3) {
|
|
1133
|
+
case 1: {
|
|
1134
|
+
if (tag !== 10) {
|
|
1135
|
+
break;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
message.body = reader.bytes();
|
|
1139
|
+
continue;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1143
|
+
break;
|
|
1144
|
+
}
|
|
1145
|
+
reader.skip(tag & 7);
|
|
1146
|
+
}
|
|
1147
|
+
return message;
|
|
1148
|
+
},
|
|
1149
|
+
|
|
1150
|
+
fromJSON(object: any): Result {
|
|
1151
|
+
return { $type: Result.$type, body: isSet(object.body) ? bytesFromBase64(object.body) : new Uint8Array(0) };
|
|
1152
|
+
},
|
|
1153
|
+
|
|
1154
|
+
toJSON(message: Result): unknown {
|
|
1155
|
+
const obj: any = {};
|
|
1156
|
+
if (message.body.length !== 0) {
|
|
1157
|
+
obj.body = base64FromBytes(message.body);
|
|
1158
|
+
}
|
|
1159
|
+
return obj;
|
|
1160
|
+
},
|
|
1161
|
+
|
|
1162
|
+
create<I extends Exact<DeepPartial<Result>, I>>(base?: I): Result {
|
|
1163
|
+
return Result.fromPartial(base ?? ({} as any));
|
|
1164
|
+
},
|
|
1165
|
+
fromPartial<I extends Exact<DeepPartial<Result>, I>>(object: I): Result {
|
|
1166
|
+
const message = createBaseResult() as any;
|
|
1167
|
+
message.body = object.body ?? new Uint8Array(0);
|
|
1168
|
+
return message;
|
|
1169
|
+
},
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
messageTypeRegistry.set(Result.$type, Result);
|
|
1173
|
+
|
|
1174
|
+
function createBaseCancelFlightInfoResult(): CancelFlightInfoResult {
|
|
1175
|
+
return { $type: "arrow.flight.protocol.CancelFlightInfoResult", status: 0 };
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
export const CancelFlightInfoResult: MessageFns<
|
|
1179
|
+
CancelFlightInfoResult,
|
|
1180
|
+
"arrow.flight.protocol.CancelFlightInfoResult"
|
|
1181
|
+
> = {
|
|
1182
|
+
$type: "arrow.flight.protocol.CancelFlightInfoResult" as const,
|
|
1183
|
+
|
|
1184
|
+
encode(message: CancelFlightInfoResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1185
|
+
if (message.status !== 0) {
|
|
1186
|
+
writer.uint32(8).int32(message.status);
|
|
1187
|
+
}
|
|
1188
|
+
return writer;
|
|
1189
|
+
},
|
|
1190
|
+
|
|
1191
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CancelFlightInfoResult {
|
|
1192
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1193
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1194
|
+
const message = createBaseCancelFlightInfoResult() as any;
|
|
1195
|
+
while (reader.pos < end) {
|
|
1196
|
+
const tag = reader.uint32();
|
|
1197
|
+
switch (tag >>> 3) {
|
|
1198
|
+
case 1: {
|
|
1199
|
+
if (tag !== 8) {
|
|
1200
|
+
break;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
message.status = reader.int32() as any;
|
|
1204
|
+
continue;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1208
|
+
break;
|
|
1209
|
+
}
|
|
1210
|
+
reader.skip(tag & 7);
|
|
1211
|
+
}
|
|
1212
|
+
return message;
|
|
1213
|
+
},
|
|
1214
|
+
|
|
1215
|
+
fromJSON(object: any): CancelFlightInfoResult {
|
|
1216
|
+
return {
|
|
1217
|
+
$type: CancelFlightInfoResult.$type,
|
|
1218
|
+
status: isSet(object.status) ? cancelStatusFromJSON(object.status) : 0,
|
|
1219
|
+
};
|
|
1220
|
+
},
|
|
1221
|
+
|
|
1222
|
+
toJSON(message: CancelFlightInfoResult): unknown {
|
|
1223
|
+
const obj: any = {};
|
|
1224
|
+
if (message.status !== 0) {
|
|
1225
|
+
obj.status = cancelStatusToJSON(message.status);
|
|
1226
|
+
}
|
|
1227
|
+
return obj;
|
|
1228
|
+
},
|
|
1229
|
+
|
|
1230
|
+
create<I extends Exact<DeepPartial<CancelFlightInfoResult>, I>>(base?: I): CancelFlightInfoResult {
|
|
1231
|
+
return CancelFlightInfoResult.fromPartial(base ?? ({} as any));
|
|
1232
|
+
},
|
|
1233
|
+
fromPartial<I extends Exact<DeepPartial<CancelFlightInfoResult>, I>>(object: I): CancelFlightInfoResult {
|
|
1234
|
+
const message = createBaseCancelFlightInfoResult() as any;
|
|
1235
|
+
message.status = object.status ?? 0;
|
|
1236
|
+
return message;
|
|
1237
|
+
},
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
messageTypeRegistry.set(CancelFlightInfoResult.$type, CancelFlightInfoResult);
|
|
1241
|
+
|
|
1242
|
+
function createBaseSchemaResult(): SchemaResult {
|
|
1243
|
+
return { $type: "arrow.flight.protocol.SchemaResult", schema: new Uint8Array(0) };
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
export const SchemaResult: MessageFns<SchemaResult, "arrow.flight.protocol.SchemaResult"> = {
|
|
1247
|
+
$type: "arrow.flight.protocol.SchemaResult" as const,
|
|
1248
|
+
|
|
1249
|
+
encode(message: SchemaResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1250
|
+
if (message.schema.length !== 0) {
|
|
1251
|
+
writer.uint32(10).bytes(message.schema);
|
|
1252
|
+
}
|
|
1253
|
+
return writer;
|
|
1254
|
+
},
|
|
1255
|
+
|
|
1256
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SchemaResult {
|
|
1257
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1258
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1259
|
+
const message = createBaseSchemaResult() as any;
|
|
1260
|
+
while (reader.pos < end) {
|
|
1261
|
+
const tag = reader.uint32();
|
|
1262
|
+
switch (tag >>> 3) {
|
|
1263
|
+
case 1: {
|
|
1264
|
+
if (tag !== 10) {
|
|
1265
|
+
break;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
message.schema = reader.bytes();
|
|
1269
|
+
continue;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1273
|
+
break;
|
|
1274
|
+
}
|
|
1275
|
+
reader.skip(tag & 7);
|
|
1276
|
+
}
|
|
1277
|
+
return message;
|
|
1278
|
+
},
|
|
1279
|
+
|
|
1280
|
+
fromJSON(object: any): SchemaResult {
|
|
1281
|
+
return {
|
|
1282
|
+
$type: SchemaResult.$type,
|
|
1283
|
+
schema: isSet(object.schema) ? bytesFromBase64(object.schema) : new Uint8Array(0),
|
|
1284
|
+
};
|
|
1285
|
+
},
|
|
1286
|
+
|
|
1287
|
+
toJSON(message: SchemaResult): unknown {
|
|
1288
|
+
const obj: any = {};
|
|
1289
|
+
if (message.schema.length !== 0) {
|
|
1290
|
+
obj.schema = base64FromBytes(message.schema);
|
|
1291
|
+
}
|
|
1292
|
+
return obj;
|
|
1293
|
+
},
|
|
1294
|
+
|
|
1295
|
+
create<I extends Exact<DeepPartial<SchemaResult>, I>>(base?: I): SchemaResult {
|
|
1296
|
+
return SchemaResult.fromPartial(base ?? ({} as any));
|
|
1297
|
+
},
|
|
1298
|
+
fromPartial<I extends Exact<DeepPartial<SchemaResult>, I>>(object: I): SchemaResult {
|
|
1299
|
+
const message = createBaseSchemaResult() as any;
|
|
1300
|
+
message.schema = object.schema ?? new Uint8Array(0);
|
|
1301
|
+
return message;
|
|
1302
|
+
},
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
messageTypeRegistry.set(SchemaResult.$type, SchemaResult);
|
|
1306
|
+
|
|
1307
|
+
function createBaseFlightDescriptor(): FlightDescriptor {
|
|
1308
|
+
return { $type: "arrow.flight.protocol.FlightDescriptor", type: 0, cmd: new Uint8Array(0), path: [] };
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
export const FlightDescriptor: MessageFns<FlightDescriptor, "arrow.flight.protocol.FlightDescriptor"> = {
|
|
1312
|
+
$type: "arrow.flight.protocol.FlightDescriptor" as const,
|
|
1313
|
+
|
|
1314
|
+
encode(message: FlightDescriptor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1315
|
+
if (message.type !== 0) {
|
|
1316
|
+
writer.uint32(8).int32(message.type);
|
|
1317
|
+
}
|
|
1318
|
+
if (message.cmd.length !== 0) {
|
|
1319
|
+
writer.uint32(18).bytes(message.cmd);
|
|
1320
|
+
}
|
|
1321
|
+
for (const v of message.path) {
|
|
1322
|
+
writer.uint32(26).string(v!);
|
|
1323
|
+
}
|
|
1324
|
+
return writer;
|
|
1325
|
+
},
|
|
1326
|
+
|
|
1327
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FlightDescriptor {
|
|
1328
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1329
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1330
|
+
const message = createBaseFlightDescriptor() as any;
|
|
1331
|
+
while (reader.pos < end) {
|
|
1332
|
+
const tag = reader.uint32();
|
|
1333
|
+
switch (tag >>> 3) {
|
|
1334
|
+
case 1: {
|
|
1335
|
+
if (tag !== 8) {
|
|
1336
|
+
break;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
message.type = reader.int32() as any;
|
|
1340
|
+
continue;
|
|
1341
|
+
}
|
|
1342
|
+
case 2: {
|
|
1343
|
+
if (tag !== 18) {
|
|
1344
|
+
break;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
message.cmd = reader.bytes();
|
|
1348
|
+
continue;
|
|
1349
|
+
}
|
|
1350
|
+
case 3: {
|
|
1351
|
+
if (tag !== 26) {
|
|
1352
|
+
break;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
message.path.push(reader.string());
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1360
|
+
break;
|
|
1361
|
+
}
|
|
1362
|
+
reader.skip(tag & 7);
|
|
1363
|
+
}
|
|
1364
|
+
return message;
|
|
1365
|
+
},
|
|
1366
|
+
|
|
1367
|
+
fromJSON(object: any): FlightDescriptor {
|
|
1368
|
+
return {
|
|
1369
|
+
$type: FlightDescriptor.$type,
|
|
1370
|
+
type: isSet(object.type) ? flightDescriptor_DescriptorTypeFromJSON(object.type) : 0,
|
|
1371
|
+
cmd: isSet(object.cmd) ? bytesFromBase64(object.cmd) : new Uint8Array(0),
|
|
1372
|
+
path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.String(e)) : [],
|
|
1373
|
+
};
|
|
1374
|
+
},
|
|
1375
|
+
|
|
1376
|
+
toJSON(message: FlightDescriptor): unknown {
|
|
1377
|
+
const obj: any = {};
|
|
1378
|
+
if (message.type !== 0) {
|
|
1379
|
+
obj.type = flightDescriptor_DescriptorTypeToJSON(message.type);
|
|
1380
|
+
}
|
|
1381
|
+
if (message.cmd.length !== 0) {
|
|
1382
|
+
obj.cmd = base64FromBytes(message.cmd);
|
|
1383
|
+
}
|
|
1384
|
+
if (message.path?.length) {
|
|
1385
|
+
obj.path = message.path;
|
|
1386
|
+
}
|
|
1387
|
+
return obj;
|
|
1388
|
+
},
|
|
1389
|
+
|
|
1390
|
+
create<I extends Exact<DeepPartial<FlightDescriptor>, I>>(base?: I): FlightDescriptor {
|
|
1391
|
+
return FlightDescriptor.fromPartial(base ?? ({} as any));
|
|
1392
|
+
},
|
|
1393
|
+
fromPartial<I extends Exact<DeepPartial<FlightDescriptor>, I>>(object: I): FlightDescriptor {
|
|
1394
|
+
const message = createBaseFlightDescriptor() as any;
|
|
1395
|
+
message.type = object.type ?? 0;
|
|
1396
|
+
message.cmd = object.cmd ?? new Uint8Array(0);
|
|
1397
|
+
message.path = object.path?.map((e) => e) || [];
|
|
1398
|
+
return message;
|
|
1399
|
+
},
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
messageTypeRegistry.set(FlightDescriptor.$type, FlightDescriptor);
|
|
1403
|
+
|
|
1404
|
+
function createBaseFlightInfo(): FlightInfo {
|
|
1405
|
+
return {
|
|
1406
|
+
$type: "arrow.flight.protocol.FlightInfo",
|
|
1407
|
+
schema: new Uint8Array(0),
|
|
1408
|
+
flightDescriptor: undefined,
|
|
1409
|
+
endpoint: [],
|
|
1410
|
+
totalRecords: 0n,
|
|
1411
|
+
totalBytes: 0n,
|
|
1412
|
+
ordered: false,
|
|
1413
|
+
appMetadata: new Uint8Array(0),
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
export const FlightInfo: MessageFns<FlightInfo, "arrow.flight.protocol.FlightInfo"> = {
|
|
1418
|
+
$type: "arrow.flight.protocol.FlightInfo" as const,
|
|
1419
|
+
|
|
1420
|
+
encode(message: FlightInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1421
|
+
if (message.schema.length !== 0) {
|
|
1422
|
+
writer.uint32(10).bytes(message.schema);
|
|
1423
|
+
}
|
|
1424
|
+
if (message.flightDescriptor !== undefined) {
|
|
1425
|
+
FlightDescriptor.encode(message.flightDescriptor, writer.uint32(18).fork()).join();
|
|
1426
|
+
}
|
|
1427
|
+
for (const v of message.endpoint) {
|
|
1428
|
+
FlightEndpoint.encode(v!, writer.uint32(26).fork()).join();
|
|
1429
|
+
}
|
|
1430
|
+
if (message.totalRecords !== 0n) {
|
|
1431
|
+
if (BigInt.asIntN(64, message.totalRecords) !== message.totalRecords) {
|
|
1432
|
+
throw new globalThis.Error("value provided for field message.totalRecords of type int64 too large");
|
|
1433
|
+
}
|
|
1434
|
+
writer.uint32(32).int64(message.totalRecords);
|
|
1435
|
+
}
|
|
1436
|
+
if (message.totalBytes !== 0n) {
|
|
1437
|
+
if (BigInt.asIntN(64, message.totalBytes) !== message.totalBytes) {
|
|
1438
|
+
throw new globalThis.Error("value provided for field message.totalBytes of type int64 too large");
|
|
1439
|
+
}
|
|
1440
|
+
writer.uint32(40).int64(message.totalBytes);
|
|
1441
|
+
}
|
|
1442
|
+
if (message.ordered !== false) {
|
|
1443
|
+
writer.uint32(48).bool(message.ordered);
|
|
1444
|
+
}
|
|
1445
|
+
if (message.appMetadata.length !== 0) {
|
|
1446
|
+
writer.uint32(58).bytes(message.appMetadata);
|
|
1447
|
+
}
|
|
1448
|
+
return writer;
|
|
1449
|
+
},
|
|
1450
|
+
|
|
1451
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FlightInfo {
|
|
1452
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1453
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1454
|
+
const message = createBaseFlightInfo() as any;
|
|
1455
|
+
while (reader.pos < end) {
|
|
1456
|
+
const tag = reader.uint32();
|
|
1457
|
+
switch (tag >>> 3) {
|
|
1458
|
+
case 1: {
|
|
1459
|
+
if (tag !== 10) {
|
|
1460
|
+
break;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
message.schema = reader.bytes();
|
|
1464
|
+
continue;
|
|
1465
|
+
}
|
|
1466
|
+
case 2: {
|
|
1467
|
+
if (tag !== 18) {
|
|
1468
|
+
break;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
message.flightDescriptor = FlightDescriptor.decode(reader, reader.uint32());
|
|
1472
|
+
continue;
|
|
1473
|
+
}
|
|
1474
|
+
case 3: {
|
|
1475
|
+
if (tag !== 26) {
|
|
1476
|
+
break;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
message.endpoint.push(FlightEndpoint.decode(reader, reader.uint32()));
|
|
1480
|
+
continue;
|
|
1481
|
+
}
|
|
1482
|
+
case 4: {
|
|
1483
|
+
if (tag !== 32) {
|
|
1484
|
+
break;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
message.totalRecords = reader.int64() as bigint;
|
|
1488
|
+
continue;
|
|
1489
|
+
}
|
|
1490
|
+
case 5: {
|
|
1491
|
+
if (tag !== 40) {
|
|
1492
|
+
break;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
message.totalBytes = reader.int64() as bigint;
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
case 6: {
|
|
1499
|
+
if (tag !== 48) {
|
|
1500
|
+
break;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
message.ordered = reader.bool();
|
|
1504
|
+
continue;
|
|
1505
|
+
}
|
|
1506
|
+
case 7: {
|
|
1507
|
+
if (tag !== 58) {
|
|
1508
|
+
break;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
message.appMetadata = reader.bytes();
|
|
1512
|
+
continue;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1516
|
+
break;
|
|
1517
|
+
}
|
|
1518
|
+
reader.skip(tag & 7);
|
|
1519
|
+
}
|
|
1520
|
+
return message;
|
|
1521
|
+
},
|
|
1522
|
+
|
|
1523
|
+
fromJSON(object: any): FlightInfo {
|
|
1524
|
+
return {
|
|
1525
|
+
$type: FlightInfo.$type,
|
|
1526
|
+
schema: isSet(object.schema) ? bytesFromBase64(object.schema) : new Uint8Array(0),
|
|
1527
|
+
flightDescriptor: isSet(object.flightDescriptor) ? FlightDescriptor.fromJSON(object.flightDescriptor) : undefined,
|
|
1528
|
+
endpoint: globalThis.Array.isArray(object?.endpoint)
|
|
1529
|
+
? object.endpoint.map((e: any) => FlightEndpoint.fromJSON(e))
|
|
1530
|
+
: [],
|
|
1531
|
+
totalRecords: isSet(object.totalRecords) ? BigInt(object.totalRecords) : 0n,
|
|
1532
|
+
totalBytes: isSet(object.totalBytes) ? BigInt(object.totalBytes) : 0n,
|
|
1533
|
+
ordered: isSet(object.ordered) ? globalThis.Boolean(object.ordered) : false,
|
|
1534
|
+
appMetadata: isSet(object.appMetadata) ? bytesFromBase64(object.appMetadata) : new Uint8Array(0),
|
|
1535
|
+
};
|
|
1536
|
+
},
|
|
1537
|
+
|
|
1538
|
+
toJSON(message: FlightInfo): unknown {
|
|
1539
|
+
const obj: any = {};
|
|
1540
|
+
if (message.schema.length !== 0) {
|
|
1541
|
+
obj.schema = base64FromBytes(message.schema);
|
|
1542
|
+
}
|
|
1543
|
+
if (message.flightDescriptor !== undefined) {
|
|
1544
|
+
obj.flightDescriptor = FlightDescriptor.toJSON(message.flightDescriptor);
|
|
1545
|
+
}
|
|
1546
|
+
if (message.endpoint?.length) {
|
|
1547
|
+
obj.endpoint = message.endpoint.map((e) => FlightEndpoint.toJSON(e));
|
|
1548
|
+
}
|
|
1549
|
+
if (message.totalRecords !== 0n) {
|
|
1550
|
+
obj.totalRecords = message.totalRecords.toString();
|
|
1551
|
+
}
|
|
1552
|
+
if (message.totalBytes !== 0n) {
|
|
1553
|
+
obj.totalBytes = message.totalBytes.toString();
|
|
1554
|
+
}
|
|
1555
|
+
if (message.ordered !== false) {
|
|
1556
|
+
obj.ordered = message.ordered;
|
|
1557
|
+
}
|
|
1558
|
+
if (message.appMetadata.length !== 0) {
|
|
1559
|
+
obj.appMetadata = base64FromBytes(message.appMetadata);
|
|
1560
|
+
}
|
|
1561
|
+
return obj;
|
|
1562
|
+
},
|
|
1563
|
+
|
|
1564
|
+
create<I extends Exact<DeepPartial<FlightInfo>, I>>(base?: I): FlightInfo {
|
|
1565
|
+
return FlightInfo.fromPartial(base ?? ({} as any));
|
|
1566
|
+
},
|
|
1567
|
+
fromPartial<I extends Exact<DeepPartial<FlightInfo>, I>>(object: I): FlightInfo {
|
|
1568
|
+
const message = createBaseFlightInfo() as any;
|
|
1569
|
+
message.schema = object.schema ?? new Uint8Array(0);
|
|
1570
|
+
message.flightDescriptor = (object.flightDescriptor !== undefined && object.flightDescriptor !== null)
|
|
1571
|
+
? FlightDescriptor.fromPartial(object.flightDescriptor)
|
|
1572
|
+
: undefined;
|
|
1573
|
+
message.endpoint = object.endpoint?.map((e) => FlightEndpoint.fromPartial(e)) || [];
|
|
1574
|
+
message.totalRecords = object.totalRecords ?? 0n;
|
|
1575
|
+
message.totalBytes = object.totalBytes ?? 0n;
|
|
1576
|
+
message.ordered = object.ordered ?? false;
|
|
1577
|
+
message.appMetadata = object.appMetadata ?? new Uint8Array(0);
|
|
1578
|
+
return message;
|
|
1579
|
+
},
|
|
1580
|
+
};
|
|
1581
|
+
|
|
1582
|
+
messageTypeRegistry.set(FlightInfo.$type, FlightInfo);
|
|
1583
|
+
|
|
1584
|
+
function createBasePollInfo(): PollInfo {
|
|
1585
|
+
return {
|
|
1586
|
+
$type: "arrow.flight.protocol.PollInfo",
|
|
1587
|
+
info: undefined,
|
|
1588
|
+
flightDescriptor: undefined,
|
|
1589
|
+
progress: undefined,
|
|
1590
|
+
expirationTime: undefined,
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
export const PollInfo: MessageFns<PollInfo, "arrow.flight.protocol.PollInfo"> = {
|
|
1595
|
+
$type: "arrow.flight.protocol.PollInfo" as const,
|
|
1596
|
+
|
|
1597
|
+
encode(message: PollInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1598
|
+
if (message.info !== undefined) {
|
|
1599
|
+
FlightInfo.encode(message.info, writer.uint32(10).fork()).join();
|
|
1600
|
+
}
|
|
1601
|
+
if (message.flightDescriptor !== undefined) {
|
|
1602
|
+
FlightDescriptor.encode(message.flightDescriptor, writer.uint32(18).fork()).join();
|
|
1603
|
+
}
|
|
1604
|
+
if (message.progress !== undefined) {
|
|
1605
|
+
writer.uint32(25).double(message.progress);
|
|
1606
|
+
}
|
|
1607
|
+
if (message.expirationTime !== undefined) {
|
|
1608
|
+
Timestamp.encode(toTimestamp(message.expirationTime), writer.uint32(34).fork()).join();
|
|
1609
|
+
}
|
|
1610
|
+
return writer;
|
|
1611
|
+
},
|
|
1612
|
+
|
|
1613
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PollInfo {
|
|
1614
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1615
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1616
|
+
const message = createBasePollInfo() as any;
|
|
1617
|
+
while (reader.pos < end) {
|
|
1618
|
+
const tag = reader.uint32();
|
|
1619
|
+
switch (tag >>> 3) {
|
|
1620
|
+
case 1: {
|
|
1621
|
+
if (tag !== 10) {
|
|
1622
|
+
break;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
message.info = FlightInfo.decode(reader, reader.uint32());
|
|
1626
|
+
continue;
|
|
1627
|
+
}
|
|
1628
|
+
case 2: {
|
|
1629
|
+
if (tag !== 18) {
|
|
1630
|
+
break;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
message.flightDescriptor = FlightDescriptor.decode(reader, reader.uint32());
|
|
1634
|
+
continue;
|
|
1635
|
+
}
|
|
1636
|
+
case 3: {
|
|
1637
|
+
if (tag !== 25) {
|
|
1638
|
+
break;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
message.progress = reader.double();
|
|
1642
|
+
continue;
|
|
1643
|
+
}
|
|
1644
|
+
case 4: {
|
|
1645
|
+
if (tag !== 34) {
|
|
1646
|
+
break;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
message.expirationTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1650
|
+
continue;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1654
|
+
break;
|
|
1655
|
+
}
|
|
1656
|
+
reader.skip(tag & 7);
|
|
1657
|
+
}
|
|
1658
|
+
return message;
|
|
1659
|
+
},
|
|
1660
|
+
|
|
1661
|
+
fromJSON(object: any): PollInfo {
|
|
1662
|
+
return {
|
|
1663
|
+
$type: PollInfo.$type,
|
|
1664
|
+
info: isSet(object.info) ? FlightInfo.fromJSON(object.info) : undefined,
|
|
1665
|
+
flightDescriptor: isSet(object.flightDescriptor) ? FlightDescriptor.fromJSON(object.flightDescriptor) : undefined,
|
|
1666
|
+
progress: isSet(object.progress) ? globalThis.Number(object.progress) : undefined,
|
|
1667
|
+
expirationTime: isSet(object.expirationTime) ? fromJsonTimestamp(object.expirationTime) : undefined,
|
|
1668
|
+
};
|
|
1669
|
+
},
|
|
1670
|
+
|
|
1671
|
+
toJSON(message: PollInfo): unknown {
|
|
1672
|
+
const obj: any = {};
|
|
1673
|
+
if (message.info !== undefined) {
|
|
1674
|
+
obj.info = FlightInfo.toJSON(message.info);
|
|
1675
|
+
}
|
|
1676
|
+
if (message.flightDescriptor !== undefined) {
|
|
1677
|
+
obj.flightDescriptor = FlightDescriptor.toJSON(message.flightDescriptor);
|
|
1678
|
+
}
|
|
1679
|
+
if (message.progress !== undefined) {
|
|
1680
|
+
obj.progress = message.progress;
|
|
1681
|
+
}
|
|
1682
|
+
if (message.expirationTime !== undefined) {
|
|
1683
|
+
obj.expirationTime = message.expirationTime.toISOString();
|
|
1684
|
+
}
|
|
1685
|
+
return obj;
|
|
1686
|
+
},
|
|
1687
|
+
|
|
1688
|
+
create<I extends Exact<DeepPartial<PollInfo>, I>>(base?: I): PollInfo {
|
|
1689
|
+
return PollInfo.fromPartial(base ?? ({} as any));
|
|
1690
|
+
},
|
|
1691
|
+
fromPartial<I extends Exact<DeepPartial<PollInfo>, I>>(object: I): PollInfo {
|
|
1692
|
+
const message = createBasePollInfo() as any;
|
|
1693
|
+
message.info = (object.info !== undefined && object.info !== null)
|
|
1694
|
+
? FlightInfo.fromPartial(object.info)
|
|
1695
|
+
: undefined;
|
|
1696
|
+
message.flightDescriptor = (object.flightDescriptor !== undefined && object.flightDescriptor !== null)
|
|
1697
|
+
? FlightDescriptor.fromPartial(object.flightDescriptor)
|
|
1698
|
+
: undefined;
|
|
1699
|
+
message.progress = object.progress ?? undefined;
|
|
1700
|
+
message.expirationTime = object.expirationTime ?? undefined;
|
|
1701
|
+
return message;
|
|
1702
|
+
},
|
|
1703
|
+
};
|
|
1704
|
+
|
|
1705
|
+
messageTypeRegistry.set(PollInfo.$type, PollInfo);
|
|
1706
|
+
|
|
1707
|
+
function createBaseFlightEndpoint(): FlightEndpoint {
|
|
1708
|
+
return {
|
|
1709
|
+
$type: "arrow.flight.protocol.FlightEndpoint",
|
|
1710
|
+
ticket: undefined,
|
|
1711
|
+
location: [],
|
|
1712
|
+
expirationTime: undefined,
|
|
1713
|
+
appMetadata: new Uint8Array(0),
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
export const FlightEndpoint: MessageFns<FlightEndpoint, "arrow.flight.protocol.FlightEndpoint"> = {
|
|
1718
|
+
$type: "arrow.flight.protocol.FlightEndpoint" as const,
|
|
1719
|
+
|
|
1720
|
+
encode(message: FlightEndpoint, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1721
|
+
if (message.ticket !== undefined) {
|
|
1722
|
+
Ticket.encode(message.ticket, writer.uint32(10).fork()).join();
|
|
1723
|
+
}
|
|
1724
|
+
for (const v of message.location) {
|
|
1725
|
+
Location.encode(v!, writer.uint32(18).fork()).join();
|
|
1726
|
+
}
|
|
1727
|
+
if (message.expirationTime !== undefined) {
|
|
1728
|
+
Timestamp.encode(toTimestamp(message.expirationTime), writer.uint32(26).fork()).join();
|
|
1729
|
+
}
|
|
1730
|
+
if (message.appMetadata.length !== 0) {
|
|
1731
|
+
writer.uint32(34).bytes(message.appMetadata);
|
|
1732
|
+
}
|
|
1733
|
+
return writer;
|
|
1734
|
+
},
|
|
1735
|
+
|
|
1736
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FlightEndpoint {
|
|
1737
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1738
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1739
|
+
const message = createBaseFlightEndpoint() as any;
|
|
1740
|
+
while (reader.pos < end) {
|
|
1741
|
+
const tag = reader.uint32();
|
|
1742
|
+
switch (tag >>> 3) {
|
|
1743
|
+
case 1: {
|
|
1744
|
+
if (tag !== 10) {
|
|
1745
|
+
break;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
message.ticket = Ticket.decode(reader, reader.uint32());
|
|
1749
|
+
continue;
|
|
1750
|
+
}
|
|
1751
|
+
case 2: {
|
|
1752
|
+
if (tag !== 18) {
|
|
1753
|
+
break;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
message.location.push(Location.decode(reader, reader.uint32()));
|
|
1757
|
+
continue;
|
|
1758
|
+
}
|
|
1759
|
+
case 3: {
|
|
1760
|
+
if (tag !== 26) {
|
|
1761
|
+
break;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
message.expirationTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1765
|
+
continue;
|
|
1766
|
+
}
|
|
1767
|
+
case 4: {
|
|
1768
|
+
if (tag !== 34) {
|
|
1769
|
+
break;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
message.appMetadata = reader.bytes();
|
|
1773
|
+
continue;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1777
|
+
break;
|
|
1778
|
+
}
|
|
1779
|
+
reader.skip(tag & 7);
|
|
1780
|
+
}
|
|
1781
|
+
return message;
|
|
1782
|
+
},
|
|
1783
|
+
|
|
1784
|
+
fromJSON(object: any): FlightEndpoint {
|
|
1785
|
+
return {
|
|
1786
|
+
$type: FlightEndpoint.$type,
|
|
1787
|
+
ticket: isSet(object.ticket) ? Ticket.fromJSON(object.ticket) : undefined,
|
|
1788
|
+
location: globalThis.Array.isArray(object?.location) ? object.location.map((e: any) => Location.fromJSON(e)) : [],
|
|
1789
|
+
expirationTime: isSet(object.expirationTime) ? fromJsonTimestamp(object.expirationTime) : undefined,
|
|
1790
|
+
appMetadata: isSet(object.appMetadata) ? bytesFromBase64(object.appMetadata) : new Uint8Array(0),
|
|
1791
|
+
};
|
|
1792
|
+
},
|
|
1793
|
+
|
|
1794
|
+
toJSON(message: FlightEndpoint): unknown {
|
|
1795
|
+
const obj: any = {};
|
|
1796
|
+
if (message.ticket !== undefined) {
|
|
1797
|
+
obj.ticket = Ticket.toJSON(message.ticket);
|
|
1798
|
+
}
|
|
1799
|
+
if (message.location?.length) {
|
|
1800
|
+
obj.location = message.location.map((e) => Location.toJSON(e));
|
|
1801
|
+
}
|
|
1802
|
+
if (message.expirationTime !== undefined) {
|
|
1803
|
+
obj.expirationTime = message.expirationTime.toISOString();
|
|
1804
|
+
}
|
|
1805
|
+
if (message.appMetadata.length !== 0) {
|
|
1806
|
+
obj.appMetadata = base64FromBytes(message.appMetadata);
|
|
1807
|
+
}
|
|
1808
|
+
return obj;
|
|
1809
|
+
},
|
|
1810
|
+
|
|
1811
|
+
create<I extends Exact<DeepPartial<FlightEndpoint>, I>>(base?: I): FlightEndpoint {
|
|
1812
|
+
return FlightEndpoint.fromPartial(base ?? ({} as any));
|
|
1813
|
+
},
|
|
1814
|
+
fromPartial<I extends Exact<DeepPartial<FlightEndpoint>, I>>(object: I): FlightEndpoint {
|
|
1815
|
+
const message = createBaseFlightEndpoint() as any;
|
|
1816
|
+
message.ticket = (object.ticket !== undefined && object.ticket !== null)
|
|
1817
|
+
? Ticket.fromPartial(object.ticket)
|
|
1818
|
+
: undefined;
|
|
1819
|
+
message.location = object.location?.map((e) => Location.fromPartial(e)) || [];
|
|
1820
|
+
message.expirationTime = object.expirationTime ?? undefined;
|
|
1821
|
+
message.appMetadata = object.appMetadata ?? new Uint8Array(0);
|
|
1822
|
+
return message;
|
|
1823
|
+
},
|
|
1824
|
+
};
|
|
1825
|
+
|
|
1826
|
+
messageTypeRegistry.set(FlightEndpoint.$type, FlightEndpoint);
|
|
1827
|
+
|
|
1828
|
+
function createBaseLocation(): Location {
|
|
1829
|
+
return { $type: "arrow.flight.protocol.Location", uri: "" };
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
export const Location: MessageFns<Location, "arrow.flight.protocol.Location"> = {
|
|
1833
|
+
$type: "arrow.flight.protocol.Location" as const,
|
|
1834
|
+
|
|
1835
|
+
encode(message: Location, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1836
|
+
if (message.uri !== "") {
|
|
1837
|
+
writer.uint32(10).string(message.uri);
|
|
1838
|
+
}
|
|
1839
|
+
return writer;
|
|
1840
|
+
},
|
|
1841
|
+
|
|
1842
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Location {
|
|
1843
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1844
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1845
|
+
const message = createBaseLocation() as any;
|
|
1846
|
+
while (reader.pos < end) {
|
|
1847
|
+
const tag = reader.uint32();
|
|
1848
|
+
switch (tag >>> 3) {
|
|
1849
|
+
case 1: {
|
|
1850
|
+
if (tag !== 10) {
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
message.uri = reader.string();
|
|
1855
|
+
continue;
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
reader.skip(tag & 7);
|
|
1862
|
+
}
|
|
1863
|
+
return message;
|
|
1864
|
+
},
|
|
1865
|
+
|
|
1866
|
+
fromJSON(object: any): Location {
|
|
1867
|
+
return { $type: Location.$type, uri: isSet(object.uri) ? globalThis.String(object.uri) : "" };
|
|
1868
|
+
},
|
|
1869
|
+
|
|
1870
|
+
toJSON(message: Location): unknown {
|
|
1871
|
+
const obj: any = {};
|
|
1872
|
+
if (message.uri !== "") {
|
|
1873
|
+
obj.uri = message.uri;
|
|
1874
|
+
}
|
|
1875
|
+
return obj;
|
|
1876
|
+
},
|
|
1877
|
+
|
|
1878
|
+
create<I extends Exact<DeepPartial<Location>, I>>(base?: I): Location {
|
|
1879
|
+
return Location.fromPartial(base ?? ({} as any));
|
|
1880
|
+
},
|
|
1881
|
+
fromPartial<I extends Exact<DeepPartial<Location>, I>>(object: I): Location {
|
|
1882
|
+
const message = createBaseLocation() as any;
|
|
1883
|
+
message.uri = object.uri ?? "";
|
|
1884
|
+
return message;
|
|
1885
|
+
},
|
|
1886
|
+
};
|
|
1887
|
+
|
|
1888
|
+
messageTypeRegistry.set(Location.$type, Location);
|
|
1889
|
+
|
|
1890
|
+
function createBaseTicket(): Ticket {
|
|
1891
|
+
return { $type: "arrow.flight.protocol.Ticket", ticket: new Uint8Array(0) };
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
export const Ticket: MessageFns<Ticket, "arrow.flight.protocol.Ticket"> = {
|
|
1895
|
+
$type: "arrow.flight.protocol.Ticket" as const,
|
|
1896
|
+
|
|
1897
|
+
encode(message: Ticket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1898
|
+
if (message.ticket.length !== 0) {
|
|
1899
|
+
writer.uint32(10).bytes(message.ticket);
|
|
1900
|
+
}
|
|
1901
|
+
return writer;
|
|
1902
|
+
},
|
|
1903
|
+
|
|
1904
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Ticket {
|
|
1905
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1906
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1907
|
+
const message = createBaseTicket() as any;
|
|
1908
|
+
while (reader.pos < end) {
|
|
1909
|
+
const tag = reader.uint32();
|
|
1910
|
+
switch (tag >>> 3) {
|
|
1911
|
+
case 1: {
|
|
1912
|
+
if (tag !== 10) {
|
|
1913
|
+
break;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
message.ticket = reader.bytes();
|
|
1917
|
+
continue;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1921
|
+
break;
|
|
1922
|
+
}
|
|
1923
|
+
reader.skip(tag & 7);
|
|
1924
|
+
}
|
|
1925
|
+
return message;
|
|
1926
|
+
},
|
|
1927
|
+
|
|
1928
|
+
fromJSON(object: any): Ticket {
|
|
1929
|
+
return { $type: Ticket.$type, ticket: isSet(object.ticket) ? bytesFromBase64(object.ticket) : new Uint8Array(0) };
|
|
1930
|
+
},
|
|
1931
|
+
|
|
1932
|
+
toJSON(message: Ticket): unknown {
|
|
1933
|
+
const obj: any = {};
|
|
1934
|
+
if (message.ticket.length !== 0) {
|
|
1935
|
+
obj.ticket = base64FromBytes(message.ticket);
|
|
1936
|
+
}
|
|
1937
|
+
return obj;
|
|
1938
|
+
},
|
|
1939
|
+
|
|
1940
|
+
create<I extends Exact<DeepPartial<Ticket>, I>>(base?: I): Ticket {
|
|
1941
|
+
return Ticket.fromPartial(base ?? ({} as any));
|
|
1942
|
+
},
|
|
1943
|
+
fromPartial<I extends Exact<DeepPartial<Ticket>, I>>(object: I): Ticket {
|
|
1944
|
+
const message = createBaseTicket() as any;
|
|
1945
|
+
message.ticket = object.ticket ?? new Uint8Array(0);
|
|
1946
|
+
return message;
|
|
1947
|
+
},
|
|
1948
|
+
};
|
|
1949
|
+
|
|
1950
|
+
messageTypeRegistry.set(Ticket.$type, Ticket);
|
|
1951
|
+
|
|
1952
|
+
function createBaseFlightData(): FlightData {
|
|
1953
|
+
return {
|
|
1954
|
+
$type: "arrow.flight.protocol.FlightData",
|
|
1955
|
+
flightDescriptor: undefined,
|
|
1956
|
+
dataHeader: new Uint8Array(0),
|
|
1957
|
+
appMetadata: new Uint8Array(0),
|
|
1958
|
+
dataBody: new Uint8Array(0),
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
export const FlightData: MessageFns<FlightData, "arrow.flight.protocol.FlightData"> = {
|
|
1963
|
+
$type: "arrow.flight.protocol.FlightData" as const,
|
|
1964
|
+
|
|
1965
|
+
encode(message: FlightData, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1966
|
+
if (message.flightDescriptor !== undefined) {
|
|
1967
|
+
FlightDescriptor.encode(message.flightDescriptor, writer.uint32(10).fork()).join();
|
|
1968
|
+
}
|
|
1969
|
+
if (message.dataHeader.length !== 0) {
|
|
1970
|
+
writer.uint32(18).bytes(message.dataHeader);
|
|
1971
|
+
}
|
|
1972
|
+
if (message.appMetadata.length !== 0) {
|
|
1973
|
+
writer.uint32(26).bytes(message.appMetadata);
|
|
1974
|
+
}
|
|
1975
|
+
if (message.dataBody.length !== 0) {
|
|
1976
|
+
writer.uint32(8002).bytes(message.dataBody);
|
|
1977
|
+
}
|
|
1978
|
+
return writer;
|
|
1979
|
+
},
|
|
1980
|
+
|
|
1981
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FlightData {
|
|
1982
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1983
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1984
|
+
const message = createBaseFlightData() as any;
|
|
1985
|
+
while (reader.pos < end) {
|
|
1986
|
+
const tag = reader.uint32();
|
|
1987
|
+
switch (tag >>> 3) {
|
|
1988
|
+
case 1: {
|
|
1989
|
+
if (tag !== 10) {
|
|
1990
|
+
break;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
message.flightDescriptor = FlightDescriptor.decode(reader, reader.uint32());
|
|
1994
|
+
continue;
|
|
1995
|
+
}
|
|
1996
|
+
case 2: {
|
|
1997
|
+
if (tag !== 18) {
|
|
1998
|
+
break;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
message.dataHeader = reader.bytes();
|
|
2002
|
+
continue;
|
|
2003
|
+
}
|
|
2004
|
+
case 3: {
|
|
2005
|
+
if (tag !== 26) {
|
|
2006
|
+
break;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
message.appMetadata = reader.bytes();
|
|
2010
|
+
continue;
|
|
2011
|
+
}
|
|
2012
|
+
case 1000: {
|
|
2013
|
+
if (tag !== 8002) {
|
|
2014
|
+
break;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
message.dataBody = reader.bytes();
|
|
2018
|
+
continue;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2022
|
+
break;
|
|
2023
|
+
}
|
|
2024
|
+
reader.skip(tag & 7);
|
|
2025
|
+
}
|
|
2026
|
+
return message;
|
|
2027
|
+
},
|
|
2028
|
+
|
|
2029
|
+
fromJSON(object: any): FlightData {
|
|
2030
|
+
return {
|
|
2031
|
+
$type: FlightData.$type,
|
|
2032
|
+
flightDescriptor: isSet(object.flightDescriptor) ? FlightDescriptor.fromJSON(object.flightDescriptor) : undefined,
|
|
2033
|
+
dataHeader: isSet(object.dataHeader) ? bytesFromBase64(object.dataHeader) : new Uint8Array(0),
|
|
2034
|
+
appMetadata: isSet(object.appMetadata) ? bytesFromBase64(object.appMetadata) : new Uint8Array(0),
|
|
2035
|
+
dataBody: isSet(object.dataBody) ? bytesFromBase64(object.dataBody) : new Uint8Array(0),
|
|
2036
|
+
};
|
|
2037
|
+
},
|
|
2038
|
+
|
|
2039
|
+
toJSON(message: FlightData): unknown {
|
|
2040
|
+
const obj: any = {};
|
|
2041
|
+
if (message.flightDescriptor !== undefined) {
|
|
2042
|
+
obj.flightDescriptor = FlightDescriptor.toJSON(message.flightDescriptor);
|
|
2043
|
+
}
|
|
2044
|
+
if (message.dataHeader.length !== 0) {
|
|
2045
|
+
obj.dataHeader = base64FromBytes(message.dataHeader);
|
|
2046
|
+
}
|
|
2047
|
+
if (message.appMetadata.length !== 0) {
|
|
2048
|
+
obj.appMetadata = base64FromBytes(message.appMetadata);
|
|
2049
|
+
}
|
|
2050
|
+
if (message.dataBody.length !== 0) {
|
|
2051
|
+
obj.dataBody = base64FromBytes(message.dataBody);
|
|
2052
|
+
}
|
|
2053
|
+
return obj;
|
|
2054
|
+
},
|
|
2055
|
+
|
|
2056
|
+
create<I extends Exact<DeepPartial<FlightData>, I>>(base?: I): FlightData {
|
|
2057
|
+
return FlightData.fromPartial(base ?? ({} as any));
|
|
2058
|
+
},
|
|
2059
|
+
fromPartial<I extends Exact<DeepPartial<FlightData>, I>>(object: I): FlightData {
|
|
2060
|
+
const message = createBaseFlightData() as any;
|
|
2061
|
+
message.flightDescriptor = (object.flightDescriptor !== undefined && object.flightDescriptor !== null)
|
|
2062
|
+
? FlightDescriptor.fromPartial(object.flightDescriptor)
|
|
2063
|
+
: undefined;
|
|
2064
|
+
message.dataHeader = object.dataHeader ?? new Uint8Array(0);
|
|
2065
|
+
message.appMetadata = object.appMetadata ?? new Uint8Array(0);
|
|
2066
|
+
message.dataBody = object.dataBody ?? new Uint8Array(0);
|
|
2067
|
+
return message;
|
|
2068
|
+
},
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
messageTypeRegistry.set(FlightData.$type, FlightData);
|
|
2072
|
+
|
|
2073
|
+
function createBasePutResult(): PutResult {
|
|
2074
|
+
return { $type: "arrow.flight.protocol.PutResult", appMetadata: new Uint8Array(0) };
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
export const PutResult: MessageFns<PutResult, "arrow.flight.protocol.PutResult"> = {
|
|
2078
|
+
$type: "arrow.flight.protocol.PutResult" as const,
|
|
2079
|
+
|
|
2080
|
+
encode(message: PutResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2081
|
+
if (message.appMetadata.length !== 0) {
|
|
2082
|
+
writer.uint32(10).bytes(message.appMetadata);
|
|
2083
|
+
}
|
|
2084
|
+
return writer;
|
|
2085
|
+
},
|
|
2086
|
+
|
|
2087
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PutResult {
|
|
2088
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2089
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2090
|
+
const message = createBasePutResult() as any;
|
|
2091
|
+
while (reader.pos < end) {
|
|
2092
|
+
const tag = reader.uint32();
|
|
2093
|
+
switch (tag >>> 3) {
|
|
2094
|
+
case 1: {
|
|
2095
|
+
if (tag !== 10) {
|
|
2096
|
+
break;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
message.appMetadata = reader.bytes();
|
|
2100
|
+
continue;
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2104
|
+
break;
|
|
2105
|
+
}
|
|
2106
|
+
reader.skip(tag & 7);
|
|
2107
|
+
}
|
|
2108
|
+
return message;
|
|
2109
|
+
},
|
|
2110
|
+
|
|
2111
|
+
fromJSON(object: any): PutResult {
|
|
2112
|
+
return {
|
|
2113
|
+
$type: PutResult.$type,
|
|
2114
|
+
appMetadata: isSet(object.appMetadata) ? bytesFromBase64(object.appMetadata) : new Uint8Array(0),
|
|
2115
|
+
};
|
|
2116
|
+
},
|
|
2117
|
+
|
|
2118
|
+
toJSON(message: PutResult): unknown {
|
|
2119
|
+
const obj: any = {};
|
|
2120
|
+
if (message.appMetadata.length !== 0) {
|
|
2121
|
+
obj.appMetadata = base64FromBytes(message.appMetadata);
|
|
2122
|
+
}
|
|
2123
|
+
return obj;
|
|
2124
|
+
},
|
|
2125
|
+
|
|
2126
|
+
create<I extends Exact<DeepPartial<PutResult>, I>>(base?: I): PutResult {
|
|
2127
|
+
return PutResult.fromPartial(base ?? ({} as any));
|
|
2128
|
+
},
|
|
2129
|
+
fromPartial<I extends Exact<DeepPartial<PutResult>, I>>(object: I): PutResult {
|
|
2130
|
+
const message = createBasePutResult() as any;
|
|
2131
|
+
message.appMetadata = object.appMetadata ?? new Uint8Array(0);
|
|
2132
|
+
return message;
|
|
2133
|
+
},
|
|
2134
|
+
};
|
|
2135
|
+
|
|
2136
|
+
messageTypeRegistry.set(PutResult.$type, PutResult);
|
|
2137
|
+
|
|
2138
|
+
/**
|
|
2139
|
+
* A flight service is an endpoint for retrieving or storing Arrow data. A
|
|
2140
|
+
* flight service can expose one or more predefined endpoints that can be
|
|
2141
|
+
* accessed using the Arrow Flight Protocol. Additionally, a flight service
|
|
2142
|
+
* can expose a set of actions that are available.
|
|
2143
|
+
*/
|
|
2144
|
+
export type FlightServiceDefinition = typeof FlightServiceDefinition;
|
|
2145
|
+
export const FlightServiceDefinition = {
|
|
2146
|
+
name: "FlightService",
|
|
2147
|
+
fullName: "arrow.flight.protocol.FlightService",
|
|
2148
|
+
methods: {
|
|
2149
|
+
/**
|
|
2150
|
+
* Handshake between client and server. Depending on the server, the
|
|
2151
|
+
* handshake may be required to determine the token that should be used for
|
|
2152
|
+
* future operations. Both request and response are streams to allow multiple
|
|
2153
|
+
* round-trips depending on auth mechanism.
|
|
2154
|
+
*/
|
|
2155
|
+
handshake: {
|
|
2156
|
+
name: "Handshake",
|
|
2157
|
+
requestType: HandshakeRequest,
|
|
2158
|
+
requestStream: true,
|
|
2159
|
+
responseType: HandshakeResponse,
|
|
2160
|
+
responseStream: true,
|
|
2161
|
+
options: {},
|
|
2162
|
+
},
|
|
2163
|
+
/**
|
|
2164
|
+
* Get a list of available streams given a particular criteria. Most flight
|
|
2165
|
+
* services will expose one or more streams that are readily available for
|
|
2166
|
+
* retrieval. This api allows listing the streams available for
|
|
2167
|
+
* consumption. A user can also provide a criteria. The criteria can limit
|
|
2168
|
+
* the subset of streams that can be listed via this interface. Each flight
|
|
2169
|
+
* service allows its own definition of how to consume criteria.
|
|
2170
|
+
*/
|
|
2171
|
+
listFlights: {
|
|
2172
|
+
name: "ListFlights",
|
|
2173
|
+
requestType: Criteria,
|
|
2174
|
+
requestStream: false,
|
|
2175
|
+
responseType: FlightInfo,
|
|
2176
|
+
responseStream: true,
|
|
2177
|
+
options: {},
|
|
2178
|
+
},
|
|
2179
|
+
/**
|
|
2180
|
+
* For a given FlightDescriptor, get information about how the flight can be
|
|
2181
|
+
* consumed. This is a useful interface if the consumer of the interface
|
|
2182
|
+
* already can identify the specific flight to consume. This interface can
|
|
2183
|
+
* also allow a consumer to generate a flight stream through a specified
|
|
2184
|
+
* descriptor. For example, a flight descriptor might be something that
|
|
2185
|
+
* includes a SQL statement or a Pickled Python operation that will be
|
|
2186
|
+
* executed. In those cases, the descriptor will not be previously available
|
|
2187
|
+
* within the list of available streams provided by ListFlights but will be
|
|
2188
|
+
* available for consumption for the duration defined by the specific flight
|
|
2189
|
+
* service.
|
|
2190
|
+
*/
|
|
2191
|
+
getFlightInfo: {
|
|
2192
|
+
name: "GetFlightInfo",
|
|
2193
|
+
requestType: FlightDescriptor,
|
|
2194
|
+
requestStream: false,
|
|
2195
|
+
responseType: FlightInfo,
|
|
2196
|
+
responseStream: false,
|
|
2197
|
+
options: {},
|
|
2198
|
+
},
|
|
2199
|
+
/**
|
|
2200
|
+
* For a given FlightDescriptor, start a query and get information
|
|
2201
|
+
* to poll its execution status. This is a useful interface if the
|
|
2202
|
+
* query may be a long-running query. The first PollFlightInfo call
|
|
2203
|
+
* should return as quickly as possible. (GetFlightInfo doesn't
|
|
2204
|
+
* return until the query is complete.)
|
|
2205
|
+
*
|
|
2206
|
+
* A client can consume any available results before
|
|
2207
|
+
* the query is completed. See PollInfo.info for details.
|
|
2208
|
+
*
|
|
2209
|
+
* A client can poll the updated query status by calling
|
|
2210
|
+
* PollFlightInfo() with PollInfo.flight_descriptor. A server
|
|
2211
|
+
* should not respond until the result would be different from last
|
|
2212
|
+
* time. That way, the client can "long poll" for updates
|
|
2213
|
+
* without constantly making requests. Clients can set a short timeout
|
|
2214
|
+
* to avoid blocking calls if desired.
|
|
2215
|
+
*
|
|
2216
|
+
* A client can't use PollInfo.flight_descriptor after
|
|
2217
|
+
* PollInfo.expiration_time passes. A server might not accept the
|
|
2218
|
+
* retry descriptor anymore and the query may be cancelled.
|
|
2219
|
+
*
|
|
2220
|
+
* A client may use the CancelFlightInfo action with
|
|
2221
|
+
* PollInfo.info to cancel the running query.
|
|
2222
|
+
*/
|
|
2223
|
+
pollFlightInfo: {
|
|
2224
|
+
name: "PollFlightInfo",
|
|
2225
|
+
requestType: FlightDescriptor,
|
|
2226
|
+
requestStream: false,
|
|
2227
|
+
responseType: PollInfo,
|
|
2228
|
+
responseStream: false,
|
|
2229
|
+
options: {},
|
|
2230
|
+
},
|
|
2231
|
+
/**
|
|
2232
|
+
* For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
|
|
2233
|
+
* This is used when a consumer needs the Schema of flight stream. Similar to
|
|
2234
|
+
* GetFlightInfo this interface may generate a new flight that was not previously
|
|
2235
|
+
* available in ListFlights.
|
|
2236
|
+
*/
|
|
2237
|
+
getSchema: {
|
|
2238
|
+
name: "GetSchema",
|
|
2239
|
+
requestType: FlightDescriptor,
|
|
2240
|
+
requestStream: false,
|
|
2241
|
+
responseType: SchemaResult,
|
|
2242
|
+
responseStream: false,
|
|
2243
|
+
options: {},
|
|
2244
|
+
},
|
|
2245
|
+
/**
|
|
2246
|
+
* Retrieve a single stream associated with a particular descriptor
|
|
2247
|
+
* associated with the referenced ticket. A Flight can be composed of one or
|
|
2248
|
+
* more streams where each stream can be retrieved using a separate opaque
|
|
2249
|
+
* ticket that the flight service uses for managing a collection of streams.
|
|
2250
|
+
*/
|
|
2251
|
+
doGet: {
|
|
2252
|
+
name: "DoGet",
|
|
2253
|
+
requestType: Ticket,
|
|
2254
|
+
requestStream: false,
|
|
2255
|
+
responseType: FlightData,
|
|
2256
|
+
responseStream: true,
|
|
2257
|
+
options: {},
|
|
2258
|
+
},
|
|
2259
|
+
/**
|
|
2260
|
+
* Push a stream to the flight service associated with a particular
|
|
2261
|
+
* flight stream. This allows a client of a flight service to upload a stream
|
|
2262
|
+
* of data. Depending on the particular flight service, a client consumer
|
|
2263
|
+
* could be allowed to upload a single stream per descriptor or an unlimited
|
|
2264
|
+
* number. In the latter, the service might implement a 'seal' action that
|
|
2265
|
+
* can be applied to a descriptor once all streams are uploaded.
|
|
2266
|
+
*/
|
|
2267
|
+
doPut: {
|
|
2268
|
+
name: "DoPut",
|
|
2269
|
+
requestType: FlightData,
|
|
2270
|
+
requestStream: true,
|
|
2271
|
+
responseType: PutResult,
|
|
2272
|
+
responseStream: true,
|
|
2273
|
+
options: {},
|
|
2274
|
+
},
|
|
2275
|
+
/**
|
|
2276
|
+
* Open a bidirectional data channel for a given descriptor. This
|
|
2277
|
+
* allows clients to send and receive arbitrary Arrow data and
|
|
2278
|
+
* application-specific metadata in a single logical stream. In
|
|
2279
|
+
* contrast to DoGet/DoPut, this is more suited for clients
|
|
2280
|
+
* offloading computation (rather than storage) to a Flight service.
|
|
2281
|
+
*/
|
|
2282
|
+
doExchange: {
|
|
2283
|
+
name: "DoExchange",
|
|
2284
|
+
requestType: FlightData,
|
|
2285
|
+
requestStream: true,
|
|
2286
|
+
responseType: FlightData,
|
|
2287
|
+
responseStream: true,
|
|
2288
|
+
options: {},
|
|
2289
|
+
},
|
|
2290
|
+
/**
|
|
2291
|
+
* Flight services can support an arbitrary number of simple actions in
|
|
2292
|
+
* addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
|
|
2293
|
+
* operations that are potentially available. DoAction allows a flight client
|
|
2294
|
+
* to do a specific action against a flight service. An action includes
|
|
2295
|
+
* opaque request and response objects that are specific to the type action
|
|
2296
|
+
* being undertaken.
|
|
2297
|
+
*/
|
|
2298
|
+
doAction: {
|
|
2299
|
+
name: "DoAction",
|
|
2300
|
+
requestType: Action,
|
|
2301
|
+
requestStream: false,
|
|
2302
|
+
responseType: Result,
|
|
2303
|
+
responseStream: true,
|
|
2304
|
+
options: {},
|
|
2305
|
+
},
|
|
2306
|
+
/**
|
|
2307
|
+
* A flight service exposes all of the available action types that it has
|
|
2308
|
+
* along with descriptions. This allows different flight consumers to
|
|
2309
|
+
* understand the capabilities of the flight service.
|
|
2310
|
+
*/
|
|
2311
|
+
listActions: {
|
|
2312
|
+
name: "ListActions",
|
|
2313
|
+
requestType: Empty,
|
|
2314
|
+
requestStream: false,
|
|
2315
|
+
responseType: ActionType,
|
|
2316
|
+
responseStream: true,
|
|
2317
|
+
options: {},
|
|
2318
|
+
},
|
|
2319
|
+
},
|
|
2320
|
+
} as const;
|
|
2321
|
+
|
|
2322
|
+
export interface FlightServiceImplementation<CallContextExt = {}> {
|
|
2323
|
+
/**
|
|
2324
|
+
* Handshake between client and server. Depending on the server, the
|
|
2325
|
+
* handshake may be required to determine the token that should be used for
|
|
2326
|
+
* future operations. Both request and response are streams to allow multiple
|
|
2327
|
+
* round-trips depending on auth mechanism.
|
|
2328
|
+
*/
|
|
2329
|
+
handshake(
|
|
2330
|
+
request: AsyncIterable<HandshakeRequest>,
|
|
2331
|
+
context: CallContext & CallContextExt,
|
|
2332
|
+
): ServerStreamingMethodResult<DeepPartial<HandshakeResponse>>;
|
|
2333
|
+
/**
|
|
2334
|
+
* Get a list of available streams given a particular criteria. Most flight
|
|
2335
|
+
* services will expose one or more streams that are readily available for
|
|
2336
|
+
* retrieval. This api allows listing the streams available for
|
|
2337
|
+
* consumption. A user can also provide a criteria. The criteria can limit
|
|
2338
|
+
* the subset of streams that can be listed via this interface. Each flight
|
|
2339
|
+
* service allows its own definition of how to consume criteria.
|
|
2340
|
+
*/
|
|
2341
|
+
listFlights(
|
|
2342
|
+
request: Criteria,
|
|
2343
|
+
context: CallContext & CallContextExt,
|
|
2344
|
+
): ServerStreamingMethodResult<DeepPartial<FlightInfo>>;
|
|
2345
|
+
/**
|
|
2346
|
+
* For a given FlightDescriptor, get information about how the flight can be
|
|
2347
|
+
* consumed. This is a useful interface if the consumer of the interface
|
|
2348
|
+
* already can identify the specific flight to consume. This interface can
|
|
2349
|
+
* also allow a consumer to generate a flight stream through a specified
|
|
2350
|
+
* descriptor. For example, a flight descriptor might be something that
|
|
2351
|
+
* includes a SQL statement or a Pickled Python operation that will be
|
|
2352
|
+
* executed. In those cases, the descriptor will not be previously available
|
|
2353
|
+
* within the list of available streams provided by ListFlights but will be
|
|
2354
|
+
* available for consumption for the duration defined by the specific flight
|
|
2355
|
+
* service.
|
|
2356
|
+
*/
|
|
2357
|
+
getFlightInfo(request: FlightDescriptor, context: CallContext & CallContextExt): Promise<DeepPartial<FlightInfo>>;
|
|
2358
|
+
/**
|
|
2359
|
+
* For a given FlightDescriptor, start a query and get information
|
|
2360
|
+
* to poll its execution status. This is a useful interface if the
|
|
2361
|
+
* query may be a long-running query. The first PollFlightInfo call
|
|
2362
|
+
* should return as quickly as possible. (GetFlightInfo doesn't
|
|
2363
|
+
* return until the query is complete.)
|
|
2364
|
+
*
|
|
2365
|
+
* A client can consume any available results before
|
|
2366
|
+
* the query is completed. See PollInfo.info for details.
|
|
2367
|
+
*
|
|
2368
|
+
* A client can poll the updated query status by calling
|
|
2369
|
+
* PollFlightInfo() with PollInfo.flight_descriptor. A server
|
|
2370
|
+
* should not respond until the result would be different from last
|
|
2371
|
+
* time. That way, the client can "long poll" for updates
|
|
2372
|
+
* without constantly making requests. Clients can set a short timeout
|
|
2373
|
+
* to avoid blocking calls if desired.
|
|
2374
|
+
*
|
|
2375
|
+
* A client can't use PollInfo.flight_descriptor after
|
|
2376
|
+
* PollInfo.expiration_time passes. A server might not accept the
|
|
2377
|
+
* retry descriptor anymore and the query may be cancelled.
|
|
2378
|
+
*
|
|
2379
|
+
* A client may use the CancelFlightInfo action with
|
|
2380
|
+
* PollInfo.info to cancel the running query.
|
|
2381
|
+
*/
|
|
2382
|
+
pollFlightInfo(request: FlightDescriptor, context: CallContext & CallContextExt): Promise<DeepPartial<PollInfo>>;
|
|
2383
|
+
/**
|
|
2384
|
+
* For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
|
|
2385
|
+
* This is used when a consumer needs the Schema of flight stream. Similar to
|
|
2386
|
+
* GetFlightInfo this interface may generate a new flight that was not previously
|
|
2387
|
+
* available in ListFlights.
|
|
2388
|
+
*/
|
|
2389
|
+
getSchema(request: FlightDescriptor, context: CallContext & CallContextExt): Promise<DeepPartial<SchemaResult>>;
|
|
2390
|
+
/**
|
|
2391
|
+
* Retrieve a single stream associated with a particular descriptor
|
|
2392
|
+
* associated with the referenced ticket. A Flight can be composed of one or
|
|
2393
|
+
* more streams where each stream can be retrieved using a separate opaque
|
|
2394
|
+
* ticket that the flight service uses for managing a collection of streams.
|
|
2395
|
+
*/
|
|
2396
|
+
doGet(request: Ticket, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<FlightData>>;
|
|
2397
|
+
/**
|
|
2398
|
+
* Push a stream to the flight service associated with a particular
|
|
2399
|
+
* flight stream. This allows a client of a flight service to upload a stream
|
|
2400
|
+
* of data. Depending on the particular flight service, a client consumer
|
|
2401
|
+
* could be allowed to upload a single stream per descriptor or an unlimited
|
|
2402
|
+
* number. In the latter, the service might implement a 'seal' action that
|
|
2403
|
+
* can be applied to a descriptor once all streams are uploaded.
|
|
2404
|
+
*/
|
|
2405
|
+
doPut(
|
|
2406
|
+
request: AsyncIterable<FlightData>,
|
|
2407
|
+
context: CallContext & CallContextExt,
|
|
2408
|
+
): ServerStreamingMethodResult<DeepPartial<PutResult>>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Open a bidirectional data channel for a given descriptor. This
|
|
2411
|
+
* allows clients to send and receive arbitrary Arrow data and
|
|
2412
|
+
* application-specific metadata in a single logical stream. In
|
|
2413
|
+
* contrast to DoGet/DoPut, this is more suited for clients
|
|
2414
|
+
* offloading computation (rather than storage) to a Flight service.
|
|
2415
|
+
*/
|
|
2416
|
+
doExchange(
|
|
2417
|
+
request: AsyncIterable<FlightData>,
|
|
2418
|
+
context: CallContext & CallContextExt,
|
|
2419
|
+
): ServerStreamingMethodResult<DeepPartial<FlightData>>;
|
|
2420
|
+
/**
|
|
2421
|
+
* Flight services can support an arbitrary number of simple actions in
|
|
2422
|
+
* addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
|
|
2423
|
+
* operations that are potentially available. DoAction allows a flight client
|
|
2424
|
+
* to do a specific action against a flight service. An action includes
|
|
2425
|
+
* opaque request and response objects that are specific to the type action
|
|
2426
|
+
* being undertaken.
|
|
2427
|
+
*/
|
|
2428
|
+
doAction(request: Action, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<Result>>;
|
|
2429
|
+
/**
|
|
2430
|
+
* A flight service exposes all of the available action types that it has
|
|
2431
|
+
* along with descriptions. This allows different flight consumers to
|
|
2432
|
+
* understand the capabilities of the flight service.
|
|
2433
|
+
*/
|
|
2434
|
+
listActions(
|
|
2435
|
+
request: Empty,
|
|
2436
|
+
context: CallContext & CallContextExt,
|
|
2437
|
+
): ServerStreamingMethodResult<DeepPartial<ActionType>>;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
export interface FlightServiceClient<CallOptionsExt = {}> {
|
|
2441
|
+
/**
|
|
2442
|
+
* Handshake between client and server. Depending on the server, the
|
|
2443
|
+
* handshake may be required to determine the token that should be used for
|
|
2444
|
+
* future operations. Both request and response are streams to allow multiple
|
|
2445
|
+
* round-trips depending on auth mechanism.
|
|
2446
|
+
*/
|
|
2447
|
+
handshake(
|
|
2448
|
+
request: AsyncIterable<DeepPartial<HandshakeRequest>>,
|
|
2449
|
+
options?: CallOptions & CallOptionsExt,
|
|
2450
|
+
): AsyncIterable<HandshakeResponse>;
|
|
2451
|
+
/**
|
|
2452
|
+
* Get a list of available streams given a particular criteria. Most flight
|
|
2453
|
+
* services will expose one or more streams that are readily available for
|
|
2454
|
+
* retrieval. This api allows listing the streams available for
|
|
2455
|
+
* consumption. A user can also provide a criteria. The criteria can limit
|
|
2456
|
+
* the subset of streams that can be listed via this interface. Each flight
|
|
2457
|
+
* service allows its own definition of how to consume criteria.
|
|
2458
|
+
*/
|
|
2459
|
+
listFlights(request: DeepPartial<Criteria>, options?: CallOptions & CallOptionsExt): AsyncIterable<FlightInfo>;
|
|
2460
|
+
/**
|
|
2461
|
+
* For a given FlightDescriptor, get information about how the flight can be
|
|
2462
|
+
* consumed. This is a useful interface if the consumer of the interface
|
|
2463
|
+
* already can identify the specific flight to consume. This interface can
|
|
2464
|
+
* also allow a consumer to generate a flight stream through a specified
|
|
2465
|
+
* descriptor. For example, a flight descriptor might be something that
|
|
2466
|
+
* includes a SQL statement or a Pickled Python operation that will be
|
|
2467
|
+
* executed. In those cases, the descriptor will not be previously available
|
|
2468
|
+
* within the list of available streams provided by ListFlights but will be
|
|
2469
|
+
* available for consumption for the duration defined by the specific flight
|
|
2470
|
+
* service.
|
|
2471
|
+
*/
|
|
2472
|
+
getFlightInfo(request: DeepPartial<FlightDescriptor>, options?: CallOptions & CallOptionsExt): Promise<FlightInfo>;
|
|
2473
|
+
/**
|
|
2474
|
+
* For a given FlightDescriptor, start a query and get information
|
|
2475
|
+
* to poll its execution status. This is a useful interface if the
|
|
2476
|
+
* query may be a long-running query. The first PollFlightInfo call
|
|
2477
|
+
* should return as quickly as possible. (GetFlightInfo doesn't
|
|
2478
|
+
* return until the query is complete.)
|
|
2479
|
+
*
|
|
2480
|
+
* A client can consume any available results before
|
|
2481
|
+
* the query is completed. See PollInfo.info for details.
|
|
2482
|
+
*
|
|
2483
|
+
* A client can poll the updated query status by calling
|
|
2484
|
+
* PollFlightInfo() with PollInfo.flight_descriptor. A server
|
|
2485
|
+
* should not respond until the result would be different from last
|
|
2486
|
+
* time. That way, the client can "long poll" for updates
|
|
2487
|
+
* without constantly making requests. Clients can set a short timeout
|
|
2488
|
+
* to avoid blocking calls if desired.
|
|
2489
|
+
*
|
|
2490
|
+
* A client can't use PollInfo.flight_descriptor after
|
|
2491
|
+
* PollInfo.expiration_time passes. A server might not accept the
|
|
2492
|
+
* retry descriptor anymore and the query may be cancelled.
|
|
2493
|
+
*
|
|
2494
|
+
* A client may use the CancelFlightInfo action with
|
|
2495
|
+
* PollInfo.info to cancel the running query.
|
|
2496
|
+
*/
|
|
2497
|
+
pollFlightInfo(request: DeepPartial<FlightDescriptor>, options?: CallOptions & CallOptionsExt): Promise<PollInfo>;
|
|
2498
|
+
/**
|
|
2499
|
+
* For a given FlightDescriptor, get the Schema as described in Schema.fbs::Schema
|
|
2500
|
+
* This is used when a consumer needs the Schema of flight stream. Similar to
|
|
2501
|
+
* GetFlightInfo this interface may generate a new flight that was not previously
|
|
2502
|
+
* available in ListFlights.
|
|
2503
|
+
*/
|
|
2504
|
+
getSchema(request: DeepPartial<FlightDescriptor>, options?: CallOptions & CallOptionsExt): Promise<SchemaResult>;
|
|
2505
|
+
/**
|
|
2506
|
+
* Retrieve a single stream associated with a particular descriptor
|
|
2507
|
+
* associated with the referenced ticket. A Flight can be composed of one or
|
|
2508
|
+
* more streams where each stream can be retrieved using a separate opaque
|
|
2509
|
+
* ticket that the flight service uses for managing a collection of streams.
|
|
2510
|
+
*/
|
|
2511
|
+
doGet(request: DeepPartial<Ticket>, options?: CallOptions & CallOptionsExt): AsyncIterable<FlightData>;
|
|
2512
|
+
/**
|
|
2513
|
+
* Push a stream to the flight service associated with a particular
|
|
2514
|
+
* flight stream. This allows a client of a flight service to upload a stream
|
|
2515
|
+
* of data. Depending on the particular flight service, a client consumer
|
|
2516
|
+
* could be allowed to upload a single stream per descriptor or an unlimited
|
|
2517
|
+
* number. In the latter, the service might implement a 'seal' action that
|
|
2518
|
+
* can be applied to a descriptor once all streams are uploaded.
|
|
2519
|
+
*/
|
|
2520
|
+
doPut(
|
|
2521
|
+
request: AsyncIterable<DeepPartial<FlightData>>,
|
|
2522
|
+
options?: CallOptions & CallOptionsExt,
|
|
2523
|
+
): AsyncIterable<PutResult>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Open a bidirectional data channel for a given descriptor. This
|
|
2526
|
+
* allows clients to send and receive arbitrary Arrow data and
|
|
2527
|
+
* application-specific metadata in a single logical stream. In
|
|
2528
|
+
* contrast to DoGet/DoPut, this is more suited for clients
|
|
2529
|
+
* offloading computation (rather than storage) to a Flight service.
|
|
2530
|
+
*/
|
|
2531
|
+
doExchange(
|
|
2532
|
+
request: AsyncIterable<DeepPartial<FlightData>>,
|
|
2533
|
+
options?: CallOptions & CallOptionsExt,
|
|
2534
|
+
): AsyncIterable<FlightData>;
|
|
2535
|
+
/**
|
|
2536
|
+
* Flight services can support an arbitrary number of simple actions in
|
|
2537
|
+
* addition to the possible ListFlights, GetFlightInfo, DoGet, DoPut
|
|
2538
|
+
* operations that are potentially available. DoAction allows a flight client
|
|
2539
|
+
* to do a specific action against a flight service. An action includes
|
|
2540
|
+
* opaque request and response objects that are specific to the type action
|
|
2541
|
+
* being undertaken.
|
|
2542
|
+
*/
|
|
2543
|
+
doAction(request: DeepPartial<Action>, options?: CallOptions & CallOptionsExt): AsyncIterable<Result>;
|
|
2544
|
+
/**
|
|
2545
|
+
* A flight service exposes all of the available action types that it has
|
|
2546
|
+
* along with descriptions. This allows different flight consumers to
|
|
2547
|
+
* understand the capabilities of the flight service.
|
|
2548
|
+
*/
|
|
2549
|
+
listActions(request: DeepPartial<Empty>, options?: CallOptions & CallOptionsExt): AsyncIterable<ActionType>;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
2553
|
+
if ((globalThis as any).Buffer) {
|
|
2554
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
2555
|
+
} else {
|
|
2556
|
+
const bin = globalThis.atob(b64);
|
|
2557
|
+
const arr = new Uint8Array(bin.length);
|
|
2558
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
2559
|
+
arr[i] = bin.charCodeAt(i);
|
|
2560
|
+
}
|
|
2561
|
+
return arr;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
2566
|
+
if ((globalThis as any).Buffer) {
|
|
2567
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
2568
|
+
} else {
|
|
2569
|
+
const bin: string[] = [];
|
|
2570
|
+
arr.forEach((byte) => {
|
|
2571
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
2572
|
+
});
|
|
2573
|
+
return globalThis.btoa(bin.join(""));
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
2578
|
+
|
|
2579
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2580
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2581
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2582
|
+
: T extends { readonly $case: string }
|
|
2583
|
+
? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { readonly $case: T["$case"] }
|
|
2584
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
2585
|
+
: Partial<T>;
|
|
2586
|
+
|
|
2587
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2588
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2589
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
2590
|
+
|
|
2591
|
+
function toTimestamp(date: Date): Timestamp {
|
|
2592
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
|
|
2593
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
2594
|
+
return { $type: "google.protobuf.Timestamp", seconds, nanos };
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
function fromTimestamp(t: Timestamp): Date {
|
|
2598
|
+
let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1_000;
|
|
2599
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
2600
|
+
return new globalThis.Date(millis);
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
function fromJsonTimestamp(o: any): Date {
|
|
2604
|
+
if (o instanceof globalThis.Date) {
|
|
2605
|
+
return o;
|
|
2606
|
+
} else if (typeof o === "string") {
|
|
2607
|
+
return new globalThis.Date(o);
|
|
2608
|
+
} else {
|
|
2609
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
function isSet(value: any): boolean {
|
|
2614
|
+
return value !== null && value !== undefined;
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|
|
2618
|
+
|
|
2619
|
+
export interface MessageFns<T, V extends string> {
|
|
2620
|
+
readonly $type: V;
|
|
2621
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2622
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2623
|
+
fromJSON(object: any): T;
|
|
2624
|
+
toJSON(message: T): unknown;
|
|
2625
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
2626
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
2627
|
+
}
|