@databricks/sdk-postgres 0.0.0-dev → 0.1.0-dev.1

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.
@@ -0,0 +1,2409 @@
1
+ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
+ import { Temporal } from '@js-temporal/polyfill';
3
+ import { FieldMask } from '@databricks/sdk-core/wkt';
4
+ import { z } from 'zod';
5
+ /** The compute endpoint type. Either `read_write` or `read_only`. */
6
+ export var EndpointType;
7
+ (function (EndpointType) {
8
+ /** Default value, not used */
9
+ EndpointType["ENDPOINT_TYPE_UNSPECIFIED"] = "ENDPOINT_TYPE_UNSPECIFIED";
10
+ EndpointType["ENDPOINT_TYPE_READ_WRITE"] = "ENDPOINT_TYPE_READ_WRITE";
11
+ EndpointType["ENDPOINT_TYPE_READ_ONLY"] = "ENDPOINT_TYPE_READ_ONLY";
12
+ })(EndpointType || (EndpointType = {}));
13
+ /** Error codes returned by Databricks APIs to indicate specific failure conditions. */
14
+ export var ErrorCode;
15
+ (function (ErrorCode) {
16
+ /**
17
+ * Unknown error. This error generally should not be returned explicitly, but will be used
18
+ * as a fallback if the error enum is missing from the message for some reason.
19
+ *
20
+ * It's assigned tag 0 to follow the best practice from
21
+ * https://developers.google.com/protocol-buffers/docs/style#enums
22
+ *
23
+ * TODO(PLAT-55898): Add custom option to declare HTTP and gRPC mappings.
24
+ * Maps to:
25
+ * - google.rpc.Code: UNKNOWN = 2;
26
+ * - HTTP code: 500 Internal Server Error
27
+ */
28
+ ErrorCode["UNKNOWN"] = "UNKNOWN";
29
+ /**
30
+ * Internal error. This means that some invariants expected by the underlying system have been
31
+ * broken. This error code is reserved for serious errors, which generally cannot be resolved
32
+ * by the user.
33
+ *
34
+ * Prefer this over all kinds of detailed error messages (e.g IO_ERROR), unless there's some
35
+ * automation that relies on the custom error code.
36
+ *
37
+ * Maps to:
38
+ * - google.rpc.Code: INTERNAL = 13;
39
+ * - HTTP code: 500 Internal Server Error
40
+ */
41
+ ErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
42
+ /**
43
+ * The service is currently unavailable. This is most likely a transient condition, which can be
44
+ * corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent
45
+ * operations.
46
+ *
47
+ * Prefer this over SERVICE_UNDER_MAINTENANCE, WORKSPACE_TEMPORARILY_UNAVAILABLE.
48
+ *
49
+ * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
50
+ * for guideline on how to pick this vs RESOURCE_EXHAUSTED.
51
+ *
52
+ * Maps to:
53
+ * - google.rpc.Code: UNAVAILABLE = 14;
54
+ * - HTTP code: 503 Service Unavailable
55
+ */
56
+ ErrorCode["TEMPORARILY_UNAVAILABLE"] = "TEMPORARILY_UNAVAILABLE";
57
+ /**
58
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
59
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
60
+ * Indicates that an IOException has been internally thrown.
61
+ */
62
+ ErrorCode["IO_ERROR"] = "IO_ERROR";
63
+ /**
64
+ * The request is invalid. Prefer more specific error code whenever possible.
65
+ * Also see similar recommendation for the google.rpc.Code.FAILED_PRECONDITION.
66
+ *
67
+ * Prefer this error code over MALFORMED_REQUEST, INVALID_STATE, UNPARSEABLE_HTTP_ERROR.
68
+ *
69
+ * Maps to:
70
+ * - google.rpc.Code: FAILED_PRECONDITION = 9;
71
+ * - HTTP code: 400 Bad Request
72
+ */
73
+ ErrorCode["BAD_REQUEST"] = "BAD_REQUEST";
74
+ /**
75
+ * An external service is unavailable temporarily as it is being updated/re-deployed. Indicates
76
+ * gateway proxy to safely retry the request.
77
+ */
78
+ ErrorCode["SERVICE_UNDER_MAINTENANCE"] = "SERVICE_UNDER_MAINTENANCE";
79
+ /** A workspace is temporarily unavailable as the workspace is being re-assigned. */
80
+ ErrorCode["WORKSPACE_TEMPORARILY_UNAVAILABLE"] = "WORKSPACE_TEMPORARILY_UNAVAILABLE";
81
+ /**
82
+ * The deadline expired before the operation could complete. For operations that change the state
83
+ * of the system, this error may be returned even if the operation has completed successfully.
84
+ * For example, a successful response from a server could have been delayed long enough for
85
+ * the deadline to expire. When possible - implementations should make sure further processing of
86
+ * the request is aborted, e.g. by throwing an exception instead of making the RPC request,
87
+ * making the database query, etc.
88
+ *
89
+ * Maps to:
90
+ * - google.rpc.Code: DEADLINE_EXCEEDED = 4;
91
+ * - HTTP code: 504 Gateway Timeout
92
+ */
93
+ ErrorCode["DEADLINE_EXCEEDED"] = "DEADLINE_EXCEEDED";
94
+ /**
95
+ * The operation was canceled by the caller. An example - client closed the connection without
96
+ * waiting for a response.
97
+ *
98
+ * Maps to:
99
+ * - google.rpc.Code: CANCELLED = 1;
100
+ * - HTTP code: 499 Client Closed Request
101
+ */
102
+ ErrorCode["CANCELLED"] = "CANCELLED";
103
+ /**
104
+ * The operation is rejected because of either rate limiting or resource quota,
105
+ * such as the client has sent too many requests recently or the client has allocated too many
106
+ * resources.
107
+ *
108
+ * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
109
+ * for guideline on how to pick this vs TEMPORARILY_UNAVAILABLE.
110
+ *
111
+ * Maps to:
112
+ * - google.rpc.Code: RESOURCE_EXHAUSTED = 8;
113
+ * - HTTP code: 429 Too Many Requests
114
+ */
115
+ ErrorCode["RESOURCE_EXHAUSTED"] = "RESOURCE_EXHAUSTED";
116
+ /**
117
+ * The operation was aborted, typically due to a concurrency issue such as a sequencer
118
+ * check failure, transaction abort, or transaction conflict.
119
+ *
120
+ * Maps to:
121
+ * - google.rpc.Code: ABORTED = 10;
122
+ * - HTTP code: 409 Conflict
123
+ */
124
+ ErrorCode["ABORTED"] = "ABORTED";
125
+ /**
126
+ * Operation was performed on a resource that does not exist,
127
+ * e.g. file or directory was not found.
128
+ *
129
+ * Maps to:
130
+ * - google.rpc.Code: NOT_FOUND = 5;
131
+ * - HTTP code: 404 Not Found
132
+ */
133
+ ErrorCode["NOT_FOUND"] = "NOT_FOUND";
134
+ /**
135
+ * Operation was rejected due a conflict with an existing resource, e.g. attempted to create
136
+ * file or directory that already exists.
137
+ *
138
+ * Prefer this over RESOURCE_CONFLICT.
139
+ *
140
+ * Maps to:
141
+ * - google.rpc.Code: ALREADY_EXISTS = 6;
142
+ * - HTTP code: 409 Conflict
143
+ */
144
+ ErrorCode["ALREADY_EXISTS"] = "ALREADY_EXISTS";
145
+ /**
146
+ * The request does not have valid authentication (AuthN) credentials for the operation.
147
+ *
148
+ * Prefer this over CUSTOMER_UNAUTHORIZED, unless you need to keep consistent behavior with legacy
149
+ * code.
150
+ * For authorization (AuthZ) errors use PERMISSION_DENIED.
151
+ *
152
+ * Maps to:
153
+ * - google.rpc.Code: UNAUTHENTICATED = 16;
154
+ * - HTTP code: 401 Unauthorized
155
+ */
156
+ ErrorCode["UNAUTHENTICATED"] = "UNAUTHENTICATED";
157
+ /**
158
+ * The service is currently unavailable. Please note that the unavailability may or may not be transient.
159
+ * That means if this is a non-transient condition, retrying it does not work. If the unavailability
160
+ * is certainly a transient condition, pleases use `TEMPORARILY_UNAVAILABLE` which signals its transient
161
+ * nature explicitly.
162
+ * An example of this error code’s use case is that when DNS resolution fails, the DNS resolver does
163
+ * not know whether it is because the domain name is completely wrong (non-transient situation) or
164
+ * the domain name is valid but the DNS server does not have an entry for this domain name yet (transient
165
+ * situation). Hence, `UNAVAILABLE` is suitable for this case.
166
+ *
167
+ * Maps to:
168
+ * - google.rpc.Code: UNAVAILABLE = 14;
169
+ * - HTTP code: 503 Service Unavailable
170
+ */
171
+ ErrorCode["UNAVAILABLE"] = "UNAVAILABLE";
172
+ /**
173
+ * Supplied value for a parameter was invalid (e.g., giving a number for a string parameter).
174
+ *
175
+ * Maps to:
176
+ * - google.rpc.Code: INVALID_ARGUMENT = 3;
177
+ * - HTTP code: 400 Bad Request
178
+ */
179
+ ErrorCode["INVALID_PARAMETER_VALUE"] = "INVALID_PARAMETER_VALUE";
180
+ /**
181
+ * Indicates that the given API endpoint does not exist. Legacy, when possible - NOT_IMPLEMENTED
182
+ * should be used instead to indicate that API doesn't exist.
183
+ *
184
+ * Maps to:
185
+ * - google.rpc.Code: NOT_FOUND = 5;
186
+ * - HTTP code: 404 Not Found
187
+ */
188
+ ErrorCode["ENDPOINT_NOT_FOUND"] = "ENDPOINT_NOT_FOUND";
189
+ /** Indicates that the given API request was malformed. */
190
+ ErrorCode["MALFORMED_REQUEST"] = "MALFORMED_REQUEST";
191
+ /**
192
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
193
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
194
+ * If one or more of the inputs to a given RPC are not in a valid state for the action.
195
+ */
196
+ ErrorCode["INVALID_STATE"] = "INVALID_STATE";
197
+ /**
198
+ * The caller does not have permission to execute the specified operation.
199
+ * PERMISSION_DENIED must not be used for rejections caused by exhausting some resource,
200
+ * use RESOURCE_EXHAUSTED instead for those errors.
201
+ * PERMISSION_DENIED must not be used if the caller can not be identified,
202
+ * use CUSTOMER_UNAUTHORIZED instead for those errors.
203
+ * This error code does not imply the request is valid or the requested entity exists or
204
+ * satisfies other pre-conditions.
205
+ *
206
+ * Maps to:
207
+ * - google.rpc.Code: PERMISSION_DENIED = 7;
208
+ * - HTTP code: 403 Forbidden
209
+ */
210
+ ErrorCode["PERMISSION_DENIED"] = "PERMISSION_DENIED";
211
+ /**
212
+ * NOTE: Deprecated due to inconsistent mapping in legacy code, see
213
+ * https://docs.google.com/document/d/17TZIKX_Y39cJMBr333lc-d5dTvvBLSu3DPUyGU5eMJg/edit?disco=AAAAzVGt6FA.
214
+ * Prefer using NOT_FOUND or PERMISSION_DENIED.
215
+ *
216
+ * If a given user/entity is trying to use a feature which has been disabled.
217
+ *
218
+ * Maps to:
219
+ * - google.rpc.Code: NOT_FOUND = 5;
220
+ * - HTTP code: 404 Not Found
221
+ */
222
+ ErrorCode["FEATURE_DISABLED"] = "FEATURE_DISABLED";
223
+ /**
224
+ * The request does not have valid authentication (AuthN) credentials for the operation.
225
+ *
226
+ * For authentication (AuthN) errors prefer using UNAUTHENTICATED, unless you need to keep
227
+ * consistent behavior with legacy code.
228
+ * For authorization (AuthZ) errors use PERMISSION_DENIED.
229
+ *
230
+ * Important: name is confusing, this error code is for authentication (AuthN) errors, not
231
+ * authorization (AuthZ) errors. It maps to 401 Unauthorized and suffers from the same confusing
232
+ * naming. See https://datatracker.ietf.org/doc/html/rfc7235#section-3.1 - "[...] status code
233
+ * indicates that the request has not been applied because it lacks valid authentication
234
+ * credentials for the target resource. [...] If the request included authentication credentials,
235
+ * then the 401 response indicates that authorization has been refused for those credentials."
236
+ *
237
+ * Also, see https://stackoverflow.com/a/6937030/16352922, it covers it pretty well.
238
+ *
239
+ * Maps to:
240
+ * - google.rpc.Code: UNAUTHENTICATED = 16;
241
+ * - HTTP code: 401 Unauthorized
242
+ */
243
+ ErrorCode["CUSTOMER_UNAUTHORIZED"] = "CUSTOMER_UNAUTHORIZED";
244
+ /**
245
+ * The operation is rejected because of request rate limit, for example rate limiting applied to
246
+ * users, workspaces, IP addresses, etc.
247
+ *
248
+ * Prefer a more generic RESOURCE_EXHAUSTED for the new use cases.
249
+ *
250
+ * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
251
+ * for guideline on the rate limiting vs throttling.
252
+ *
253
+ * Maps to:
254
+ * - google.rpc.Code: RESOURCE_EXHAUSTED = 8;
255
+ * - HTTP code: 429 Too Many Requests
256
+ */
257
+ ErrorCode["REQUEST_LIMIT_EXCEEDED"] = "REQUEST_LIMIT_EXCEEDED";
258
+ /** Indicates API request was rejected due a conflict with an existing resource. */
259
+ ErrorCode["RESOURCE_CONFLICT"] = "RESOURCE_CONFLICT";
260
+ /**
261
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
262
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
263
+ * Indicates that the HTTP response cannot be correctly deserialized.
264
+ * This currently is only used in DUST test clients, and not by any real service code.
265
+ */
266
+ ErrorCode["UNPARSEABLE_HTTP_ERROR"] = "UNPARSEABLE_HTTP_ERROR";
267
+ /**
268
+ * The operation is not implemented or is not supported/enabled in this service.
269
+ *
270
+ * Maps to:
271
+ * - google.rpc.Code: UNIMPLEMENTED = 12;
272
+ * - HTTP code: 501 Not Implemented
273
+ */
274
+ ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED";
275
+ /**
276
+ * Unrecoverable data loss or corruption.
277
+ *
278
+ * One of the major use cases is to indicate that server failed to validate the integrity of
279
+ * the request. This error can occur when the checksum specified in the `X-Databricks-Checksum`
280
+ * request header (or trailer) doesn't match the actual request content checksum.
281
+ *
282
+ * Note, in case of the severe corruption that results in a malformed request, the server may
283
+ * send a generic `400 Bad Request` response rather than sending this error code.
284
+ *
285
+ * Maps to:
286
+ * - google.rpc.Code: DATA_LOSS = 15;
287
+ * - HTTP code: 500 Internal Server Error
288
+ */
289
+ ErrorCode["DATA_LOSS"] = "DATA_LOSS";
290
+ /** If the user attempts to perform an invalid state transition on a shard. */
291
+ ErrorCode["INVALID_STATE_TRANSITION"] = "INVALID_STATE_TRANSITION";
292
+ /**
293
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
294
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
295
+ * Unable to perform the operation because the shard was locked by some other operation.
296
+ */
297
+ ErrorCode["COULD_NOT_ACQUIRE_LOCK"] = "COULD_NOT_ACQUIRE_LOCK";
298
+ /**
299
+ * NOTE: Deprecated, prefer using ALREADY_EXISTS.
300
+ * Unlike ALREADY_EXISTS - this maps to HTTP code 400 Bad Request due to legacy reasons,
301
+ * remapping will be a backwards incompatible change.
302
+ *
303
+ * Operation was performed on a resource that already exists.
304
+ */
305
+ ErrorCode["RESOURCE_ALREADY_EXISTS"] = "RESOURCE_ALREADY_EXISTS";
306
+ /**
307
+ * NOTE: Deprecated, prefer using NOT_FOUND - see the note for the RESOURCE_ALREADY_EXISTS,
308
+ * because this pair of codes is related and RESOURCE_ALREADY_EXISTS has bad mapping to the HTTP
309
+ * codes we added new error codes NOT_FOUND and ALREADY_EXISTS, and recommend to use them instead.
310
+ *
311
+ * Operation was performed on a resource that does not exist.
312
+ */
313
+ ErrorCode["RESOURCE_DOES_NOT_EXIST"] = "RESOURCE_DOES_NOT_EXIST";
314
+ /**
315
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
316
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
317
+ */
318
+ ErrorCode["QUOTA_EXCEEDED"] = "QUOTA_EXCEEDED";
319
+ /**
320
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
321
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
322
+ */
323
+ ErrorCode["MAX_BLOCK_SIZE_EXCEEDED"] = "MAX_BLOCK_SIZE_EXCEEDED";
324
+ /**
325
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
326
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
327
+ */
328
+ ErrorCode["MAX_READ_SIZE_EXCEEDED"] = "MAX_READ_SIZE_EXCEEDED";
329
+ ErrorCode["PARTIAL_DELETE"] = "PARTIAL_DELETE";
330
+ ErrorCode["MAX_LIST_SIZE_EXCEEDED"] = "MAX_LIST_SIZE_EXCEEDED";
331
+ /**
332
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
333
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
334
+ */
335
+ ErrorCode["DRY_RUN_FAILED"] = "DRY_RUN_FAILED";
336
+ /**
337
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
338
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
339
+ * Cluster request was rejected because it would exceed a resource limit.
340
+ */
341
+ ErrorCode["RESOURCE_LIMIT_EXCEEDED"] = "RESOURCE_LIMIT_EXCEEDED";
342
+ /**
343
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
344
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
345
+ */
346
+ ErrorCode["DIRECTORY_NOT_EMPTY"] = "DIRECTORY_NOT_EMPTY";
347
+ /**
348
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
349
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
350
+ */
351
+ ErrorCode["DIRECTORY_PROTECTED"] = "DIRECTORY_PROTECTED";
352
+ /**
353
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
354
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
355
+ */
356
+ ErrorCode["MAX_NOTEBOOK_SIZE_EXCEEDED"] = "MAX_NOTEBOOK_SIZE_EXCEEDED";
357
+ ErrorCode["MAX_CHILD_NODE_SIZE_EXCEEDED"] = "MAX_CHILD_NODE_SIZE_EXCEEDED";
358
+ /**
359
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
360
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
361
+ */
362
+ ErrorCode["SEARCH_QUERY_TOO_LONG"] = "SEARCH_QUERY_TOO_LONG";
363
+ /**
364
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
365
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
366
+ */
367
+ ErrorCode["SEARCH_QUERY_TOO_SHORT"] = "SEARCH_QUERY_TOO_SHORT";
368
+ /**
369
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
370
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
371
+ */
372
+ ErrorCode["MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST"] = "MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST";
373
+ /**
374
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
375
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
376
+ */
377
+ ErrorCode["PERMISSION_NOT_PROPAGATED"] = "PERMISSION_NOT_PROPAGATED";
378
+ /**
379
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
380
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
381
+ */
382
+ ErrorCode["DEPLOYMENT_TIMEOUT"] = "DEPLOYMENT_TIMEOUT";
383
+ /**
384
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
385
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
386
+ */
387
+ ErrorCode["GIT_CONFLICT"] = "GIT_CONFLICT";
388
+ /**
389
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
390
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
391
+ */
392
+ ErrorCode["GIT_UNKNOWN_REF"] = "GIT_UNKNOWN_REF";
393
+ /**
394
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
395
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
396
+ */
397
+ ErrorCode["GIT_SENSITIVE_TOKEN_DETECTED"] = "GIT_SENSITIVE_TOKEN_DETECTED";
398
+ /**
399
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
400
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
401
+ */
402
+ ErrorCode["GIT_URL_NOT_ON_ALLOW_LIST"] = "GIT_URL_NOT_ON_ALLOW_LIST";
403
+ /**
404
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
405
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
406
+ */
407
+ ErrorCode["GIT_REMOTE_ERROR"] = "GIT_REMOTE_ERROR";
408
+ /**
409
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
410
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
411
+ */
412
+ ErrorCode["PROJECTS_OPERATION_TIMEOUT"] = "PROJECTS_OPERATION_TIMEOUT";
413
+ /**
414
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
415
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
416
+ */
417
+ ErrorCode["IPYNB_FILE_IN_REPO"] = "IPYNB_FILE_IN_REPO";
418
+ /**
419
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
420
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
421
+ */
422
+ ErrorCode["INSECURE_PARTNER_RESPONSE"] = "INSECURE_PARTNER_RESPONSE";
423
+ /**
424
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
425
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
426
+ */
427
+ ErrorCode["MALFORMED_PARTNER_RESPONSE"] = "MALFORMED_PARTNER_RESPONSE";
428
+ ErrorCode["METASTORE_DOES_NOT_EXIST"] = "METASTORE_DOES_NOT_EXIST";
429
+ /**
430
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
431
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
432
+ */
433
+ ErrorCode["DAC_DOES_NOT_EXIST"] = "DAC_DOES_NOT_EXIST";
434
+ ErrorCode["CATALOG_DOES_NOT_EXIST"] = "CATALOG_DOES_NOT_EXIST";
435
+ ErrorCode["SCHEMA_DOES_NOT_EXIST"] = "SCHEMA_DOES_NOT_EXIST";
436
+ ErrorCode["TABLE_DOES_NOT_EXIST"] = "TABLE_DOES_NOT_EXIST";
437
+ ErrorCode["SHARE_DOES_NOT_EXIST"] = "SHARE_DOES_NOT_EXIST";
438
+ ErrorCode["RECIPIENT_DOES_NOT_EXIST"] = "RECIPIENT_DOES_NOT_EXIST";
439
+ ErrorCode["STORAGE_CREDENTIAL_DOES_NOT_EXIST"] = "STORAGE_CREDENTIAL_DOES_NOT_EXIST";
440
+ ErrorCode["EXTERNAL_LOCATION_DOES_NOT_EXIST"] = "EXTERNAL_LOCATION_DOES_NOT_EXIST";
441
+ ErrorCode["PRINCIPAL_DOES_NOT_EXIST"] = "PRINCIPAL_DOES_NOT_EXIST";
442
+ ErrorCode["PROVIDER_DOES_NOT_EXIST"] = "PROVIDER_DOES_NOT_EXIST";
443
+ /**
444
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
445
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
446
+ */
447
+ ErrorCode["METASTORE_ALREADY_EXISTS"] = "METASTORE_ALREADY_EXISTS";
448
+ /**
449
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
450
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
451
+ */
452
+ ErrorCode["DAC_ALREADY_EXISTS"] = "DAC_ALREADY_EXISTS";
453
+ /**
454
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
455
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
456
+ */
457
+ ErrorCode["CATALOG_ALREADY_EXISTS"] = "CATALOG_ALREADY_EXISTS";
458
+ /**
459
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
460
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
461
+ */
462
+ ErrorCode["SCHEMA_ALREADY_EXISTS"] = "SCHEMA_ALREADY_EXISTS";
463
+ /**
464
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
465
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
466
+ */
467
+ ErrorCode["TABLE_ALREADY_EXISTS"] = "TABLE_ALREADY_EXISTS";
468
+ /**
469
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
470
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
471
+ */
472
+ ErrorCode["SHARE_ALREADY_EXISTS"] = "SHARE_ALREADY_EXISTS";
473
+ /**
474
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
475
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
476
+ */
477
+ ErrorCode["RECIPIENT_ALREADY_EXISTS"] = "RECIPIENT_ALREADY_EXISTS";
478
+ /**
479
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
480
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
481
+ */
482
+ ErrorCode["STORAGE_CREDENTIAL_ALREADY_EXISTS"] = "STORAGE_CREDENTIAL_ALREADY_EXISTS";
483
+ /**
484
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
485
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
486
+ */
487
+ ErrorCode["EXTERNAL_LOCATION_ALREADY_EXISTS"] = "EXTERNAL_LOCATION_ALREADY_EXISTS";
488
+ /**
489
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
490
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
491
+ */
492
+ ErrorCode["PROVIDER_ALREADY_EXISTS"] = "PROVIDER_ALREADY_EXISTS";
493
+ /**
494
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
495
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
496
+ */
497
+ ErrorCode["CATALOG_NOT_EMPTY"] = "CATALOG_NOT_EMPTY";
498
+ /**
499
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
500
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
501
+ */
502
+ ErrorCode["SCHEMA_NOT_EMPTY"] = "SCHEMA_NOT_EMPTY";
503
+ /**
504
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
505
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
506
+ */
507
+ ErrorCode["METASTORE_NOT_EMPTY"] = "METASTORE_NOT_EMPTY";
508
+ /**
509
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
510
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
511
+ */
512
+ ErrorCode["PROVIDER_SHARE_NOT_ACCESSIBLE"] = "PROVIDER_SHARE_NOT_ACCESSIBLE";
513
+ })(ErrorCode || (ErrorCode = {}));
514
+ /** The current phase of the data synchronization pipeline. */
515
+ export var ProvisioningPhase;
516
+ (function (ProvisioningPhase) {
517
+ /** The default phase. It should not be reported by any synced tables. */
518
+ ProvisioningPhase["PROVISIONING_PHASE_UNSPECIFIED"] = "PROVISIONING_PHASE_UNSPECIFIED";
519
+ /** Ingestion phase of the synced table. This is when the synced table is ingesting data from the delta table. */
520
+ ProvisioningPhase["PROVISIONING_PHASE_MAIN"] = "PROVISIONING_PHASE_MAIN";
521
+ /** Index scan phase of the synced table. This is when the synced table is creating indexes on the ingested data. */
522
+ ProvisioningPhase["PROVISIONING_PHASE_INDEX_SCAN"] = "PROVISIONING_PHASE_INDEX_SCAN";
523
+ /** Index sort phase of the synced table. This is when the synced table is creating indexes on the ingested data. */
524
+ ProvisioningPhase["PROVISIONING_PHASE_INDEX_SORT"] = "PROVISIONING_PHASE_INDEX_SORT";
525
+ })(ProvisioningPhase || (ProvisioningPhase = {}));
526
+ /** The state of a synced table. */
527
+ export var SyncedTableState;
528
+ (function (SyncedTableState) {
529
+ /** The default state. It should not be reported by any synced tables. */
530
+ SyncedTableState["SYNCED_TABLE_STATE_UNSPECIFIED"] = "SYNCED_TABLE_STATE_UNSPECIFIED";
531
+ /**
532
+ * The synced table has just been created and resources are being provisioned. This is also the
533
+ * catch-all state if there is not a more suitable state to report for the synced table.
534
+ */
535
+ SyncedTableState["SYNCED_TABLE_PROVISIONING"] = "SYNCED_TABLE_PROVISIONING";
536
+ /** The synced table is provisioning resources for the data synchronization pipeline. */
537
+ SyncedTableState["SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES"] = "SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES";
538
+ /** The synced table is executing the initial data synchronization. */
539
+ SyncedTableState["SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT"] = "SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT";
540
+ /** The synced table is ready to serve data. */
541
+ SyncedTableState["SYNCED_TABLE_ONLINE"] = "SYNCED_TABLE_ONLINE";
542
+ /**
543
+ * The synced table is ready to serve data and is continuously updating. Only shown for synced
544
+ * tables using the "Continuous" sync mode.
545
+ */
546
+ SyncedTableState["SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE"] = "SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE";
547
+ /**
548
+ * The synced table is ready to serve data and an active update is in progress. Only shown for
549
+ * synced tables using the "Triggered" sync mode.
550
+ */
551
+ SyncedTableState["SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE"] = "SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE";
552
+ /**
553
+ * The synced table is ready to serve data and there are no active updates. Only shown for synced
554
+ * tables using the "Triggered" sync mode.
555
+ */
556
+ SyncedTableState["SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE"] = "SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE";
557
+ /** The synced table has encountered an internal error and is not available for serving. */
558
+ SyncedTableState["SYNCED_TABLE_OFFLINE"] = "SYNCED_TABLE_OFFLINE";
559
+ /**
560
+ * The synced table is not available for serving because the data synchronization pipeline has
561
+ * failed. Please review the pipeline event logs to troubleshoot.
562
+ */
563
+ SyncedTableState["SYNCED_TABLE_OFFLINE_FAILED"] = "SYNCED_TABLE_OFFLINE_FAILED";
564
+ /**
565
+ * The data synchronization pipeline has encountered an error but the synced table is still
566
+ * available for serving (potentially stale) data. Please review the pipeline event logs to
567
+ * troubleshoot.
568
+ */
569
+ SyncedTableState["SYNCED_TABLE_ONLINE_PIPELINE_FAILED"] = "SYNCED_TABLE_ONLINE_PIPELINE_FAILED";
570
+ /**
571
+ * The synced table is available for serving, and is provisioning resources for a newly started
572
+ * data synchronization pipeline.
573
+ */
574
+ SyncedTableState["SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES"] = "SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES";
575
+ })(SyncedTableState || (SyncedTableState = {}));
576
+ /** The state of the branch. */
577
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
578
+ export var BranchStatus_State;
579
+ (function (BranchStatus_State) {
580
+ /** Default value, not used. */
581
+ BranchStatus_State["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
582
+ /** The branch is being created but is not yet available for querying. */
583
+ BranchStatus_State["INIT"] = "INIT";
584
+ /** The branch is being imported and is not yet available for querying. */
585
+ BranchStatus_State["IMPORTING"] = "IMPORTING";
586
+ /** The branch is being reset to a specific point in time or LSN and is not yet available for querying. */
587
+ BranchStatus_State["RESETTING"] = "RESETTING";
588
+ /** The branch is fully operational and ready for querying. */
589
+ BranchStatus_State["READY"] = "READY";
590
+ /** The branch is stored in cost-effective archival storage. Expect slow query response times. */
591
+ BranchStatus_State["ARCHIVED"] = "ARCHIVED";
592
+ /** The branch is deleted and is not available for querying, but can be undeleted. */
593
+ BranchStatus_State["DELETED"] = "DELETED";
594
+ })(BranchStatus_State || (BranchStatus_State = {}));
595
+ /** The state of the compute endpoint. */
596
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
597
+ export var EndpointStatus_State;
598
+ (function (EndpointStatus_State) {
599
+ /** Default value, not used */
600
+ EndpointStatus_State["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
601
+ EndpointStatus_State["INIT"] = "INIT";
602
+ EndpointStatus_State["ACTIVE"] = "ACTIVE";
603
+ EndpointStatus_State["IDLE"] = "IDLE";
604
+ EndpointStatus_State["DEGRADED"] = "DEGRADED";
605
+ })(EndpointStatus_State || (EndpointStatus_State = {}));
606
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
607
+ export var ProvisioningInfo_State;
608
+ (function (ProvisioningInfo_State) {
609
+ ProvisioningInfo_State["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
610
+ ProvisioningInfo_State["PROVISIONING"] = "PROVISIONING";
611
+ ProvisioningInfo_State["ACTIVE"] = "ACTIVE";
612
+ ProvisioningInfo_State["FAILED"] = "FAILED";
613
+ ProvisioningInfo_State["DELETING"] = "DELETING";
614
+ ProvisioningInfo_State["UPDATING"] = "UPDATING";
615
+ ProvisioningInfo_State["DEGRADED"] = "DEGRADED";
616
+ })(ProvisioningInfo_State || (ProvisioningInfo_State = {}));
617
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
618
+ export var RequestedClaims_PermissionSet;
619
+ (function (RequestedClaims_PermissionSet) {
620
+ RequestedClaims_PermissionSet["PERMISSION_SET_UNSPECIFIED"] = "PERMISSION_SET_UNSPECIFIED";
621
+ RequestedClaims_PermissionSet["READ_ONLY"] = "READ_ONLY";
622
+ })(RequestedClaims_PermissionSet || (RequestedClaims_PermissionSet = {}));
623
+ /** How the role is authenticated when connecting to Postgres. */
624
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
625
+ export var Role_AuthMethod;
626
+ (function (Role_AuthMethod) {
627
+ Role_AuthMethod["AUTH_METHOD_UNSPECIFIED"] = "AUTH_METHOD_UNSPECIFIED";
628
+ /** NO_LOGIN means this role cannot be used for interactive access */
629
+ Role_AuthMethod["NO_LOGIN"] = "NO_LOGIN";
630
+ /** PG_PASSWORD_SCRAM_SHA_256 is a password-based authentication */
631
+ Role_AuthMethod["PG_PASSWORD_SCRAM_SHA_256"] = "PG_PASSWORD_SCRAM_SHA_256";
632
+ /**
633
+ * LAKEBASE_OAUTH_V1 is for logging in with the managed identities like
634
+ * the <Databricks> service principal, <Databricks> Group or <Databricks> user.
635
+ */
636
+ Role_AuthMethod["LAKEBASE_OAUTH_V1"] = "LAKEBASE_OAUTH_V1";
637
+ })(Role_AuthMethod || (Role_AuthMethod = {}));
638
+ /**
639
+ * The type of the <Databricks> managed identity that this Role represents.
640
+ * Leave empty if you wish to create a regular Postgres role not associated with a <Databricks> identity.
641
+ */
642
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
643
+ export var Role_IdentityType;
644
+ (function (Role_IdentityType) {
645
+ /** Default value, not used */
646
+ Role_IdentityType["IDENTITY_TYPE_UNSPECIFIED"] = "IDENTITY_TYPE_UNSPECIFIED";
647
+ /** A user in a <Databricks> workspace. */
648
+ Role_IdentityType["USER"] = "USER";
649
+ /** A service principal in a <Databricks> workspace. */
650
+ Role_IdentityType["SERVICE_PRINCIPAL"] = "SERVICE_PRINCIPAL";
651
+ /** A group in a <Databricks> workspace. */
652
+ Role_IdentityType["GROUP"] = "GROUP";
653
+ })(Role_IdentityType || (Role_IdentityType = {}));
654
+ /** Roles that the DatabaseInstanceRole can be a member of. */
655
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
656
+ export var Role_MembershipRole;
657
+ (function (Role_MembershipRole) {
658
+ /** Indicates that the DatabaseInstanceRole is not a member of any standard, managed roles. */
659
+ Role_MembershipRole["MEMBERSHIP_ROLE_UNSPECIFIED"] = "MEMBERSHIP_ROLE_UNSPECIFIED";
660
+ /** Indicates membership in DATABRICKS_SUPERUSER, the highest set of privileges exposed to customers. */
661
+ Role_MembershipRole["DATABRICKS_SUPERUSER"] = "DATABRICKS_SUPERUSER";
662
+ })(Role_MembershipRole || (Role_MembershipRole = {}));
663
+ /** Scheduling policy of the synced table's underlying pipeline. */
664
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
665
+ export var SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy;
666
+ (function (SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy) {
667
+ SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy["SYNCED_TABLE_SCHEDULING_POLICY_UNSPECIFIED"] = "SYNCED_TABLE_SCHEDULING_POLICY_UNSPECIFIED";
668
+ /**
669
+ * Pipeline runs continuously after generating the initial data.
670
+ * Requires the source table to have Change Data Feed (CDF) enabled.
671
+ */
672
+ SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy["CONTINUOUS"] = "CONTINUOUS";
673
+ /**
674
+ * Pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
675
+ * Requires the source table to have Change Data Feed (CDF) enabled.
676
+ */
677
+ SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy["TRIGGERED"] = "TRIGGERED";
678
+ /**
679
+ * Pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
680
+ * Successive updates always perform a full copy of the source table data (no incremental updates).
681
+ * Does not require the source table to have Change Data Feed (CDF) enabled.
682
+ */
683
+ SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy["SNAPSHOT"] = "SNAPSHOT";
684
+ })(SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy || (SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy = {}));
685
+ export const unmarshalBranchSchema = z
686
+ .object({
687
+ name: z.string().optional(),
688
+ uid: z.string().optional(),
689
+ parent: z.string().optional(),
690
+ create_time: z
691
+ .string()
692
+ .transform(s => Temporal.Instant.from(s))
693
+ .optional(),
694
+ update_time: z
695
+ .string()
696
+ .transform(s => Temporal.Instant.from(s))
697
+ .optional(),
698
+ spec: z.lazy(() => unmarshalBranchSpecSchema).optional(),
699
+ status: z.lazy(() => unmarshalBranchStatusSchema).optional(),
700
+ })
701
+ .transform(d => ({
702
+ name: d.name,
703
+ uid: d.uid,
704
+ parent: d.parent,
705
+ createTime: d.create_time,
706
+ updateTime: d.update_time,
707
+ spec: d.spec,
708
+ status: d.status,
709
+ }));
710
+ export const unmarshalBranchOperationMetadataSchema = z.object({});
711
+ export const unmarshalBranchSpecSchema = z
712
+ .object({
713
+ source_branch: z.string().optional(),
714
+ source_branch_lsn: z.string().optional(),
715
+ source_branch_time: z
716
+ .string()
717
+ .transform(s => Temporal.Instant.from(s))
718
+ .optional(),
719
+ is_protected: z.boolean().optional(),
720
+ expire_time: z
721
+ .string()
722
+ .transform(s => Temporal.Instant.from(s))
723
+ .optional(),
724
+ ttl: z
725
+ .string()
726
+ .transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
727
+ .optional(),
728
+ no_expiry: z.boolean().optional(),
729
+ })
730
+ .transform(d => ({
731
+ sourceBranch: d.source_branch,
732
+ sourceBranchLsn: d.source_branch_lsn,
733
+ sourceBranchTime: d.source_branch_time,
734
+ isProtected: d.is_protected,
735
+ expiration: d.expire_time !== undefined
736
+ ? { $case: 'expireTime', expireTime: d.expire_time }
737
+ : d.ttl !== undefined
738
+ ? { $case: 'ttl', ttl: d.ttl }
739
+ : d.no_expiry !== undefined
740
+ ? { $case: 'noExpiry', noExpiry: d.no_expiry }
741
+ : undefined,
742
+ }));
743
+ export const unmarshalBranchStatusSchema = z
744
+ .object({
745
+ source_branch: z.string().optional(),
746
+ source_branch_lsn: z.string().optional(),
747
+ source_branch_time: z
748
+ .string()
749
+ .transform(s => Temporal.Instant.from(s))
750
+ .optional(),
751
+ default: z.boolean().optional(),
752
+ is_protected: z.boolean().optional(),
753
+ current_state: z.enum(BranchStatus_State).optional(),
754
+ pending_state: z.enum(BranchStatus_State).optional(),
755
+ state_change_time: z
756
+ .string()
757
+ .transform(s => Temporal.Instant.from(s))
758
+ .optional(),
759
+ logical_size_bytes: z
760
+ .union([z.number(), z.bigint()])
761
+ .transform(v => BigInt(v))
762
+ .optional(),
763
+ expire_time: z
764
+ .string()
765
+ .transform(s => Temporal.Instant.from(s))
766
+ .optional(),
767
+ branch_id: z.string().optional(),
768
+ delete_time: z
769
+ .string()
770
+ .transform(s => Temporal.Instant.from(s))
771
+ .optional(),
772
+ purge_time: z
773
+ .string()
774
+ .transform(s => Temporal.Instant.from(s))
775
+ .optional(),
776
+ })
777
+ .transform(d => ({
778
+ sourceBranch: d.source_branch,
779
+ sourceBranchLsn: d.source_branch_lsn,
780
+ sourceBranchTime: d.source_branch_time,
781
+ default: d.default,
782
+ isProtected: d.is_protected,
783
+ currentState: d.current_state,
784
+ pendingState: d.pending_state,
785
+ stateChangeTime: d.state_change_time,
786
+ logicalSizeBytes: d.logical_size_bytes,
787
+ expireTime: d.expire_time,
788
+ branchId: d.branch_id,
789
+ deleteTime: d.delete_time,
790
+ purgeTime: d.purge_time,
791
+ }));
792
+ export const unmarshalCatalogSchema = z
793
+ .object({
794
+ name: z.string().optional(),
795
+ uid: z.string().optional(),
796
+ spec: z.lazy(() => unmarshalCatalog_CatalogSpecSchema).optional(),
797
+ status: z.lazy(() => unmarshalCatalog_CatalogStatusSchema).optional(),
798
+ create_time: z
799
+ .string()
800
+ .transform(s => Temporal.Instant.from(s))
801
+ .optional(),
802
+ update_time: z
803
+ .string()
804
+ .transform(s => Temporal.Instant.from(s))
805
+ .optional(),
806
+ })
807
+ .transform(d => ({
808
+ name: d.name,
809
+ uid: d.uid,
810
+ spec: d.spec,
811
+ status: d.status,
812
+ createTime: d.create_time,
813
+ updateTime: d.update_time,
814
+ }));
815
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
816
+ export const unmarshalCatalog_CatalogSpecSchema = z
817
+ .object({
818
+ postgres_database: z.string().optional(),
819
+ create_database_if_missing: z.boolean().optional(),
820
+ branch: z.string().optional(),
821
+ })
822
+ .transform(d => ({
823
+ postgresDatabase: d.postgres_database,
824
+ createDatabaseIfMissing: d.create_database_if_missing,
825
+ branch: d.branch,
826
+ }));
827
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
828
+ export const unmarshalCatalog_CatalogStatusSchema = z
829
+ .object({
830
+ postgres_database: z.string().optional(),
831
+ project: z.string().optional(),
832
+ branch: z.string().optional(),
833
+ })
834
+ .transform(d => ({
835
+ postgresDatabase: d.postgres_database,
836
+ project: d.project,
837
+ branch: d.branch,
838
+ }));
839
+ export const unmarshalCatalogOperationMetadataSchema = z.object({});
840
+ export const unmarshalDatabaseSchema = z
841
+ .object({
842
+ name: z.string().optional(),
843
+ parent: z.string().optional(),
844
+ create_time: z
845
+ .string()
846
+ .transform(s => Temporal.Instant.from(s))
847
+ .optional(),
848
+ update_time: z
849
+ .string()
850
+ .transform(s => Temporal.Instant.from(s))
851
+ .optional(),
852
+ spec: z.lazy(() => unmarshalDatabase_DatabaseSpecSchema).optional(),
853
+ status: z.lazy(() => unmarshalDatabase_DatabaseStatusSchema).optional(),
854
+ })
855
+ .transform(d => ({
856
+ name: d.name,
857
+ parent: d.parent,
858
+ createTime: d.create_time,
859
+ updateTime: d.update_time,
860
+ spec: d.spec,
861
+ status: d.status,
862
+ }));
863
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
864
+ export const unmarshalDatabase_DatabaseSpecSchema = z
865
+ .object({
866
+ role: z.string().optional(),
867
+ postgres_database: z.string().optional(),
868
+ })
869
+ .transform(d => ({
870
+ role: d.role,
871
+ postgresDatabase: d.postgres_database,
872
+ }));
873
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
874
+ export const unmarshalDatabase_DatabaseStatusSchema = z
875
+ .object({
876
+ role: z.string().optional(),
877
+ postgres_database: z.string().optional(),
878
+ database_id: z.string().optional(),
879
+ })
880
+ .transform(d => ({
881
+ role: d.role,
882
+ postgresDatabase: d.postgres_database,
883
+ databaseId: d.database_id,
884
+ }));
885
+ export const unmarshalDatabaseCredentialSchema = z
886
+ .object({
887
+ token: z.string().optional(),
888
+ expire_time: z
889
+ .string()
890
+ .transform(s => Temporal.Instant.from(s))
891
+ .optional(),
892
+ })
893
+ .transform(d => ({
894
+ token: d.token,
895
+ expireTime: d.expire_time,
896
+ }));
897
+ export const unmarshalDatabaseOperationMetadataSchema = z.object({});
898
+ export const unmarshalDatabricksServiceExceptionWithDetailsProtoSchema = z
899
+ .object({
900
+ error_code: z.enum(ErrorCode).optional(),
901
+ message: z.string().optional(),
902
+ stack_trace: z.string().optional(),
903
+ details: z.array(z.record(z.string(), z.unknown())).optional(),
904
+ })
905
+ .transform(d => ({
906
+ errorCode: d.error_code,
907
+ message: d.message,
908
+ stackTrace: d.stack_trace,
909
+ details: d.details,
910
+ }));
911
+ export const unmarshalDeltaTableSyncInfoSchema = z
912
+ .object({
913
+ delta_commit_version: z
914
+ .union([z.number(), z.bigint()])
915
+ .transform(v => BigInt(v))
916
+ .optional(),
917
+ delta_commit_time: z
918
+ .string()
919
+ .transform(s => Temporal.Instant.from(s))
920
+ .optional(),
921
+ })
922
+ .transform(d => ({
923
+ deltaCommitVersion: d.delta_commit_version,
924
+ deltaCommitTime: d.delta_commit_time,
925
+ }));
926
+ export const unmarshalEndpointSchema = z
927
+ .object({
928
+ name: z.string().optional(),
929
+ uid: z.string().optional(),
930
+ parent: z.string().optional(),
931
+ create_time: z
932
+ .string()
933
+ .transform(s => Temporal.Instant.from(s))
934
+ .optional(),
935
+ update_time: z
936
+ .string()
937
+ .transform(s => Temporal.Instant.from(s))
938
+ .optional(),
939
+ spec: z.lazy(() => unmarshalEndpointSpecSchema).optional(),
940
+ status: z.lazy(() => unmarshalEndpointStatusSchema).optional(),
941
+ })
942
+ .transform(d => ({
943
+ name: d.name,
944
+ uid: d.uid,
945
+ parent: d.parent,
946
+ createTime: d.create_time,
947
+ updateTime: d.update_time,
948
+ spec: d.spec,
949
+ status: d.status,
950
+ }));
951
+ export const unmarshalEndpointGroupSpecSchema = z
952
+ .object({
953
+ min: z.number().optional(),
954
+ max: z.number().optional(),
955
+ enable_readable_secondaries: z.boolean().optional(),
956
+ })
957
+ .transform(d => ({
958
+ min: d.min,
959
+ max: d.max,
960
+ enableReadableSecondaries: d.enable_readable_secondaries,
961
+ }));
962
+ export const unmarshalEndpointGroupStatusSchema = z
963
+ .object({
964
+ min: z.number().optional(),
965
+ max: z.number().optional(),
966
+ enable_readable_secondaries: z.boolean().optional(),
967
+ })
968
+ .transform(d => ({
969
+ min: d.min,
970
+ max: d.max,
971
+ enableReadableSecondaries: d.enable_readable_secondaries,
972
+ }));
973
+ export const unmarshalEndpointHostsSchema = z
974
+ .object({
975
+ host: z.string().optional(),
976
+ read_only_host: z.string().optional(),
977
+ })
978
+ .transform(d => ({
979
+ host: d.host,
980
+ readOnlyHost: d.read_only_host,
981
+ }));
982
+ export const unmarshalEndpointOperationMetadataSchema = z.object({});
983
+ export const unmarshalEndpointSettingsSchema = z
984
+ .object({
985
+ pg_settings: z.record(z.string(), z.string()).optional(),
986
+ })
987
+ .transform(d => ({
988
+ pgSettings: d.pg_settings,
989
+ }));
990
+ export const unmarshalEndpointSpecSchema = z
991
+ .object({
992
+ endpoint_type: z.enum(EndpointType).optional(),
993
+ autoscaling_limit_min_cu: z.number().optional(),
994
+ autoscaling_limit_max_cu: z.number().optional(),
995
+ disabled: z.boolean().optional(),
996
+ suspend_timeout_duration: z
997
+ .string()
998
+ .transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
999
+ .optional(),
1000
+ no_suspension: z.boolean().optional(),
1001
+ settings: z.lazy(() => unmarshalEndpointSettingsSchema).optional(),
1002
+ group: z.lazy(() => unmarshalEndpointGroupSpecSchema).optional(),
1003
+ })
1004
+ .transform(d => ({
1005
+ endpointType: d.endpoint_type,
1006
+ autoscalingLimitMinCu: d.autoscaling_limit_min_cu,
1007
+ autoscalingLimitMaxCu: d.autoscaling_limit_max_cu,
1008
+ disabled: d.disabled,
1009
+ suspension: d.suspend_timeout_duration !== undefined
1010
+ ? {
1011
+ $case: 'suspendTimeoutDuration',
1012
+ suspendTimeoutDuration: d.suspend_timeout_duration,
1013
+ }
1014
+ : d.no_suspension !== undefined
1015
+ ? { $case: 'noSuspension', noSuspension: d.no_suspension }
1016
+ : undefined,
1017
+ settings: d.settings,
1018
+ group: d.group,
1019
+ }));
1020
+ export const unmarshalEndpointStatusSchema = z
1021
+ .object({
1022
+ endpoint_type: z.enum(EndpointType).optional(),
1023
+ hosts: z.lazy(() => unmarshalEndpointHostsSchema).optional(),
1024
+ autoscaling_limit_min_cu: z.number().optional(),
1025
+ autoscaling_limit_max_cu: z.number().optional(),
1026
+ current_state: z.enum(EndpointStatus_State).optional(),
1027
+ pending_state: z.enum(EndpointStatus_State).optional(),
1028
+ disabled: z.boolean().optional(),
1029
+ suspend_timeout_duration: z
1030
+ .string()
1031
+ .transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
1032
+ .optional(),
1033
+ settings: z.lazy(() => unmarshalEndpointSettingsSchema).optional(),
1034
+ group: z.lazy(() => unmarshalEndpointGroupStatusSchema).optional(),
1035
+ endpoint_id: z.string().optional(),
1036
+ })
1037
+ .transform(d => ({
1038
+ endpointType: d.endpoint_type,
1039
+ hosts: d.hosts,
1040
+ autoscalingLimitMinCu: d.autoscaling_limit_min_cu,
1041
+ autoscalingLimitMaxCu: d.autoscaling_limit_max_cu,
1042
+ currentState: d.current_state,
1043
+ pendingState: d.pending_state,
1044
+ disabled: d.disabled,
1045
+ suspendTimeoutDuration: d.suspend_timeout_duration,
1046
+ settings: d.settings,
1047
+ group: d.group,
1048
+ endpointId: d.endpoint_id,
1049
+ }));
1050
+ export const unmarshalInitialEndpointSpecSchema = z
1051
+ .object({
1052
+ group: z.lazy(() => unmarshalEndpointGroupSpecSchema).optional(),
1053
+ })
1054
+ .transform(d => ({
1055
+ group: d.group,
1056
+ }));
1057
+ export const unmarshalListBranchesResponseSchema = z
1058
+ .object({
1059
+ branches: z.array(z.lazy(() => unmarshalBranchSchema)).optional(),
1060
+ next_page_token: z.string().optional(),
1061
+ })
1062
+ .transform(d => ({
1063
+ branches: d.branches,
1064
+ nextPageToken: d.next_page_token,
1065
+ }));
1066
+ export const unmarshalListDatabasesResponseSchema = z
1067
+ .object({
1068
+ databases: z.array(z.lazy(() => unmarshalDatabaseSchema)).optional(),
1069
+ next_page_token: z.string().optional(),
1070
+ })
1071
+ .transform(d => ({
1072
+ databases: d.databases,
1073
+ nextPageToken: d.next_page_token,
1074
+ }));
1075
+ export const unmarshalListEndpointsResponseSchema = z
1076
+ .object({
1077
+ endpoints: z.array(z.lazy(() => unmarshalEndpointSchema)).optional(),
1078
+ next_page_token: z.string().optional(),
1079
+ })
1080
+ .transform(d => ({
1081
+ endpoints: d.endpoints,
1082
+ nextPageToken: d.next_page_token,
1083
+ }));
1084
+ export const unmarshalListProjectsResponseSchema = z
1085
+ .object({
1086
+ projects: z.array(z.lazy(() => unmarshalProjectSchema)).optional(),
1087
+ next_page_token: z.string().optional(),
1088
+ })
1089
+ .transform(d => ({
1090
+ projects: d.projects,
1091
+ nextPageToken: d.next_page_token,
1092
+ }));
1093
+ export const unmarshalListRolesResponseSchema = z
1094
+ .object({
1095
+ roles: z.array(z.lazy(() => unmarshalRoleSchema)).optional(),
1096
+ next_page_token: z.string().optional(),
1097
+ })
1098
+ .transform(d => ({
1099
+ roles: d.roles,
1100
+ nextPageToken: d.next_page_token,
1101
+ }));
1102
+ export const unmarshalNewPipelineSpecSchema = z
1103
+ .object({
1104
+ storage_catalog: z.string().optional(),
1105
+ storage_schema: z.string().optional(),
1106
+ budget_policy_id: z.string().optional(),
1107
+ })
1108
+ .transform(d => ({
1109
+ storageCatalog: d.storage_catalog,
1110
+ storageSchema: d.storage_schema,
1111
+ budgetPolicyId: d.budget_policy_id,
1112
+ }));
1113
+ export const unmarshalOperationSchema = z
1114
+ .object({
1115
+ name: z.string().optional(),
1116
+ metadata: z.record(z.string(), z.unknown()).optional(),
1117
+ done: z.boolean().optional(),
1118
+ error: z
1119
+ .lazy(() => unmarshalDatabricksServiceExceptionWithDetailsProtoSchema)
1120
+ .optional(),
1121
+ response: z.record(z.string(), z.unknown()).optional(),
1122
+ })
1123
+ .transform(d => ({
1124
+ name: d.name,
1125
+ metadata: d.metadata,
1126
+ done: d.done,
1127
+ result: d.error !== undefined
1128
+ ? { $case: 'error', error: d.error }
1129
+ : d.response !== undefined
1130
+ ? { $case: 'response', response: d.response }
1131
+ : undefined,
1132
+ }));
1133
+ export const unmarshalProjectSchema = z
1134
+ .object({
1135
+ name: z.string().optional(),
1136
+ uid: z.string().optional(),
1137
+ create_time: z
1138
+ .string()
1139
+ .transform(s => Temporal.Instant.from(s))
1140
+ .optional(),
1141
+ update_time: z
1142
+ .string()
1143
+ .transform(s => Temporal.Instant.from(s))
1144
+ .optional(),
1145
+ spec: z.lazy(() => unmarshalProjectSpecSchema).optional(),
1146
+ status: z.lazy(() => unmarshalProjectStatusSchema).optional(),
1147
+ initial_endpoint_spec: z
1148
+ .lazy(() => unmarshalInitialEndpointSpecSchema)
1149
+ .optional(),
1150
+ delete_time: z
1151
+ .string()
1152
+ .transform(s => Temporal.Instant.from(s))
1153
+ .optional(),
1154
+ purge_time: z
1155
+ .string()
1156
+ .transform(s => Temporal.Instant.from(s))
1157
+ .optional(),
1158
+ })
1159
+ .transform(d => ({
1160
+ name: d.name,
1161
+ uid: d.uid,
1162
+ createTime: d.create_time,
1163
+ updateTime: d.update_time,
1164
+ spec: d.spec,
1165
+ status: d.status,
1166
+ initialEndpointSpec: d.initial_endpoint_spec,
1167
+ deleteTime: d.delete_time,
1168
+ purgeTime: d.purge_time,
1169
+ }));
1170
+ export const unmarshalProjectCustomTagSchema = z
1171
+ .object({
1172
+ key: z.string().optional(),
1173
+ value: z.string().optional(),
1174
+ })
1175
+ .transform(d => ({
1176
+ key: d.key,
1177
+ value: d.value,
1178
+ }));
1179
+ export const unmarshalProjectDefaultEndpointSettingsSchema = z
1180
+ .object({
1181
+ autoscaling_limit_min_cu: z.number().optional(),
1182
+ autoscaling_limit_max_cu: z.number().optional(),
1183
+ suspend_timeout_duration: z
1184
+ .string()
1185
+ .transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
1186
+ .optional(),
1187
+ no_suspension: z.boolean().optional(),
1188
+ pg_settings: z.record(z.string(), z.string()).optional(),
1189
+ })
1190
+ .transform(d => ({
1191
+ autoscalingLimitMinCu: d.autoscaling_limit_min_cu,
1192
+ autoscalingLimitMaxCu: d.autoscaling_limit_max_cu,
1193
+ suspension: d.suspend_timeout_duration !== undefined
1194
+ ? {
1195
+ $case: 'suspendTimeoutDuration',
1196
+ suspendTimeoutDuration: d.suspend_timeout_duration,
1197
+ }
1198
+ : d.no_suspension !== undefined
1199
+ ? { $case: 'noSuspension', noSuspension: d.no_suspension }
1200
+ : undefined,
1201
+ pgSettings: d.pg_settings,
1202
+ }));
1203
+ export const unmarshalProjectOperationMetadataSchema = z.object({});
1204
+ export const unmarshalProjectSpecSchema = z
1205
+ .object({
1206
+ display_name: z.string().optional(),
1207
+ pg_version: z.number().optional(),
1208
+ history_retention_duration: z
1209
+ .string()
1210
+ .transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
1211
+ .optional(),
1212
+ default_endpoint_settings: z
1213
+ .lazy(() => unmarshalProjectDefaultEndpointSettingsSchema)
1214
+ .optional(),
1215
+ budget_policy_id: z.string().optional(),
1216
+ custom_tags: z
1217
+ .array(z.lazy(() => unmarshalProjectCustomTagSchema))
1218
+ .optional(),
1219
+ enable_pg_native_login: z.boolean().optional(),
1220
+ default_branch: z.string().optional(),
1221
+ })
1222
+ .transform(d => ({
1223
+ displayName: d.display_name,
1224
+ pgVersion: d.pg_version,
1225
+ historyRetentionDuration: d.history_retention_duration,
1226
+ defaultEndpointSettings: d.default_endpoint_settings,
1227
+ budgetPolicyId: d.budget_policy_id,
1228
+ customTags: d.custom_tags,
1229
+ enablePgNativeLogin: d.enable_pg_native_login,
1230
+ defaultBranch: d.default_branch,
1231
+ }));
1232
+ export const unmarshalProjectStatusSchema = z
1233
+ .object({
1234
+ display_name: z.string().optional(),
1235
+ pg_version: z.number().optional(),
1236
+ history_retention_duration: z
1237
+ .string()
1238
+ .transform(s => Temporal.Duration.from('PT' + s.toUpperCase()))
1239
+ .optional(),
1240
+ default_endpoint_settings: z
1241
+ .lazy(() => unmarshalProjectDefaultEndpointSettingsSchema)
1242
+ .optional(),
1243
+ branch_logical_size_limit_bytes: z
1244
+ .union([z.number(), z.bigint()])
1245
+ .transform(v => BigInt(v))
1246
+ .optional(),
1247
+ synthetic_storage_size_bytes: z
1248
+ .union([z.number(), z.bigint()])
1249
+ .transform(v => BigInt(v))
1250
+ .optional(),
1251
+ budget_policy_id: z.string().optional(),
1252
+ custom_tags: z
1253
+ .array(z.lazy(() => unmarshalProjectCustomTagSchema))
1254
+ .optional(),
1255
+ owner: z.string().optional(),
1256
+ enable_pg_native_login: z.boolean().optional(),
1257
+ default_branch: z.string().optional(),
1258
+ project_id: z.string().optional(),
1259
+ })
1260
+ .transform(d => ({
1261
+ displayName: d.display_name,
1262
+ pgVersion: d.pg_version,
1263
+ historyRetentionDuration: d.history_retention_duration,
1264
+ defaultEndpointSettings: d.default_endpoint_settings,
1265
+ branchLogicalSizeLimitBytes: d.branch_logical_size_limit_bytes,
1266
+ syntheticStorageSizeBytes: d.synthetic_storage_size_bytes,
1267
+ budgetPolicyId: d.budget_policy_id,
1268
+ customTags: d.custom_tags,
1269
+ owner: d.owner,
1270
+ enablePgNativeLogin: d.enable_pg_native_login,
1271
+ defaultBranch: d.default_branch,
1272
+ projectId: d.project_id,
1273
+ }));
1274
+ export const unmarshalRoleSchema = z
1275
+ .object({
1276
+ name: z.string().optional(),
1277
+ parent: z.string().optional(),
1278
+ create_time: z
1279
+ .string()
1280
+ .transform(s => Temporal.Instant.from(s))
1281
+ .optional(),
1282
+ update_time: z
1283
+ .string()
1284
+ .transform(s => Temporal.Instant.from(s))
1285
+ .optional(),
1286
+ spec: z.lazy(() => unmarshalRole_RoleSpecSchema).optional(),
1287
+ status: z.lazy(() => unmarshalRole_RoleStatusSchema).optional(),
1288
+ })
1289
+ .transform(d => ({
1290
+ name: d.name,
1291
+ parent: d.parent,
1292
+ createTime: d.create_time,
1293
+ updateTime: d.update_time,
1294
+ spec: d.spec,
1295
+ status: d.status,
1296
+ }));
1297
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1298
+ export const unmarshalRole_AttributesSchema = z
1299
+ .object({
1300
+ createdb: z.boolean().optional(),
1301
+ createrole: z.boolean().optional(),
1302
+ bypassrls: z.boolean().optional(),
1303
+ })
1304
+ .transform(d => ({
1305
+ createdb: d.createdb,
1306
+ createrole: d.createrole,
1307
+ bypassrls: d.bypassrls,
1308
+ }));
1309
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1310
+ export const unmarshalRole_RoleSpecSchema = z
1311
+ .object({
1312
+ membership_roles: z.array(z.enum(Role_MembershipRole)).optional(),
1313
+ identity_type: z.enum(Role_IdentityType).optional(),
1314
+ attributes: z.lazy(() => unmarshalRole_AttributesSchema).optional(),
1315
+ auth_method: z.enum(Role_AuthMethod).optional(),
1316
+ postgres_role: z.string().optional(),
1317
+ })
1318
+ .transform(d => ({
1319
+ membershipRoles: d.membership_roles,
1320
+ identityType: d.identity_type,
1321
+ attributes: d.attributes,
1322
+ authMethod: d.auth_method,
1323
+ postgresRole: d.postgres_role,
1324
+ }));
1325
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1326
+ export const unmarshalRole_RoleStatusSchema = z
1327
+ .object({
1328
+ membership_roles: z.array(z.enum(Role_MembershipRole)).optional(),
1329
+ identity_type: z.enum(Role_IdentityType).optional(),
1330
+ attributes: z.lazy(() => unmarshalRole_AttributesSchema).optional(),
1331
+ auth_method: z.enum(Role_AuthMethod).optional(),
1332
+ postgres_role: z.string().optional(),
1333
+ role_id: z.string().optional(),
1334
+ })
1335
+ .transform(d => ({
1336
+ membershipRoles: d.membership_roles,
1337
+ identityType: d.identity_type,
1338
+ attributes: d.attributes,
1339
+ authMethod: d.auth_method,
1340
+ postgresRole: d.postgres_role,
1341
+ roleId: d.role_id,
1342
+ }));
1343
+ export const unmarshalRoleOperationMetadataSchema = z.object({});
1344
+ export const unmarshalSyncedTableSchema = z
1345
+ .object({
1346
+ name: z.string().optional(),
1347
+ uid: z.string().optional(),
1348
+ spec: z.lazy(() => unmarshalSyncedTable_SyncedTableSpecSchema).optional(),
1349
+ status: z
1350
+ .lazy(() => unmarshalSyncedTable_SyncedTableStatusSchema)
1351
+ .optional(),
1352
+ create_time: z
1353
+ .string()
1354
+ .transform(s => Temporal.Instant.from(s))
1355
+ .optional(),
1356
+ })
1357
+ .transform(d => ({
1358
+ name: d.name,
1359
+ uid: d.uid,
1360
+ spec: d.spec,
1361
+ status: d.status,
1362
+ createTime: d.create_time,
1363
+ }));
1364
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1365
+ export const unmarshalSyncedTable_SyncedTableSpecSchema = z
1366
+ .object({
1367
+ postgres_database: z.string().optional(),
1368
+ branch: z.string().optional(),
1369
+ scheduling_policy: z
1370
+ .enum(SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy)
1371
+ .optional(),
1372
+ source_table_full_name: z.string().optional(),
1373
+ primary_key_columns: z.array(z.string()).optional(),
1374
+ timeseries_key: z.string().optional(),
1375
+ existing_pipeline_id: z.string().optional(),
1376
+ create_database_objects_if_missing: z.boolean().optional(),
1377
+ new_pipeline_spec: z
1378
+ .lazy(() => unmarshalNewPipelineSpecSchema)
1379
+ .optional(),
1380
+ })
1381
+ .transform(d => ({
1382
+ postgresDatabase: d.postgres_database,
1383
+ branch: d.branch,
1384
+ schedulingPolicy: d.scheduling_policy,
1385
+ sourceTableFullName: d.source_table_full_name,
1386
+ primaryKeyColumns: d.primary_key_columns,
1387
+ timeseriesKey: d.timeseries_key,
1388
+ existingPipelineId: d.existing_pipeline_id,
1389
+ createDatabaseObjectsIfMissing: d.create_database_objects_if_missing,
1390
+ newPipelineSpec: d.new_pipeline_spec,
1391
+ }));
1392
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1393
+ export const unmarshalSyncedTable_SyncedTableStatusSchema = z
1394
+ .object({
1395
+ message: z.string().optional(),
1396
+ detailed_state: z.enum(SyncedTableState).optional(),
1397
+ last_sync: z.lazy(() => unmarshalSyncedTablePositionSchema).optional(),
1398
+ ongoing_sync_progress: z
1399
+ .lazy(() => unmarshalSyncedTablePipelineProgressSchema)
1400
+ .optional(),
1401
+ provisioning_phase: z.enum(ProvisioningPhase).optional(),
1402
+ last_processed_commit_version: z
1403
+ .union([z.number(), z.bigint()])
1404
+ .transform(v => BigInt(v))
1405
+ .optional(),
1406
+ last_sync_time: z
1407
+ .string()
1408
+ .transform(s => Temporal.Instant.from(s))
1409
+ .optional(),
1410
+ pipeline_id: z.string().optional(),
1411
+ unity_catalog_provisioning_state: z
1412
+ .enum(ProvisioningInfo_State)
1413
+ .optional(),
1414
+ project: z.string().optional(),
1415
+ })
1416
+ .transform(d => ({
1417
+ message: d.message,
1418
+ detailedState: d.detailed_state,
1419
+ lastSync: d.last_sync,
1420
+ ongoingSyncProgress: d.ongoing_sync_progress,
1421
+ provisioningPhase: d.provisioning_phase,
1422
+ lastProcessedCommitVersion: d.last_processed_commit_version,
1423
+ lastSyncTime: d.last_sync_time,
1424
+ pipelineId: d.pipeline_id,
1425
+ unityCatalogProvisioningState: d.unity_catalog_provisioning_state,
1426
+ project: d.project,
1427
+ }));
1428
+ export const unmarshalSyncedTableOperationMetadataSchema = z.object({});
1429
+ export const unmarshalSyncedTablePipelineProgressSchema = z
1430
+ .object({
1431
+ latest_version_currently_processing: z
1432
+ .union([z.number(), z.bigint()])
1433
+ .transform(v => BigInt(v))
1434
+ .optional(),
1435
+ synced_row_count: z
1436
+ .union([z.number(), z.bigint()])
1437
+ .transform(v => BigInt(v))
1438
+ .optional(),
1439
+ total_row_count: z
1440
+ .union([z.number(), z.bigint()])
1441
+ .transform(v => BigInt(v))
1442
+ .optional(),
1443
+ sync_progress_completion: z.number().optional(),
1444
+ estimated_completion_time_seconds: z.number().optional(),
1445
+ })
1446
+ .transform(d => ({
1447
+ latestVersionCurrentlyProcessing: d.latest_version_currently_processing,
1448
+ syncedRowCount: d.synced_row_count,
1449
+ totalRowCount: d.total_row_count,
1450
+ syncProgressCompletion: d.sync_progress_completion,
1451
+ estimatedCompletionTimeSeconds: d.estimated_completion_time_seconds,
1452
+ }));
1453
+ export const unmarshalSyncedTablePositionSchema = z
1454
+ .object({
1455
+ sync_start_time: z
1456
+ .string()
1457
+ .transform(s => Temporal.Instant.from(s))
1458
+ .optional(),
1459
+ sync_end_time: z
1460
+ .string()
1461
+ .transform(s => Temporal.Instant.from(s))
1462
+ .optional(),
1463
+ delta_table_sync_info: z
1464
+ .lazy(() => unmarshalDeltaTableSyncInfoSchema)
1465
+ .optional(),
1466
+ })
1467
+ .transform(d => ({
1468
+ syncStartTime: d.sync_start_time,
1469
+ syncEndTime: d.sync_end_time,
1470
+ sourceSyncInfo: d.delta_table_sync_info !== undefined
1471
+ ? {
1472
+ $case: 'deltaTableSyncInfo',
1473
+ deltaTableSyncInfo: d.delta_table_sync_info,
1474
+ }
1475
+ : undefined,
1476
+ }));
1477
+ export const marshalBranchSchema = z
1478
+ .object({
1479
+ name: z.string().optional(),
1480
+ uid: z.string().optional(),
1481
+ parent: z.string().optional(),
1482
+ createTime: z
1483
+ .any()
1484
+ .transform((d) => d.toString())
1485
+ .optional(),
1486
+ updateTime: z
1487
+ .any()
1488
+ .transform((d) => d.toString())
1489
+ .optional(),
1490
+ spec: z.lazy(() => marshalBranchSpecSchema).optional(),
1491
+ status: z.lazy(() => marshalBranchStatusSchema).optional(),
1492
+ })
1493
+ .transform(d => ({
1494
+ name: d.name,
1495
+ uid: d.uid,
1496
+ parent: d.parent,
1497
+ create_time: d.createTime,
1498
+ update_time: d.updateTime,
1499
+ spec: d.spec,
1500
+ status: d.status,
1501
+ }));
1502
+ export const marshalBranchSpecSchema = z
1503
+ .object({
1504
+ sourceBranch: z.string().optional(),
1505
+ sourceBranchLsn: z.string().optional(),
1506
+ sourceBranchTime: z
1507
+ .any()
1508
+ .transform((d) => d.toString())
1509
+ .optional(),
1510
+ isProtected: z.boolean().optional(),
1511
+ expiration: z
1512
+ .discriminatedUnion('$case', [
1513
+ z.object({
1514
+ $case: z.literal('expireTime'),
1515
+ expireTime: z.any().transform((d) => d.toString()),
1516
+ }),
1517
+ z.object({
1518
+ $case: z.literal('ttl'),
1519
+ ttl: z
1520
+ .any()
1521
+ .transform((d) => d.toString().slice(2).toLowerCase()),
1522
+ }),
1523
+ z.object({ $case: z.literal('noExpiry'), noExpiry: z.boolean() }),
1524
+ ])
1525
+ .optional(),
1526
+ })
1527
+ .transform(d => ({
1528
+ source_branch: d.sourceBranch,
1529
+ source_branch_lsn: d.sourceBranchLsn,
1530
+ source_branch_time: d.sourceBranchTime,
1531
+ is_protected: d.isProtected,
1532
+ ...(d.expiration?.$case === 'expireTime' && {
1533
+ expire_time: d.expiration.expireTime,
1534
+ }),
1535
+ ...(d.expiration?.$case === 'ttl' && { ttl: d.expiration.ttl }),
1536
+ ...(d.expiration?.$case === 'noExpiry' && {
1537
+ no_expiry: d.expiration.noExpiry,
1538
+ }),
1539
+ }));
1540
+ export const marshalBranchStatusSchema = z
1541
+ .object({
1542
+ sourceBranch: z.string().optional(),
1543
+ sourceBranchLsn: z.string().optional(),
1544
+ sourceBranchTime: z
1545
+ .any()
1546
+ .transform((d) => d.toString())
1547
+ .optional(),
1548
+ default: z.boolean().optional(),
1549
+ isProtected: z.boolean().optional(),
1550
+ currentState: z.enum(BranchStatus_State).optional(),
1551
+ pendingState: z.enum(BranchStatus_State).optional(),
1552
+ stateChangeTime: z
1553
+ .any()
1554
+ .transform((d) => d.toString())
1555
+ .optional(),
1556
+ logicalSizeBytes: z.bigint().optional(),
1557
+ expireTime: z
1558
+ .any()
1559
+ .transform((d) => d.toString())
1560
+ .optional(),
1561
+ branchId: z.string().optional(),
1562
+ deleteTime: z
1563
+ .any()
1564
+ .transform((d) => d.toString())
1565
+ .optional(),
1566
+ purgeTime: z
1567
+ .any()
1568
+ .transform((d) => d.toString())
1569
+ .optional(),
1570
+ })
1571
+ .transform(d => ({
1572
+ source_branch: d.sourceBranch,
1573
+ source_branch_lsn: d.sourceBranchLsn,
1574
+ source_branch_time: d.sourceBranchTime,
1575
+ default: d.default,
1576
+ is_protected: d.isProtected,
1577
+ current_state: d.currentState,
1578
+ pending_state: d.pendingState,
1579
+ state_change_time: d.stateChangeTime,
1580
+ logical_size_bytes: d.logicalSizeBytes,
1581
+ expire_time: d.expireTime,
1582
+ branch_id: d.branchId,
1583
+ delete_time: d.deleteTime,
1584
+ purge_time: d.purgeTime,
1585
+ }));
1586
+ export const marshalCatalogSchema = z
1587
+ .object({
1588
+ name: z.string().optional(),
1589
+ uid: z.string().optional(),
1590
+ spec: z.lazy(() => marshalCatalog_CatalogSpecSchema).optional(),
1591
+ status: z.lazy(() => marshalCatalog_CatalogStatusSchema).optional(),
1592
+ createTime: z
1593
+ .any()
1594
+ .transform((d) => d.toString())
1595
+ .optional(),
1596
+ updateTime: z
1597
+ .any()
1598
+ .transform((d) => d.toString())
1599
+ .optional(),
1600
+ })
1601
+ .transform(d => ({
1602
+ name: d.name,
1603
+ uid: d.uid,
1604
+ spec: d.spec,
1605
+ status: d.status,
1606
+ create_time: d.createTime,
1607
+ update_time: d.updateTime,
1608
+ }));
1609
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1610
+ export const marshalCatalog_CatalogSpecSchema = z
1611
+ .object({
1612
+ postgresDatabase: z.string().optional(),
1613
+ createDatabaseIfMissing: z.boolean().optional(),
1614
+ branch: z.string().optional(),
1615
+ })
1616
+ .transform(d => ({
1617
+ postgres_database: d.postgresDatabase,
1618
+ create_database_if_missing: d.createDatabaseIfMissing,
1619
+ branch: d.branch,
1620
+ }));
1621
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1622
+ export const marshalCatalog_CatalogStatusSchema = z
1623
+ .object({
1624
+ postgresDatabase: z.string().optional(),
1625
+ project: z.string().optional(),
1626
+ branch: z.string().optional(),
1627
+ })
1628
+ .transform(d => ({
1629
+ postgres_database: d.postgresDatabase,
1630
+ project: d.project,
1631
+ branch: d.branch,
1632
+ }));
1633
+ export const marshalDatabaseSchema = z
1634
+ .object({
1635
+ name: z.string().optional(),
1636
+ parent: z.string().optional(),
1637
+ createTime: z
1638
+ .any()
1639
+ .transform((d) => d.toString())
1640
+ .optional(),
1641
+ updateTime: z
1642
+ .any()
1643
+ .transform((d) => d.toString())
1644
+ .optional(),
1645
+ spec: z.lazy(() => marshalDatabase_DatabaseSpecSchema).optional(),
1646
+ status: z.lazy(() => marshalDatabase_DatabaseStatusSchema).optional(),
1647
+ })
1648
+ .transform(d => ({
1649
+ name: d.name,
1650
+ parent: d.parent,
1651
+ create_time: d.createTime,
1652
+ update_time: d.updateTime,
1653
+ spec: d.spec,
1654
+ status: d.status,
1655
+ }));
1656
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1657
+ export const marshalDatabase_DatabaseSpecSchema = z
1658
+ .object({
1659
+ role: z.string().optional(),
1660
+ postgresDatabase: z.string().optional(),
1661
+ })
1662
+ .transform(d => ({
1663
+ role: d.role,
1664
+ postgres_database: d.postgresDatabase,
1665
+ }));
1666
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1667
+ export const marshalDatabase_DatabaseStatusSchema = z
1668
+ .object({
1669
+ role: z.string().optional(),
1670
+ postgresDatabase: z.string().optional(),
1671
+ databaseId: z.string().optional(),
1672
+ })
1673
+ .transform(d => ({
1674
+ role: d.role,
1675
+ postgres_database: d.postgresDatabase,
1676
+ database_id: d.databaseId,
1677
+ }));
1678
+ export const marshalDeltaTableSyncInfoSchema = z
1679
+ .object({
1680
+ deltaCommitVersion: z.bigint().optional(),
1681
+ deltaCommitTime: z
1682
+ .any()
1683
+ .transform((d) => d.toString())
1684
+ .optional(),
1685
+ })
1686
+ .transform(d => ({
1687
+ delta_commit_version: d.deltaCommitVersion,
1688
+ delta_commit_time: d.deltaCommitTime,
1689
+ }));
1690
+ export const marshalEndpointSchema = z
1691
+ .object({
1692
+ name: z.string().optional(),
1693
+ uid: z.string().optional(),
1694
+ parent: z.string().optional(),
1695
+ createTime: z
1696
+ .any()
1697
+ .transform((d) => d.toString())
1698
+ .optional(),
1699
+ updateTime: z
1700
+ .any()
1701
+ .transform((d) => d.toString())
1702
+ .optional(),
1703
+ spec: z.lazy(() => marshalEndpointSpecSchema).optional(),
1704
+ status: z.lazy(() => marshalEndpointStatusSchema).optional(),
1705
+ })
1706
+ .transform(d => ({
1707
+ name: d.name,
1708
+ uid: d.uid,
1709
+ parent: d.parent,
1710
+ create_time: d.createTime,
1711
+ update_time: d.updateTime,
1712
+ spec: d.spec,
1713
+ status: d.status,
1714
+ }));
1715
+ export const marshalEndpointGroupSpecSchema = z
1716
+ .object({
1717
+ min: z.number().optional(),
1718
+ max: z.number().optional(),
1719
+ enableReadableSecondaries: z.boolean().optional(),
1720
+ })
1721
+ .transform(d => ({
1722
+ min: d.min,
1723
+ max: d.max,
1724
+ enable_readable_secondaries: d.enableReadableSecondaries,
1725
+ }));
1726
+ export const marshalEndpointGroupStatusSchema = z
1727
+ .object({
1728
+ min: z.number().optional(),
1729
+ max: z.number().optional(),
1730
+ enableReadableSecondaries: z.boolean().optional(),
1731
+ })
1732
+ .transform(d => ({
1733
+ min: d.min,
1734
+ max: d.max,
1735
+ enable_readable_secondaries: d.enableReadableSecondaries,
1736
+ }));
1737
+ export const marshalEndpointHostsSchema = z
1738
+ .object({
1739
+ host: z.string().optional(),
1740
+ readOnlyHost: z.string().optional(),
1741
+ })
1742
+ .transform(d => ({
1743
+ host: d.host,
1744
+ read_only_host: d.readOnlyHost,
1745
+ }));
1746
+ export const marshalEndpointSettingsSchema = z
1747
+ .object({
1748
+ pgSettings: z.record(z.string(), z.string()).optional(),
1749
+ })
1750
+ .transform(d => ({
1751
+ pg_settings: d.pgSettings,
1752
+ }));
1753
+ export const marshalEndpointSpecSchema = z
1754
+ .object({
1755
+ endpointType: z.enum(EndpointType).optional(),
1756
+ autoscalingLimitMinCu: z.number().optional(),
1757
+ autoscalingLimitMaxCu: z.number().optional(),
1758
+ disabled: z.boolean().optional(),
1759
+ suspension: z
1760
+ .discriminatedUnion('$case', [
1761
+ z.object({
1762
+ $case: z.literal('suspendTimeoutDuration'),
1763
+ suspendTimeoutDuration: z
1764
+ .any()
1765
+ .transform((d) => d.toString().slice(2).toLowerCase()),
1766
+ }),
1767
+ z.object({ $case: z.literal('noSuspension'), noSuspension: z.boolean() }),
1768
+ ])
1769
+ .optional(),
1770
+ settings: z.lazy(() => marshalEndpointSettingsSchema).optional(),
1771
+ group: z.lazy(() => marshalEndpointGroupSpecSchema).optional(),
1772
+ })
1773
+ .transform(d => ({
1774
+ endpoint_type: d.endpointType,
1775
+ autoscaling_limit_min_cu: d.autoscalingLimitMinCu,
1776
+ autoscaling_limit_max_cu: d.autoscalingLimitMaxCu,
1777
+ disabled: d.disabled,
1778
+ ...(d.suspension?.$case === 'suspendTimeoutDuration' && {
1779
+ suspend_timeout_duration: d.suspension.suspendTimeoutDuration,
1780
+ }),
1781
+ ...(d.suspension?.$case === 'noSuspension' && {
1782
+ no_suspension: d.suspension.noSuspension,
1783
+ }),
1784
+ settings: d.settings,
1785
+ group: d.group,
1786
+ }));
1787
+ export const marshalEndpointStatusSchema = z
1788
+ .object({
1789
+ endpointType: z.enum(EndpointType).optional(),
1790
+ hosts: z.lazy(() => marshalEndpointHostsSchema).optional(),
1791
+ autoscalingLimitMinCu: z.number().optional(),
1792
+ autoscalingLimitMaxCu: z.number().optional(),
1793
+ currentState: z.enum(EndpointStatus_State).optional(),
1794
+ pendingState: z.enum(EndpointStatus_State).optional(),
1795
+ disabled: z.boolean().optional(),
1796
+ suspendTimeoutDuration: z
1797
+ .any()
1798
+ .transform((d) => d.toString().slice(2).toLowerCase())
1799
+ .optional(),
1800
+ settings: z.lazy(() => marshalEndpointSettingsSchema).optional(),
1801
+ group: z.lazy(() => marshalEndpointGroupStatusSchema).optional(),
1802
+ endpointId: z.string().optional(),
1803
+ })
1804
+ .transform(d => ({
1805
+ endpoint_type: d.endpointType,
1806
+ hosts: d.hosts,
1807
+ autoscaling_limit_min_cu: d.autoscalingLimitMinCu,
1808
+ autoscaling_limit_max_cu: d.autoscalingLimitMaxCu,
1809
+ current_state: d.currentState,
1810
+ pending_state: d.pendingState,
1811
+ disabled: d.disabled,
1812
+ suspend_timeout_duration: d.suspendTimeoutDuration,
1813
+ settings: d.settings,
1814
+ group: d.group,
1815
+ endpoint_id: d.endpointId,
1816
+ }));
1817
+ export const marshalGenerateDatabaseCredentialRequestSchema = z
1818
+ .object({
1819
+ claims: z.array(z.lazy(() => marshalRequestedClaimsSchema)).optional(),
1820
+ endpoint: z.string().optional(),
1821
+ })
1822
+ .transform(d => ({
1823
+ claims: d.claims,
1824
+ endpoint: d.endpoint,
1825
+ }));
1826
+ export const marshalInitialEndpointSpecSchema = z
1827
+ .object({
1828
+ group: z.lazy(() => marshalEndpointGroupSpecSchema).optional(),
1829
+ })
1830
+ .transform(d => ({
1831
+ group: d.group,
1832
+ }));
1833
+ export const marshalNewPipelineSpecSchema = z
1834
+ .object({
1835
+ storageCatalog: z.string().optional(),
1836
+ storageSchema: z.string().optional(),
1837
+ budgetPolicyId: z.string().optional(),
1838
+ })
1839
+ .transform(d => ({
1840
+ storage_catalog: d.storageCatalog,
1841
+ storage_schema: d.storageSchema,
1842
+ budget_policy_id: d.budgetPolicyId,
1843
+ }));
1844
+ export const marshalProjectSchema = z
1845
+ .object({
1846
+ name: z.string().optional(),
1847
+ uid: z.string().optional(),
1848
+ createTime: z
1849
+ .any()
1850
+ .transform((d) => d.toString())
1851
+ .optional(),
1852
+ updateTime: z
1853
+ .any()
1854
+ .transform((d) => d.toString())
1855
+ .optional(),
1856
+ spec: z.lazy(() => marshalProjectSpecSchema).optional(),
1857
+ status: z.lazy(() => marshalProjectStatusSchema).optional(),
1858
+ initialEndpointSpec: z
1859
+ .lazy(() => marshalInitialEndpointSpecSchema)
1860
+ .optional(),
1861
+ deleteTime: z
1862
+ .any()
1863
+ .transform((d) => d.toString())
1864
+ .optional(),
1865
+ purgeTime: z
1866
+ .any()
1867
+ .transform((d) => d.toString())
1868
+ .optional(),
1869
+ })
1870
+ .transform(d => ({
1871
+ name: d.name,
1872
+ uid: d.uid,
1873
+ create_time: d.createTime,
1874
+ update_time: d.updateTime,
1875
+ spec: d.spec,
1876
+ status: d.status,
1877
+ initial_endpoint_spec: d.initialEndpointSpec,
1878
+ delete_time: d.deleteTime,
1879
+ purge_time: d.purgeTime,
1880
+ }));
1881
+ export const marshalProjectCustomTagSchema = z
1882
+ .object({
1883
+ key: z.string().optional(),
1884
+ value: z.string().optional(),
1885
+ })
1886
+ .transform(d => ({
1887
+ key: d.key,
1888
+ value: d.value,
1889
+ }));
1890
+ export const marshalProjectDefaultEndpointSettingsSchema = z
1891
+ .object({
1892
+ autoscalingLimitMinCu: z.number().optional(),
1893
+ autoscalingLimitMaxCu: z.number().optional(),
1894
+ suspension: z
1895
+ .discriminatedUnion('$case', [
1896
+ z.object({
1897
+ $case: z.literal('suspendTimeoutDuration'),
1898
+ suspendTimeoutDuration: z
1899
+ .any()
1900
+ .transform((d) => d.toString().slice(2).toLowerCase()),
1901
+ }),
1902
+ z.object({ $case: z.literal('noSuspension'), noSuspension: z.boolean() }),
1903
+ ])
1904
+ .optional(),
1905
+ pgSettings: z.record(z.string(), z.string()).optional(),
1906
+ })
1907
+ .transform(d => ({
1908
+ autoscaling_limit_min_cu: d.autoscalingLimitMinCu,
1909
+ autoscaling_limit_max_cu: d.autoscalingLimitMaxCu,
1910
+ ...(d.suspension?.$case === 'suspendTimeoutDuration' && {
1911
+ suspend_timeout_duration: d.suspension.suspendTimeoutDuration,
1912
+ }),
1913
+ ...(d.suspension?.$case === 'noSuspension' && {
1914
+ no_suspension: d.suspension.noSuspension,
1915
+ }),
1916
+ pg_settings: d.pgSettings,
1917
+ }));
1918
+ export const marshalProjectSpecSchema = z
1919
+ .object({
1920
+ displayName: z.string().optional(),
1921
+ pgVersion: z.number().optional(),
1922
+ historyRetentionDuration: z
1923
+ .any()
1924
+ .transform((d) => d.toString().slice(2).toLowerCase())
1925
+ .optional(),
1926
+ defaultEndpointSettings: z
1927
+ .lazy(() => marshalProjectDefaultEndpointSettingsSchema)
1928
+ .optional(),
1929
+ budgetPolicyId: z.string().optional(),
1930
+ customTags: z.array(z.lazy(() => marshalProjectCustomTagSchema)).optional(),
1931
+ enablePgNativeLogin: z.boolean().optional(),
1932
+ defaultBranch: z.string().optional(),
1933
+ })
1934
+ .transform(d => ({
1935
+ display_name: d.displayName,
1936
+ pg_version: d.pgVersion,
1937
+ history_retention_duration: d.historyRetentionDuration,
1938
+ default_endpoint_settings: d.defaultEndpointSettings,
1939
+ budget_policy_id: d.budgetPolicyId,
1940
+ custom_tags: d.customTags,
1941
+ enable_pg_native_login: d.enablePgNativeLogin,
1942
+ default_branch: d.defaultBranch,
1943
+ }));
1944
+ export const marshalProjectStatusSchema = z
1945
+ .object({
1946
+ displayName: z.string().optional(),
1947
+ pgVersion: z.number().optional(),
1948
+ historyRetentionDuration: z
1949
+ .any()
1950
+ .transform((d) => d.toString().slice(2).toLowerCase())
1951
+ .optional(),
1952
+ defaultEndpointSettings: z
1953
+ .lazy(() => marshalProjectDefaultEndpointSettingsSchema)
1954
+ .optional(),
1955
+ branchLogicalSizeLimitBytes: z.bigint().optional(),
1956
+ syntheticStorageSizeBytes: z.bigint().optional(),
1957
+ budgetPolicyId: z.string().optional(),
1958
+ customTags: z.array(z.lazy(() => marshalProjectCustomTagSchema)).optional(),
1959
+ owner: z.string().optional(),
1960
+ enablePgNativeLogin: z.boolean().optional(),
1961
+ defaultBranch: z.string().optional(),
1962
+ projectId: z.string().optional(),
1963
+ })
1964
+ .transform(d => ({
1965
+ display_name: d.displayName,
1966
+ pg_version: d.pgVersion,
1967
+ history_retention_duration: d.historyRetentionDuration,
1968
+ default_endpoint_settings: d.defaultEndpointSettings,
1969
+ branch_logical_size_limit_bytes: d.branchLogicalSizeLimitBytes,
1970
+ synthetic_storage_size_bytes: d.syntheticStorageSizeBytes,
1971
+ budget_policy_id: d.budgetPolicyId,
1972
+ custom_tags: d.customTags,
1973
+ owner: d.owner,
1974
+ enable_pg_native_login: d.enablePgNativeLogin,
1975
+ default_branch: d.defaultBranch,
1976
+ project_id: d.projectId,
1977
+ }));
1978
+ export const marshalRequestedClaimsSchema = z
1979
+ .object({
1980
+ permissionSet: z.enum(RequestedClaims_PermissionSet).optional(),
1981
+ resources: z.array(z.lazy(() => marshalRequestedResourceSchema)).optional(),
1982
+ })
1983
+ .transform(d => ({
1984
+ permission_set: d.permissionSet,
1985
+ resources: d.resources,
1986
+ }));
1987
+ export const marshalRequestedResourceSchema = z
1988
+ .object({
1989
+ resourceName: z
1990
+ .discriminatedUnion('$case', [
1991
+ z.object({ $case: z.literal('tableName'), tableName: z.string() }),
1992
+ ])
1993
+ .optional(),
1994
+ })
1995
+ .transform(d => ({
1996
+ ...(d.resourceName?.$case === 'tableName' && {
1997
+ table_name: d.resourceName.tableName,
1998
+ }),
1999
+ }));
2000
+ export const marshalRoleSchema = z
2001
+ .object({
2002
+ name: z.string().optional(),
2003
+ parent: z.string().optional(),
2004
+ createTime: z
2005
+ .any()
2006
+ .transform((d) => d.toString())
2007
+ .optional(),
2008
+ updateTime: z
2009
+ .any()
2010
+ .transform((d) => d.toString())
2011
+ .optional(),
2012
+ spec: z.lazy(() => marshalRole_RoleSpecSchema).optional(),
2013
+ status: z.lazy(() => marshalRole_RoleStatusSchema).optional(),
2014
+ })
2015
+ .transform(d => ({
2016
+ name: d.name,
2017
+ parent: d.parent,
2018
+ create_time: d.createTime,
2019
+ update_time: d.updateTime,
2020
+ spec: d.spec,
2021
+ status: d.status,
2022
+ }));
2023
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2024
+ export const marshalRole_AttributesSchema = z
2025
+ .object({
2026
+ createdb: z.boolean().optional(),
2027
+ createrole: z.boolean().optional(),
2028
+ bypassrls: z.boolean().optional(),
2029
+ })
2030
+ .transform(d => ({
2031
+ createdb: d.createdb,
2032
+ createrole: d.createrole,
2033
+ bypassrls: d.bypassrls,
2034
+ }));
2035
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2036
+ export const marshalRole_RoleSpecSchema = z
2037
+ .object({
2038
+ membershipRoles: z.array(z.enum(Role_MembershipRole)).optional(),
2039
+ identityType: z.enum(Role_IdentityType).optional(),
2040
+ attributes: z.lazy(() => marshalRole_AttributesSchema).optional(),
2041
+ authMethod: z.enum(Role_AuthMethod).optional(),
2042
+ postgresRole: z.string().optional(),
2043
+ })
2044
+ .transform(d => ({
2045
+ membership_roles: d.membershipRoles,
2046
+ identity_type: d.identityType,
2047
+ attributes: d.attributes,
2048
+ auth_method: d.authMethod,
2049
+ postgres_role: d.postgresRole,
2050
+ }));
2051
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2052
+ export const marshalRole_RoleStatusSchema = z
2053
+ .object({
2054
+ membershipRoles: z.array(z.enum(Role_MembershipRole)).optional(),
2055
+ identityType: z.enum(Role_IdentityType).optional(),
2056
+ attributes: z.lazy(() => marshalRole_AttributesSchema).optional(),
2057
+ authMethod: z.enum(Role_AuthMethod).optional(),
2058
+ postgresRole: z.string().optional(),
2059
+ roleId: z.string().optional(),
2060
+ })
2061
+ .transform(d => ({
2062
+ membership_roles: d.membershipRoles,
2063
+ identity_type: d.identityType,
2064
+ attributes: d.attributes,
2065
+ auth_method: d.authMethod,
2066
+ postgres_role: d.postgresRole,
2067
+ role_id: d.roleId,
2068
+ }));
2069
+ export const marshalSyncedTableSchema = z
2070
+ .object({
2071
+ name: z.string().optional(),
2072
+ uid: z.string().optional(),
2073
+ spec: z.lazy(() => marshalSyncedTable_SyncedTableSpecSchema).optional(),
2074
+ status: z.lazy(() => marshalSyncedTable_SyncedTableStatusSchema).optional(),
2075
+ createTime: z
2076
+ .any()
2077
+ .transform((d) => d.toString())
2078
+ .optional(),
2079
+ })
2080
+ .transform(d => ({
2081
+ name: d.name,
2082
+ uid: d.uid,
2083
+ spec: d.spec,
2084
+ status: d.status,
2085
+ create_time: d.createTime,
2086
+ }));
2087
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2088
+ export const marshalSyncedTable_SyncedTableSpecSchema = z
2089
+ .object({
2090
+ postgresDatabase: z.string().optional(),
2091
+ branch: z.string().optional(),
2092
+ schedulingPolicy: z
2093
+ .enum(SyncedTable_SyncedTableSpec_SyncedTableSchedulingPolicy)
2094
+ .optional(),
2095
+ sourceTableFullName: z.string().optional(),
2096
+ primaryKeyColumns: z.array(z.string()).optional(),
2097
+ timeseriesKey: z.string().optional(),
2098
+ existingPipelineId: z.string().optional(),
2099
+ createDatabaseObjectsIfMissing: z.boolean().optional(),
2100
+ newPipelineSpec: z.lazy(() => marshalNewPipelineSpecSchema).optional(),
2101
+ })
2102
+ .transform(d => ({
2103
+ postgres_database: d.postgresDatabase,
2104
+ branch: d.branch,
2105
+ scheduling_policy: d.schedulingPolicy,
2106
+ source_table_full_name: d.sourceTableFullName,
2107
+ primary_key_columns: d.primaryKeyColumns,
2108
+ timeseries_key: d.timeseriesKey,
2109
+ existing_pipeline_id: d.existingPipelineId,
2110
+ create_database_objects_if_missing: d.createDatabaseObjectsIfMissing,
2111
+ new_pipeline_spec: d.newPipelineSpec,
2112
+ }));
2113
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2114
+ export const marshalSyncedTable_SyncedTableStatusSchema = z
2115
+ .object({
2116
+ message: z.string().optional(),
2117
+ detailedState: z.enum(SyncedTableState).optional(),
2118
+ lastSync: z.lazy(() => marshalSyncedTablePositionSchema).optional(),
2119
+ ongoingSyncProgress: z
2120
+ .lazy(() => marshalSyncedTablePipelineProgressSchema)
2121
+ .optional(),
2122
+ provisioningPhase: z.enum(ProvisioningPhase).optional(),
2123
+ lastProcessedCommitVersion: z.bigint().optional(),
2124
+ lastSyncTime: z
2125
+ .any()
2126
+ .transform((d) => d.toString())
2127
+ .optional(),
2128
+ pipelineId: z.string().optional(),
2129
+ unityCatalogProvisioningState: z.enum(ProvisioningInfo_State).optional(),
2130
+ project: z.string().optional(),
2131
+ })
2132
+ .transform(d => ({
2133
+ message: d.message,
2134
+ detailed_state: d.detailedState,
2135
+ last_sync: d.lastSync,
2136
+ ongoing_sync_progress: d.ongoingSyncProgress,
2137
+ provisioning_phase: d.provisioningPhase,
2138
+ last_processed_commit_version: d.lastProcessedCommitVersion,
2139
+ last_sync_time: d.lastSyncTime,
2140
+ pipeline_id: d.pipelineId,
2141
+ unity_catalog_provisioning_state: d.unityCatalogProvisioningState,
2142
+ project: d.project,
2143
+ }));
2144
+ export const marshalSyncedTablePipelineProgressSchema = z
2145
+ .object({
2146
+ latestVersionCurrentlyProcessing: z.bigint().optional(),
2147
+ syncedRowCount: z.bigint().optional(),
2148
+ totalRowCount: z.bigint().optional(),
2149
+ syncProgressCompletion: z.number().optional(),
2150
+ estimatedCompletionTimeSeconds: z.number().optional(),
2151
+ })
2152
+ .transform(d => ({
2153
+ latest_version_currently_processing: d.latestVersionCurrentlyProcessing,
2154
+ synced_row_count: d.syncedRowCount,
2155
+ total_row_count: d.totalRowCount,
2156
+ sync_progress_completion: d.syncProgressCompletion,
2157
+ estimated_completion_time_seconds: d.estimatedCompletionTimeSeconds,
2158
+ }));
2159
+ export const marshalSyncedTablePositionSchema = z
2160
+ .object({
2161
+ syncStartTime: z
2162
+ .any()
2163
+ .transform((d) => d.toString())
2164
+ .optional(),
2165
+ syncEndTime: z
2166
+ .any()
2167
+ .transform((d) => d.toString())
2168
+ .optional(),
2169
+ sourceSyncInfo: z
2170
+ .discriminatedUnion('$case', [
2171
+ z.object({
2172
+ $case: z.literal('deltaTableSyncInfo'),
2173
+ deltaTableSyncInfo: z.lazy(() => marshalDeltaTableSyncInfoSchema),
2174
+ }),
2175
+ ])
2176
+ .optional(),
2177
+ })
2178
+ .transform(d => ({
2179
+ sync_start_time: d.syncStartTime,
2180
+ sync_end_time: d.syncEndTime,
2181
+ ...(d.sourceSyncInfo?.$case === 'deltaTableSyncInfo' && {
2182
+ delta_table_sync_info: d.sourceSyncInfo.deltaTableSyncInfo,
2183
+ }),
2184
+ }));
2185
+ export const marshalUndeleteBranchRequestSchema = z
2186
+ .object({
2187
+ name: z.string().optional(),
2188
+ })
2189
+ .transform(d => ({
2190
+ name: d.name,
2191
+ }));
2192
+ export const marshalUndeleteProjectRequestSchema = z
2193
+ .object({
2194
+ name: z.string().optional(),
2195
+ })
2196
+ .transform(d => ({
2197
+ name: d.name,
2198
+ }));
2199
+ const branchFieldMaskSchema = {
2200
+ createTime: { wire: 'create_time' },
2201
+ name: { wire: 'name' },
2202
+ parent: { wire: 'parent' },
2203
+ spec: { wire: 'spec', children: () => branchSpecFieldMaskSchema },
2204
+ status: { wire: 'status', children: () => branchStatusFieldMaskSchema },
2205
+ uid: { wire: 'uid' },
2206
+ updateTime: { wire: 'update_time' },
2207
+ };
2208
+ export function branchFieldMask(...paths) {
2209
+ return FieldMask.build(paths, branchFieldMaskSchema);
2210
+ }
2211
+ const branchSpecFieldMaskSchema = {
2212
+ expireTime: { wire: 'expire_time' },
2213
+ isProtected: { wire: 'is_protected' },
2214
+ noExpiry: { wire: 'no_expiry' },
2215
+ sourceBranch: { wire: 'source_branch' },
2216
+ sourceBranchLsn: { wire: 'source_branch_lsn' },
2217
+ sourceBranchTime: { wire: 'source_branch_time' },
2218
+ ttl: { wire: 'ttl' },
2219
+ };
2220
+ const branchStatusFieldMaskSchema = {
2221
+ branchId: { wire: 'branch_id' },
2222
+ currentState: { wire: 'current_state' },
2223
+ default: { wire: 'default' },
2224
+ deleteTime: { wire: 'delete_time' },
2225
+ expireTime: { wire: 'expire_time' },
2226
+ isProtected: { wire: 'is_protected' },
2227
+ logicalSizeBytes: { wire: 'logical_size_bytes' },
2228
+ pendingState: { wire: 'pending_state' },
2229
+ purgeTime: { wire: 'purge_time' },
2230
+ sourceBranch: { wire: 'source_branch' },
2231
+ sourceBranchLsn: { wire: 'source_branch_lsn' },
2232
+ sourceBranchTime: { wire: 'source_branch_time' },
2233
+ stateChangeTime: { wire: 'state_change_time' },
2234
+ };
2235
+ const databaseFieldMaskSchema = {
2236
+ createTime: { wire: 'create_time' },
2237
+ name: { wire: 'name' },
2238
+ parent: { wire: 'parent' },
2239
+ spec: { wire: 'spec', children: () => database_DatabaseSpecFieldMaskSchema },
2240
+ status: {
2241
+ wire: 'status',
2242
+ children: () => database_DatabaseStatusFieldMaskSchema,
2243
+ },
2244
+ updateTime: { wire: 'update_time' },
2245
+ };
2246
+ export function databaseFieldMask(...paths) {
2247
+ return FieldMask.build(paths, databaseFieldMaskSchema);
2248
+ }
2249
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2250
+ const database_DatabaseSpecFieldMaskSchema = {
2251
+ postgresDatabase: { wire: 'postgres_database' },
2252
+ role: { wire: 'role' },
2253
+ };
2254
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2255
+ const database_DatabaseStatusFieldMaskSchema = {
2256
+ databaseId: { wire: 'database_id' },
2257
+ postgresDatabase: { wire: 'postgres_database' },
2258
+ role: { wire: 'role' },
2259
+ };
2260
+ const endpointFieldMaskSchema = {
2261
+ createTime: { wire: 'create_time' },
2262
+ name: { wire: 'name' },
2263
+ parent: { wire: 'parent' },
2264
+ spec: { wire: 'spec', children: () => endpointSpecFieldMaskSchema },
2265
+ status: { wire: 'status', children: () => endpointStatusFieldMaskSchema },
2266
+ uid: { wire: 'uid' },
2267
+ updateTime: { wire: 'update_time' },
2268
+ };
2269
+ export function endpointFieldMask(...paths) {
2270
+ return FieldMask.build(paths, endpointFieldMaskSchema);
2271
+ }
2272
+ const endpointGroupSpecFieldMaskSchema = {
2273
+ enableReadableSecondaries: { wire: 'enable_readable_secondaries' },
2274
+ max: { wire: 'max' },
2275
+ min: { wire: 'min' },
2276
+ };
2277
+ const endpointGroupStatusFieldMaskSchema = {
2278
+ enableReadableSecondaries: { wire: 'enable_readable_secondaries' },
2279
+ max: { wire: 'max' },
2280
+ min: { wire: 'min' },
2281
+ };
2282
+ const endpointHostsFieldMaskSchema = {
2283
+ host: { wire: 'host' },
2284
+ readOnlyHost: { wire: 'read_only_host' },
2285
+ };
2286
+ const endpointSettingsFieldMaskSchema = {
2287
+ pgSettings: { wire: 'pg_settings' },
2288
+ };
2289
+ const endpointSpecFieldMaskSchema = {
2290
+ autoscalingLimitMaxCu: { wire: 'autoscaling_limit_max_cu' },
2291
+ autoscalingLimitMinCu: { wire: 'autoscaling_limit_min_cu' },
2292
+ disabled: { wire: 'disabled' },
2293
+ endpointType: { wire: 'endpoint_type' },
2294
+ group: { wire: 'group', children: () => endpointGroupSpecFieldMaskSchema },
2295
+ noSuspension: { wire: 'no_suspension' },
2296
+ settings: { wire: 'settings', children: () => endpointSettingsFieldMaskSchema },
2297
+ suspendTimeoutDuration: { wire: 'suspend_timeout_duration' },
2298
+ };
2299
+ const endpointStatusFieldMaskSchema = {
2300
+ autoscalingLimitMaxCu: { wire: 'autoscaling_limit_max_cu' },
2301
+ autoscalingLimitMinCu: { wire: 'autoscaling_limit_min_cu' },
2302
+ currentState: { wire: 'current_state' },
2303
+ disabled: { wire: 'disabled' },
2304
+ endpointId: { wire: 'endpoint_id' },
2305
+ endpointType: { wire: 'endpoint_type' },
2306
+ group: { wire: 'group', children: () => endpointGroupStatusFieldMaskSchema },
2307
+ hosts: { wire: 'hosts', children: () => endpointHostsFieldMaskSchema },
2308
+ pendingState: { wire: 'pending_state' },
2309
+ settings: { wire: 'settings', children: () => endpointSettingsFieldMaskSchema },
2310
+ suspendTimeoutDuration: { wire: 'suspend_timeout_duration' },
2311
+ };
2312
+ const initialEndpointSpecFieldMaskSchema = {
2313
+ group: { wire: 'group', children: () => endpointGroupSpecFieldMaskSchema },
2314
+ };
2315
+ const projectFieldMaskSchema = {
2316
+ createTime: { wire: 'create_time' },
2317
+ deleteTime: { wire: 'delete_time' },
2318
+ initialEndpointSpec: {
2319
+ wire: 'initial_endpoint_spec',
2320
+ children: () => initialEndpointSpecFieldMaskSchema,
2321
+ },
2322
+ name: { wire: 'name' },
2323
+ purgeTime: { wire: 'purge_time' },
2324
+ spec: { wire: 'spec', children: () => projectSpecFieldMaskSchema },
2325
+ status: { wire: 'status', children: () => projectStatusFieldMaskSchema },
2326
+ uid: { wire: 'uid' },
2327
+ updateTime: { wire: 'update_time' },
2328
+ };
2329
+ export function projectFieldMask(...paths) {
2330
+ return FieldMask.build(paths, projectFieldMaskSchema);
2331
+ }
2332
+ const projectDefaultEndpointSettingsFieldMaskSchema = {
2333
+ autoscalingLimitMaxCu: { wire: 'autoscaling_limit_max_cu' },
2334
+ autoscalingLimitMinCu: { wire: 'autoscaling_limit_min_cu' },
2335
+ noSuspension: { wire: 'no_suspension' },
2336
+ pgSettings: { wire: 'pg_settings' },
2337
+ suspendTimeoutDuration: { wire: 'suspend_timeout_duration' },
2338
+ };
2339
+ const projectSpecFieldMaskSchema = {
2340
+ budgetPolicyId: { wire: 'budget_policy_id' },
2341
+ customTags: { wire: 'custom_tags' },
2342
+ defaultBranch: { wire: 'default_branch' },
2343
+ defaultEndpointSettings: {
2344
+ wire: 'default_endpoint_settings',
2345
+ children: () => projectDefaultEndpointSettingsFieldMaskSchema,
2346
+ },
2347
+ displayName: { wire: 'display_name' },
2348
+ enablePgNativeLogin: { wire: 'enable_pg_native_login' },
2349
+ historyRetentionDuration: { wire: 'history_retention_duration' },
2350
+ pgVersion: { wire: 'pg_version' },
2351
+ };
2352
+ const projectStatusFieldMaskSchema = {
2353
+ branchLogicalSizeLimitBytes: { wire: 'branch_logical_size_limit_bytes' },
2354
+ budgetPolicyId: { wire: 'budget_policy_id' },
2355
+ customTags: { wire: 'custom_tags' },
2356
+ defaultBranch: { wire: 'default_branch' },
2357
+ defaultEndpointSettings: {
2358
+ wire: 'default_endpoint_settings',
2359
+ children: () => projectDefaultEndpointSettingsFieldMaskSchema,
2360
+ },
2361
+ displayName: { wire: 'display_name' },
2362
+ enablePgNativeLogin: { wire: 'enable_pg_native_login' },
2363
+ historyRetentionDuration: { wire: 'history_retention_duration' },
2364
+ owner: { wire: 'owner' },
2365
+ pgVersion: { wire: 'pg_version' },
2366
+ projectId: { wire: 'project_id' },
2367
+ syntheticStorageSizeBytes: { wire: 'synthetic_storage_size_bytes' },
2368
+ };
2369
+ const roleFieldMaskSchema = {
2370
+ createTime: { wire: 'create_time' },
2371
+ name: { wire: 'name' },
2372
+ parent: { wire: 'parent' },
2373
+ spec: { wire: 'spec', children: () => role_RoleSpecFieldMaskSchema },
2374
+ status: { wire: 'status', children: () => role_RoleStatusFieldMaskSchema },
2375
+ updateTime: { wire: 'update_time' },
2376
+ };
2377
+ export function roleFieldMask(...paths) {
2378
+ return FieldMask.build(paths, roleFieldMaskSchema);
2379
+ }
2380
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2381
+ const role_AttributesFieldMaskSchema = {
2382
+ bypassrls: { wire: 'bypassrls' },
2383
+ createdb: { wire: 'createdb' },
2384
+ createrole: { wire: 'createrole' },
2385
+ };
2386
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2387
+ const role_RoleSpecFieldMaskSchema = {
2388
+ attributes: {
2389
+ wire: 'attributes',
2390
+ children: () => role_AttributesFieldMaskSchema,
2391
+ },
2392
+ authMethod: { wire: 'auth_method' },
2393
+ identityType: { wire: 'identity_type' },
2394
+ membershipRoles: { wire: 'membership_roles' },
2395
+ postgresRole: { wire: 'postgres_role' },
2396
+ };
2397
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2398
+ const role_RoleStatusFieldMaskSchema = {
2399
+ attributes: {
2400
+ wire: 'attributes',
2401
+ children: () => role_AttributesFieldMaskSchema,
2402
+ },
2403
+ authMethod: { wire: 'auth_method' },
2404
+ identityType: { wire: 'identity_type' },
2405
+ membershipRoles: { wire: 'membership_roles' },
2406
+ postgresRole: { wire: 'postgres_role' },
2407
+ roleId: { wire: 'role_id' },
2408
+ };
2409
+ //# sourceMappingURL=model.js.map